@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,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>
|