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.common.js +18 -12
- package/dist/index.common.js.map +1 -1
- package/dist/index.umd.js +18 -12
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/index.common.js
CHANGED
|
@@ -29578,7 +29578,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
29578
29578
|
getLoginPageNotices: function() { return /* reexport */ getLoginPageNotices; },
|
|
29579
29579
|
getMappingAppInfoByID: function() { return /* reexport */ getMappingAppInfoByID; },
|
|
29580
29580
|
getMenuDatasByGroupID: function() { return /* reexport */ getMenuDatasByGroupID; },
|
|
29581
|
-
|
|
29581
|
+
getMenuMappingDatasByRoleIDs: function() { return /* reexport */ getMenuMappingDatasByRoleIDs; },
|
|
29582
29582
|
getObjectUseTimes: function() { return /* reexport */ getObjectUseTimes; },
|
|
29583
29583
|
getOfficeInfosByIDs: function() { return /* reexport */ getOfficeInfosByIDs; },
|
|
29584
29584
|
getPageIDByComponentID: function() { return /* reexport */ getPageIDByComponentID; },
|
|
@@ -29874,16 +29874,20 @@ const getMenuDatasByGroupID = async (group_id, role_ids) => {
|
|
|
29874
29874
|
}
|
|
29875
29875
|
};
|
|
29876
29876
|
let result = await request.post(`/dataservice/rest/orchestration/getMenuDatasByGroupID`, queryData_groupData);
|
|
29877
|
+
//所有的快捷访问菜单信息
|
|
29877
29878
|
let portalMenuDatas = result.data.resultDatas;
|
|
29878
29879
|
let menuTypes = result.data.menuTypes;
|
|
29879
29880
|
if (role_ids && role_ids.length > 0) {
|
|
29880
|
-
|
|
29881
|
+
//获取当前角色下对应的角色快捷访问菜单的映射信息和快捷访问菜单的信息
|
|
29882
|
+
let result = await getMenuMappingDatasByRoleIDs(role_ids, group_id);
|
|
29883
|
+
//角色-快捷访问菜单映射信息
|
|
29881
29884
|
let quickMenuMappingDatas = result.data.quickMenuMappingDatas || [];
|
|
29882
29885
|
let filterObjectMap = {};
|
|
29883
29886
|
for (const data of quickMenuMappingDatas) {
|
|
29884
29887
|
let id = data.menu_mapping_id;
|
|
29885
29888
|
filterObjectMap[id] = data;
|
|
29886
29889
|
}
|
|
29890
|
+
//快捷菜单映射信息
|
|
29887
29891
|
let menuMappingDatas = result.data.menuMappingDatas || [];
|
|
29888
29892
|
for (const data of menuMappingDatas) {
|
|
29889
29893
|
let id = data.id;
|
|
@@ -29896,11 +29900,11 @@ const getMenuDatasByGroupID = async (group_id, role_ids) => {
|
|
|
29896
29900
|
};
|
|
29897
29901
|
|
|
29898
29902
|
/**
|
|
29899
|
-
*
|
|
29903
|
+
* 查询对应角色的门户快捷菜单映射信息
|
|
29900
29904
|
* @param id GroupID
|
|
29901
29905
|
*
|
|
29902
29906
|
*/
|
|
29903
|
-
const
|
|
29907
|
+
const getMenuMappingDatasByRoleIDs = async (role_ids, group_id) => {
|
|
29904
29908
|
let queryData_groupData = {
|
|
29905
29909
|
"param": {
|
|
29906
29910
|
"role_ids": role_ids,
|
|
@@ -29952,13 +29956,15 @@ const getRoleIDsByUserAndGroupID = async (user_id, app_id, group_id) => {
|
|
|
29952
29956
|
|
|
29953
29957
|
/**
|
|
29954
29958
|
* 转换门户菜单数据
|
|
29955
|
-
* @param {*} datas
|
|
29956
|
-
* @param {*} menuTypes
|
|
29957
|
-
* @param {*} filterObjectMap
|
|
29959
|
+
* @param {*} datas 所有的快捷菜单访问信息
|
|
29960
|
+
* @param {*} menuTypes 快捷访问菜单类型
|
|
29961
|
+
* @param {*} filterObjectMap 角色快捷菜单访问映射信息
|
|
29958
29962
|
* @returns
|
|
29959
29963
|
*/
|
|
29960
29964
|
const transformPortalData = (datas, menuTypes, filterObjectMap) => {
|
|
29961
|
-
|
|
29965
|
+
console.log(datas);
|
|
29966
|
+
console.log(menuTypes);
|
|
29967
|
+
console.log(filterObjectMap);
|
|
29962
29968
|
let menuMaps = {};
|
|
29963
29969
|
let menuTypeMaps = {};
|
|
29964
29970
|
for (const data of datas) {
|
|
@@ -31334,10 +31340,10 @@ const getDifyFileType = fileType => {
|
|
|
31334
31340
|
return typeOptions[key] || "custom";
|
|
31335
31341
|
};
|
|
31336
31342
|
|
|
31337
|
-
/**
|
|
31338
|
-
* 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
|
|
31339
|
-
* @param {string} url - 文件 URL
|
|
31340
|
-
* @returns {string} - 提取的文件名
|
|
31343
|
+
/**
|
|
31344
|
+
* 从 URL 中提取文件名(如 https://example.com/path/image.png → image.png)
|
|
31345
|
+
* @param {string} url - 文件 URL
|
|
31346
|
+
* @returns {string} - 提取的文件名
|
|
31341
31347
|
*/
|
|
31342
31348
|
const dify_extractFilenameFromUrl = url => {
|
|
31343
31349
|
try {
|