@fmdeui/fmui 1.0.36 → 1.0.38
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/es/index.d.ts +1 -3
- package/es/index.mjs +1 -5
- package/es/make-installer.css +1 -2
- package/es/make-installer.mjs +2 -1
- package/es/packages/components/fm-layout/src/navBars/topBar/userNews.vue2.mjs +3 -3
- package/es/packages/hooks/other.mjs +4 -3
- package/es/packages/stores/index.mjs +1 -0
- package/es/router/index.d.ts +2 -12
- package/es/stores/index.d.ts +2 -0
- package/index.css +1 -65
- package/index.js +124 -431
- package/index.min.css +1 -2
- package/index.min.js +6 -6
- package/index.min.mjs +6 -6
- package/index.mjs +121 -424
- package/lib/component.css +1 -2
- package/lib/index.d.ts +1 -3
- package/lib/index.js +5 -18
- package/lib/make-installer.js +2 -1
- package/lib/packages/components/fm-layout/src/navBars/topBar/userNews.vue2.js +3 -3
- package/lib/packages/hooks/other.js +6 -5
- package/lib/packages/stores/index.js +2 -0
- package/lib/router/index.d.ts +2 -12
- package/lib/stores/index.d.ts +2 -0
- package/locale/en.js +1 -1
- package/locale/en.min.js +1 -1
- package/locale/en.min.mjs +1 -1
- package/locale/en.mjs +1 -1
- package/locale/zh-cn.js +1 -1
- package/locale/zh-cn.min.js +1 -1
- package/locale/zh-cn.min.mjs +1 -1
- package/locale/zh-cn.mjs +1 -1
- package/package.json +1 -1
- package/es/node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.css.mjs +0 -3
- package/es/packages/router/backEnd.mjs +0 -138
- package/es/packages/router/createRouter.mjs +0 -15
- package/es/packages/router/frontEnd.mjs +0 -80
- package/es/packages/router/index.mjs +0 -63
- package/es/packages/router/route.mjs +0 -28
- package/es/packages/router/utils.mjs +0 -37
- package/es/router/backEnd.d.ts +0 -63
- package/es/router/createRouter.d.ts +0 -7
- package/es/router/frontEnd.d.ts +0 -61
- package/es/router/route.d.ts +0 -60
- package/es/router/utils.d.ts +0 -14
- package/lib/node_modules/.pnpm/nprogress@0.2.0/node_modules/nprogress/nprogress.css.js +0 -7
- package/lib/packages/router/backEnd.js +0 -149
- package/lib/packages/router/createRouter.js +0 -17
- package/lib/packages/router/frontEnd.js +0 -90
- package/lib/packages/router/index.js +0 -75
- package/lib/packages/router/route.js +0 -30
- package/lib/packages/router/utils.js +0 -40
- package/lib/router/backEnd.d.ts +0 -63
- package/lib/router/createRouter.d.ts +0 -7
- package/lib/router/frontEnd.d.ts +0 -61
- package/lib/router/route.d.ts +0 -60
- package/lib/router/utils.d.ts +0 -14
package/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! fmdeui-fmui v1.0.
|
|
1
|
+
/*! fmdeui-fmui v1.0.38 */
|
|
2
2
|
(function (global, factory) {
|
|
3
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('vue-router'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('
|
|
4
|
-
typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'vue-router', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', '
|
|
5
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fmdeuifmui = {}, global.VxeUITable, global.VxeUIPluginRenderElement, global.VxeUIPluginExportXLSX, global.VxeUIExport, global.ExcelJS, global.ElementPlusIconsVue, global.Vue, global.ElementPlus, global._, global.Cookies, global.Pinia, global.VueUse, global.CryptoJS, global.XLSX, global.vueI18n, global.vueRouter, global.Sortable, global.screenfull, global.Push, global.mitt, global.SignalR, global.
|
|
6
|
-
})(this, (function (exports, VxeUITable, VxeUIPluginRenderElement, VxeUIPluginExportXLSX, VxeUI, ExcelJS, svg, vue, elementPlus, lodashEs, Cookies, pinia$1, core, CryptoJS, XLSXS, vueI18n, vueRouter, Sortable, screenfull, Push, mitt, SignalR,
|
|
3
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vxe-table'), require('@vxe-ui/plugin-render-element'), require('@vxe-ui/plugin-export-xlsx'), require('vxe-pc-ui'), require('exceljs'), require('@element-plus/icons-vue'), require('vue'), require('element-plus'), require('lodash-es'), require('js-cookie'), require('pinia'), require('@vueuse/core'), require('crypto-js'), require('xlsx-js-style'), require('vue-i18n'), require('vue-router'), require('sortablejs'), require('screenfull'), require('push.js'), require('mitt'), require('@microsoft/signalr'), require('axios')) :
|
|
4
|
+
typeof define === 'function' && define.amd ? define(['exports', 'vxe-table', '@vxe-ui/plugin-render-element', '@vxe-ui/plugin-export-xlsx', 'vxe-pc-ui', 'exceljs', '@element-plus/icons-vue', 'vue', 'element-plus', 'lodash-es', 'js-cookie', 'pinia', '@vueuse/core', 'crypto-js', 'xlsx-js-style', 'vue-i18n', 'vue-router', 'sortablejs', 'screenfull', 'push.js', 'mitt', '@microsoft/signalr', 'axios'], factory) :
|
|
5
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fmdeuifmui = {}, global.VxeUITable, global.VxeUIPluginRenderElement, global.VxeUIPluginExportXLSX, global.VxeUIExport, global.ExcelJS, global.ElementPlusIconsVue, global.Vue, global.ElementPlus, global._, global.Cookies, global.Pinia, global.VueUse, global.CryptoJS, global.XLSX, global.vueI18n, global.vueRouter, global.Sortable, global.screenfull, global.Push, global.mitt, global.SignalR, global.axios));
|
|
6
|
+
})(this, (function (exports, VxeUITable, VxeUIPluginRenderElement, VxeUIPluginExportXLSX, VxeUI, ExcelJS, svg, vue, elementPlus, lodashEs, Cookies, pinia$1, core, CryptoJS, XLSXS, vueI18n, vueRouter, Sortable, screenfull, Push, mitt, SignalR, axios) { 'use strict';
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
var n = Object.create(null);
|
|
@@ -27,6 +27,67 @@
|
|
|
27
27
|
|
|
28
28
|
const pinia = pinia$1.createPinia();
|
|
29
29
|
|
|
30
|
+
const useKeepALiveNames = pinia$1.defineStore("keepALiveNames", {
|
|
31
|
+
state: () => ({
|
|
32
|
+
keepAliveNames: [],
|
|
33
|
+
cachedViews: []
|
|
34
|
+
}),
|
|
35
|
+
actions: {
|
|
36
|
+
async setCacheKeepAlive(data) {
|
|
37
|
+
this.keepAliveNames = data;
|
|
38
|
+
},
|
|
39
|
+
async addCachedView(view) {
|
|
40
|
+
var _a;
|
|
41
|
+
if (view.meta.isKeepAlive) (_a = this.cachedViews) == null ? void 0 : _a.push(view.name);
|
|
42
|
+
},
|
|
43
|
+
async delCachedView(view) {
|
|
44
|
+
const index = this.cachedViews.indexOf(view.name);
|
|
45
|
+
if (index > -1) this.cachedViews.splice(index, 1);
|
|
46
|
+
},
|
|
47
|
+
async delOthersCachedViews(view) {
|
|
48
|
+
if (view.meta.isKeepAlive) this.cachedViews = [view.name];
|
|
49
|
+
else this.cachedViews = [];
|
|
50
|
+
},
|
|
51
|
+
async delAllCachedViews() {
|
|
52
|
+
this.cachedViews = [];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const useRequestOldRoutes = pinia$1.defineStore("requestOldRoutes", {
|
|
58
|
+
state: () => ({
|
|
59
|
+
requestOldRoutes: []
|
|
60
|
+
}),
|
|
61
|
+
actions: {
|
|
62
|
+
async setRequestOldRoutes(routes) {
|
|
63
|
+
this.requestOldRoutes = routes;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
const useRoutesList = pinia$1.defineStore("routesList", {
|
|
69
|
+
state: () => ({
|
|
70
|
+
routesList: [],
|
|
71
|
+
isColumnsMenuHover: false,
|
|
72
|
+
isColumnsNavHover: false,
|
|
73
|
+
currentRoute: null
|
|
74
|
+
}),
|
|
75
|
+
actions: {
|
|
76
|
+
setCurrentRoute(route) {
|
|
77
|
+
this.currentRoute = route;
|
|
78
|
+
},
|
|
79
|
+
async setRoutesList(data) {
|
|
80
|
+
this.routesList = data;
|
|
81
|
+
},
|
|
82
|
+
async setColumnsMenuHover(bool) {
|
|
83
|
+
this.isColumnsMenuHover = bool;
|
|
84
|
+
},
|
|
85
|
+
async setColumnsNavHover(bool) {
|
|
86
|
+
this.isColumnsNavHover = bool;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
30
91
|
function judgementSameArr(newArr, oldArr) {
|
|
31
92
|
const news = removeDuplicate(newArr);
|
|
32
93
|
const olds = removeDuplicate(oldArr);
|
|
@@ -1799,43 +1860,21 @@
|
|
|
1799
1860
|
}
|
|
1800
1861
|
};
|
|
1801
1862
|
|
|
1802
|
-
const
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
div.id = id;
|
|
1816
|
-
div.style.pointerEvents = "none";
|
|
1817
|
-
div.style.top = "0px";
|
|
1818
|
-
div.style.left = "0px";
|
|
1819
|
-
div.style.position = "fixed";
|
|
1820
|
-
div.style.zIndex = "10000000";
|
|
1821
|
-
div.style.width = `${document.documentElement.clientWidth}px`;
|
|
1822
|
-
div.style.height = `${document.documentElement.clientHeight}px`;
|
|
1823
|
-
div.style.background = `url(${can.toDataURL("image/png")}) left top repeat`;
|
|
1824
|
-
document.body.appendChild(div);
|
|
1825
|
-
return id;
|
|
1826
|
-
};
|
|
1827
|
-
const watermark = {
|
|
1828
|
-
// 设置水印
|
|
1829
|
-
set: (str) => {
|
|
1830
|
-
let id = setWatermark(str);
|
|
1831
|
-
if (document.getElementById(id) === null) id = setWatermark(str);
|
|
1832
|
-
},
|
|
1833
|
-
// 删除水印
|
|
1834
|
-
del: () => {
|
|
1835
|
-
let id = "1.23452384164.123412416";
|
|
1836
|
-
if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id));
|
|
1863
|
+
const useTagsViewRoutes = pinia$1.defineStore("tagsViewRoutes", {
|
|
1864
|
+
state: () => ({
|
|
1865
|
+
tagsViewRoutes: [],
|
|
1866
|
+
isTagsViewCurrenFull: false
|
|
1867
|
+
}),
|
|
1868
|
+
actions: {
|
|
1869
|
+
async setTagsViewRoutes(data) {
|
|
1870
|
+
this.tagsViewRoutes = data;
|
|
1871
|
+
},
|
|
1872
|
+
setCurrenFullscreen(bool) {
|
|
1873
|
+
Session.set("isTagsViewCurrenFull", bool);
|
|
1874
|
+
this.isTagsViewCurrenFull = bool;
|
|
1875
|
+
}
|
|
1837
1876
|
}
|
|
1838
|
-
};
|
|
1877
|
+
});
|
|
1839
1878
|
|
|
1840
1879
|
const useThemeConfig = pinia$1.defineStore("themeConfig", {
|
|
1841
1880
|
state: () => ({
|
|
@@ -2001,6 +2040,44 @@
|
|
|
2001
2040
|
}
|
|
2002
2041
|
});
|
|
2003
2042
|
|
|
2043
|
+
const setWatermark = (str) => {
|
|
2044
|
+
const id = "1.23452384164.123412416";
|
|
2045
|
+
if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id));
|
|
2046
|
+
const can = document.createElement("canvas");
|
|
2047
|
+
can.width = 400;
|
|
2048
|
+
can.height = 200;
|
|
2049
|
+
const cans = can.getContext("2d");
|
|
2050
|
+
cans.rotate(-20 * Math.PI / 180);
|
|
2051
|
+
cans.font = "12px Vedana";
|
|
2052
|
+
cans.fillStyle = "rgba(200, 200, 200, 0.30)";
|
|
2053
|
+
cans.textBaseline = "middle";
|
|
2054
|
+
cans.fillText(str, can.width / 10, can.height, can.width);
|
|
2055
|
+
const div = document.createElement("div");
|
|
2056
|
+
div.id = id;
|
|
2057
|
+
div.style.pointerEvents = "none";
|
|
2058
|
+
div.style.top = "0px";
|
|
2059
|
+
div.style.left = "0px";
|
|
2060
|
+
div.style.position = "fixed";
|
|
2061
|
+
div.style.zIndex = "10000000";
|
|
2062
|
+
div.style.width = `${document.documentElement.clientWidth}px`;
|
|
2063
|
+
div.style.height = `${document.documentElement.clientHeight}px`;
|
|
2064
|
+
div.style.background = `url(${can.toDataURL("image/png")}) left top repeat`;
|
|
2065
|
+
document.body.appendChild(div);
|
|
2066
|
+
return id;
|
|
2067
|
+
};
|
|
2068
|
+
const watermark = {
|
|
2069
|
+
// 设置水印
|
|
2070
|
+
set: (str) => {
|
|
2071
|
+
let id = setWatermark(str);
|
|
2072
|
+
if (document.getElementById(id) === null) id = setWatermark(str);
|
|
2073
|
+
},
|
|
2074
|
+
// 删除水印
|
|
2075
|
+
del: () => {
|
|
2076
|
+
let id = "1.23452384164.123412416";
|
|
2077
|
+
if (document.getElementById(id) !== null) document.body.removeChild(document.getElementById(id));
|
|
2078
|
+
}
|
|
2079
|
+
};
|
|
2080
|
+
|
|
2004
2081
|
const useBaseApi = (module, options = {}) => {
|
|
2005
2082
|
const baseUrl = `/api/${module}/`;
|
|
2006
2083
|
const request = (config, cancel = false) => {
|
|
@@ -18592,83 +18669,6 @@
|
|
|
18592
18669
|
}));
|
|
18593
18670
|
};
|
|
18594
18671
|
|
|
18595
|
-
const useKeepALiveNames = pinia$1.defineStore("keepALiveNames", {
|
|
18596
|
-
state: () => ({
|
|
18597
|
-
keepAliveNames: [],
|
|
18598
|
-
cachedViews: []
|
|
18599
|
-
}),
|
|
18600
|
-
actions: {
|
|
18601
|
-
async setCacheKeepAlive(data) {
|
|
18602
|
-
this.keepAliveNames = data;
|
|
18603
|
-
},
|
|
18604
|
-
async addCachedView(view) {
|
|
18605
|
-
var _a;
|
|
18606
|
-
if (view.meta.isKeepAlive) (_a = this.cachedViews) == null ? void 0 : _a.push(view.name);
|
|
18607
|
-
},
|
|
18608
|
-
async delCachedView(view) {
|
|
18609
|
-
const index = this.cachedViews.indexOf(view.name);
|
|
18610
|
-
if (index > -1) this.cachedViews.splice(index, 1);
|
|
18611
|
-
},
|
|
18612
|
-
async delOthersCachedViews(view) {
|
|
18613
|
-
if (view.meta.isKeepAlive) this.cachedViews = [view.name];
|
|
18614
|
-
else this.cachedViews = [];
|
|
18615
|
-
},
|
|
18616
|
-
async delAllCachedViews() {
|
|
18617
|
-
this.cachedViews = [];
|
|
18618
|
-
}
|
|
18619
|
-
}
|
|
18620
|
-
});
|
|
18621
|
-
|
|
18622
|
-
const useRequestOldRoutes = pinia$1.defineStore("requestOldRoutes", {
|
|
18623
|
-
state: () => ({
|
|
18624
|
-
requestOldRoutes: []
|
|
18625
|
-
}),
|
|
18626
|
-
actions: {
|
|
18627
|
-
async setRequestOldRoutes(routes) {
|
|
18628
|
-
this.requestOldRoutes = routes;
|
|
18629
|
-
}
|
|
18630
|
-
}
|
|
18631
|
-
});
|
|
18632
|
-
|
|
18633
|
-
const useRoutesList = pinia$1.defineStore("routesList", {
|
|
18634
|
-
state: () => ({
|
|
18635
|
-
routesList: [],
|
|
18636
|
-
isColumnsMenuHover: false,
|
|
18637
|
-
isColumnsNavHover: false,
|
|
18638
|
-
currentRoute: null
|
|
18639
|
-
}),
|
|
18640
|
-
actions: {
|
|
18641
|
-
setCurrentRoute(route) {
|
|
18642
|
-
this.currentRoute = route;
|
|
18643
|
-
},
|
|
18644
|
-
async setRoutesList(data) {
|
|
18645
|
-
this.routesList = data;
|
|
18646
|
-
},
|
|
18647
|
-
async setColumnsMenuHover(bool) {
|
|
18648
|
-
this.isColumnsMenuHover = bool;
|
|
18649
|
-
},
|
|
18650
|
-
async setColumnsNavHover(bool) {
|
|
18651
|
-
this.isColumnsNavHover = bool;
|
|
18652
|
-
}
|
|
18653
|
-
}
|
|
18654
|
-
});
|
|
18655
|
-
|
|
18656
|
-
const useTagsViewRoutes = pinia$1.defineStore("tagsViewRoutes", {
|
|
18657
|
-
state: () => ({
|
|
18658
|
-
tagsViewRoutes: [],
|
|
18659
|
-
isTagsViewCurrenFull: false
|
|
18660
|
-
}),
|
|
18661
|
-
actions: {
|
|
18662
|
-
async setTagsViewRoutes(data) {
|
|
18663
|
-
this.tagsViewRoutes = data;
|
|
18664
|
-
},
|
|
18665
|
-
setCurrenFullscreen(bool) {
|
|
18666
|
-
Session.set("isTagsViewCurrenFull", bool);
|
|
18667
|
-
this.isTagsViewCurrenFull = bool;
|
|
18668
|
-
}
|
|
18669
|
-
}
|
|
18670
|
-
});
|
|
18671
|
-
|
|
18672
18672
|
function auth(value) {
|
|
18673
18673
|
const stores = useUserInfo();
|
|
18674
18674
|
return stores.userInfos.authApiList.some((v) => v === value);
|
|
@@ -22516,11 +22516,6 @@
|
|
|
22516
22516
|
}
|
|
22517
22517
|
});
|
|
22518
22518
|
|
|
22519
|
-
var index$4 = /*#__PURE__*/Object.freeze({
|
|
22520
|
-
__proto__: null,
|
|
22521
|
-
default: _sfc_main$o
|
|
22522
|
-
});
|
|
22523
|
-
|
|
22524
22519
|
const FLayout = _sfc_main$o;
|
|
22525
22520
|
|
|
22526
22521
|
function commonFunction() {
|
|
@@ -22693,311 +22688,11 @@
|
|
|
22693
22688
|
};
|
|
22694
22689
|
}
|
|
22695
22690
|
|
|
22696
|
-
|
|
22697
|
-
let notFoundAndNoPower = [];
|
|
22698
|
-
exports.staticRoutes = [];
|
|
22699
|
-
function configureRoutes(options) {
|
|
22700
|
-
if (options.dynamicRoutes) {
|
|
22701
|
-
if (options.merge) {
|
|
22702
|
-
dynamicRoutes = [...dynamicRoutes, ...options.dynamicRoutes];
|
|
22703
|
-
} else {
|
|
22704
|
-
dynamicRoutes = options.dynamicRoutes;
|
|
22705
|
-
}
|
|
22706
|
-
}
|
|
22707
|
-
if (options.staticRoutes) {
|
|
22708
|
-
if (options.merge) {
|
|
22709
|
-
exports.staticRoutes = [...exports.staticRoutes, ...options.staticRoutes];
|
|
22710
|
-
} else {
|
|
22711
|
-
exports.staticRoutes = options.staticRoutes;
|
|
22712
|
-
}
|
|
22713
|
-
}
|
|
22714
|
-
if (options.notFoundAndNoPower) {
|
|
22715
|
-
if (options.merge) {
|
|
22716
|
-
notFoundAndNoPower = [...notFoundAndNoPower, ...options.notFoundAndNoPower];
|
|
22717
|
-
} else {
|
|
22718
|
-
notFoundAndNoPower = options.notFoundAndNoPower;
|
|
22719
|
-
}
|
|
22720
|
-
}
|
|
22721
|
-
}
|
|
22722
|
-
|
|
22723
|
-
function formatFlatteningRoutes(arr) {
|
|
22724
|
-
if (arr.length <= 0) return false;
|
|
22725
|
-
for (let i = 0; i < arr.length; i++) {
|
|
22726
|
-
if (arr[i].children) {
|
|
22727
|
-
arr = arr.slice(0, i + 1).concat(arr[i].children, arr.slice(i + 1));
|
|
22728
|
-
}
|
|
22729
|
-
}
|
|
22730
|
-
return arr;
|
|
22731
|
-
}
|
|
22732
|
-
function formatTwoStageRoutes(arr) {
|
|
22733
|
-
if (arr.length <= 0) return false;
|
|
22734
|
-
const newArr = [];
|
|
22735
|
-
const cacheList = [];
|
|
22736
|
-
arr.forEach((v) => {
|
|
22737
|
-
if (v.path == null || v.path == void 0) return;
|
|
22738
|
-
if (v.path === "/") {
|
|
22739
|
-
newArr.push({ component: v.component, name: v.name, path: v.path, redirect: v.redirect, meta: v.meta, children: [] });
|
|
22740
|
-
} else {
|
|
22741
|
-
if (v.path.indexOf("/:") > -1) {
|
|
22742
|
-
v.meta["isDynamic"] = true;
|
|
22743
|
-
v.meta["isDynamicPath"] = v.path;
|
|
22744
|
-
}
|
|
22745
|
-
newArr[0].children.push({ ...v });
|
|
22746
|
-
if (newArr[0].meta.isKeepAlive && v.meta.isKeepAlive) {
|
|
22747
|
-
cacheList.push(v.name);
|
|
22748
|
-
}
|
|
22749
|
-
}
|
|
22750
|
-
});
|
|
22751
|
-
const stores = useKeepALiveNames(pinia);
|
|
22752
|
-
stores.setCacheKeepAlive(cacheList);
|
|
22753
|
-
return newArr;
|
|
22754
|
-
}
|
|
22755
|
-
|
|
22756
|
-
const router = vueRouter.createRouter({
|
|
22757
|
-
history: vueRouter.createWebHashHistory(),
|
|
22758
|
-
/**
|
|
22759
|
-
* 说明:
|
|
22760
|
-
* 1、notFoundAndNoPower 默认添加 404、401 界面,防止一直提示 No match found for location with path 'xxx'
|
|
22761
|
-
* 2、backEnd.ts(后端控制路由)、frontEnd.ts(前端控制路由) 中也需要加 notFoundAndNoPower 404、401 界面。
|
|
22762
|
-
* 防止 404、401 不在 layout 布局中,不设置的话,404、401 界面将全屏显示
|
|
22763
|
-
*/
|
|
22764
|
-
routes: [...notFoundAndNoPower, ...exports.staticRoutes]
|
|
22765
|
-
});
|
|
22766
|
-
|
|
22767
|
-
async function initFrontEndControlRoutes() {
|
|
22768
|
-
if (window.nextLoading === void 0) NextLoading.start();
|
|
22769
|
-
if (!Session.get("token")) return false;
|
|
22770
|
-
await useUserInfo(pinia).setUserInfos();
|
|
22771
|
-
await setAddRoute$1();
|
|
22772
|
-
setFilterMenuAndCacheTagsViewRoutes$1();
|
|
22773
|
-
}
|
|
22774
|
-
async function setAddRoute$1() {
|
|
22775
|
-
await setFilterRouteEnd$1().forEach((route) => {
|
|
22776
|
-
router.addRoute(route);
|
|
22777
|
-
});
|
|
22778
|
-
}
|
|
22779
|
-
function setFilterRouteEnd$1() {
|
|
22780
|
-
let filterRouteEnd = formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes));
|
|
22781
|
-
filterRouteEnd[0].children = [...setFilterRoute(filterRouteEnd[0].children), ...notFoundAndNoPower];
|
|
22782
|
-
return filterRouteEnd;
|
|
22783
|
-
}
|
|
22784
|
-
function setFilterRoute(chil) {
|
|
22785
|
-
const stores = useUserInfo(pinia);
|
|
22786
|
-
const { userInfos } = pinia$1.storeToRefs(stores);
|
|
22787
|
-
let filterRoute = [];
|
|
22788
|
-
chil.forEach((route) => {
|
|
22789
|
-
if (route.meta.roles) {
|
|
22790
|
-
route.meta.roles.forEach((metaRoles) => {
|
|
22791
|
-
userInfos.value.roles.forEach((roles) => {
|
|
22792
|
-
if (metaRoles === roles) filterRoute.push({ ...route });
|
|
22793
|
-
});
|
|
22794
|
-
});
|
|
22795
|
-
}
|
|
22796
|
-
});
|
|
22797
|
-
return filterRoute;
|
|
22798
|
-
}
|
|
22799
|
-
function setCacheTagsViewRoutes$1() {
|
|
22800
|
-
const stores = useUserInfo(pinia);
|
|
22801
|
-
const storesTagsView = useTagsViewRoutes(pinia);
|
|
22802
|
-
const { userInfos } = pinia$1.storeToRefs(stores);
|
|
22803
|
-
let rolesRoutes = setFilterHasRolesMenu(dynamicRoutes, userInfos.value.roles);
|
|
22804
|
-
storesTagsView.setTagsViewRoutes(formatTwoStageRoutes(formatFlatteningRoutes(rolesRoutes))[0].children);
|
|
22805
|
-
}
|
|
22806
|
-
function setFilterMenuAndCacheTagsViewRoutes$1() {
|
|
22807
|
-
const stores = useUserInfo(pinia);
|
|
22808
|
-
const storesRoutesList = useRoutesList(pinia);
|
|
22809
|
-
const { userInfos } = pinia$1.storeToRefs(stores);
|
|
22810
|
-
storesRoutesList.setRoutesList(setFilterHasRolesMenu(dynamicRoutes[0].children, userInfos.value.roles));
|
|
22811
|
-
setCacheTagsViewRoutes$1();
|
|
22812
|
-
}
|
|
22813
|
-
function hasRoles(roles, route) {
|
|
22814
|
-
if (route.meta && route.meta.roles) return roles.some((role) => route.meta.roles.includes(role));
|
|
22815
|
-
else return true;
|
|
22816
|
-
}
|
|
22817
|
-
function setFilterHasRolesMenu(routes, roles) {
|
|
22818
|
-
const menu = [];
|
|
22819
|
-
routes.forEach((route) => {
|
|
22820
|
-
const item = { ...route };
|
|
22821
|
-
if (hasRoles(roles, item)) {
|
|
22822
|
-
if (item.children) item.children = setFilterHasRolesMenu(item.children, roles);
|
|
22823
|
-
menu.push(item);
|
|
22824
|
-
}
|
|
22825
|
-
});
|
|
22826
|
-
return menu;
|
|
22827
|
-
}
|
|
22828
|
-
|
|
22829
|
-
const import_meta = {};
|
|
22830
|
-
let dynamicViewsModules = {};
|
|
22831
|
-
function setDynamicViewsModules(modules) {
|
|
22832
|
-
dynamicViewsModules = modules;
|
|
22833
|
-
}
|
|
22834
|
-
function initDynamicViewsModules() {
|
|
22835
|
-
try {
|
|
22836
|
-
const layouModules = import_meta.glob("../layout/routerView/*.{vue,tsx}");
|
|
22837
|
-
const viewsModules = import_meta.glob("../views/**/*.{vue,tsx}");
|
|
22838
|
-
dynamicViewsModules = Object.assign({}, { ...layouModules }, { ...viewsModules });
|
|
22839
|
-
} catch (error) {
|
|
22840
|
-
dynamicViewsModules = {};
|
|
22841
|
-
}
|
|
22842
|
-
}
|
|
22843
|
-
initDynamicViewsModules();
|
|
22844
|
-
async function initBackEndControlRoutes() {
|
|
22845
|
-
if (window.nextLoading === void 0) NextLoading.start();
|
|
22846
|
-
if (!Session.get("token")) return false;
|
|
22847
|
-
await useUserInfo().setUserInfos();
|
|
22848
|
-
await useUserInfo().setConstList();
|
|
22849
|
-
await useUserInfo().setDictList();
|
|
22850
|
-
const res = await getBackEndControlRoutes();
|
|
22851
|
-
if (res == void 0 || res.length <= 0) return Promise.resolve(true);
|
|
22852
|
-
useRequestOldRoutes().setRequestOldRoutes(res);
|
|
22853
|
-
if (dynamicRoutes.length === 0) {
|
|
22854
|
-
dynamicRoutes.push({
|
|
22855
|
-
path: "/",
|
|
22856
|
-
name: "Layout",
|
|
22857
|
-
component: () => Promise.resolve().then(function () { return index$4; }),
|
|
22858
|
-
children: []
|
|
22859
|
-
});
|
|
22860
|
-
}
|
|
22861
|
-
dynamicRoutes[0].children = await backEndComponent(res);
|
|
22862
|
-
await setAddRoute();
|
|
22863
|
-
setFilterMenuAndCacheTagsViewRoutes();
|
|
22864
|
-
}
|
|
22865
|
-
async function setFilterMenuAndCacheTagsViewRoutes() {
|
|
22866
|
-
const storesRoutesList = useRoutesList(pinia);
|
|
22867
|
-
storesRoutesList.setRoutesList(dynamicRoutes[0].children);
|
|
22868
|
-
setCacheTagsViewRoutes();
|
|
22869
|
-
}
|
|
22870
|
-
function setCacheTagsViewRoutes() {
|
|
22871
|
-
const storesTagsView = useTagsViewRoutes(pinia);
|
|
22872
|
-
storesTagsView.setTagsViewRoutes(formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes))[0].children);
|
|
22873
|
-
}
|
|
22874
|
-
function setFilterRouteEnd() {
|
|
22875
|
-
let filterRouteEnd = formatTwoStageRoutes(formatFlatteningRoutes(dynamicRoutes));
|
|
22876
|
-
filterRouteEnd[0].children = [...filterRouteEnd[0].children, ...notFoundAndNoPower];
|
|
22877
|
-
return filterRouteEnd;
|
|
22878
|
-
}
|
|
22879
|
-
async function setAddRoute() {
|
|
22880
|
-
await setFilterRouteEnd().forEach((route) => {
|
|
22881
|
-
router.addRoute(route);
|
|
22882
|
-
});
|
|
22883
|
-
}
|
|
22884
|
-
async function getBackEndControlRoutes() {
|
|
22885
|
-
var res = await useSysApi().getMenuTree();
|
|
22886
|
-
let resData = res.data.result;
|
|
22887
|
-
return resData;
|
|
22888
|
-
}
|
|
22889
|
-
function backEndComponent(routes) {
|
|
22890
|
-
if (!routes) return [];
|
|
22891
|
-
return routes.map((item) => {
|
|
22892
|
-
if (!item.path) item.path = "";
|
|
22893
|
-
if (item.component && typeof item.component === "string") {
|
|
22894
|
-
item.component = dynamicImport(dynamicViewsModules, item.component);
|
|
22895
|
-
if (!item.component) {
|
|
22896
|
-
item.component = () => Promise.resolve().then(function () { return index$4; });
|
|
22897
|
-
console.warn(`Using default component for route: ${item.path}`);
|
|
22898
|
-
}
|
|
22899
|
-
}
|
|
22900
|
-
if (item.children) {
|
|
22901
|
-
item.children = backEndComponent(item.children);
|
|
22902
|
-
}
|
|
22903
|
-
return item;
|
|
22904
|
-
});
|
|
22905
|
-
}
|
|
22906
|
-
function dynamicImport(dynamicViewsModules2, component) {
|
|
22907
|
-
const keys = Object.keys(dynamicViewsModules2);
|
|
22908
|
-
let matchKeys = [];
|
|
22909
|
-
matchKeys = keys.filter((key) => key.includes(component));
|
|
22910
|
-
if (matchKeys.length === 0) {
|
|
22911
|
-
const REMOVE_PREFIXES = [
|
|
22912
|
-
"../../../../packages/fmasyspage/views",
|
|
22913
|
-
"../../../../packages/fmwlpage/views",
|
|
22914
|
-
"../../../../packages/fmreliefpage/views",
|
|
22915
|
-
"../views",
|
|
22916
|
-
"./views",
|
|
22917
|
-
"./layout/routerView",
|
|
22918
|
-
"../layout/routerView",
|
|
22919
|
-
".."
|
|
22920
|
-
].map((p) => p.replace(/\./g, "\\.").replace(/\//g, "\\/")).join("|");
|
|
22921
|
-
matchKeys = keys.filter((key) => {
|
|
22922
|
-
const k = key.replace(new RegExp(`^(${REMOVE_PREFIXES})/?`), "/");
|
|
22923
|
-
return k.startsWith(`${component}`) || k.startsWith(`/${component}`);
|
|
22924
|
-
});
|
|
22925
|
-
}
|
|
22926
|
-
if ((matchKeys == null ? void 0 : matchKeys.length) === 1) {
|
|
22927
|
-
const matchKey = matchKeys[0];
|
|
22928
|
-
return dynamicViewsModules2[matchKey];
|
|
22929
|
-
}
|
|
22930
|
-
if ((matchKeys == null ? void 0 : matchKeys.length) > 1) {
|
|
22931
|
-
const exactMatch = matchKeys.find((key) => key.endsWith(`${component}.vue`) || key.endsWith(`${component}.tsx`));
|
|
22932
|
-
if (exactMatch) {
|
|
22933
|
-
return dynamicViewsModules2[exactMatch];
|
|
22934
|
-
}
|
|
22935
|
-
return dynamicViewsModules2[matchKeys[0]];
|
|
22936
|
-
}
|
|
22937
|
-
if (dynamicViewsModules2[component]) {
|
|
22938
|
-
return dynamicViewsModules2[component];
|
|
22939
|
-
}
|
|
22940
|
-
if (component.startsWith("/")) {
|
|
22941
|
-
const relativeComponent = component.substring(1);
|
|
22942
|
-
if (dynamicViewsModules2[relativeComponent]) {
|
|
22943
|
-
return dynamicViewsModules2[relativeComponent];
|
|
22944
|
-
}
|
|
22945
|
-
}
|
|
22946
|
-
console.warn(`No component found for: ${component}`);
|
|
22947
|
-
console.warn("Available modules:", Object.keys(dynamicViewsModules2));
|
|
22948
|
-
}
|
|
22949
|
-
|
|
22950
|
-
const storesThemeConfig = useThemeConfig(pinia);
|
|
22951
|
-
const { themeConfig } = pinia$1.storeToRefs(storesThemeConfig);
|
|
22952
|
-
const { isRequestRoutes } = themeConfig.value;
|
|
22953
|
-
const routeStores = useRoutesList();
|
|
22954
|
-
router.beforeEach(async (to, from) => {
|
|
22955
|
-
NProgress.configure({ showSpinner: false });
|
|
22956
|
-
routeStores.setCurrentRoute(to);
|
|
22957
|
-
if (to.meta.title) NProgress.start();
|
|
22958
|
-
const token = window.location.hash.startsWith("#/login") && to.query.token ? void 0 : Session.get("token");
|
|
22959
|
-
if (to.meta.isPublic && !token) {
|
|
22960
|
-
NProgress.done();
|
|
22961
|
-
return;
|
|
22962
|
-
} else {
|
|
22963
|
-
if (!token) {
|
|
22964
|
-
var routeLocation = `/login?redirect=${to.path}¶ms=${JSON.stringify(to.query ? to.query : to.params)}`;
|
|
22965
|
-
var tenantid = Number(Local.get("tid"));
|
|
22966
|
-
if (!isNaN(tenantid) && tenantid > 99999) routeLocation += `&tid=${tenantid}`;
|
|
22967
|
-
Session.clear();
|
|
22968
|
-
NProgress.done();
|
|
22969
|
-
return routeLocation;
|
|
22970
|
-
} else if (token && to.path === "/login") {
|
|
22971
|
-
NProgress.done();
|
|
22972
|
-
return "/dashboard/home";
|
|
22973
|
-
} else {
|
|
22974
|
-
const storesRoutesList = useRoutesList(pinia);
|
|
22975
|
-
const { routesList } = pinia$1.storeToRefs(storesRoutesList);
|
|
22976
|
-
if (routesList.value.length === 0) {
|
|
22977
|
-
if (isRequestRoutes) {
|
|
22978
|
-
const isNoPower = await initBackEndControlRoutes();
|
|
22979
|
-
if (isNoPower) clearTokens();
|
|
22980
|
-
return { path: to.path, query: to.query };
|
|
22981
|
-
} else {
|
|
22982
|
-
await initFrontEndControlRoutes();
|
|
22983
|
-
return { path: to.path, query: to.query };
|
|
22984
|
-
}
|
|
22985
|
-
} else {
|
|
22986
|
-
return;
|
|
22987
|
-
}
|
|
22988
|
-
}
|
|
22989
|
-
}
|
|
22990
|
-
});
|
|
22991
|
-
router.afterEach(() => {
|
|
22992
|
-
NProgress.done();
|
|
22993
|
-
});
|
|
22994
|
-
function initRouter() {
|
|
22995
|
-
return router;
|
|
22996
|
-
}
|
|
22997
|
-
|
|
22691
|
+
const { proxy } = vue.getCurrentInstance();
|
|
22998
22692
|
function useTitle() {
|
|
22999
22693
|
const stores = useThemeConfig(pinia);
|
|
23000
22694
|
const { themeConfig } = pinia$1.storeToRefs(stores);
|
|
22695
|
+
const router = proxy.$mycurRouter;
|
|
23001
22696
|
vue.nextTick(() => {
|
|
23002
22697
|
let webTitle = "";
|
|
23003
22698
|
let globalTitle = themeConfig.value.globalTitle;
|
|
@@ -23088,6 +22783,7 @@
|
|
|
23088
22783
|
function handleOpenLink(val) {
|
|
23089
22784
|
var _a, _b, _c;
|
|
23090
22785
|
const { origin, pathname } = window.location;
|
|
22786
|
+
const router = proxy.$mycurRouter;
|
|
23091
22787
|
router.push(val.path);
|
|
23092
22788
|
if (verifyUrl((_a = val.meta) == null ? void 0 : _a.isLink)) window.open((_b = val.meta) == null ? void 0 : _b.isLink);
|
|
23093
22789
|
else window.open(`${origin}${pathname}#${(_c = val.meta) == null ? void 0 : _c.isLink}`);
|
|
@@ -28575,12 +28271,14 @@
|
|
|
28575
28271
|
noticeList: Array
|
|
28576
28272
|
},
|
|
28577
28273
|
setup(__props) {
|
|
28274
|
+
const { proxy } = vue.getCurrentInstance();
|
|
28578
28275
|
const { removeHtmlSub } = commonFunction();
|
|
28579
28276
|
const state = vue.reactive({
|
|
28580
28277
|
dialogVisible: false,
|
|
28581
28278
|
content: ""
|
|
28582
28279
|
});
|
|
28583
28280
|
const goToNotice = () => {
|
|
28281
|
+
const router = proxy.$mycurRouter;
|
|
28584
28282
|
router.push("/dashboard/notice");
|
|
28585
28283
|
};
|
|
28586
28284
|
const viewNoticeDetail = async (notice) => {
|
|
@@ -28900,7 +28598,6 @@
|
|
|
28900
28598
|
exports.clone = clone;
|
|
28901
28599
|
exports.commonFun = commonFun;
|
|
28902
28600
|
exports.commonFunction = commonFunction;
|
|
28903
|
-
exports.configureRoutes = configureRoutes;
|
|
28904
28601
|
exports.dataURLtoBlob = dataURLtoBlob;
|
|
28905
28602
|
exports.decryptJWT = decryptJWT;
|
|
28906
28603
|
exports.default = installer;
|
|
@@ -28931,10 +28628,7 @@
|
|
|
28931
28628
|
exports.hasPrivilege = hasPrivilege;
|
|
28932
28629
|
exports.hasRoleCode = hasRoleCode;
|
|
28933
28630
|
exports.i18n = i18n;
|
|
28934
|
-
exports.initBackEndControlRoutes = initBackEndControlRoutes;
|
|
28935
|
-
exports.initFrontEndControlRoutes = initFrontEndControlRoutes;
|
|
28936
28631
|
exports.initIdleTimeout = initIdleTimeout;
|
|
28937
|
-
exports.initRouter = initRouter;
|
|
28938
28632
|
exports.install = install;
|
|
28939
28633
|
exports.isAdmin = isAdmin;
|
|
28940
28634
|
exports.isMember = isMember;
|
|
@@ -28953,6 +28647,7 @@
|
|
|
28953
28647
|
exports.orgId = orgId;
|
|
28954
28648
|
exports.orgName = orgName;
|
|
28955
28649
|
exports.other = other;
|
|
28650
|
+
exports.pinia = pinia;
|
|
28956
28651
|
exports.posId = posId;
|
|
28957
28652
|
exports.posName = posName;
|
|
28958
28653
|
exports.provideFormEvents = provideFormEvents;
|
|
@@ -28962,11 +28657,9 @@
|
|
|
28962
28657
|
exports.request2 = request2;
|
|
28963
28658
|
exports.restartSignalR = restartSignalR;
|
|
28964
28659
|
exports.roles = roles;
|
|
28965
|
-
exports.router = router;
|
|
28966
28660
|
exports.saulVModel = saulVModel;
|
|
28967
28661
|
exports.service = service;
|
|
28968
28662
|
exports.setCssCdn = setCssCdn;
|
|
28969
|
-
exports.setDynamicViewsModules = setDynamicViewsModules;
|
|
28970
28663
|
exports.setIntroduction = setIntroduction;
|
|
28971
28664
|
exports.setJsCdn = setJsCdn;
|
|
28972
28665
|
exports.setupI18n = setupI18n;
|