@utogether/udp-core 1.0.1-beta.2 → 1.0.1-beta.20
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/build/plugins.ts +8 -1
- package/dist/{403-BBQoJwTM.js → 403-Bz5EJPLA.js} +1 -1
- package/dist/{404-BbJPSIWM.js → 404-ClOnaj9V.js} +1 -1
- package/dist/{500-BtFL9R4M.js → 500-DCUfhV7Y.js} +1 -1
- package/dist/{AuthorityInfo-DhiwCeLN.js → AuthorityInfo-q6E-js1r.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BM52QDgn.js +100 -0
- package/dist/{Company-CGqmslx-.js → Company-BSShW3Q4.js} +3 -3
- package/dist/{CompanyPanel-hlDsxD-6.js → CompanyPanel-Dl8eOYLk.js} +26 -26
- package/dist/{Department-BZyJtacc.js → Department-CVIxAnUN.js} +3 -3
- package/dist/{DepartmentPanel-D-a_EBFt.js → DepartmentPanel-Sa3IDl4z.js} +25 -25
- package/dist/{DesignPanel-Bl4luWDV.js → DesignPanel-DnRipagE.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-I8C3iGvz.js → DesignPanel.vue_vue_type_style_index_0_lang-DGNyp3Vl.js} +28 -30
- package/dist/DictView-uf2K9A1d.js +109 -0
- package/dist/InvOrganization-CG9VCpXl.js +74 -0
- package/dist/Org-W2CBN1B8.js +39 -0
- package/dist/{Preview-pHD84xqI.js → Preview-DPBxdDvW.js} +2 -2
- package/dist/{ReportDefine-DnnCNQWS.js → ReportDefine-Dsx9VM-I.js} +1 -1
- package/dist/{ReportDesign-BnI_Q4pg.js → ReportDesign-DiIGfte0.js} +43 -43
- package/dist/{ReportQuery-Dby2MmtM.js → ReportQuery-9A4Bfs1M.js} +1 -1
- package/dist/{ReportQueryFrom-Blm1N8P1.js → ReportQueryFrom-M5qLoGAa.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CnG_Ybnt.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-OQ9pUCKP.js} +1 -1
- package/dist/{ReportTemplate-D65RXRY_.js → ReportTemplate-C34FWAuK.js} +28 -28
- package/dist/{Role-eFZoTpXc.js → Role-jG3VTeOF.js} +6 -6
- package/dist/{RoleAssign-D9-Y3UNz.js → RoleAssign-BfHpCequ.js} +9 -9
- package/dist/{RolePanel-DlFw6HSf.js → RolePanel-DW9pNl0L.js} +1 -1
- package/dist/{RolePanel-CoUOc3sX.js → RolePanel-xRN2-rkk.js} +1 -1
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-Clwk-MHw.js → RolePanel.vue_vue_type_script_setup_true_lang-BVEHqEq9.js} +44 -38
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-C0rTy6vZ.js +132 -0
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-M2FQJwPU.js → ScrollPanel.vue_vue_type_style_index_0_lang-D65sJYWT.js} +23 -23
- package/dist/{Staff-DFBLCsAd.js → Staff-BqBVEjau.js} +3 -3
- package/dist/{StaffInfo-d2CK0oBA.js → StaffInfo-DXeyyEFL.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-4m8wK9tq.js → StaffInfo.vue_vue_type_script_setup_true_lang-Dg0iYgRf.js} +16 -16
- package/dist/{StaffPanel-D6aWLKN3.js → StaffPanel-iE-8VtUm.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-C7YT2CVb.js → StaffPanel.vue_vue_type_script_setup_true_lang-BrrvE1xm.js} +2 -2
- package/dist/{SysUser-BdZvYxQH.js → SysUser-DSZyW30i.js} +2 -2
- package/dist/{SysUserPanel-BIVa6LLr.js → SysUserPanel-CbiG6GQF.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-B1Y1fmBe.js +298 -0
- package/dist/{SystemMenu-C-5VKlHK.js → SystemMenu-DreuWY-a.js} +33 -33
- package/dist/{UserInfo-DqXCRZts.js → UserInfo-DXrzKAim.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-N3TwfpPx.js → UserInfo.vue_vue_type_style_index_0_lang-C44E20b4.js} +41 -39
- package/dist/{childView-B2lSsqS3.js → childView-VCidWgY6.js} +1 -1
- package/dist/{childView-DRUNqgjI.js → childView-k5IkJOBr.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-B9XBDDU_.js → childView.vue_vue_type_style_index_0_lang-C6ftwwvZ.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-oGriyFTv.js → childView.vue_vue_type_style_index_0_lang-DmG82dVB.js} +43 -43
- package/dist/{code-rule-DZC9T6cl.js → code-rule-7WQMabpW.js} +13 -15
- package/dist/core.es.js +18 -10
- package/dist/{cron-task-BJwPeA5F.js → cron-task-D1t56MSu.js} +11 -11
- package/dist/{frameView-C6wkvok-.js → frameView-CWsIFBgU.js} +1 -1
- package/dist/img/l_img.svg +1 -1
- package/dist/img/minicolors.png +0 -0
- package/dist/img/v_img.svg +1 -1
- package/dist/index-DxWAYxai.js +5495 -0
- package/dist/{layoutView-CeJBpZb_.js → layoutView-DLpHSner.js} +1564 -1559
- package/dist/{log-in-e7D5Ss1P.js → log-in-CpGqc33f.js} +5 -4
- package/dist/{log-out--RRncZhN.js → log-out-D1b4VRMZ.js} +30 -24
- package/dist/login-OjDiQmz8.js +249 -0
- package/dist/{login-log-CvVnyGi3.js → login-log-BNRXLeMi.js} +4 -3
- package/dist/{lov-view-DRF-99U4.js → lov-view-D28X6m3k.js} +5 -5
- package/dist/{menuInfo-3Sjvs9nM.js → menuInfo-DwPB6rHz.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-DrQ560nm.js → menuInfo.vue_vue_type_style_index_0_lang-l5DNRfb7.js} +34 -32
- package/dist/{pda-app-B9tn7jdv.js → pda-app-Bdms2PRY.js} +202 -188
- package/dist/{resource-BqnxbQNe.js → resource-y6SHrHoq.js} +18 -18
- package/dist/{su-welcome-VwifUK_O.js → su-welcome-D9G6EuK2.js} +118 -120
- package/dist/sys-config-DFnGHiFc.js +355 -0
- package/dist/udp-core.css +1 -9
- package/dist/utogether-MlnyYtNS.js +4 -0
- package/index.ts +17 -5
- package/package.json +1 -1
- package/src/App.vue +2 -7
- package/src/api/http.ts +1 -4
- package/src/api/index.ts +5 -3
- package/src/api/user.ts +2 -2
- package/src/components/SuCharts/src/UserInfo.vue +3 -3
- package/src/components/SuScrollTree/ScrollPanel.vue +170 -175
- package/src/components/udp/form/form.vue +109 -0
- package/src/components/udp/grid/index.vue +509 -0
- package/src/components/udp/index.ts +4 -4
- package/src/components/udp/utils.ts +405 -40
- package/src/directives/permission/index.ts +1 -1
- package/src/layout/components/lay-navbar/index.vue +9 -7
- package/src/layout/components/lay-panel/index.vue +3 -3
- package/src/layout/components/lay-search/index.vue +1 -1
- package/src/layout/components/lay-select-org/index.vue +4 -9
- package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
- package/src/layout/components/lay-sidebar/horizontal.vue +4 -5
- package/src/layout/components/lay-sidebar/mixNav.vue +6 -4
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +94 -98
- package/src/layout/components/lay-tag/index.vue +596 -625
- package/src/layout/hooks/useTag.ts +223 -233
- package/src/layout/layoutView.vue +215 -215
- package/src/layout/types.ts +3 -2
- package/src/main.ts +39 -31
- package/src/plugins/i18n/en.ts +26 -13
- package/src/plugins/i18n/zh.ts +35 -16
- package/src/plugins/vxe-table/index.ts +67 -4
- package/src/plugins/vxe-table/render.tsx +945 -817
- package/src/router/index.ts +186 -183
- package/src/router/modules/remaining.ts +1 -26
- package/src/router/utils.ts +393 -377
- package/src/store/modules/app.ts +1 -3
- package/src/store/modules/multiTags.ts +110 -109
- package/src/store/modules/permission.ts +113 -103
- package/src/store/modules/system.ts +1 -3
- package/src/style/button.scss +10 -3
- package/src/style/login.css +1 -1
- package/src/style/tailwind.css +1 -68
- package/src/style/vxetable.scss +348 -256
- package/src/utils/authority/index.ts +1 -1
- package/src/utils/index.ts +3 -1
- package/src/utils/propTypes.ts +1 -6
- package/src/views/login/login-view.vue +6 -20
- package/src/views/organization/company/CompanyPanel.vue +2 -2
- package/src/views/organization/department/DepartmentPanel.vue +269 -283
- package/src/views/organization/inv-org/InvOrganization.vue +23 -9
- package/src/views/organization/org/Org.vue +9 -5
- package/src/views/system/menu/SystemMenu.vue +183 -197
- package/src/views/system/menu/menuInfo.vue +8 -18
- package/src/views/system/role/AuthorityInfo.vue +19 -15
- package/src/views/system/role/Role.vue +1 -5
- package/src/views/system/role/RolePanel.vue +11 -2
- package/src/views/system/role/UserInfo.vue +11 -9
- package/src/views/system/role-assign/RoleAssign.vue +2 -2
- package/src/views/system/role-assign/RolePanel.vue +12 -9
- package/src/views/system/sys/sys-config.vue +66 -21
- package/src/views/system/sysUser/SysUserPanel.vue +44 -43
- package/src/views/uapp/pda/pda-app.vue +48 -16
- package/src/views/udev/coderule/code-rule.vue +120 -121
- package/src/views/udev/dict/DictView.vue +16 -4
- package/src/views/udev/dict/childView.vue +8 -8
- package/src/views/ufile/aggregation/File.vue +5 -5
- package/src/views/ufile/file/water-mark.vue +14 -14
- package/src/views/uhome/components/menu-favorite.vue +314 -331
- package/src/views/uhome/su-welcome.vue +3 -3
- package/src/views/ulogin/login.vue +19 -12
- package/src/views/upms/interface/log-in.vue +100 -106
- package/src/views/upms/interface/log-out.vue +2 -8
- package/src/views/upms/user/login-log.vue +54 -60
- package/src/views/urpt/design/DesignPanel.vue +16 -35
- package/src/views/urpt/design/Preview.vue +1 -0
- package/src/views/urpt/design/ReportDesign.vue +17 -23
- package/src/views/urpt/static-resource/resource.vue +3 -3
- package/src/views/urpt/template/ReportTemplate.vue +7 -7
- package/types/global.d.ts +4 -9
- package/vite.config.ts +6 -2
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-Duyweh89.js +0 -102
- package/dist/DictView-B4a7Hs1X.js +0 -95
- package/dist/InvOrganization-q4T3y8dQ.js +0 -260
- package/dist/Org-BTGTrAVz.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DKHgNWQP.js +0 -126
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BsBKpYR7.js +0 -288
- package/dist/index-DZc3qRTx.js +0 -2650
- package/dist/login-BOxwzwdB.js +0 -252
- package/dist/sys-config-C0-gSBFO.js +0 -277
- package/dist/utogether-Di1byIum.js +0 -182
- package/src/components/udp/form-upload.vue +0 -183
- package/src/components/udp/modal-form.vue +0 -180
- package/src/utils/http/index.ts +0 -297
- package/src/utils/http/types.d.ts +0 -46
- package/src/utils/udp/useRender.ts +0 -420
package/src/store/modules/app.ts
CHANGED
|
@@ -14,9 +14,7 @@ import { responsiveStorageNameSpace, getConfig } from '../../config';
|
|
|
14
14
|
export const useAppStore = defineStore('udp-app', {
|
|
15
15
|
state: (): appType => ({
|
|
16
16
|
sidebar: {
|
|
17
|
-
opened:
|
|
18
|
-
storageLocal.getItem(`${responsiveStorageNameSpace()}layout`)?.sidebarStatus ??
|
|
19
|
-
getConfig().SidebarStatus,
|
|
17
|
+
opened: storageLocal.getItem(`${responsiveStorageNameSpace()}layout`)?.sidebarStatus ?? getConfig().SidebarStatus,
|
|
20
18
|
withoutAnimation: false,
|
|
21
19
|
isClickCollapse: false
|
|
22
20
|
},
|
|
@@ -1,109 +1,110 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-12-23 17:33:20
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
import { defineStore } from 'pinia';
|
|
9
|
-
import { isEqual, isBoolean } from 'xe-utils';
|
|
10
|
-
import { storageLocal, isUrl } from '@utogether/utils';
|
|
11
|
-
import { store } from '../index';
|
|
12
|
-
import { routerArrays } from '../../layout/types';
|
|
13
|
-
import { usePermissionStoreHook } from './permission';
|
|
14
|
-
import { responsiveStorageNameSpace } from '../../config';
|
|
15
|
-
import type { multiType, positionType } from './types';
|
|
16
|
-
|
|
17
|
-
export const useMultiTagsStore = defineStore('udp-multiTags', {
|
|
18
|
-
state: () => ({
|
|
19
|
-
// 存储标签页信息(路由信息)
|
|
20
|
-
multiTags: storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.multiTagsCache
|
|
21
|
-
? storageLocal.getItem(`${responsiveStorageNameSpace()}tags`)
|
|
22
|
-
: [...routerArrays, ...usePermissionStoreHook().flatteningRoutes.filter(v => v?.meta?.fixedTag)],
|
|
23
|
-
multiTagsCache: storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.multiTagsCache
|
|
24
|
-
}),
|
|
25
|
-
getters: {
|
|
26
|
-
getMultiTagsCache(state) {
|
|
27
|
-
return state.multiTagsCache;
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
actions: {
|
|
31
|
-
multiTagsCacheChange(multiTagsCache: boolean) {
|
|
32
|
-
this.multiTagsCache = multiTagsCache;
|
|
33
|
-
if (multiTagsCache) {
|
|
34
|
-
storageLocal.setItem(`${responsiveStorageNameSpace()}tags`, this.multiTags);
|
|
35
|
-
} else {
|
|
36
|
-
storageLocal.removeItem(`${responsiveStorageNameSpace()}tags`);
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
tagsCache(multiTags) {
|
|
40
|
-
this.getMultiTagsCache && storageLocal.setItem(`${responsiveStorageNameSpace()}tags`, multiTags);
|
|
41
|
-
},
|
|
42
|
-
handleTags<T>(mode: string, value?: T | multiType, position?: positionType): T {
|
|
43
|
-
switch (mode) {
|
|
44
|
-
case 'equal':
|
|
45
|
-
this.multiTags = value;
|
|
46
|
-
this.tagsCache(this.multiTags);
|
|
47
|
-
break;
|
|
48
|
-
case 'push':
|
|
49
|
-
{
|
|
50
|
-
const tagVal = value as multiType;
|
|
51
|
-
// 不添加到标签页
|
|
52
|
-
if (tagVal?.meta?.hiddenTag) return;
|
|
53
|
-
// 如果是外链无需添加信息到标签页
|
|
54
|
-
if (isUrl(tagVal?.name)) return;
|
|
55
|
-
// 如果title为空拒绝添加空信息到标签页
|
|
56
|
-
if (tagVal?.meta?.title?.length === 0) return;
|
|
57
|
-
// showLink:false 不添加到标签页
|
|
58
|
-
if (isBoolean(tagVal?.meta?.showLink) && !tagVal?.meta?.showLink) return;
|
|
59
|
-
const tagPath = tagVal.path;
|
|
60
|
-
// 判断tag是否已存在
|
|
61
|
-
const tagHasExits = this.multiTags.some(tag => {
|
|
62
|
-
return tag.path === tagPath;
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
// 判断tag中的query键值是否相等
|
|
66
|
-
const tagQueryHasExits = this.multiTags.some(tag => {
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
// 判断tag中的params键值是否相等
|
|
71
|
-
const tagParamsHasExits = this.multiTags.some(tag => {
|
|
72
|
-
|
|
73
|
-
});
|
|
74
|
-
|
|
75
|
-
if (tagHasExits && tagQueryHasExits && tagParamsHasExits) return;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
index
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
this.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-12-23 17:33:20
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-10-19 12:01:05
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import { defineStore } from 'pinia';
|
|
9
|
+
import { isEqual, isBoolean } from 'xe-utils';
|
|
10
|
+
import { storageLocal, isUrl } from '@utogether/utils';
|
|
11
|
+
import { store } from '../index';
|
|
12
|
+
import { routerArrays } from '../../layout/types';
|
|
13
|
+
import { usePermissionStoreHook } from './permission';
|
|
14
|
+
import { responsiveStorageNameSpace } from '../../config';
|
|
15
|
+
import type { multiType, positionType } from './types';
|
|
16
|
+
|
|
17
|
+
export const useMultiTagsStore = defineStore('udp-multiTags', {
|
|
18
|
+
state: () => ({
|
|
19
|
+
// 存储标签页信息(路由信息)
|
|
20
|
+
multiTags: storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.multiTagsCache
|
|
21
|
+
? storageLocal.getItem(`${responsiveStorageNameSpace()}tags`)
|
|
22
|
+
: [...routerArrays, ...usePermissionStoreHook().flatteningRoutes.filter(v => v?.meta?.fixedTag)],
|
|
23
|
+
multiTagsCache: storageLocal.getItem(`${responsiveStorageNameSpace()}configure`)?.multiTagsCache
|
|
24
|
+
}),
|
|
25
|
+
getters: {
|
|
26
|
+
getMultiTagsCache(state) {
|
|
27
|
+
return state.multiTagsCache;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
actions: {
|
|
31
|
+
multiTagsCacheChange(multiTagsCache: boolean) {
|
|
32
|
+
this.multiTagsCache = multiTagsCache;
|
|
33
|
+
if (multiTagsCache) {
|
|
34
|
+
storageLocal.setItem(`${responsiveStorageNameSpace()}tags`, this.multiTags);
|
|
35
|
+
} else {
|
|
36
|
+
storageLocal.removeItem(`${responsiveStorageNameSpace()}tags`);
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
tagsCache(multiTags) {
|
|
40
|
+
this.getMultiTagsCache && storageLocal.setItem(`${responsiveStorageNameSpace()}tags`, multiTags);
|
|
41
|
+
},
|
|
42
|
+
handleTags<T>(mode: string, value?: T | multiType, position?: positionType): T {
|
|
43
|
+
switch (mode) {
|
|
44
|
+
case 'equal':
|
|
45
|
+
this.multiTags = value;
|
|
46
|
+
this.tagsCache(this.multiTags);
|
|
47
|
+
break;
|
|
48
|
+
case 'push':
|
|
49
|
+
{
|
|
50
|
+
const tagVal = value as multiType;
|
|
51
|
+
// 不添加到标签页
|
|
52
|
+
if (tagVal?.meta?.hiddenTag) return;
|
|
53
|
+
// 如果是外链无需添加信息到标签页
|
|
54
|
+
if (isUrl(tagVal?.name)) return;
|
|
55
|
+
// 如果title为空拒绝添加空信息到标签页
|
|
56
|
+
if (tagVal?.meta?.title?.length === 0) return;
|
|
57
|
+
// showLink:false 不添加到标签页
|
|
58
|
+
if (isBoolean(tagVal?.meta?.showLink) && !tagVal?.meta?.showLink) return;
|
|
59
|
+
const tagPath = tagVal.path;
|
|
60
|
+
// 判断tag是否已存在
|
|
61
|
+
const tagHasExits = this.multiTags.some(tag => {
|
|
62
|
+
return tag.path === tagPath && isEqual(tag?.query, tagVal?.query) && isEqual(tag?.params, tagVal?.params);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
// 判断tag中的query键值是否相等
|
|
66
|
+
// const tagQueryHasExits = this.multiTags.some(tag => {
|
|
67
|
+
// return isEqual(tag?.query, tagVal?.query);
|
|
68
|
+
// });
|
|
69
|
+
|
|
70
|
+
// // 判断tag中的params键值是否相等
|
|
71
|
+
// const tagParamsHasExits = this.multiTags.some(tag => {
|
|
72
|
+
// return isEqual(tag?.params, tagVal?.params);
|
|
73
|
+
// });
|
|
74
|
+
|
|
75
|
+
// if (tagHasExits && tagQueryHasExits && tagParamsHasExits) return;
|
|
76
|
+
if (tagHasExits) return;
|
|
77
|
+
|
|
78
|
+
// 动态路由可打开的最大数量
|
|
79
|
+
const dynamicLevel = tagVal?.meta?.dynamicLevel ?? -1;
|
|
80
|
+
if (dynamicLevel > 0) {
|
|
81
|
+
if (this.multiTags.filter(e => e?.path === tagPath).length >= dynamicLevel) {
|
|
82
|
+
// 如果当前已打开的动态路由数大于dynamicLevel,替换第一个动态路由标签
|
|
83
|
+
const index = this.multiTags.findIndex(item => item?.path === tagPath);
|
|
84
|
+
index !== -1 && this.multiTags.splice(index, 1);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
this.multiTags.push(value);
|
|
88
|
+
this.tagsCache(this.multiTags);
|
|
89
|
+
}
|
|
90
|
+
break;
|
|
91
|
+
case 'splice':
|
|
92
|
+
if (!position) {
|
|
93
|
+
const index = this.multiTags.findIndex(v => v.path === value);
|
|
94
|
+
if (index === -1) return;
|
|
95
|
+
this.multiTags.splice(index, 1);
|
|
96
|
+
} else {
|
|
97
|
+
this.multiTags.splice(position?.startIndex, position?.length);
|
|
98
|
+
}
|
|
99
|
+
this.tagsCache(this.multiTags);
|
|
100
|
+
return this.multiTags;
|
|
101
|
+
case 'slice':
|
|
102
|
+
return this.multiTags.slice(-1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
export function useMultiTagsStoreHook() {
|
|
109
|
+
return useMultiTagsStore(store);
|
|
110
|
+
}
|
|
@@ -1,103 +1,113 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-11-17 16:02:30
|
|
4
|
-
* @LastEditors:
|
|
5
|
-
* @LastEditTime:
|
|
6
|
-
* @Description: file content
|
|
7
|
-
*/
|
|
8
|
-
import { defineStore } from 'pinia';
|
|
9
|
-
import { store } from '../index';
|
|
10
|
-
import type { cacheType } from './types';
|
|
11
|
-
import { constantMenus } from '../../router';
|
|
12
|
-
import { clone,
|
|
13
|
-
import { getKeyList } from '../../utils';
|
|
14
|
-
import { ascending, filterTree, formatFlatteningRoutes } from '../../router/utils';
|
|
15
|
-
import { useMultiTagsStoreHook } from './multiTags';
|
|
16
|
-
|
|
17
|
-
export const usePermissionStore = defineStore('udp-permission', {
|
|
18
|
-
state: () => ({
|
|
19
|
-
// 静态路由生成的菜单
|
|
20
|
-
constantMenus,
|
|
21
|
-
// 整体路由生成的菜单(静态、动态)
|
|
22
|
-
wholeMenus: [],
|
|
23
|
-
// 深拷贝一个菜单树,与导航菜单不冲突
|
|
24
|
-
menusTree: [],
|
|
25
|
-
// 整体路由(一维数组格式)
|
|
26
|
-
flatteningRoutes: [],
|
|
27
|
-
buttonAuth: [],
|
|
28
|
-
// 缓存页面keepAlive
|
|
29
|
-
cachePageList: []
|
|
30
|
-
}),
|
|
31
|
-
getters: {
|
|
32
|
-
getButtonAuth() {
|
|
33
|
-
return this.buttonAuth;
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
actions: {
|
|
37
|
-
asyncActionRoutes(routes = []) {
|
|
38
|
-
if (this.wholeMenus.length > 0) return;
|
|
39
|
-
const idx = findLastIndexOf(routes, item => item.menuCode === 'SysHome');
|
|
40
|
-
const constantMenus = clone(this.constantMenus, true);
|
|
41
|
-
if (idx !== -1) {
|
|
42
|
-
const homeRouter = this.constantMenus.find(f => f.name === 'home');
|
|
43
|
-
// 过滤非路由分类非菜单的数据
|
|
44
|
-
routes[idx].children && homeRouter.children.push(...routes[idx].children);
|
|
45
|
-
routes.splice(idx, 1);
|
|
46
|
-
}
|
|
47
|
-
this.wholeMenus = filterTree(ascending(this.constantMenus.concat(routes)));
|
|
48
|
-
this.flatteningRoutes = formatFlatteningRoutes(this.constantMenus.concat(routes));
|
|
49
|
-
this.menusTree = clone(this.wholeMenus, true);
|
|
50
|
-
this.constantMenus = constantMenus;
|
|
51
|
-
},
|
|
52
|
-
async changeSetting(routes) {
|
|
53
|
-
await this.asyncActionRoutes(routes);
|
|
54
|
-
},
|
|
55
|
-
setAuthButton(buttonAuth) {
|
|
56
|
-
this.buttonAuth = buttonAuth;
|
|
57
|
-
},
|
|
58
|
-
setWholeMenus(wholeMenus) {
|
|
59
|
-
this.wholeMenus = wholeMenus;
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
this.cachePageList.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
this.
|
|
96
|
-
this.cachePageList
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
1
|
+
/*
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:02:30
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-10-19 11:58:29
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import { defineStore } from 'pinia';
|
|
9
|
+
import { store } from '../index';
|
|
10
|
+
import type { cacheType } from './types';
|
|
11
|
+
import { constantMenus } from '../../router';
|
|
12
|
+
import { clone, findLastIndexOf } from 'xe-utils';
|
|
13
|
+
import { getKeyList } from '../../utils';
|
|
14
|
+
import { ascending, filterTree, formatFlatteningRoutes } from '../../router/utils';
|
|
15
|
+
import { useMultiTagsStoreHook } from './multiTags';
|
|
16
|
+
|
|
17
|
+
export const usePermissionStore = defineStore('udp-permission', {
|
|
18
|
+
state: () => ({
|
|
19
|
+
// 静态路由生成的菜单
|
|
20
|
+
constantMenus,
|
|
21
|
+
// 整体路由生成的菜单(静态、动态)
|
|
22
|
+
wholeMenus: [],
|
|
23
|
+
// 深拷贝一个菜单树,与导航菜单不冲突
|
|
24
|
+
menusTree: [],
|
|
25
|
+
// 整体路由(一维数组格式)
|
|
26
|
+
flatteningRoutes: [],
|
|
27
|
+
buttonAuth: [],
|
|
28
|
+
// 缓存页面keepAlive
|
|
29
|
+
cachePageList: []
|
|
30
|
+
}),
|
|
31
|
+
getters: {
|
|
32
|
+
getButtonAuth() {
|
|
33
|
+
return this.buttonAuth;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
actions: {
|
|
37
|
+
asyncActionRoutes(routes = []) {
|
|
38
|
+
if (this.wholeMenus.length > 0) return;
|
|
39
|
+
const idx = findLastIndexOf(routes, item => item.menuCode === 'SysHome');
|
|
40
|
+
const constantMenus = clone(this.constantMenus, true);
|
|
41
|
+
if (idx !== -1) {
|
|
42
|
+
const homeRouter = this.constantMenus.find(f => f.name === 'home');
|
|
43
|
+
// 过滤非路由分类非菜单的数据
|
|
44
|
+
routes[idx].children && homeRouter.children.push(...routes[idx].children);
|
|
45
|
+
routes.splice(idx, 1);
|
|
46
|
+
}
|
|
47
|
+
this.wholeMenus = filterTree(ascending(this.constantMenus.concat(routes)));
|
|
48
|
+
this.flatteningRoutes = formatFlatteningRoutes(this.constantMenus.concat(routes));
|
|
49
|
+
this.menusTree = clone(this.wholeMenus, true);
|
|
50
|
+
this.constantMenus = constantMenus;
|
|
51
|
+
},
|
|
52
|
+
async changeSetting(routes) {
|
|
53
|
+
await this.asyncActionRoutes(routes);
|
|
54
|
+
},
|
|
55
|
+
setAuthButton(buttonAuth) {
|
|
56
|
+
this.buttonAuth = buttonAuth;
|
|
57
|
+
},
|
|
58
|
+
setWholeMenus(wholeMenus) {
|
|
59
|
+
this.wholeMenus = wholeMenus;
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
/** 监听缓存页面是否存在于标签页,不存在则删除 */
|
|
63
|
+
clearCache() {
|
|
64
|
+
let cacheLength = this.cachePageList.length;
|
|
65
|
+
const nameList = getKeyList(useMultiTagsStoreHook().multiTags, 'name');
|
|
66
|
+
while (cacheLength > 0) {
|
|
67
|
+
nameList.findIndex(v => v === this.cachePageList[cacheLength - 1]) === -1 &&
|
|
68
|
+
this.cachePageList.splice(this.cachePageList.indexOf(this.cachePageList[cacheLength - 1]), 1);
|
|
69
|
+
cacheLength--;
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
cacheOperate({ mode, name }: cacheType) {
|
|
73
|
+
const delIndex = this.cachePageList.findIndex(v => v === name);
|
|
74
|
+
switch (mode) {
|
|
75
|
+
case 'refresh':
|
|
76
|
+
this.cachePageList = this.cachePageList.filter(v => v !== name);
|
|
77
|
+
this.clearCache();
|
|
78
|
+
break;
|
|
79
|
+
case 'add':
|
|
80
|
+
this.cachePageList.push(name);
|
|
81
|
+
break;
|
|
82
|
+
case 'delete':
|
|
83
|
+
delIndex !== -1 && this.cachePageList.splice(delIndex, 1);
|
|
84
|
+
this.clearCache();
|
|
85
|
+
break;
|
|
86
|
+
case 'reset':
|
|
87
|
+
this.cachePageList = [];
|
|
88
|
+
break;
|
|
89
|
+
}
|
|
90
|
+
/** 监听缓存页面是否存在于标签页,不存在则删除 */
|
|
91
|
+
// debounce(() => {
|
|
92
|
+
// let cacheLength = this.cachePageList.length;
|
|
93
|
+
// const nameList = getKeyList(useMultiTagsStoreHook().multiTags, 'name');
|
|
94
|
+
// while (cacheLength > 0) {
|
|
95
|
+
// nameList.findIndex(v => v === this.cachePageList[cacheLength - 1]) === -1 &&
|
|
96
|
+
// this.cachePageList.splice(this.cachePageList.indexOf(this.cachePageList[cacheLength - 1]), 1);
|
|
97
|
+
// cacheLength--;
|
|
98
|
+
// }
|
|
99
|
+
// }, 500)();
|
|
100
|
+
},
|
|
101
|
+
/** 清空缓存页面 */
|
|
102
|
+
clearAllCachePage() {
|
|
103
|
+
this.wholeMenus = [];
|
|
104
|
+
this.menusTree = [];
|
|
105
|
+
this.buttonAuth = [];
|
|
106
|
+
this.cachePageList = [];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
export function usePermissionStoreHook() {
|
|
112
|
+
return usePermissionStore(store);
|
|
113
|
+
}
|
|
@@ -166,9 +166,7 @@ export const useSystemStore = defineStore('udp-system', {
|
|
|
166
166
|
organizationId: systemInfo.organizationId
|
|
167
167
|
};
|
|
168
168
|
cookies.set('kCookies_param', JSON.stringify(query));
|
|
169
|
-
this.isAdminRole = this.employee.sysRoles.some(
|
|
170
|
-
s => s.roleCode === 'admin' || ['管理员'].includes(s.roleName)
|
|
171
|
-
);
|
|
169
|
+
this.isAdminRole = this.employee.sysRoles.some(s => s.roleCode === 'admin' || ['管理员'].includes(s.roleName));
|
|
172
170
|
// 缓存按钮数据权限
|
|
173
171
|
usePermissionStoreHook().setAuthButton(systemInfo.dataMenus);
|
|
174
172
|
}
|
package/src/style/button.scss
CHANGED
|
@@ -44,10 +44,17 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.vxe-button.type--button:not(.is--disabled):hover {
|
|
47
|
-
color:
|
|
47
|
+
color: inherit;
|
|
48
48
|
|
|
49
|
-
.vxe-button--icon
|
|
50
|
-
|
|
49
|
+
.vxe-button--icon,
|
|
50
|
+
.vxe-button--item {
|
|
51
|
+
color: inherit;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.vxe-button[name='favorite'].type--button:not(.is--disabled):hover {
|
|
56
|
+
.vxe-button--item {
|
|
57
|
+
color: var(--udp-theme-vxeColor);
|
|
51
58
|
}
|
|
52
59
|
}
|
|
53
60
|
|
package/src/style/login.css
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
height: 100vh;
|
|
12
12
|
display: flex;
|
|
13
13
|
justify-content: flex-end;
|
|
14
|
-
background-color: #
|
|
14
|
+
background-color: #2a5f97;
|
|
15
15
|
/* background: url('../assets/login/default-bg.png') no-repeat center; */
|
|
16
16
|
background-repeat: no-repeat;
|
|
17
17
|
background-position: center;
|
package/src/style/tailwind.css
CHANGED
|
@@ -1,68 +1 @@
|
|
|
1
|
-
|
|
2
|
-
@tailwind components;
|
|
3
|
-
@tailwind utilities;
|
|
4
|
-
|
|
5
|
-
@layer components {
|
|
6
|
-
.flex-c {
|
|
7
|
-
@apply flex justify-center items-center;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.flex-ac {
|
|
11
|
-
@apply flex justify-around items-center;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
.flex-bc {
|
|
15
|
-
@apply flex justify-between items-center;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.navbar-bg-hover {
|
|
19
|
-
@apply dark:text-white dark:hover:!bg-[#242424];
|
|
20
|
-
}
|
|
21
|
-
} */
|
|
22
|
-
|
|
23
|
-
@layer theme, base, components, utilities;
|
|
24
|
-
@import 'tailwindcss/theme.css' layer(theme);
|
|
25
|
-
@import 'tailwindcss/utilities.css' layer(utilities);
|
|
26
|
-
|
|
27
|
-
@custom-variant dark (&:is(.dark *));
|
|
28
|
-
|
|
29
|
-
@theme {
|
|
30
|
-
--color-bg_color: var(--el-bg-color);
|
|
31
|
-
--color-primary: var(--el-color-primary);
|
|
32
|
-
--color-text_color_primary: var(--el-text-color-primary);
|
|
33
|
-
--color-text_color_regular: var(--el-text-color-regular);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/*
|
|
37
|
-
The default border color has changed to `currentColor` in Tailwind CSS v4,
|
|
38
|
-
so we've added these compatibility styles to make sure everything still
|
|
39
|
-
looks the same as it did with Tailwind CSS v3.
|
|
40
|
-
|
|
41
|
-
If we ever want to remove these styles, we need to add an explicit border
|
|
42
|
-
color utility to any element that depends on these defaults.
|
|
43
|
-
*/
|
|
44
|
-
@layer base {
|
|
45
|
-
*,
|
|
46
|
-
::after,
|
|
47
|
-
::before,
|
|
48
|
-
::backdrop,
|
|
49
|
-
::file-selector-button {
|
|
50
|
-
border-color: var(--color-gray-200, currentColor);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@utility flex-c {
|
|
55
|
-
@apply flex justify-center items-center;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@utility flex-ac {
|
|
59
|
-
@apply flex justify-around items-center;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
@utility flex-bc {
|
|
63
|
-
@apply flex justify-between items-center;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
@utility navbar-bg-hover {
|
|
67
|
-
@apply dark:text-white dark:hover:bg-[#242424]!;
|
|
68
|
-
}
|
|
1
|
+
@import 'tailwindcss';
|