@indfnd/common 1.1.16 → 1.1.18
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/CHANGELOG.md +17 -0
- package/dist/ind-common.es.js +191 -74
- package/dist/ind-common.umd.cjs +76 -76
- package/dist/styles/index.css +1 -1
- package/package.json +1 -1
- package/src/styles/components/panel.less +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [1.1.18](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.17...v1.1.18) (2025-11-06)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* 表格组件修改 ([3b0f8e1](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/3b0f8e1179aa7eedfa9e57de3a3b83ef26819d5b))
|
|
11
|
+
* 路由升级 ([4c452b8](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/4c452b82991d4df843bf593e67b90a04006201df))
|
|
12
|
+
* 路由升级 ([f248b56](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/f248b56d827b22fe1dd7683f81c0b5c84b37aeef))
|
|
13
|
+
|
|
14
|
+
### [1.1.17](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.16...v1.1.17) (2025-11-03)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* 修改 ([75c284a](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/75c284a8b5268edfd5a23793d3bd90e08b1ae1ac))
|
|
20
|
+
* 修改 ([387e6c9](http://git.inspur.com/imp-ec/ind-front/ind-common-front/commit/387e6c9e103f561e4a0fba72051f6aa3a2f9853b))
|
|
21
|
+
|
|
5
22
|
### [1.1.16](http://git.inspur.com/imp-ec/ind-front/ind-common-front/compare/v1.1.15...v1.1.16) (2025-10-30)
|
|
6
23
|
|
|
7
24
|
|
package/dist/ind-common.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Button as Button$1, ButtonGroup as ButtonGroup$1, Input, Drawer as Drawer$1, Dropdown as Dropdown$1, Modal as Modal$1, Form, FormItem, Select as Select$1, Option, Row, Col, Menu, MenuItem, Submenu, Badge, DropdownMenu, DropdownItem, Tag, Header, Layout, Content, Spin, Poptip as Poptip$1, CheckboxGroup, Checkbox, RadioGroup, Radio, Card, Message, LoadingBar } from "view-design";
|
|
2
|
-
import { isNil, getSessionStorage, putOssFileApi, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate as isDate$1, isArray as isArray$1, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios as axios$3, getPreviewUrlApi, getToken, isFunction as isFunction$1, isString as isString$1, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi,
|
|
2
|
+
import { isNil, getSessionStorage, putOssFileApi, formatDate as formatDate$1, useConfig, getQuarterNum, formatQuarter, str2Date, isDate as isDate$1, isArray as isArray$1, checkIdCard, checkVehicleNo, checkPhone, getDictMapApi, axios as axios$3, getPreviewUrlApi, getToken, isFunction as isFunction$1, isString as isString$1, uuid, exportJsonToExcel as exportJsonToExcel$1, importJsonFromExcel, isEqual, on, off, deleteMenuHistoryApi, deleteMenuCollectApi, getMenuHistoryApi, getMenuCollectApi, getLocalStorage, getPermissionCache, listItemTreeApi, getPriceInfo, MIME_TYPE, base64ToBlob, getCaptchaURL, guid, setLocalStorage, removeLocalStorage, clearSessionStorage, cryptor, putOssFileUrl, getOssFileUrl, responseInterceptors, listComTreeApi, listUserTreeApi, UC_ENUM, config as config$1, setToken, loginApi, clearUserInfoCache, clearPermissionCache, logoutApi, getUserInfoCache, getUserInfoApi, setUserInfoCache, setSessionStorage, getAppListApi, getPermissionApi, setPermissionCache, menuHistoryApi, addMenuCollectApi, removeMenuCollectApi, getIndexDescCache, listIndexDescApi, setIndexDescCache } from "@indfnd/utils";
|
|
3
3
|
import Vue$1 from "vue";
|
|
4
4
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
5
5
|
function getAugmentedNamespace(n) {
|
|
@@ -5460,7 +5460,7 @@ var lodash = { exports: {} };
|
|
|
5460
5460
|
})(lodash, lodash.exports);
|
|
5461
5461
|
var _ = lodash.exports;
|
|
5462
5462
|
const name$1 = "@indfnd/common";
|
|
5463
|
-
const version = "1.1.
|
|
5463
|
+
const version = "1.1.17";
|
|
5464
5464
|
const author = "huxuetong";
|
|
5465
5465
|
const publishConfig = {
|
|
5466
5466
|
registry: "https://registry.npmjs.org/"
|
|
@@ -53242,7 +53242,10 @@ const __vue2_script$14 = {
|
|
|
53242
53242
|
rowSpanDefs: Array,
|
|
53243
53243
|
headerHeight: {
|
|
53244
53244
|
type: Number,
|
|
53245
|
-
default
|
|
53245
|
+
default() {
|
|
53246
|
+
var _a;
|
|
53247
|
+
return ((_a = this.$config) == null ? void 0 : _a.agHeaderHeight) || 28;
|
|
53248
|
+
}
|
|
53246
53249
|
},
|
|
53247
53250
|
rowMultiSelectWithClick: Boolean,
|
|
53248
53251
|
pinnedTopRowData: Array,
|
|
@@ -53500,7 +53503,8 @@ const __vue2_script$14 = {
|
|
|
53500
53503
|
return data2.treeLevelFlag;
|
|
53501
53504
|
},
|
|
53502
53505
|
autoGroupColumnDef: null,
|
|
53503
|
-
groupDisplayType: ""
|
|
53506
|
+
groupDisplayType: "",
|
|
53507
|
+
inited: false
|
|
53504
53508
|
};
|
|
53505
53509
|
},
|
|
53506
53510
|
computed: {
|
|
@@ -53741,7 +53745,13 @@ const __vue2_script$14 = {
|
|
|
53741
53745
|
this.renderSumRow();
|
|
53742
53746
|
}
|
|
53743
53747
|
},
|
|
53744
|
-
|
|
53748
|
+
created() {
|
|
53749
|
+
if (this.autoRefresh) {
|
|
53750
|
+
this.tableRefresh();
|
|
53751
|
+
this.inited = true;
|
|
53752
|
+
}
|
|
53753
|
+
},
|
|
53754
|
+
async mounted() {
|
|
53745
53755
|
var _a;
|
|
53746
53756
|
this.tableRef = this;
|
|
53747
53757
|
this.unitType = this.defaultTableUnitType;
|
|
@@ -53770,7 +53780,10 @@ const __vue2_script$14 = {
|
|
|
53770
53780
|
activated() {
|
|
53771
53781
|
console.log(this._uid + "activated");
|
|
53772
53782
|
if (this.autoRefresh) {
|
|
53773
|
-
this.
|
|
53783
|
+
if (!this.inited) {
|
|
53784
|
+
this.tableRefresh();
|
|
53785
|
+
}
|
|
53786
|
+
this.inited = false;
|
|
53774
53787
|
}
|
|
53775
53788
|
},
|
|
53776
53789
|
destroyed() {
|
|
@@ -57592,8 +57605,11 @@ const __vue2_script$_ = {
|
|
|
57592
57605
|
watchUrlParamsProp() {
|
|
57593
57606
|
this.$watch(
|
|
57594
57607
|
"urlParams",
|
|
57595
|
-
() => {
|
|
57596
|
-
|
|
57608
|
+
(newVal, oldVal) => {
|
|
57609
|
+
let flag = isEqual(newVal, oldVal);
|
|
57610
|
+
if (!flag) {
|
|
57611
|
+
this.init();
|
|
57612
|
+
}
|
|
57597
57613
|
},
|
|
57598
57614
|
{ immediate: true }
|
|
57599
57615
|
);
|
|
@@ -60619,17 +60635,30 @@ var render$G = function() {
|
|
|
60619
60635
|
var staticRenderFns$G = [];
|
|
60620
60636
|
const __vue2_script$H = {
|
|
60621
60637
|
name: "IndEmptyLayout",
|
|
60638
|
+
data() {
|
|
60639
|
+
return {
|
|
60640
|
+
tagNavList: []
|
|
60641
|
+
};
|
|
60642
|
+
},
|
|
60622
60643
|
computed: {
|
|
60623
|
-
tagNavList() {
|
|
60624
|
-
return this.$store.state.app.tagNavList;
|
|
60625
|
-
},
|
|
60626
60644
|
notCacheName() {
|
|
60627
60645
|
return [this.$route.meta && this.$route.meta.notCache ? this.$route.name : ""];
|
|
60628
60646
|
},
|
|
60629
60647
|
cacheList() {
|
|
60630
|
-
const list = (this.tagNavList || []).filter((item2) => !(item2.meta && item2.meta.notCache)).map((item2) =>
|
|
60648
|
+
const list = (this.tagNavList || []).filter((item2) => !(item2.meta && item2.meta.notCache)).map((item2) => {
|
|
60649
|
+
var _a, _b;
|
|
60650
|
+
return (_b = (_a = item2.meta) == null ? void 0 : _a.data) == null ? void 0 : _b.permissionValue;
|
|
60651
|
+
});
|
|
60631
60652
|
return ["IndEmptyLayout", ...list];
|
|
60632
60653
|
}
|
|
60654
|
+
},
|
|
60655
|
+
watch: {
|
|
60656
|
+
$route: {
|
|
60657
|
+
handler() {
|
|
60658
|
+
this.tagNavList = getLocalStorage("ibp-sc-tagNavList");
|
|
60659
|
+
},
|
|
60660
|
+
immediate: true
|
|
60661
|
+
}
|
|
60633
60662
|
}
|
|
60634
60663
|
};
|
|
60635
60664
|
const __cssModules$H = {};
|
|
@@ -60678,7 +60707,7 @@ function __vue2_injectStyles$G(context) {
|
|
|
60678
60707
|
this[o] = __cssModules$G[o];
|
|
60679
60708
|
}
|
|
60680
60709
|
}
|
|
60681
|
-
var
|
|
60710
|
+
var PageLayout = /* @__PURE__ */ function() {
|
|
60682
60711
|
return __component__$G.exports;
|
|
60683
60712
|
}();
|
|
60684
60713
|
var render$E = function() {
|
|
@@ -71568,7 +71597,7 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
|
71568
71597
|
User,
|
|
71569
71598
|
BasicLayout,
|
|
71570
71599
|
EmptyLayout,
|
|
71571
|
-
PageLayout
|
|
71600
|
+
PageLayout,
|
|
71572
71601
|
DetailView: detailView,
|
|
71573
71602
|
PageView: pageView,
|
|
71574
71603
|
Login,
|
|
@@ -71730,8 +71759,44 @@ const PERMISSION_TYPE = {
|
|
|
71730
71759
|
function isMenuPermissionType(type) {
|
|
71731
71760
|
return [PERMISSION_TYPE.DIRECTORY, PERMISSION_TYPE.MENU].includes(type);
|
|
71732
71761
|
}
|
|
71762
|
+
function getPermissionType(type) {
|
|
71763
|
+
return Object.keys(PERMISSION_TYPE).find((key) => PERMISSION_TYPE[key] === type);
|
|
71764
|
+
}
|
|
71733
71765
|
function filterMicroPermissionList(microType, permissionList = []) {
|
|
71734
|
-
|
|
71766
|
+
if (!microType)
|
|
71767
|
+
return permissionList;
|
|
71768
|
+
return permissionList.filter((item2) => {
|
|
71769
|
+
const itemName = item2 && item2.permissionValue || "";
|
|
71770
|
+
return itemName.startsWith(microType) || itemName.startsWith(`${config$1.routerBase}-${microType}`);
|
|
71771
|
+
});
|
|
71772
|
+
}
|
|
71773
|
+
function permission2Router(list, microType) {
|
|
71774
|
+
console.log("permission2Router params", list, microType);
|
|
71775
|
+
if (!list) {
|
|
71776
|
+
return [];
|
|
71777
|
+
}
|
|
71778
|
+
let tempList = [];
|
|
71779
|
+
for (const item2 of list) {
|
|
71780
|
+
tempList.push({
|
|
71781
|
+
path: dealRoutePath(item2.uri, microType),
|
|
71782
|
+
uri: item2.uri,
|
|
71783
|
+
name: item2.permissionValue,
|
|
71784
|
+
meta: {
|
|
71785
|
+
appId: item2.appId,
|
|
71786
|
+
permissionId: item2.permissionId,
|
|
71787
|
+
title: item2.label,
|
|
71788
|
+
icon: item2.icon,
|
|
71789
|
+
crumbs: [
|
|
71790
|
+
{ icon: item2.icon, name: item2.permissionValue, title: item2.label, type: item2.type }
|
|
71791
|
+
],
|
|
71792
|
+
activeName: item2.permissionValue,
|
|
71793
|
+
data: item2
|
|
71794
|
+
},
|
|
71795
|
+
component: item2.permissionValue
|
|
71796
|
+
});
|
|
71797
|
+
}
|
|
71798
|
+
console.log("permission2Router result", tempList);
|
|
71799
|
+
return tempList;
|
|
71735
71800
|
}
|
|
71736
71801
|
function listToMenuTree({ list, menuTree, pageNode, parentId, crumbs, root, microType }) {
|
|
71737
71802
|
if (!list)
|
|
@@ -71833,29 +71898,6 @@ function generatorMenuTree(permissionList = []) {
|
|
|
71833
71898
|
});
|
|
71834
71899
|
return menuTree;
|
|
71835
71900
|
}
|
|
71836
|
-
function generatorDynamicRouter(permissionList = [], microType) {
|
|
71837
|
-
const menuTree = [];
|
|
71838
|
-
const pageNode = {
|
|
71839
|
-
path: "/page",
|
|
71840
|
-
name: "page",
|
|
71841
|
-
meta: { hideInMenu: true, notCache: true },
|
|
71842
|
-
component: "EmptyLayoutNotCache",
|
|
71843
|
-
children: []
|
|
71844
|
-
};
|
|
71845
|
-
listToMenuTree({
|
|
71846
|
-
list: permissionList,
|
|
71847
|
-
menuTree,
|
|
71848
|
-
pageNode,
|
|
71849
|
-
parentId: "0",
|
|
71850
|
-
crumbs: [],
|
|
71851
|
-
root: true,
|
|
71852
|
-
microType
|
|
71853
|
-
});
|
|
71854
|
-
if (pageNode.children.length) {
|
|
71855
|
-
menuTree.push(pageNode);
|
|
71856
|
-
}
|
|
71857
|
-
return generator(menuTree);
|
|
71858
|
-
}
|
|
71859
71901
|
function generator(menuData = []) {
|
|
71860
71902
|
for (let item2 of menuData) {
|
|
71861
71903
|
if (item2.component) {
|
|
@@ -71877,31 +71919,96 @@ function generator(menuData = []) {
|
|
|
71877
71919
|
}
|
|
71878
71920
|
return menuData;
|
|
71879
71921
|
}
|
|
71880
|
-
|
|
71881
|
-
|
|
71882
|
-
|
|
71883
|
-
|
|
71884
|
-
|
|
71885
|
-
|
|
71922
|
+
function generatorRouteByPermission(item2) {
|
|
71923
|
+
if (window.loadComponentHandler) {
|
|
71924
|
+
item2.component = window.loadComponentHandler(item2.path, item2.name) || NotFound;
|
|
71925
|
+
} else {
|
|
71926
|
+
console.error(`\u627E\u4E0D\u5230\u7EC4\u4EF6\u5B9A\u4E49:${item2.component},\u8BF7\u6392\u67E5\u8D44\u6E90\u8DEF\u5F84\u914D\u7F6E\u662F\u5426\u6B63\u786E`);
|
|
71927
|
+
item2.component = NotFound;
|
|
71928
|
+
}
|
|
71929
|
+
return item2;
|
|
71930
|
+
}
|
|
71931
|
+
const isAdded = (router, route) => {
|
|
71932
|
+
var _a, _b;
|
|
71933
|
+
let rlt = router.resolve(route);
|
|
71934
|
+
return !!((_b = (_a = rlt == null ? void 0 : rlt.resolved) == null ? void 0 : _a.matched) == null ? void 0 : _b.length);
|
|
71935
|
+
};
|
|
71936
|
+
const pageRoute = {
|
|
71937
|
+
path: "/page",
|
|
71938
|
+
name: "page",
|
|
71939
|
+
meta: { hideInMenu: true, notCache: true },
|
|
71940
|
+
component: PageLayout,
|
|
71941
|
+
children: []
|
|
71942
|
+
};
|
|
71943
|
+
async function renderRoutes({
|
|
71944
|
+
router,
|
|
71945
|
+
store: store2,
|
|
71946
|
+
microType,
|
|
71947
|
+
allowPermissionList,
|
|
71948
|
+
routerOptionsBak,
|
|
71949
|
+
to
|
|
71950
|
+
}) {
|
|
71951
|
+
let isInitilaze = !store2.state.user.userName;
|
|
71952
|
+
if (isAdded(router, to) && !isInitilaze) {
|
|
71953
|
+
return;
|
|
71954
|
+
}
|
|
71955
|
+
if (isInitilaze) {
|
|
71956
|
+
await store2.dispatch("getUserInfo");
|
|
71957
|
+
await store2.dispatch("getAppListData");
|
|
71958
|
+
await store2.dispatch("getPermissionData", {
|
|
71959
|
+
constantRouterComponents,
|
|
71960
|
+
permissionStoreKeyParams: "ibp-sc-permission"
|
|
71961
|
+
});
|
|
71962
|
+
router.options = _.cloneDeep(routerOptionsBak);
|
|
71963
|
+
}
|
|
71964
|
+
const permissionData = getPermissionCache();
|
|
71886
71965
|
const microPermissionData = filterMicroPermissionList(microType, permissionData);
|
|
71887
|
-
const dynamicRouters = generatorDynamicRouter(microPermissionData, microType);
|
|
71888
|
-
console.log("dynamicROuters", dynamicRouters);
|
|
71889
71966
|
const rootRoute2 = router.options.routes.find((item2) => item2.path === "/");
|
|
71890
|
-
|
|
71891
|
-
router.addRoute(rootRoute2.name,
|
|
71892
|
-
rootRoute2.children.push(
|
|
71967
|
+
if (isInitilaze) {
|
|
71968
|
+
router.addRoute(rootRoute2.name, pageRoute);
|
|
71969
|
+
rootRoute2.children.push(pageRoute);
|
|
71893
71970
|
}
|
|
71894
|
-
|
|
71895
|
-
|
|
71896
|
-
|
|
71897
|
-
|
|
71898
|
-
|
|
71899
|
-
|
|
71900
|
-
|
|
71901
|
-
|
|
71902
|
-
|
|
71903
|
-
|
|
71904
|
-
|
|
71971
|
+
if (!isAdded(router, to)) {
|
|
71972
|
+
let tempPer = microPermissionData.find((item2) => {
|
|
71973
|
+
return item2.permissionValue == to.name || item2.name == to.name;
|
|
71974
|
+
});
|
|
71975
|
+
if (!tempPer && to.path != "/") {
|
|
71976
|
+
tempPer = microPermissionData.find((item2) => {
|
|
71977
|
+
var _a, _b, _c;
|
|
71978
|
+
return ((_a = item2 == null ? void 0 : item2.uri) == null ? void 0 : _a.includes("?")) ? (_b = item2 == null ? void 0 : item2.uri) == null ? void 0 : _b.includes(to.path) : (_c = item2 == null ? void 0 : item2.uri) == null ? void 0 : _c.endsWith(to.path);
|
|
71979
|
+
});
|
|
71980
|
+
}
|
|
71981
|
+
const perType = getPermissionType(tempPer.type || "");
|
|
71982
|
+
let tmpRoute = generatorRouteByPermission(permission2Router([tempPer], microType)[0]);
|
|
71983
|
+
if (perType == "PAGE") {
|
|
71984
|
+
router.addRoute(pageRoute.name, {
|
|
71985
|
+
...tmpRoute,
|
|
71986
|
+
meta: { ...tmpRoute.meta, notCache: true }
|
|
71987
|
+
});
|
|
71988
|
+
pageRoute.children.push(tmpRoute);
|
|
71989
|
+
}
|
|
71990
|
+
if (perType == "MENU") {
|
|
71991
|
+
router.addRoute(rootRoute2.name, tmpRoute);
|
|
71992
|
+
rootRoute2.children.push(tmpRoute);
|
|
71993
|
+
}
|
|
71994
|
+
}
|
|
71995
|
+
if (isInitilaze) {
|
|
71996
|
+
const microAllowPermissionList = filterMicroPermissionList(microType, allowPermissionList);
|
|
71997
|
+
const needAddRoutes = microAllowPermissionList.filter((permission2) => {
|
|
71998
|
+
return router.options.routes.findIndex((route) => permission2.name === route.name) === -1;
|
|
71999
|
+
});
|
|
72000
|
+
needAddRoutes.forEach((item2) => {
|
|
72001
|
+
item2.component = item2.name;
|
|
72002
|
+
item2.meta = {
|
|
72003
|
+
hideInMenu: true,
|
|
72004
|
+
title: item2.label,
|
|
72005
|
+
activeName: item2.name
|
|
72006
|
+
};
|
|
72007
|
+
});
|
|
72008
|
+
const dynamicDetailRouters = generator(needAddRoutes);
|
|
72009
|
+
for (const item2 of dynamicDetailRouters) {
|
|
72010
|
+
router.addRoute(config.rootRouteName, item2);
|
|
72011
|
+
}
|
|
71905
72012
|
}
|
|
71906
72013
|
}
|
|
71907
72014
|
function addRouterGuards({ router, store: store2, microType, allowPermissionList }) {
|
|
@@ -71916,13 +72023,7 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
71916
72023
|
if (url.endsWith("/login"))
|
|
71917
72024
|
return;
|
|
71918
72025
|
if (window.confirm("\u4F1A\u8BDD\u5DF2\u5931\u6548\uFF0C\u662F\u5426\u91CD\u65B0\u767B\u5F55\uFF1F")) {
|
|
71919
|
-
|
|
71920
|
-
router.push({ name: LOGIN_PAGE_NAME }, () => {
|
|
71921
|
-
window.location.reload();
|
|
71922
|
-
});
|
|
71923
|
-
} else {
|
|
71924
|
-
top.location = "/ibp-sc/login";
|
|
71925
|
-
}
|
|
72026
|
+
top.location = "/ibp-sc/login";
|
|
71926
72027
|
}
|
|
71927
72028
|
};
|
|
71928
72029
|
window.apiErrorHandler = function(msg) {
|
|
@@ -71951,9 +72052,11 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
71951
72052
|
return false;
|
|
71952
72053
|
};
|
|
71953
72054
|
router.beforeEach(async (to, from, next) => {
|
|
72055
|
+
var _a;
|
|
71954
72056
|
LoadingBar.start();
|
|
71955
72057
|
let token = getToken();
|
|
71956
72058
|
let search = location.search;
|
|
72059
|
+
let tempToken = false;
|
|
71957
72060
|
if (search) {
|
|
71958
72061
|
let rlt = getQueryVariable("token");
|
|
71959
72062
|
if (rlt) {
|
|
@@ -71962,17 +72065,18 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
71962
72065
|
store2.dispatch("loginSuccess", token);
|
|
71963
72066
|
}
|
|
71964
72067
|
}
|
|
71965
|
-
let ssoToken = getQueryVariable("sso_token");
|
|
72068
|
+
let ssoToken = getQueryVariable("sso_token") || sessionStorage.getItem("sso_token");
|
|
71966
72069
|
if (ssoToken) {
|
|
71967
|
-
|
|
72070
|
+
tempToken = true;
|
|
71968
72071
|
sessionStorage.setItem("sso_token", ssoToken);
|
|
71969
72072
|
}
|
|
71970
72073
|
}
|
|
71971
|
-
|
|
72074
|
+
let isInitilaze = !store2.state.user.userName;
|
|
72075
|
+
if (!tempToken && !token && to.name !== LOGIN_PAGE_NAME) {
|
|
71972
72076
|
next({ name: LOGIN_PAGE_NAME });
|
|
71973
72077
|
} else if (to.name === LOGIN_PAGE_NAME) {
|
|
71974
72078
|
next();
|
|
71975
|
-
} else if (
|
|
72079
|
+
} else if (isInitilaze || top !== self || location.href.includes("imarket-analysis")) {
|
|
71976
72080
|
Spin.show();
|
|
71977
72081
|
try {
|
|
71978
72082
|
await renderRoutes({
|
|
@@ -71980,10 +72084,23 @@ function addRouterGuards({ router, store: store2, microType, allowPermissionList
|
|
|
71980
72084
|
store: store2,
|
|
71981
72085
|
microType,
|
|
71982
72086
|
allowPermissionList,
|
|
71983
|
-
routerOptionsBak
|
|
72087
|
+
routerOptionsBak,
|
|
72088
|
+
to
|
|
71984
72089
|
});
|
|
71985
|
-
|
|
72090
|
+
if (isInitilaze || !((_a = to.matched) == null ? void 0 : _a.length)) {
|
|
72091
|
+
console.log("\u8DEF\u7531\u6CA1\u6709\u5339\u914D\u5230", to);
|
|
72092
|
+
if (to.name && to.path == "/") {
|
|
72093
|
+
next({ name: to.name, query: to.query });
|
|
72094
|
+
} else {
|
|
72095
|
+
console.log("\u8DEF\u7531\u5339\u914D\u5230\uFF0C\u8DF3", to);
|
|
72096
|
+
next({ ...to });
|
|
72097
|
+
}
|
|
72098
|
+
} else {
|
|
72099
|
+
console.log("\u8DEF\u7531\u5339\u914D\u5230\uFF0C\u8DF32", to);
|
|
72100
|
+
next();
|
|
72101
|
+
}
|
|
71986
72102
|
} catch (error) {
|
|
72103
|
+
console.log("router.beforeeach err", error);
|
|
71987
72104
|
next({ name: LOGIN_PAGE_NAME });
|
|
71988
72105
|
}
|
|
71989
72106
|
Spin.hide();
|
|
@@ -73559,4 +73676,4 @@ const API = {
|
|
|
73559
73676
|
getDefaultTheme,
|
|
73560
73677
|
doChangeTheme
|
|
73561
73678
|
};
|
|
73562
|
-
export { AppMenu, auditLogModal as AuditLogModal, auditModal as AuditModal, BackTop, backTopPanel as BackTopPanel, BasicLayout, brandInputModal as BrandInputModal, Button, ButtonGroup, Collect, comInputModal as ComInputModal, ConditionPanel, datePicker as DatePicker, detailView as DetailView, Drawer, Dropdown, dropdownItem as DropdownItem, dropdownMenu as DropdownMenu, EmptyLayout, ErrorContent, errorStore as ErrorStore, index$4 as ExcelFlowModal, FormWrap, Fullscreen as FullScreen, helpTableModal as HelpTableModal, helpTreeModal as HelpTreeModal, Icons, imagePreview as ImagePreview, configPlugin as IndConfigPlugin, routerPlugin as IndRouterPlugin, index$2 as ItemCompInputModal, itemInputModal as ItemInputModal, itemTypeCombineSelect as ItemTypeCombineSelect, language as Language, LoadingPanel, Login, materialItemModal as MaterialItemModal, mobileindex as MobileTable, Modal, NotFound, IndOption as Option, optionGroup as OptionGroup, OtherMenu,
|
|
73679
|
+
export { AppMenu, auditLogModal as AuditLogModal, auditModal as AuditModal, BackTop, backTopPanel as BackTopPanel, BasicLayout, brandInputModal as BrandInputModal, Button, ButtonGroup, Collect, comInputModal as ComInputModal, ConditionPanel, datePicker as DatePicker, detailView as DetailView, Drawer, Dropdown, dropdownItem as DropdownItem, dropdownMenu as DropdownMenu, EmptyLayout, ErrorContent, errorStore as ErrorStore, index$4 as ExcelFlowModal, FormWrap, Fullscreen as FullScreen, helpTableModal as HelpTableModal, helpTreeModal as HelpTreeModal, Icons, imagePreview as ImagePreview, configPlugin as IndConfigPlugin, routerPlugin as IndRouterPlugin, index$2 as ItemCompInputModal, itemInputModal as ItemInputModal, itemTypeCombineSelect as ItemTypeCombineSelect, language as Language, LoadingPanel, Login, materialItemModal as MaterialItemModal, mobileindex as MobileTable, Modal, NotFound, IndOption as Option, optionGroup as OptionGroup, OtherMenu, PageLayout, pageView as PageView, Poptip, reportIndexModal as ReportIndexModal, reportOptionModal as ReportOptionModal, roleAuth as RoleAuth, index$1 as RowSumSettingInputModal, Select, SideMenu, SideMenuItem, SiderTrigger, Sign, signModal as SignModal, index as StepTrack, Table, TagsNav, Tooltip, Tree, index$3 as TreeModal, ImpTreeSelect as TreeSelect, unitRadio as UnitRadio, uploadFile as UploadFile, uploadImg as UploadImg, User, userAuth as UserAuth, editor as WangEditor, zeroRadio as ZeroRadio, addRouterGuards, clickOutside, createMacroBasicRoutes, createMicroBasicRoutes, API as default, install, permission, print, routerOptions, store, transferDom };
|