isdata-customer-sdk 0.1.16 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -4996,7 +4996,7 @@ const queryAssetById = (id, count = 200) => request.post(`/asset/getAssetData?as
4996
4996
  * @param {*} isPortalAction
4997
4997
  * @returns
4998
4998
  */
4999
- const getPoratlAppID = isPortalAction => {
4999
+ const getPoratlAppID = (isPortalAction, appVariables) => {
5000
5000
  let portal_app_id = "";
5001
5001
  if (isPortalAction) {
5002
5002
  portal_app_id = window.appSdk.getAppId();
@@ -5004,7 +5004,7 @@ const getPoratlAppID = isPortalAction => {
5004
5004
  portal_app_id = window.sessionStorage.getItem("iportal_app_id");
5005
5005
  // 如果缓存中没有iportal_app_id,则从appVariables中获取
5006
5006
  if (!portal_app_id) {
5007
- undefined.vueProps.appVariables.forEach(item => {
5007
+ appVariables.forEach(item => {
5008
5008
  if (item.name == "iPortal_app_id") {
5009
5009
  portal_app_id = item.default_value;
5010
5010
  }
@@ -5021,8 +5021,8 @@ const getPoratlAppID = isPortalAction => {
5021
5021
  * @param {*} isPortalAction
5022
5022
  * @returns
5023
5023
  */
5024
- const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction) => {
5025
- let portal_app_id = getPoratlAppID(isPortalAction);
5024
+ const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction, appVariables) => {
5025
+ let portal_app_id = getPoratlAppID(isPortalAction, appVariables);
5026
5026
  let roleList = await getRoleIDsByUserAndGroupID(user_id, portal_app_id, group_id);
5027
5027
  let portalMenuDatas = await getMenuDatasByGroupID(group_id, roleList);
5028
5028
  let app_id = window.appSdk.getAppId();
@@ -5118,12 +5118,13 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5118
5118
  let id = data.id;
5119
5119
  let tempMenuData = {
5120
5120
  id: id,
5121
+ index: data.menu_id,
5121
5122
  name: data.title,
5122
5123
  sort: data.sort,
5123
5124
  actionType: data.actionType,
5124
5125
  url: data.url,
5125
5126
  iconClass: data.image,
5126
- types: [],
5127
+ children: [],
5127
5128
  app_id: data.app_id,
5128
5129
  menu_id: data.menu_id,
5129
5130
  beyond_type: data.menu_type ? data.menu_type : "RJVIEW-OTHERS",
@@ -5153,7 +5154,7 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5153
5154
  let tempType = tempMenuData.beyond_type;
5154
5155
  // let tempType_sort =tempMenuData.beyond_type_sort;
5155
5156
  let tempParentMenu = menuMaps[parent_id];
5156
- let parentTypes = tempParentMenu.types;
5157
+ let parentTypes = tempParentMenu.children;
5157
5158
  let parentType = parentTypes.find(tempTypeItem => {
5158
5159
  return tempTypeItem.id == tempType;
5159
5160
  });
@@ -5164,11 +5165,13 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5164
5165
  let menuTypeObj = menuTypeMaps[tempType];
5165
5166
  let parentType = menuTypeObj ? {
5166
5167
  id: tempType,
5168
+ index: tempType,
5167
5169
  name: menuTypeObj.title,
5168
5170
  children: [],
5169
5171
  sort: menuTypeObj.value
5170
5172
  } : {
5171
5173
  id: tempType,
5174
+ index: tempType,
5172
5175
  name: "其他",
5173
5176
  children: [],
5174
5177
  sort: 999
@@ -5187,7 +5190,7 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5187
5190
  let tempMenuData = menuMaps[data.id];
5188
5191
  //如果没有对应的菜单数据,则跳过
5189
5192
  if (!tempMenuData) continue;
5190
- let menuTypes = tempMenuData.types;
5193
+ let menuTypes = tempMenuData.children;
5191
5194
  let count = 0;
5192
5195
  for (const menuType of menuTypes) {
5193
5196
  let type_childens = menuType.children;
@@ -5201,7 +5204,7 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5201
5204
  continue;
5202
5205
  }
5203
5206
  menuList.push(tempMenuData);
5204
- let types = tempMenuData.types;
5207
+ let types = tempMenuData.children;
5205
5208
  types.sort((data1, data2) => {
5206
5209
  if (Number.isNaN(data1.sort)) return 1;
5207
5210
  if (Number.isNaN(data2.sort)) return -1;