@utogether/udp-core 1.0.1-beta.1 → 1.0.1-beta.11
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 -32
- package/dist/{403-Dp617CWX.js → 403-Dsgsr2M-.js} +1 -1
- package/dist/{404-Cz_Axb6Y.js → 404-DmPHEfqM.js} +1 -1
- package/dist/{500-BGCtRNse.js → 500-OYEgHR2a.js} +1 -1
- package/dist/{AuthorityInfo-DGGfm7IS.js → AuthorityInfo-B1H1txG-.js} +1 -1
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BUlmQtjQ.js +100 -0
- package/dist/{Company-IV3GTnzY.js → Company-C8ojgx93.js} +3 -3
- package/dist/{CompanyPanel-qV-_VtoL.js → CompanyPanel-Dageer1t.js} +16 -16
- package/dist/{Department-B3W-OxW8.js → Department-Dr94_85I.js} +3 -3
- package/dist/{DepartmentPanel-Cw3OWxE7.js → DepartmentPanel-Bc5r1HpT.js} +1 -1
- package/dist/{DesignPanel-BFxR2fHJ.js → DesignPanel-CcWt1Myp.js} +1 -1
- package/dist/{DesignPanel.vue_vue_type_style_index_0_lang-DljbeFba.js → DesignPanel.vue_vue_type_style_index_0_lang-CKA6nx1l.js} +24 -26
- package/dist/DictView-BHj6wexC.js +110 -0
- package/dist/InvOrganization-DP3Le9g-.js +72 -0
- package/dist/Org-BRGHTwsw.js +39 -0
- package/dist/{Preview-BlDMmpdR.js → Preview-CqMaUD_3.js} +1 -1
- package/dist/{ReportDefine-Cub_85LA.js → ReportDefine-PEQdTCOY.js} +1 -1
- package/dist/{ReportDesign-hFhq5UVE.js → ReportDesign-CB4bv8ba.js} +43 -43
- package/dist/{ReportQuery-ChkWEyxT.js → ReportQuery-B7t4lMK0.js} +1 -1
- package/dist/{ReportQueryFrom-KVyD_8Dj.js → ReportQueryFrom-VBxUIMRJ.js} +1 -1
- package/dist/{ReportQueryFrom.vue_vue_type_style_index_0_lang-CLNODquq.js → ReportQueryFrom.vue_vue_type_style_index_0_lang-HeLA4Qs5.js} +1 -1
- package/dist/{ReportTemplate-ag9NDvh2.js → ReportTemplate-DNkv7F5p.js} +28 -28
- package/dist/{Role-_q3lQ8CZ.js → Role-BGfTpZK4.js} +6 -6
- package/dist/{RoleAssign-DZb9IRsm.js → RoleAssign-DrKFWZzA.js} +8 -8
- package/dist/{RolePanel-CsLsz-Ds.js → RolePanel-3lvRh7aS.js} +1 -1
- package/dist/{RolePanel-BQb1LlhD.js → RolePanel-BRI5QYe4.js} +1 -1
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-BXKZb7yt.js +132 -0
- package/dist/{RolePanel.vue_vue_type_script_setup_true_lang-BrnRgHEk.js → RolePanel.vue_vue_type_script_setup_true_lang-Cci_Ysty.js} +44 -38
- package/dist/{ScrollPanel.vue_vue_type_style_index_0_lang-CaFKRwXu.js → ScrollPanel.vue_vue_type_style_index_0_lang-BmId6zzA.js} +21 -21
- package/dist/{Staff-BSf9Ypbk.js → Staff-Dr0dq3fW.js} +3 -3
- package/dist/{StaffInfo-BNKasyMF.js → StaffInfo-_N9g2hPa.js} +1 -1
- package/dist/{StaffInfo.vue_vue_type_script_setup_true_lang-DDZ7ukd0.js → StaffInfo.vue_vue_type_script_setup_true_lang-DiTJY2ug.js} +11 -11
- package/dist/{StaffPanel-Bpq0WVlH.js → StaffPanel-mxJQiW3G.js} +1 -1
- package/dist/{StaffPanel.vue_vue_type_script_setup_true_lang-BhiJ0Q-Q.js → StaffPanel.vue_vue_type_script_setup_true_lang-GRGn-5t6.js} +2 -2
- package/dist/{SysUser-FAABuNti.js → SysUser-DgA19hZE.js} +2 -2
- package/dist/{SysUserPanel-PxJeOgHm.js → SysUserPanel-Bc85z5_K.js} +1 -1
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BHDrP1Pk.js +294 -0
- package/dist/{SystemMenu-C-7NAGon.js → SystemMenu-Be-gFIie.js} +26 -26
- package/dist/{UserInfo-ClXKtyGo.js → UserInfo-BCYuwFmr.js} +1 -1
- package/dist/{UserInfo.vue_vue_type_style_index_0_lang-8N7P4Hl7.js → UserInfo.vue_vue_type_style_index_0_lang-B1lgokO6.js} +39 -37
- package/dist/{childView-C_HmDQNd.js → childView-DhcBr1UA.js} +1 -1
- package/dist/{childView-uUlBcTza.js → childView-Dk4zZoXd.js} +1 -1
- package/dist/{childView.vue_vue_type_style_index_0_lang-Ckjmw6wJ.js → childView.vue_vue_type_style_index_0_lang-CVnLnl03.js} +40 -40
- package/dist/{childView.vue_vue_type_style_index_0_lang-y0sDvYx5.js → childView.vue_vue_type_style_index_0_lang-D4GYVhOc.js} +1 -1
- package/dist/{code-rule-AgCVDKFy.js → code-rule-BSwPwuAL.js} +9 -10
- package/dist/core.es.js +14 -11
- package/dist/{cron-task-C6FgQxTi.js → cron-task-T1ztyra7.js} +1 -1
- package/dist/{frameView-BDgISK7N.js → frameView-BDgngiBq.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-BSj2AtVL.js +4468 -0
- package/dist/{layoutView-yb3DV2DQ.js → layoutView-i7dLLBzJ.js} +1181 -1176
- package/dist/{login-RRpljbkm.js → login-K5Ludp8x.js} +105 -113
- package/dist/{login-log-CvVnyGi3.js → login-log-kqKzKTto.js} +1 -1
- package/dist/{lov-view-C9-rjzZR.js → lov-view-lAexiucu.js} +2 -2
- package/dist/{menuInfo-CzPQyFhp.js → menuInfo-BaN5YZPp.js} +1 -1
- package/dist/{menuInfo.vue_vue_type_style_index_0_lang-BumXunCg.js → menuInfo.vue_vue_type_style_index_0_lang-yI4QOYxG.js} +100 -97
- package/dist/{pda-app-Dvy3U-b6.js → pda-app-DEtDXFvM.js} +211 -197
- package/dist/{resource-Fy0lFkSV.js → resource-Bztmz7pn.js} +15 -15
- package/dist/{su-welcome-DYvSCUST.js → su-welcome-Bx8nBPi9.js} +109 -110
- package/dist/sys-config-nvrtYGgi.js +290 -0
- package/dist/udp-core.css +2 -2
- package/dist/{utogether-CjmJiHoE.js → utogether-yPnwDAIH.js} +1 -1
- package/index.ts +40 -36
- package/package.json +18 -18
- package/src/App.vue +65 -70
- package/src/api/index.ts +31 -31
- 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 +414 -64
- package/src/components/udp/form.vue +112 -0
- package/src/components/udp/grid.vue +495 -0
- package/src/components/udp/index.ts +10 -4
- package/src/components/udp/lov.vue +388 -0
- package/src/components/udp/modal-form.vue +13 -3
- package/src/components/udp/modal-grid.vue +298 -0
- package/src/components/udp/upload.vue +423 -0
- package/src/components/udp/utils.ts +447 -40
- package/src/directives/permission/index.ts +1 -1
- package/src/layout/components/lay-navbar/index.vue +239 -237
- 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-select-org/index.vue +64 -69
- package/src/layout/components/lay-sidebar/breadCrumb.vue +1 -1
- package/src/layout/components/lay-sidebar/horizontal.vue +190 -191
- package/src/layout/components/lay-sidebar/mixNav.vue +260 -258
- package/src/layout/components/lay-sidebar/sidebar-logo.vue +92 -98
- package/src/layout/components/lay-tag/index.vue +625 -625
- package/src/layout/hooks/useNav.ts +173 -173
- package/src/layout/layoutView.vue +215 -215
- package/src/main.ts +119 -109
- package/src/plugins/i18n/en.ts +302 -289
- package/src/plugins/i18n/zh.ts +349 -337
- package/src/plugins/vxe-table/index.ts +53 -46
- package/src/plugins/vxe-table/render.tsx +956 -817
- package/src/router/index.ts +177 -183
- package/src/router/modules/remaining.ts +58 -83
- package/src/store/modules/permission.ts +1 -4
- 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 +283 -297
- package/src/utils/{http → udp/http}/types.d.ts +8 -5
- package/src/utils/udp/useRender.ts +17 -6
- package/src/views/login/login-view.vue +300 -314
- package/src/views/organization/company/CompanyPanel.vue +259 -259
- package/src/views/organization/inv-org/InvOrganization.vue +68 -54
- 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 +363 -371
- 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 +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 +287 -291
- 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/su-welcome.vue +3 -3
- package/src/views/ulogin/login.vue +12 -8
- 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 -1
- package/vite.config.ts +6 -2
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-BqccGW7v.js +0 -102
- package/dist/DictView-C-i7e4hZ.js +0 -95
- package/dist/InvOrganization-cfT6riGU.js +0 -260
- package/dist/Org-CA7vTDIF.js +0 -35
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-cmW7zBLu.js +0 -126
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-njefUln5.js +0 -288
- package/dist/index-DzOzUkf6.js +0 -3388
- package/dist/sys-config-DJ1vNQTy.js +0 -277
|
@@ -1,278 +1,278 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="page">
|
|
3
|
-
<ut-grid
|
|
4
|
-
ref="xgrid"
|
|
5
|
-
:columns="columns"
|
|
6
|
-
:items="formItems"
|
|
7
|
-
:url="url"
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
:
|
|
35
|
-
field="
|
|
36
|
-
span="24"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
import {
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
85
|
-
import {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
const
|
|
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
|
-
const
|
|
130
|
-
const
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
const url = '/uums/user';
|
|
134
|
-
|
|
135
|
-
const xgrid = ref(null);
|
|
136
|
-
|
|
137
|
-
const formItems = [
|
|
138
|
-
{ field: 'name', title: 'message.userName' },
|
|
139
|
-
{ field: 'userName', title: 'message.userCode' }
|
|
140
|
-
];
|
|
141
|
-
|
|
142
|
-
const columns = [
|
|
143
|
-
{ type: 'checkbox', width: 40, align: 'center' },
|
|
144
|
-
{ field: 'userName', title: 'message.userCode', required: true, editRender: renderHook.renderInput() },
|
|
145
|
-
{ field: 'name', title: 'message.userName', required: true, editRender: renderHook.renderInput() },
|
|
146
|
-
{
|
|
147
|
-
field: 'type',
|
|
148
|
-
title: 'message.
|
|
149
|
-
formatter: ['formatDict', 'SU.
|
|
150
|
-
editRender: renderHook.renderDict('SU.USER.TYPE')
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
field: 'userPwd',
|
|
154
|
-
required: true,
|
|
155
|
-
width: 150,
|
|
156
|
-
editRender: renderHook.renderInput(),
|
|
157
|
-
formatter: () => '*******'
|
|
158
|
-
},
|
|
159
|
-
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) },
|
|
160
|
-
{
|
|
161
|
-
field: 'operate',
|
|
162
|
-
width: 240,
|
|
163
|
-
fixed: 'right',
|
|
164
|
-
slots: {
|
|
165
|
-
default: ({ row }) => {
|
|
166
|
-
return
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<ut-button
|
|
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
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
await serviceApi.
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
})
|
|
270
|
-
.catch(() => {
|
|
271
|
-
errorMessage('获取租户失败,刷新后重试');
|
|
272
|
-
});
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
onMounted(() => {
|
|
276
|
-
getUnitList();
|
|
277
|
-
});
|
|
278
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="page">
|
|
3
|
+
<ut-grid
|
|
4
|
+
ref="xgrid"
|
|
5
|
+
:columns="columns"
|
|
6
|
+
:items="formItems"
|
|
7
|
+
:url="url"
|
|
8
|
+
:auto-load="false"
|
|
9
|
+
:default-params="defaultParams"
|
|
10
|
+
:default-value="defaultParams"
|
|
11
|
+
:events="onGridEvents"
|
|
12
|
+
/>
|
|
13
|
+
<!-- 编辑用户信息 -->
|
|
14
|
+
<vxe-modal v-model="data.showModelView" title="用户信息" width="300">
|
|
15
|
+
<template #default>
|
|
16
|
+
<vxe-form ref="xForm" :data="data.record" :rules="rules" title-align="right">
|
|
17
|
+
<vxe-form-item :title="$t('message.unitName')" field="unitId" span="24">
|
|
18
|
+
<template #default="{ data }">
|
|
19
|
+
<vxe-select v-model="data.unitId">
|
|
20
|
+
<vxe-option v-for="unit in treeList" :key="unit.id" :value="unit.id" :label="unit.unitName" />
|
|
21
|
+
</vxe-select>
|
|
22
|
+
</template>
|
|
23
|
+
</vxe-form-item>
|
|
24
|
+
<vxe-form-item
|
|
25
|
+
:title="$t('message.userCode')"
|
|
26
|
+
:item-render="{ name: 'input', attrs: { disabled: data.dataStatus === 'update' } }"
|
|
27
|
+
field="userName"
|
|
28
|
+
span="24"
|
|
29
|
+
/>
|
|
30
|
+
<vxe-form-item :title="$t('message.userName')" field="name" span="24" :item-render="{ name: 'input' }" />
|
|
31
|
+
<vxe-form-item
|
|
32
|
+
v-if="data.dataStatus === 'add'"
|
|
33
|
+
:title="$t('message.userPwd')"
|
|
34
|
+
:item-render="{ name: 'input' }"
|
|
35
|
+
field="userPwd"
|
|
36
|
+
span="24"
|
|
37
|
+
/>
|
|
38
|
+
<vxe-form-item align="right" span="24">
|
|
39
|
+
<template #default>
|
|
40
|
+
<ut-button content="cancel" icon="ri-close-fill" @click="handleClose" />
|
|
41
|
+
<ut-button content="confirm" icon="ri-save-3-fill" status="u-cyan" @click="onSubmit" />
|
|
42
|
+
</template>
|
|
43
|
+
</vxe-form-item>
|
|
44
|
+
</vxe-form>
|
|
45
|
+
</template>
|
|
46
|
+
</vxe-modal>
|
|
47
|
+
<!-- 用户角色 -->
|
|
48
|
+
<vxe-modal v-model="data.showUserRole" :loading="loading" :title="$t('message.title.roleInfo')" width="600">
|
|
49
|
+
<template #default>
|
|
50
|
+
<vxe-table height="300" :data="data.roleList" border>
|
|
51
|
+
<vxe-column type="seq" width="60" />
|
|
52
|
+
<vxe-column field="roleName" :title="$t('message.udp.roleName')" />
|
|
53
|
+
<vxe-column field="roleDesc" :title="$t('message.udp.roleDesc')" />
|
|
54
|
+
</vxe-table>
|
|
55
|
+
</template>
|
|
56
|
+
</vxe-modal>
|
|
57
|
+
|
|
58
|
+
<vxe-modal
|
|
59
|
+
v-model="data.showAuth"
|
|
60
|
+
:loading="loading"
|
|
61
|
+
:title="$t('message.title.authority', { role: data.record.name || '88888' })"
|
|
62
|
+
height="620"
|
|
63
|
+
width="560"
|
|
64
|
+
>
|
|
65
|
+
<template #default>
|
|
66
|
+
<el-tree-v2
|
|
67
|
+
ref="xTree"
|
|
68
|
+
:data="data.roleList"
|
|
69
|
+
:props="{ children: 'children', label: 'menuName' }"
|
|
70
|
+
:height="560"
|
|
71
|
+
node-key="id"
|
|
72
|
+
/>
|
|
73
|
+
</template>
|
|
74
|
+
</vxe-modal>
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
|
|
78
|
+
<script setup lang="tsx">
|
|
79
|
+
import { useI18n } from 'vue-i18n';
|
|
80
|
+
import { ref, reactive, inject, onMounted } from 'vue';
|
|
81
|
+
import to from 'await-to-js';
|
|
82
|
+
import { useRender, errorMessage, warnMessage, delay } from '@utogether/utils';
|
|
83
|
+
import { VxeUI, VxeFormPropTypes } from 'vxe-pc-ui';
|
|
84
|
+
import { isEmpty } from 'xe-utils';
|
|
85
|
+
import { getServiceApi } from '../../../api';
|
|
86
|
+
|
|
87
|
+
const data = reactive<IRecord>({
|
|
88
|
+
record: {},
|
|
89
|
+
listQuery: {},
|
|
90
|
+
dataList: [],
|
|
91
|
+
roleList: [],
|
|
92
|
+
submitLoading: false,
|
|
93
|
+
showModelView: false,
|
|
94
|
+
showUserRole: false,
|
|
95
|
+
showAuth: false,
|
|
96
|
+
dataStatus: ''
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
const serviceApi = getServiceApi();
|
|
100
|
+
const { t } = useI18n();
|
|
101
|
+
|
|
102
|
+
const rules: VxeFormPropTypes.Rules = {
|
|
103
|
+
userName: [
|
|
104
|
+
{
|
|
105
|
+
required: true,
|
|
106
|
+
message: `${t('message.required')}${t('message.userCode')}`
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
name: [
|
|
110
|
+
{
|
|
111
|
+
required: true,
|
|
112
|
+
message: `${t('message.required')}${t('message.userName')}`
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
unitId: [
|
|
116
|
+
{
|
|
117
|
+
required: true,
|
|
118
|
+
message: `${t('message.required')}${t('message.unitName')}`
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
userPwd: [
|
|
122
|
+
{
|
|
123
|
+
required: true,
|
|
124
|
+
message: `${t('message.required')}${t('message.userPwd')}`
|
|
125
|
+
}
|
|
126
|
+
]
|
|
127
|
+
};
|
|
128
|
+
const renderHook = useRender();
|
|
129
|
+
const defaultParams = ref({});
|
|
130
|
+
const treeList: IRecord[] = inject('treeList');
|
|
131
|
+
const loading = ref(false);
|
|
132
|
+
|
|
133
|
+
const url = '/uums/user';
|
|
134
|
+
|
|
135
|
+
const xgrid = ref(null);
|
|
136
|
+
|
|
137
|
+
const formItems = [
|
|
138
|
+
{ field: 'name', title: 'message.udp.userName' },
|
|
139
|
+
{ field: 'userName', title: 'message.udp.userCode' }
|
|
140
|
+
];
|
|
141
|
+
|
|
142
|
+
const columns = [
|
|
143
|
+
{ type: 'checkbox', width: 40, align: 'center' },
|
|
144
|
+
{ field: 'userName', title: 'message.udp.userCode', required: true, editRender: renderHook.renderInput() },
|
|
145
|
+
{ field: 'name', title: 'message.udp.userName', required: true, editRender: renderHook.renderInput() },
|
|
146
|
+
{
|
|
147
|
+
field: 'type',
|
|
148
|
+
title: 'message.udp.userType',
|
|
149
|
+
formatter: ['formatDict', 'SU.USER.TYPE'],
|
|
150
|
+
editRender: renderHook.renderDict('SU.USER.TYPE')
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
field: 'userPwd',
|
|
154
|
+
required: true,
|
|
155
|
+
width: 150,
|
|
156
|
+
editRender: renderHook.renderInput(),
|
|
157
|
+
formatter: () => '*******'
|
|
158
|
+
},
|
|
159
|
+
{ field: 'enabled', width: 80, cellRender: renderHook.renderEnabled(handleClick) },
|
|
160
|
+
{
|
|
161
|
+
field: 'operate',
|
|
162
|
+
width: 240,
|
|
163
|
+
fixed: 'right',
|
|
164
|
+
slots: {
|
|
165
|
+
default: ({ row }) => {
|
|
166
|
+
if (!row.id) return null;
|
|
167
|
+
return [
|
|
168
|
+
<>
|
|
169
|
+
<ut-button icon="ri-user-fill" content="role" onTap={() => handleRole(row)} />
|
|
170
|
+
<ut-button icon="ri-lock-fill" content="auth" status="success" onTap={() => handleAuth(row)} />
|
|
171
|
+
<ut-button icon="ri-lock-fill" content="passwordReset" status="warning" onTap={() => handleResetPwd(row)} />
|
|
172
|
+
</>
|
|
173
|
+
];
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
];
|
|
178
|
+
|
|
179
|
+
// 启用/禁用
|
|
180
|
+
async function handleClick({ row }) {
|
|
181
|
+
await to(serviceApi.put(url, [row]));
|
|
182
|
+
xgrid.value.refreshData();
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* @description: 查看用户角色
|
|
187
|
+
* @param {*} row 用户行
|
|
188
|
+
* @return {*}
|
|
189
|
+
*/
|
|
190
|
+
const handleRole = async (row: any) => {
|
|
191
|
+
data.roleList = [];
|
|
192
|
+
data.showUserRole = true;
|
|
193
|
+
loading.value = true;
|
|
194
|
+
const serverData = await serviceApi.get(url + '/getUserRole', { userName: row.userName });
|
|
195
|
+
loading.value = false;
|
|
196
|
+
data.roleList = serverData[0]?.sysRoles;
|
|
197
|
+
// nextTick(() => {
|
|
198
|
+
// });
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* @description: 密码重置
|
|
202
|
+
* @param {*} row 用户信息
|
|
203
|
+
* @return {*}
|
|
204
|
+
*/
|
|
205
|
+
const handleResetPwd = async (row: Object) => {
|
|
206
|
+
await serviceApi.put(url + '/resetPwd', row);
|
|
207
|
+
await VxeUI.modal.alert(t('message.tip.initPassword'));
|
|
208
|
+
};
|
|
209
|
+
// 启用/禁用
|
|
210
|
+
// const handleUpdate = async (record: IRecord) => {
|
|
211
|
+
// record.enabled = record.enabled === '1' ? '0' : '1';
|
|
212
|
+
// await serviceApi.put(url, record);
|
|
213
|
+
// getDataList();
|
|
214
|
+
// };
|
|
215
|
+
/**
|
|
216
|
+
* @description: 用户权限
|
|
217
|
+
* @param {*} row 用户信息
|
|
218
|
+
* @return {*}
|
|
219
|
+
*/
|
|
220
|
+
const handleAuth = async row => {
|
|
221
|
+
data.roleList = [];
|
|
222
|
+
data.showAuth = true;
|
|
223
|
+
loading.value = true;
|
|
224
|
+
data.record = row;
|
|
225
|
+
const [err, res] = await to(serviceApi.get(url + '/getUserRole', { userName: row.userName }));
|
|
226
|
+
loading.value = false;
|
|
227
|
+
if (!err) {
|
|
228
|
+
if (!isEmpty(res)) {
|
|
229
|
+
data.roleList = res[0]?.sysMenuExts;
|
|
230
|
+
} else {
|
|
231
|
+
warnMessage(t('message.tip.emptyAuth'));
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
const onGridEvents = {
|
|
237
|
+
editActived({ row }) {
|
|
238
|
+
columns[1].editRender.props.disabled = !!row.id;
|
|
239
|
+
columns[4].editRender.props.disabled = !!row.id;
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
const xForm = ref(null);
|
|
243
|
+
// const xSarchFrom = ref(null);
|
|
244
|
+
|
|
245
|
+
const onSubmit = () => {
|
|
246
|
+
xForm.value.validate(async valid => {
|
|
247
|
+
if (!valid) {
|
|
248
|
+
const { record, dataStatus } = data;
|
|
249
|
+
if (dataStatus === 'add') {
|
|
250
|
+
await serviceApi.post(url, record);
|
|
251
|
+
} else {
|
|
252
|
+
await serviceApi.put(url, record);
|
|
253
|
+
}
|
|
254
|
+
handleClose();
|
|
255
|
+
}
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
|
|
259
|
+
const handleClose = () => {
|
|
260
|
+
data.showModelView = false;
|
|
261
|
+
};
|
|
262
|
+
const getUnitList = () => {
|
|
263
|
+
serviceApi
|
|
264
|
+
.get('/uums/unit', { pageSize: 10 })
|
|
265
|
+
.then(async res => {
|
|
266
|
+
defaultParams.value = { unitId: res[0].id, enabled: '1' };
|
|
267
|
+
await delay(100);
|
|
268
|
+
xgrid.value.refreshData();
|
|
269
|
+
})
|
|
270
|
+
.catch(() => {
|
|
271
|
+
errorMessage('获取租户失败,刷新后重试');
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
|
|
275
|
+
onMounted(() => {
|
|
276
|
+
getUnitList();
|
|
277
|
+
});
|
|
278
|
+
</script>
|