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