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.umd.js CHANGED
@@ -5006,7 +5006,7 @@ const queryAssetById = (id, count = 200) => request.post(`/asset/getAssetData?as
5006
5006
  * @param {*} isPortalAction
5007
5007
  * @returns
5008
5008
  */
5009
- const getPoratlAppID = isPortalAction => {
5009
+ const getPoratlAppID = (isPortalAction, appVariables) => {
5010
5010
  let portal_app_id = "";
5011
5011
  if (isPortalAction) {
5012
5012
  portal_app_id = window.appSdk.getAppId();
@@ -5014,7 +5014,7 @@ const getPoratlAppID = isPortalAction => {
5014
5014
  portal_app_id = window.sessionStorage.getItem("iportal_app_id");
5015
5015
  // 如果缓存中没有iportal_app_id,则从appVariables中获取
5016
5016
  if (!portal_app_id) {
5017
- undefined.vueProps.appVariables.forEach(item => {
5017
+ appVariables.forEach(item => {
5018
5018
  if (item.name == "iPortal_app_id") {
5019
5019
  portal_app_id = item.default_value;
5020
5020
  }
@@ -5031,8 +5031,8 @@ const getPoratlAppID = isPortalAction => {
5031
5031
  * @param {*} isPortalAction
5032
5032
  * @returns
5033
5033
  */
5034
- const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction) => {
5035
- let portal_app_id = getPoratlAppID(isPortalAction);
5034
+ const getAppPortalMenuDatas = async (user_id, group_id, isPortalAction, appVariables) => {
5035
+ let portal_app_id = getPoratlAppID(isPortalAction, appVariables);
5036
5036
  let roleList = await getRoleIDsByUserAndGroupID(user_id, portal_app_id, group_id);
5037
5037
  let portalMenuDatas = await getMenuDatasByGroupID(group_id, roleList);
5038
5038
  let app_id = window.appSdk.getAppId();
@@ -5128,12 +5128,13 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5128
5128
  let id = data.id;
5129
5129
  let tempMenuData = {
5130
5130
  id: id,
5131
+ index: data.menu_id,
5131
5132
  name: data.title,
5132
5133
  sort: data.sort,
5133
5134
  actionType: data.actionType,
5134
5135
  url: data.url,
5135
5136
  iconClass: data.image,
5136
- types: [],
5137
+ children: [],
5137
5138
  app_id: data.app_id,
5138
5139
  menu_id: data.menu_id,
5139
5140
  beyond_type: data.menu_type ? data.menu_type : "RJVIEW-OTHERS",
@@ -5163,7 +5164,7 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5163
5164
  let tempType = tempMenuData.beyond_type;
5164
5165
  // let tempType_sort =tempMenuData.beyond_type_sort;
5165
5166
  let tempParentMenu = menuMaps[parent_id];
5166
- let parentTypes = tempParentMenu.types;
5167
+ let parentTypes = tempParentMenu.children;
5167
5168
  let parentType = parentTypes.find(tempTypeItem => {
5168
5169
  return tempTypeItem.id == tempType;
5169
5170
  });
@@ -5174,11 +5175,13 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5174
5175
  let menuTypeObj = menuTypeMaps[tempType];
5175
5176
  let parentType = menuTypeObj ? {
5176
5177
  id: tempType,
5178
+ index: tempType,
5177
5179
  name: menuTypeObj.title,
5178
5180
  children: [],
5179
5181
  sort: menuTypeObj.value
5180
5182
  } : {
5181
5183
  id: tempType,
5184
+ index: tempType,
5182
5185
  name: "其他",
5183
5186
  children: [],
5184
5187
  sort: 999
@@ -5197,7 +5200,7 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5197
5200
  let tempMenuData = menuMaps[data.id];
5198
5201
  //如果没有对应的菜单数据,则跳过
5199
5202
  if (!tempMenuData) continue;
5200
- let menuTypes = tempMenuData.types;
5203
+ let menuTypes = tempMenuData.children;
5201
5204
  let count = 0;
5202
5205
  for (const menuType of menuTypes) {
5203
5206
  let type_childens = menuType.children;
@@ -5211,7 +5214,7 @@ const transformPortalData = (datas, menuTypes, filterObjectMap) => {
5211
5214
  continue;
5212
5215
  }
5213
5216
  menuList.push(tempMenuData);
5214
- let types = tempMenuData.types;
5217
+ let types = tempMenuData.children;
5215
5218
  types.sort((data1, data2) => {
5216
5219
  if (Number.isNaN(data1.sort)) return 1;
5217
5220
  if (Number.isNaN(data2.sort)) return -1;