gw-gis-standard-global-vue3 1.1.79 → 1.1.80
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/gw-gis-standard-global.js +42 -33
- package/package.json +1 -1
|
@@ -1418,32 +1418,42 @@ function filterRolesRouterFn2(routerList) {
|
|
|
1418
1418
|
for (var i = 0; i < routerList.length; i++) {
|
|
1419
1419
|
if (routerList[i].path && routerList[i].meta) {
|
|
1420
1420
|
if (list.length > 0) {
|
|
1421
|
-
if (!
|
|
1422
|
-
|
|
1423
|
-
if (routerList[i].meta
|
|
1424
|
-
|
|
1425
|
-
routerList[i].meta.GwRoleSet = true;
|
|
1426
|
-
routerList[i].meta.visible = false;
|
|
1427
|
-
} else {
|
|
1428
|
-
routerList[i].meta.GwRoleSet = false;
|
|
1429
|
-
}
|
|
1421
|
+
// if (!routerList[i].meta.notInLayout && !list.includes(routerList[i].meta[menuFilterKey])) {
|
|
1422
|
+
if (!routerList[i].meta.notInLayout) {
|
|
1423
|
+
if (list.includes(routerList[i].meta[menuFilterKey])) {
|
|
1424
|
+
routerList[i].meta.gisInfoSetShowRole = true;
|
|
1430
1425
|
} else {
|
|
1426
|
+
routerList[i].meta.gisInfoSetHideRole = true;
|
|
1431
1427
|
routerList[i].meta.visible = false;
|
|
1432
|
-
routerList[i].meta.GwRoleSet = true;
|
|
1433
1428
|
}
|
|
1429
|
+
|
|
1430
|
+
// 是为了记录角色隐藏了哪些菜单
|
|
1431
|
+
// if (routerList[i].meta.hasOwnProperty('visible')) {
|
|
1432
|
+
// if (routerList[i].meta.visible) {
|
|
1433
|
+
// routerList[i].meta.gisInfoSetHideRole = true
|
|
1434
|
+
// routerList[i].meta.visible = false
|
|
1435
|
+
// } else {
|
|
1436
|
+
// routerList[i].meta.gisInfoSetHideRole = false
|
|
1437
|
+
// }
|
|
1438
|
+
// } else {
|
|
1439
|
+
// routerList[i].meta.visible = false
|
|
1440
|
+
// routerList[i].meta.gisInfoSetHideRole = true
|
|
1441
|
+
// }
|
|
1434
1442
|
}
|
|
1435
1443
|
} else {
|
|
1444
|
+
// 为空则全部隐藏
|
|
1436
1445
|
if (!routerList[i].meta.notInLayout) {
|
|
1437
|
-
routerList[i].meta.
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1446
|
+
routerList[i].meta.gisInfoSetHideRole = true;
|
|
1447
|
+
routerList[i].meta.visible = false;
|
|
1448
|
+
// if (routerList[i].meta.hasOwnProperty('visible')) {
|
|
1449
|
+
// // 是为了记录角色隐藏了哪些菜单
|
|
1450
|
+
// if (!routerList[i].meta.visible) {
|
|
1451
|
+
// routerList[i].meta.gisInfoSetHideRole = false
|
|
1452
|
+
// }
|
|
1453
|
+
// routerList[i].meta.visible = false
|
|
1454
|
+
// } else {
|
|
1455
|
+
// routerList[i].meta.visible = false
|
|
1456
|
+
// }
|
|
1447
1457
|
// 清空文件
|
|
1448
1458
|
}
|
|
1449
1459
|
}
|
|
@@ -1456,9 +1466,9 @@ function filterRolesRouterFn2(routerList) {
|
|
|
1456
1466
|
function _resetRouterListFn(routerList, list) {
|
|
1457
1467
|
for (var i = 0; i < routerList.length; i++) {
|
|
1458
1468
|
if (routerList[i].path) {
|
|
1459
|
-
if (routerList[i].meta.
|
|
1469
|
+
if (routerList[i].meta.gisInfoSetHideRole) {
|
|
1460
1470
|
routerList[i].meta.visible = true;
|
|
1461
|
-
delete routerList[i].meta.
|
|
1471
|
+
delete routerList[i].meta.gisInfoSetHideRole;
|
|
1462
1472
|
}
|
|
1463
1473
|
}
|
|
1464
1474
|
if (routerList[i].children && routerList[i].children.length > 0) {
|
|
@@ -2903,7 +2913,7 @@ var GisPermission = /*#__PURE__*/function () {
|
|
|
2903
2913
|
// if (to.matched.length > 0) {
|
|
2904
2914
|
// // const lastRouteMsg = to.matched.at(-1)
|
|
2905
2915
|
// const lastRouteMsg = to
|
|
2906
|
-
// if (lastRouteMsg.meta.
|
|
2916
|
+
// if (lastRouteMsg.meta.gisInfoSetHideRole && !lastRouteMsg.meta.visible) {
|
|
2907
2917
|
// // 找整个模块第一个显示的页面
|
|
2908
2918
|
// if (to.path) {
|
|
2909
2919
|
// const firstPath = (to.path.split('/').length > 0 && to.path.split('/')[1]) || undefined
|
|
@@ -2972,10 +2982,10 @@ var GisPermission = /*#__PURE__*/function () {
|
|
|
2972
2982
|
// }
|
|
2973
2983
|
// -----------------------------
|
|
2974
2984
|
if (to.matched.length > 0) {
|
|
2975
|
-
var _to$meta, _to$redirectedFrom, _to$meta2, _lastRouteMsg$
|
|
2985
|
+
var _to$meta, _to$redirectedFrom, _to$meta2, _lastRouteMsg$meta;
|
|
2976
2986
|
var lastRouteMsg = to.matched.at(-1);
|
|
2977
2987
|
// const lastRouteMsg = to
|
|
2978
|
-
console.log('lastRouteMsglastRouteMsg',
|
|
2988
|
+
console.log('lastRouteMsglastRouteMsg', lastRouteMsg);
|
|
2979
2989
|
// 进入主页,主页如果已被隐藏则进去第一个显示的页面
|
|
2980
2990
|
if ((_to$meta = to.meta) !== null && _to$meta !== void 0 && _to$meta.isHomePage && (to === null || to === void 0 || (_to$redirectedFrom = to.redirectedFrom) === null || _to$redirectedFrom === void 0 ? void 0 : _to$redirectedFrom.path) === '/') {
|
|
2981
2991
|
var hasShowHomePage = undefined;
|
|
@@ -2996,18 +3006,17 @@ var GisPermission = /*#__PURE__*/function () {
|
|
|
2996
3006
|
query: (_hasShowHomePage = hasShowHomePage) === null || _hasShowHomePage === void 0 || (_hasShowHomePage = _hasShowHomePage.meta) === null || _hasShowHomePage === void 0 ? void 0 : _hasShowHomePage.query
|
|
2997
3007
|
});
|
|
2998
3008
|
}
|
|
2999
|
-
} else if ((_to$meta2 = to.meta) !== null && _to$meta2 !== void 0 && _to$meta2.
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
} else if ((_lastRouteMsg$meta2 = lastRouteMsg.meta) !== null && _lastRouteMsg$meta2 !== void 0 && _lastRouteMsg$meta2.GwRoleSet && lastRouteMsg.meta.hasOwnProperty('visible') && !lastRouteMsg.meta.visible) {
|
|
3009
|
+
} else if ((_to$meta2 = to.meta) !== null && _to$meta2 !== void 0 && _to$meta2.gisInfoSetHideRole && to.meta.hasOwnProperty('visible') && !to.meta.visible) {
|
|
3010
|
+
// if (lastRouteMsg?.meta?.gisInfoSetHideRole && lastRouteMsg?.meta.hasOwnProperty('visible') && !lastRouteMsg.meta.visible) {
|
|
3011
|
+
getCache(constType.SESSION_STORAGE).remove(constType.TOP_MENU);
|
|
3012
|
+
next(constType.NO_IN_LAYOUT_MSG.FORBIDDEN);
|
|
3013
|
+
// }
|
|
3014
|
+
} else if ((_lastRouteMsg$meta = lastRouteMsg.meta) !== null && _lastRouteMsg$meta !== void 0 && _lastRouteMsg$meta.gisInfoSetHideRole && lastRouteMsg.meta.hasOwnProperty('visible') && !lastRouteMsg.meta.visible) {
|
|
3006
3015
|
getCache(constType.SESSION_STORAGE).remove(constType.TOP_MENU);
|
|
3007
3016
|
next(constType.NO_IN_LAYOUT_MSG.FORBIDDEN);
|
|
3008
3017
|
}
|
|
3009
3018
|
|
|
3010
|
-
// if (lastRouteMsg.meta.
|
|
3019
|
+
// if (lastRouteMsg.meta.gisInfoSetHideRole && !lastRouteMsg.meta.visible) {
|
|
3011
3020
|
// // 找整个模块第一个显示的页面
|
|
3012
3021
|
// if (to.path) {
|
|
3013
3022
|
// const firstPath = (to.path.split('/').length > 0 && to.path.split('/')[1]) || undefined
|