@utogether/udp-core 1.0.0 → 1.0.1-beta.10
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 +39 -26
- package/dist/{403-B1R-4vXw.js → 403-Ctxjn4q8.js} +9 -8
- package/dist/{404-fXPl8csw.js → 404-W5yzyiZ9.js} +15 -14
- package/dist/{500-eI5842YB.js → 500-DXuGEOm4.js} +11 -10
- package/dist/{AuthorityInfo-CfVH6PaB.js → AuthorityInfo-C2tflCt8.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-SVgy3HX7.js +100 -0
- package/dist/{AuthorityPanel-BaLMwMgW.js → AuthorityPanel-BeBNiwqc.js} +1 -1
- package/dist/{AuthorityPanel.vue_vue_type_style_index_0_lang-C_bkqLD9.js → AuthorityPanel.vue_vue_type_style_index_0_lang-CIYmnP9-.js} +6 -6
- package/dist/{Company-CYC9Avfz.js → Company-PLez5GoH.js} +3 -3
- package/dist/{CompanyPanel-B4MzoqN_.js → CompanyPanel-CIGaQooL.js} +20 -20
- package/dist/{Department-B4BNSiYx.js → Department-B9wLsXFm.js} +3 -3
- package/dist/{DepartmentPanel-zJO89L2O.js → DepartmentPanel-DSM4lTaz.js} +23 -23
- package/dist/{DesignPanel-S8P0J97f.js → DesignPanel-B6a9wW_A.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DW-_Vqrr.js → DesignPanel.vue_vue_type_style_index_0_lang-DtHfoDQk.js} +28 -30
- package/dist/DictView-DhFbQxdJ.js +110 -0
- package/dist/{InvOrganization-MuM2jtsG.js → InvOrganization-D90AbR3b.js} +2 -2
- package/dist/Org-DxBkYabD.js +39 -0
- package/dist/{Preview-CRyiwUIR.js → Preview-BFtRpBxw.js} +1 -1
- package/dist/{ReportDefine-WZYIx8Sm.js → ReportDefine-BIa2QryC.js} +1 -1
- package/dist/{ReportDesign-D-7GKgpb.js → ReportDesign-CnyjI-WD.js} +44 -44
- package/dist/{ReportQuery-BIIJny6w.js → ReportQuery-BiK7yEhV.js} +5 -5
- package/dist/{ReportQueryFrom-OoUl7N2O.js → ReportQueryFrom-C2rqdFTm.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-B878fgj8.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-Ba9HLnXQ.js} +6 -5
- package/dist/{ReportTemplate-Cfeq9US-.js → ReportTemplate-DdkLscP3.js} +30 -30
- package/dist/{Role-BwTV2QMH.js → Role-BrsxgK8D.js} +6 -6
- package/dist/{RoleAssign-De1JjOun.js → RoleAssign-DiqwJqDa.js} +8 -8
- package/dist/{RolePanel-pUBXsqCM.js → RolePanel-BDusGyo7.js} +1 -1
- package/dist/{RolePanel-E3RcdByM.js → RolePanel-Dqx5dI3f.js} +1 -1
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-2Z1q_5uW.js +132 -0
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-B2pQwHb0.js → RolePanel.vue_vue_type_script_setup_true_lang-B5lUnaMI.js} +40 -34
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-vMR1fBi0.js → ScrollPanel.vue_vue_type_style_index_0_lang-vSP23fEq.js} +23 -23
- package/dist/{Staff-Czm7A8vI.js → Staff-Cwi9LQiZ.js} +3 -3
- package/dist/StaffInfo-XjVtyaMv.js +4 -0
- package/dist/{StaffInfo.vue_vue_type_style_index_0_lang-DMTL7KCh.js → StaffInfo.vue_vue_type_script_setup_true_lang-wSrAuyet.js} +16 -16
- package/dist/{StaffPanel-CHk60LEz.js → StaffPanel-C-wYcFdv.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-iPKLb5wG.js → StaffPanel.vue_vue_type_script_setup_true_lang-DZNArmnC.js} +46 -49
- package/dist/{SysUser-BGwbttRn.js → SysUser-O4tvr-Ur.js} +2 -2
- package/dist/{SysUserPanel-BCbKoLKt.js → SysUserPanel-B853docZ.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-DhiYYC97.js +294 -0
- package/dist/{SystemMenu-BkqZSDKl.js → SystemMenu-CXR6mrXr.js} +52 -50
- package/dist/{UserInfo-BsyAcT2d.js → UserInfo-BkP8pE2a.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-D0-KDxAh.js → UserInfo.vue_vue_type_style_index_0_lang-D4r_umjV.js} +38 -36
- package/dist/{childView-CyuLTUqC.js → childView-D0HwbgDT.js} +1 -1
- package/dist/{childView-CF83nhxb.js → childView-TRqUkSDC.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-CNSgGda3.js → childView.vue_vue_type_style_index_0_lang-BzISq0Jf.js} +43 -43
- package/dist/{childView.vue_vue_type_style_index_0_lang-Cch4lE-i.js → childView.vue_vue_type_style_index_0_lang-DQRgNsJY.js} +1 -1
- package/dist/{code-rule-Bz-gnktN.js → code-rule-BV7PQWhK.js} +13 -14
- package/dist/core.es.js +13 -10
- package/dist/{cron-task-CIifSUdW.js → cron-task-9ZS9bi7K.js} +11 -11
- package/dist/{frameView-_d2mqjjQ.js → frameView-DE83AN50.js} +15 -14
- 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-DVARtten.js +2623 -0
- package/dist/{layoutView-DLKVepB8.js → layoutView-D1U-c4By.js} +730 -724
- package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
- package/dist/{login-LREiDfFU.js → login-sPCEiTGT.js} +107 -113
- package/dist/{lov-view-DDrIVILB.js → lov-view-76NcYTYl.js} +5 -5
- package/dist/{menuInfo-B1FUV-Sk.js → menuInfo-CxjfjFpm.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-Cnk3vdtD.js → menuInfo.vue_vue_type_style_index_0_lang-C2qahH3r.js} +98 -95
- package/dist/pda-app-BUH16bLj.js +710 -0
- package/dist/redirect-BqegffKC.js +15 -0
- package/dist/{resource-BCwx9fEv.js → resource-CCuHzoA6.js} +18 -18
- package/dist/{su-welcome-189A7N4r.js → su-welcome-mRArONsd.js} +133 -133
- package/dist/{sys-config-BZ3sejow.js → sys-config-Cvt05yF6.js} +21 -21
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-r08LNiIZ.js → utogether-Dm_VBQHR.js} +6 -6
- package/index.ts +40 -36
- package/package.json +4 -2
- package/src/App.vue +65 -70
- package/src/api/index.ts +1 -1
- package/src/components/SuCharts/src/UserInfo.vue +78 -78
- package/src/components/SuScrollTree/ScrollPanel.vue +3 -3
- package/src/components/udp/count-down.vue +536 -0
- package/src/components/udp/flip-down/FlipCard/flip-card.vue +251 -0
- package/src/components/udp/flip-down/FlipCard/interfaces.ts +4 -0
- package/src/components/udp/flip-down/FlipClock/flip-clock.vue +113 -0
- package/src/components/udp/form-upload.vue +482 -0
- package/src/components/udp/form.vue +112 -0
- package/src/components/udp/grid.vue +495 -0
- package/src/components/udp/index.ts +10 -0
- package/src/components/udp/lov.vue +388 -0
- package/src/components/udp/modal-form.vue +189 -0
- package/src/components/udp/modal-grid.vue +288 -0
- package/src/components/udp/upload.vue +423 -0
- package/src/components/udp/utils.ts +447 -0
- package/src/directives/permission/index.ts +1 -1
- package/src/layout/components/lay-navbar/index.vue +1 -1
- package/src/layout/components/lay-panel/index.vue +150 -150
- package/src/layout/components/lay-search/index.vue +25 -25
- package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
- package/src/layout/components/lay-tag/index.vue +625 -625
- package/src/layout/layoutView.vue +215 -215
- package/src/main.ts +25 -14
- package/src/plugins/i18n/en.ts +302 -289
- package/src/plugins/i18n/zh.ts +348 -337
- package/src/plugins/vxe-table/index.ts +53 -46
- package/src/plugins/vxe-table/render.tsx +956 -397
- package/src/router/index.ts +187 -183
- package/src/router/modules/remaining.ts +58 -83
- package/src/style/button.scss +85 -78
- package/src/style/tailwind.css +1 -68
- package/src/style/vxetable.scss +44 -11
- package/src/utils/authority/index.ts +1 -1
- package/src/utils/{http → udp/http}/index.ts +8 -24
- package/src/utils/{http → udp/http}/types.d.ts +8 -5
- package/src/utils/udp/useRender.ts +431 -0
- package/src/views/login/login-view.vue +2 -2
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/inv-org/InvOrganization.vue +1 -1
- package/src/views/organization/org/Org.vue +9 -5
- package/src/views/organization/staff/StaffInfo.vue +0 -30
- package/src/views/organization/staff/StaffPanel.vue +4 -3
- package/src/views/system/menu/AuthorityPanel.vue +2 -2
- package/src/views/system/menu/SystemMenu.vue +183 -191
- package/src/views/system/menu/menuInfo.vue +363 -368
- package/src/views/system/role/AuthorityInfo.vue +19 -33
- 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 +195 -193
- package/src/views/system/role-assign/RoleAssign.vue +57 -57
- package/src/views/system/role-assign/RolePanel.vue +139 -136
- package/src/views/system/sys/sys-config.vue +1 -1
- package/src/views/system/sysUser/SysUserPanel.vue +278 -278
- package/src/views/uapp/pda/pda-app.vue +208 -176
- package/src/views/udev/dict/DictView.vue +118 -106
- package/src/views/udev/dict/childView.vue +7 -7
- package/src/views/udev/lov/lov-view.vue +91 -91
- 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 +1 -1
- package/src/views/uhome/su-welcome.vue +4 -4
- package/src/views/ulogin/login.vue +15 -10
- package/src/views/upms/user/login-log.vue +1 -1
- package/src/views/urpt/design/DesignPanel.vue +507 -526
- package/src/views/urpt/design/ReportDesign.vue +15 -19
- package/src/views/urpt/static-resource/resource.vue +3 -3
- package/src/views/urpt/template/ReportTemplate.vue +7 -7
- package/types/global.d.ts +2 -2
- package/vite.config.ts +13 -2
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-DbK-f8jH.js +0 -102
- package/dist/DictView-bIS5-rK-.js +0 -95
- package/dist/Org-kXHSjsgJ.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CTIad9_Q.js +0 -126
- package/dist/StaffInfo-DJzvBuxy.js +0 -4
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-0QUjnhjF.js +0 -289
- package/dist/core.umd.js +0 -173
- package/dist/index-BKIw8tSn.js +0 -9195
- package/dist/pda-app-CRhVGijN.js +0 -2209
- package/dist/redirect-DiaNDu8F.js +0 -15
- package/src/assets/images/empty.png +0 -0
- package/src/assets/images/logo.png +0 -0
- package/src/components/ReCountTo/README.md +0 -2
- package/src/components/ReCountTo/index.ts +0 -18
- package/src/components/ReCountTo/src/normal/index.tsx +0 -165
- package/src/components/ReCountTo/src/normal/props.ts +0 -37
- package/src/components/ReCountTo/src/rebound/index.tsx +0 -67
- package/src/components/ReCountTo/src/rebound/props.ts +0 -14
- package/src/components/ReCountTo/src/rebound/rebound.css +0 -77
- package/src/components/ReCropper/index.ts +0 -14
- package/src/components/ReCropper/src/index.tsx +0 -141
- package/src/components/ReFlicker/index.css +0 -39
- package/src/components/ReFlicker/index.ts +0 -50
- package/src/components/ReFlop/index.ts +0 -14
- package/src/components/ReFlop/src/Filpper.tsx +0 -99
- package/src/components/ReFlop/src/filpper.css +0 -184
- package/src/components/ReFlop/src/index.vue +0 -126
- package/src/components/ReFlowChart/index.ts +0 -24
- package/src/components/ReFlowChart/src/Control.vue +0 -139
- package/src/components/ReFlowChart/src/DataDialog.vue +0 -12
- package/src/components/ReFlowChart/src/NodePanel.vue +0 -151
- package/src/components/ReFlowChart/src/adpterForTurbo.ts +0 -160
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.css +0 -49
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.eot +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.js +0 -61
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.json +0 -58
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.svg +0 -47
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.ttf +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff +0 -0
- package/src/components/ReFlowChart/src/assets/iconfont/iconfont.woff2 +0 -0
- package/src/components/ReFlowChart/src/config.ts +0 -62
- package/src/components/ReSplitPane/index.css +0 -49
- package/src/components/ReSplitPane/index.tsx +0 -119
- package/src/components/ReSplitPane/resizer.css +0 -45
- package/src/components/ReSplitPane/resizer.tsx +0 -30
- package/src/components/SuCommon/card/components/Card.vue +0 -148
- package/src/components/SuCommon/card/components/DialogForm.vue +0 -127
- package/src/components/SuCommon/card/index.vue +0 -142
- package/src/components/SuCommon/icon-select/index.vue +0 -241
- package/src/components/SuCommon/table/index.vue +0 -208
- package/src/components/SuCommon/utils/index.ts +0 -103
- package/src/components/SuCommon/utils/slot.tsx +0 -50
- package/src/views/components/contextmenu/basic.vue +0 -74
- package/src/views/components/contextmenu/context-menu.vue +0 -40
- package/src/views/components/contextmenu/menuDynamic.vue +0 -99
- package/src/views/components/contextmenu/menuGroup.vue +0 -71
- package/src/views/components/count-to/index.vue +0 -43
- package/src/views/components/cropping/index.vue +0 -59
- package/src/views/components/cropping/picture.jpeg +0 -0
- package/src/views/components/split-pane/index.vue +0 -82
- package/src/views/components/video/index.vue +0 -57
|
@@ -1,368 +1,363 @@
|
|
|
1
|
-
<!--
|
|
2
|
-
* @Author: wei.li
|
|
3
|
-
* @Date: 2021-11-17 16:44:08
|
|
4
|
-
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
-
* @LastEditTime: 2025-
|
|
6
|
-
* @Description: file content
|
|
7
|
-
-->
|
|
8
|
-
|
|
9
|
-
<template>
|
|
10
|
-
<div class="ut-menu-wrapper">
|
|
11
|
-
<el-drawer
|
|
12
|
-
:model-value="show"
|
|
13
|
-
:title="$t('message.title.memuInfo')"
|
|
14
|
-
:before-close="handleClose"
|
|
15
|
-
direction="rtl"
|
|
16
|
-
destroy-on-close
|
|
17
|
-
size="50%"
|
|
18
|
-
>
|
|
19
|
-
<vxe-form
|
|
20
|
-
ref="xForm"
|
|
21
|
-
:data="record"
|
|
22
|
-
:rules="rules"
|
|
23
|
-
:loading="loading"
|
|
24
|
-
title-colon
|
|
25
|
-
title-align="right"
|
|
26
|
-
title-width="110"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
v-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
>
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
dataStatus
|
|
168
|
-
direction
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
.u-menu-prefix.vxe-input {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
border
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
.
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
.el-
|
|
337
|
-
margin
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
color: #fff;
|
|
365
|
-
background-color: #59bfc1;
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
</style>
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: wei.li
|
|
3
|
+
* @Date: 2021-11-17 16:44:08
|
|
4
|
+
* @LastEditors: levi7754 levi7754@163.com
|
|
5
|
+
* @LastEditTime: 2025-08-01 17:38:53
|
|
6
|
+
* @Description: file content
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<div class="ut-menu-wrapper">
|
|
11
|
+
<el-drawer
|
|
12
|
+
:model-value="show"
|
|
13
|
+
:title="$t('message.title.memuInfo')"
|
|
14
|
+
:before-close="handleClose"
|
|
15
|
+
direction="rtl"
|
|
16
|
+
destroy-on-close
|
|
17
|
+
size="50%"
|
|
18
|
+
>
|
|
19
|
+
<vxe-form
|
|
20
|
+
ref="xForm"
|
|
21
|
+
:data="record"
|
|
22
|
+
:rules="rules"
|
|
23
|
+
:loading="loading"
|
|
24
|
+
title-colon
|
|
25
|
+
title-align="right"
|
|
26
|
+
title-width="110"
|
|
27
|
+
transfer
|
|
28
|
+
>
|
|
29
|
+
<vxe-form-item v-if="record.menuType === '0'" :title="$t('message.menuType')" field="menuCategory" span="24">
|
|
30
|
+
<template #default="{ data }">
|
|
31
|
+
<vxe-select v-model="data.menuCategory" :disabled="data.menuCategory === '0'" :transfer="false">
|
|
32
|
+
<vxe-option
|
|
33
|
+
v-for="dict in getLovList('SU.MENU.TYPE')"
|
|
34
|
+
:key="dict.dictCode"
|
|
35
|
+
:value="dict.dictCode"
|
|
36
|
+
:label="dict.dictName"
|
|
37
|
+
:disabled="dict.enabled"
|
|
38
|
+
/>
|
|
39
|
+
</vxe-select>
|
|
40
|
+
</template>
|
|
41
|
+
</vxe-form-item>
|
|
42
|
+
<vxe-form-item :title="$t('message.permissionCode')" field="dispalyCode" span="24">
|
|
43
|
+
<template #default="{ data }">
|
|
44
|
+
<vxe-input
|
|
45
|
+
v-model="data.dispalyCode"
|
|
46
|
+
clearable
|
|
47
|
+
:class="{ 'u-menu-prefix': dataStatus === 'add' }"
|
|
48
|
+
:disabled="dataStatus !== 'add'"
|
|
49
|
+
>
|
|
50
|
+
<template v-if="dataStatus === 'add'" #prefix>
|
|
51
|
+
<span>{{ prefixCode }}</span>
|
|
52
|
+
</template>
|
|
53
|
+
</vxe-input>
|
|
54
|
+
</template>
|
|
55
|
+
</vxe-form-item>
|
|
56
|
+
<vxe-form-item
|
|
57
|
+
v-if="!(record.menuType * 1) && record.menuCategory !== '3'"
|
|
58
|
+
:title="$t('message.menuCode')"
|
|
59
|
+
:item-render="{ name: '$input' }"
|
|
60
|
+
field="menuCode"
|
|
61
|
+
span="24"
|
|
62
|
+
/>
|
|
63
|
+
<vxe-form-item :title="$t('message.menuName')" :item-render="{ name: '$input' }" field="menuName" span="24" />
|
|
64
|
+
<vxe-form-item
|
|
65
|
+
:title="$t('message.menuNameEn')"
|
|
66
|
+
field="menuNameEn"
|
|
67
|
+
span="24"
|
|
68
|
+
:item-render="{ name: '$input' }"
|
|
69
|
+
/>
|
|
70
|
+
<vxe-form-item
|
|
71
|
+
v-if="!(record.menuType * 1)"
|
|
72
|
+
:title="$t('message.menuPath')"
|
|
73
|
+
:item-render="{ name: '$input' }"
|
|
74
|
+
field="menuPath"
|
|
75
|
+
span="24"
|
|
76
|
+
/>
|
|
77
|
+
<vxe-form-item
|
|
78
|
+
v-if="!(record.menuType * 1)"
|
|
79
|
+
:title="$t('message.i18nField')"
|
|
80
|
+
:item-render="{ name: '$input' }"
|
|
81
|
+
field="i18nField"
|
|
82
|
+
span="24"
|
|
83
|
+
/>
|
|
84
|
+
<vxe-form-item
|
|
85
|
+
v-if="record.menuCategory === '2'"
|
|
86
|
+
:title="$t('message.frameSrc')"
|
|
87
|
+
:item-render="{ name: '$input' }"
|
|
88
|
+
field="frameSrc"
|
|
89
|
+
span="24"
|
|
90
|
+
/>
|
|
91
|
+
<vxe-form-item
|
|
92
|
+
v-if="record.menuCategory === '3'"
|
|
93
|
+
:title="$t('message.externalURI')"
|
|
94
|
+
:item-render="{ name: '$input' }"
|
|
95
|
+
field="menuCode"
|
|
96
|
+
span="24"
|
|
97
|
+
/>
|
|
98
|
+
<vxe-form-item
|
|
99
|
+
v-if="!(record.menuType * 1) && record.menuCategory !== '3'"
|
|
100
|
+
:title="$t('message.extraIcon')"
|
|
101
|
+
:item-render="{ name: '$input' }"
|
|
102
|
+
field="extraIcon"
|
|
103
|
+
span="24"
|
|
104
|
+
/>
|
|
105
|
+
<vxe-form-item
|
|
106
|
+
v-if="['0', '5'].includes(record.menuCategory)"
|
|
107
|
+
:title="$t('message.redirect')"
|
|
108
|
+
:item-render="{ name: '$input' }"
|
|
109
|
+
field="redirect"
|
|
110
|
+
span="24"
|
|
111
|
+
/>
|
|
112
|
+
<vxe-form-item v-if="!(record.menuType * 1)" :title="$t('message.sort')" span="24">
|
|
113
|
+
<template #default="{ data }">
|
|
114
|
+
<vxe-input v-model="data.sort" type="number" step="10" clearable />
|
|
115
|
+
</template>
|
|
116
|
+
</vxe-form-item>
|
|
117
|
+
<vxe-form-item
|
|
118
|
+
v-if="dataStatus === 'add' && ['2', '1'].includes(record.menuCategory)"
|
|
119
|
+
:title="$t('message.btn.auth')"
|
|
120
|
+
>
|
|
121
|
+
<template #default>
|
|
122
|
+
<vxe-checkbox-group v-model="authority">
|
|
123
|
+
<vxe-checkbox label="add" :content="$t('message.btn.add')" />
|
|
124
|
+
<vxe-checkbox label="del" :content="$t('message.btn.delete')" />
|
|
125
|
+
<vxe-checkbox label="edit" :content="$t('message.btn.edit')" />
|
|
126
|
+
<vxe-checkbox label="fetch" :content="$t('message.btn.fetch')" />
|
|
127
|
+
<vxe-checkbox label="export" :content="$t('message.btn.export')" />
|
|
128
|
+
</vxe-checkbox-group>
|
|
129
|
+
</template>
|
|
130
|
+
</vxe-form-item>
|
|
131
|
+
<vxe-form-item v-if="!(record.menuType * 1)" :title="$t('message.icon')" span="24">
|
|
132
|
+
<template #default="{ data }">
|
|
133
|
+
<ut-icon-select v-model="data.icon" />
|
|
134
|
+
</template>
|
|
135
|
+
</vxe-form-item>
|
|
136
|
+
</vxe-form>
|
|
137
|
+
<el-divider />
|
|
138
|
+
<el-row type="flex" justify="end" style="padding-right: 22px">
|
|
139
|
+
<ut-button content="cancel" status="warning" @tap="handleClose" />
|
|
140
|
+
<ut-button content="confirm" status="primary" @tap="onSubmit" />
|
|
141
|
+
</el-row>
|
|
142
|
+
</el-drawer>
|
|
143
|
+
</div>
|
|
144
|
+
</template>
|
|
145
|
+
<script setup lang="ts">
|
|
146
|
+
import { useI18n } from 'vue-i18n';
|
|
147
|
+
import { ref, watch } from 'vue';
|
|
148
|
+
import to from 'await-to-js';
|
|
149
|
+
import { templateRef } from '@vueuse/core';
|
|
150
|
+
import { useSystemStoreHook } from '../../../store/modules/system';
|
|
151
|
+
import { getServiceApi } from '../../../api';
|
|
152
|
+
|
|
153
|
+
interface IProps {
|
|
154
|
+
show: boolean;
|
|
155
|
+
record: IRecord;
|
|
156
|
+
dataStatus?: string;
|
|
157
|
+
direction?: string;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
const dictData = useSystemStoreHook().getDataDict;
|
|
161
|
+
|
|
162
|
+
const props = withDefaults(defineProps<IProps>(), {
|
|
163
|
+
show: false,
|
|
164
|
+
record: (): IRecord => {
|
|
165
|
+
return {};
|
|
166
|
+
},
|
|
167
|
+
dataStatus: 'detail',
|
|
168
|
+
direction: 'rtl'
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
watch(
|
|
172
|
+
() => props.show,
|
|
173
|
+
() => {
|
|
174
|
+
prefixCode.value = props.show && getPrefixCode();
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
const serviceApi = getServiceApi();
|
|
179
|
+
|
|
180
|
+
const { t } = useI18n();
|
|
181
|
+
const rules = {
|
|
182
|
+
menuCode: [
|
|
183
|
+
{
|
|
184
|
+
required: true,
|
|
185
|
+
message: `${t('message.required')}${t('message.menuCode')}`
|
|
186
|
+
}
|
|
187
|
+
],
|
|
188
|
+
menuName: [
|
|
189
|
+
{
|
|
190
|
+
required: true,
|
|
191
|
+
message: `${t('message.required')}${t('message.menuName')}`
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
menuPath: [
|
|
195
|
+
{
|
|
196
|
+
required: true,
|
|
197
|
+
message: `${t('message.required')}${t('message.menuPath')}`
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
frameSrc: [
|
|
201
|
+
{
|
|
202
|
+
required: true,
|
|
203
|
+
message: `${t('message.required')}${t('message.externalURI')}`
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
i18nField: [
|
|
207
|
+
{
|
|
208
|
+
required: true,
|
|
209
|
+
message: `${t('message.required')}${t('message.i18nField')}`
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
dispalyCode: [
|
|
213
|
+
{
|
|
214
|
+
required: true,
|
|
215
|
+
message: `${t('message.required')}${t('message.permissionCode')}`
|
|
216
|
+
}
|
|
217
|
+
],
|
|
218
|
+
menuCategory: [
|
|
219
|
+
{
|
|
220
|
+
required: true,
|
|
221
|
+
message: `${t('message.required')}${t('message.menuType')}`
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
const xForm = templateRef<any>('xForm', null);
|
|
227
|
+
const loading = ref(false);
|
|
228
|
+
const prefixCode = ref('');
|
|
229
|
+
const authority = ref(['fetch']);
|
|
230
|
+
|
|
231
|
+
const url = '/uums/menu';
|
|
232
|
+
|
|
233
|
+
const emit = defineEmits<{
|
|
234
|
+
(e: 'close', type, data?): void;
|
|
235
|
+
}>();
|
|
236
|
+
|
|
237
|
+
const getPrefixCode = () => {
|
|
238
|
+
const { record, dataStatus } = props;
|
|
239
|
+
const { id, parentId, hasChildren } = record;
|
|
240
|
+
if (dataStatus === 'update') return;
|
|
241
|
+
if (!id && !parentId) return 'su';
|
|
242
|
+
if (hasChildren || dataStatus === 'add') {
|
|
243
|
+
record.dispalyCode = '';
|
|
244
|
+
return record.permissionCode;
|
|
245
|
+
}
|
|
246
|
+
return record.permissionCode;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
const onSubmit = () => {
|
|
250
|
+
xForm.value.validate(async valid => {
|
|
251
|
+
if (!valid) {
|
|
252
|
+
loading.value = true;
|
|
253
|
+
let resData;
|
|
254
|
+
const { record, dataStatus } = props;
|
|
255
|
+
if (dataStatus === 'add') {
|
|
256
|
+
record.permissionCode = `${prefixCode.value}.${record.dispalyCode}`;
|
|
257
|
+
const [err, data]: [Error, any] = await to(serviceApi.post(url, [record]));
|
|
258
|
+
if (!err && !['0', '5'].includes(record.menuCategory) && authority.value.length) {
|
|
259
|
+
const dataList = authority.value.map((auth, idx) => {
|
|
260
|
+
return {
|
|
261
|
+
permissionCode: record.permissionCode + '.' + auth,
|
|
262
|
+
parentId: data[0].id,
|
|
263
|
+
menuName: getAuthName(auth),
|
|
264
|
+
menuType: 1,
|
|
265
|
+
enabled: '1',
|
|
266
|
+
sort: (idx + 1) * 10
|
|
267
|
+
};
|
|
268
|
+
});
|
|
269
|
+
const [err, res] = await to(serviceApi.post(url, dataList));
|
|
270
|
+
if (!err) {
|
|
271
|
+
// props.record.children.push(...res);
|
|
272
|
+
resData = res[0];
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
loading.value = false;
|
|
276
|
+
} else {
|
|
277
|
+
record.permissionCode = record.dispalyCode;
|
|
278
|
+
await to(serviceApi.put(url, [record]));
|
|
279
|
+
loading.value = false;
|
|
280
|
+
resData = record;
|
|
281
|
+
}
|
|
282
|
+
handleClose('submit', resData);
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
const getAuthName = code => {
|
|
287
|
+
const auth = {
|
|
288
|
+
fetch: t('message.btn.fetch'),
|
|
289
|
+
add: t('message.btn.add'),
|
|
290
|
+
edit: t('message.btn.edit'),
|
|
291
|
+
del: t('message.btn.delete'),
|
|
292
|
+
export: t('message.btn.export')
|
|
293
|
+
};
|
|
294
|
+
return auth[code];
|
|
295
|
+
};
|
|
296
|
+
const getLovList = code => {
|
|
297
|
+
return dictData[code]?.children.map(m => {
|
|
298
|
+
m.enabled = m.dictCode === '0' && props.record.menuCategory !== '0';
|
|
299
|
+
return m;
|
|
300
|
+
});
|
|
301
|
+
};
|
|
302
|
+
// 抽屉关闭
|
|
303
|
+
function handleClose(type, data) {
|
|
304
|
+
emit('close', type, data);
|
|
305
|
+
}
|
|
306
|
+
</script>
|
|
307
|
+
|
|
308
|
+
<style lang="scss">
|
|
309
|
+
.u-menu-prefix.vxe-input {
|
|
310
|
+
height: 34px;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.u-menu-prefix.vxe-input .vxe-input--prefix {
|
|
314
|
+
top: 1px;
|
|
315
|
+
width: 150px;
|
|
316
|
+
height: 24px;
|
|
317
|
+
text-align: center;
|
|
318
|
+
background-color: #f5f7fa;
|
|
319
|
+
border-right: 1px solid #dcdfe6;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.u-menu-prefix.vxe-input .vxe-input--inner {
|
|
323
|
+
border: 1px solid #dcdfe6;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.ut-menu-wrapper {
|
|
327
|
+
.el-drawer__header {
|
|
328
|
+
margin-bottom: 16px;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.el-drawer__body {
|
|
332
|
+
margin-bottom: 12px;
|
|
333
|
+
overflow: auto;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.el-divider {
|
|
337
|
+
margin: 15px 0;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.menu-icon {
|
|
342
|
+
display: flex;
|
|
343
|
+
flex-wrap: wrap;
|
|
344
|
+
width: 100%;
|
|
345
|
+
|
|
346
|
+
li {
|
|
347
|
+
display: flex;
|
|
348
|
+
align-items: center;
|
|
349
|
+
justify-content: center;
|
|
350
|
+
width: 36px;
|
|
351
|
+
height: 36px;
|
|
352
|
+
margin: 0 2px;
|
|
353
|
+
margin-top: 5px;
|
|
354
|
+
cursor: pointer;
|
|
355
|
+
border: 1px solid #ddd;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
.active-icon {
|
|
359
|
+
color: #fff;
|
|
360
|
+
background-color: #59bfc1;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
</style>
|