isdata-customer-sdk 0.1.71 → 0.1.73

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
@@ -29588,7 +29588,7 @@ __webpack_require__.d(__webpack_exports__, {
29588
29588
  getLoginPageNotices: function() { return /* reexport */ getLoginPageNotices; },
29589
29589
  getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
29590
29590
  getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
29591
- getMenuDatasByRoleIDs: function() { return /* reexport */ getMenuDatasByRoleIDs; },
29591
+ getMenuMappingDatasByRoleIDs: function() { return /* reexport */ getMenuMappingDatasByRoleIDs; },
29592
29592
  getObjectUseTimes: function() { return /* reexport */ getObjectUseTimes; },
29593
29593
  getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
29594
29594
  getPageIDByComponentID: function() { return /* reexport */ getPageIDByComponentID; },
@@ -29884,16 +29884,20 @@ const getMenuDatasByGroupID = async (group_id, role_ids) => {
29884
29884
  }
29885
29885
  };
29886
29886
  let result = await request.post(`/dataservice/rest/orchestration/getMenuDatasByGroupID`, queryData_groupData);
29887
+ //所有的快捷访问菜单信息
29887
29888
  let portalMenuDatas = result.data.resultDatas;
29888
29889
  let menuTypes = result.data.menuTypes;
29889
29890
  if (role_ids && role_ids.length > 0) {
29890
- let result = await getMenuDatasByRoleIDs(role_ids, group_id);
29891
+ //获取当前角色下对应的角色快捷访问菜单的映射信息和快捷访问菜单的信息
29892
+ let result = await getMenuMappingDatasByRoleIDs(role_ids, group_id);
29893
+ //角色-快捷访问菜单映射信息
29891
29894
  let quickMenuMappingDatas = result.data.quickMenuMappingDatas || [];
29892
29895
  let filterObjectMap = {};
29893
29896
  for (const data of quickMenuMappingDatas) {
29894
29897
  let id = data.menu_mapping_id;
29895
29898
  filterObjectMap[id] = data;
29896
29899
  }
29900
+ //快捷菜单映射信息
29897
29901
  let menuMappingDatas = result.data.menuMappingDatas || [];
29898
29902
  for (const data of menuMappingDatas) {
29899
29903
  let id = data.id;
@@ -29906,11 +29910,11 @@ const getMenuDatasByGroupID = async (group_id, role_ids) => {
29906
29910
  };
29907
29911
 
29908
29912
  /**
29909
- * 查询对应角色的门户快捷菜单信息
29913
+ * 查询对应角色的门户快捷菜单映射信息
29910
29914
  * @param id GroupID
29911
29915
  *
29912
29916
  */
29913
- const getMenuDatasByRoleIDs = async (role_ids, group_id) => {
29917
+ const getMenuMappingDatasByRoleIDs = async (role_ids, group_id) => {
29914
29918
  let queryData_groupData = {
29915
29919
  "param": {
29916
29920
  "role_ids": role_ids,
@@ -29962,13 +29966,15 @@ const getRoleIDsByUserAndGroupID = async (user_id, app_id, group_id) => {
29962
29966
 
29963
29967
  /**
29964
29968
  * 转换门户菜单数据
29965
- * @param {*} datas
29966
- * @param {*} menuTypes
29967
- * @param {*} filterObjectMap
29969
+ * @param {*} datas 所有的快捷菜单访问信息
29970
+ * @param {*} menuTypes 快捷访问菜单类型
29971
+ * @param {*} filterObjectMap 角色快捷菜单访问映射信息
29968
29972
  * @returns
29969
29973
  */
29970
29974
  const transformPortalData = (datas, menuTypes, filterObjectMap) => {
29971
- // console.log(datas);
29975
+ console.log(datas);
29976
+ console.log(menuTypes);
29977
+ console.log(filterObjectMap);
29972
29978
  let menuMaps = {};
29973
29979
  let menuTypeMaps = {};
29974
29980
  for (const data of datas) {
@@ -31344,10 +31350,10 @@ const getDifyFileType = fileType => {
31344
31350
  return typeOptions[key] || "custom";
31345
31351
  };
31346
31352
 
31347
- /**
31348
- * 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
31349
- * @param {string} url - 文件 URL
31350
- * @returns {string} - 提取的文件名
31353
+ /**
31354
+ * 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
31355
+ * @param {string} url - 文件 URL
31356
+ * @returns {string} - 提取的文件名
31351
31357
  */
31352
31358
  const dify_extractFilenameFromUrl = url => {
31353
31359
  try {