@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,314 +1,300 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="select-none">
|
|
3
|
-
<div class="absolute flex-
|
|
4
|
-
<!-- 主题 -->
|
|
5
|
-
<!-- <el-switch
|
|
6
|
-
v-model="dataTheme"
|
|
7
|
-
inline-prompt
|
|
8
|
-
:active-icon="dayIcon"
|
|
9
|
-
:inactive-icon="darkIcon"
|
|
10
|
-
@change="dataThemeChange"
|
|
11
|
-
/> -->
|
|
12
|
-
<!-- 国际化 -->
|
|
13
|
-
<!-- <el-dropdown v-if="sysConfig['i18nEnabled'] === 'Y'" trigger="click">
|
|
14
|
-
<globalization
|
|
15
|
-
class="hover:text-primary hover:!bg-[transparent] w-[20px] h-[20px] ml-1.5 cursor-pointer outline-hidden duration-300"
|
|
16
|
-
/>
|
|
17
|
-
<template #dropdown>
|
|
18
|
-
<el-dropdown-menu class="translation">
|
|
19
|
-
<el-dropdown-item
|
|
20
|
-
:style="getDropdownItemStyle(locale, 'zh')"
|
|
21
|
-
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
|
22
|
-
@click="translationCh"
|
|
23
|
-
>
|
|
24
|
-
<IconifyIconOffline v-show="locale === 'zh'" class="check-zh" :icon="ri:check-line" />
|
|
25
|
-
简体中文
|
|
26
|
-
</el-dropdown-item>
|
|
27
|
-
<el-dropdown-item
|
|
28
|
-
:style="getDropdownItemStyle(locale, 'en')"
|
|
29
|
-
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
|
30
|
-
@click="translationEn"
|
|
31
|
-
>
|
|
32
|
-
<span v-show="locale === 'en'" class="check-en">
|
|
33
|
-
<IconifyIconOffline :icon="ri:check-line" />
|
|
34
|
-
</span>
|
|
35
|
-
English
|
|
36
|
-
</el-dropdown-item>
|
|
37
|
-
</el-dropdown-menu>
|
|
38
|
-
</template>
|
|
39
|
-
</el-dropdown> -->
|
|
40
|
-
</div>
|
|
41
|
-
<div class="login-container">
|
|
42
|
-
<div class="bg-img" :style="{ backgroundImage: `url(${sysConfig['backgroundImg']}` }" />
|
|
43
|
-
<div class="login-box">
|
|
44
|
-
<div class="login-form">
|
|
45
|
-
<img v-if="sysConfig['logo']" class="login-logo-img" :src="sysConfig['logo']" />
|
|
46
|
-
<Motion v-if="sysConfig['title']">
|
|
47
|
-
<h2 class="outline-hidden">
|
|
48
|
-
<TypeIt :values="[sysConfig['title']]" :cursor="false" :speed="150" />
|
|
49
|
-
</h2>
|
|
50
|
-
</Motion>
|
|
51
|
-
|
|
52
|
-
<el-form ref="ruleFormRef" :model="ruleForm" :rules="loginRules" size="large">
|
|
53
|
-
<Motion :delay="100">
|
|
54
|
-
<el-form-item
|
|
55
|
-
:rules="[{ required: true, message: $t('message.username'), trigger: 'blur' }]"
|
|
56
|
-
prop="username"
|
|
57
|
-
>
|
|
58
|
-
<el-input
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
<Motion :delay="
|
|
68
|
-
<el-form-item
|
|
69
|
-
<el-
|
|
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
|
-
import {
|
|
102
|
-
import {
|
|
103
|
-
import
|
|
104
|
-
import {
|
|
105
|
-
|
|
106
|
-
import
|
|
107
|
-
|
|
108
|
-
import
|
|
109
|
-
import
|
|
110
|
-
import
|
|
111
|
-
import
|
|
112
|
-
|
|
113
|
-
import
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
// const
|
|
138
|
-
|
|
139
|
-
const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
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
|
-
|
|
238
|
-
|
|
239
|
-
|
|
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
|
-
sysConfig.value
|
|
269
|
-
|
|
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
|
-
.check-zh {
|
|
302
|
-
position: absolute;
|
|
303
|
-
left: 20px;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
.check-en {
|
|
307
|
-
position: absolute;
|
|
308
|
-
left: 20px;
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
:deep(.el-input-group__append, .el-input-group__prepend) {
|
|
312
|
-
padding: 0;
|
|
313
|
-
}
|
|
314
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="select-none">
|
|
3
|
+
<div class="absolute flex justify-center items-center right-5 top-3">
|
|
4
|
+
<!-- 主题 -->
|
|
5
|
+
<!-- <el-switch
|
|
6
|
+
v-model="dataTheme"
|
|
7
|
+
inline-prompt
|
|
8
|
+
:active-icon="dayIcon"
|
|
9
|
+
:inactive-icon="darkIcon"
|
|
10
|
+
@change="dataThemeChange"
|
|
11
|
+
/> -->
|
|
12
|
+
<!-- 国际化 -->
|
|
13
|
+
<!-- <el-dropdown v-if="sysConfig['i18nEnabled'] === 'Y'" trigger="click">
|
|
14
|
+
<globalization
|
|
15
|
+
class="hover:text-primary hover:!bg-[transparent] w-[20px] h-[20px] ml-1.5 cursor-pointer outline-hidden duration-300"
|
|
16
|
+
/>
|
|
17
|
+
<template #dropdown>
|
|
18
|
+
<el-dropdown-menu class="translation">
|
|
19
|
+
<el-dropdown-item
|
|
20
|
+
:style="getDropdownItemStyle(locale, 'zh')"
|
|
21
|
+
:class="['dark:text-white!', getDropdownItemClass(locale, 'zh')]"
|
|
22
|
+
@click="translationCh"
|
|
23
|
+
>
|
|
24
|
+
<IconifyIconOffline v-show="locale === 'zh'" class="check-zh" :icon="ri:check-line" />
|
|
25
|
+
简体中文
|
|
26
|
+
</el-dropdown-item>
|
|
27
|
+
<el-dropdown-item
|
|
28
|
+
:style="getDropdownItemStyle(locale, 'en')"
|
|
29
|
+
:class="['dark:text-white!', getDropdownItemClass(locale, 'en')]"
|
|
30
|
+
@click="translationEn"
|
|
31
|
+
>
|
|
32
|
+
<span v-show="locale === 'en'" class="check-en">
|
|
33
|
+
<IconifyIconOffline :icon="ri:check-line" />
|
|
34
|
+
</span>
|
|
35
|
+
English
|
|
36
|
+
</el-dropdown-item>
|
|
37
|
+
</el-dropdown-menu>
|
|
38
|
+
</template>
|
|
39
|
+
</el-dropdown> -->
|
|
40
|
+
</div>
|
|
41
|
+
<div class="login-container">
|
|
42
|
+
<div class="bg-img" :style="{ backgroundImage: `url(${sysConfig['backgroundImg']}` }" />
|
|
43
|
+
<div class="login-box">
|
|
44
|
+
<div class="login-form">
|
|
45
|
+
<img v-if="sysConfig['logo']" class="login-logo-img" :src="sysConfig['logo']" />
|
|
46
|
+
<Motion v-if="sysConfig['title']">
|
|
47
|
+
<h2 class="outline-hidden">
|
|
48
|
+
<TypeIt :values="[sysConfig['title']]" :cursor="false" :speed="150" />
|
|
49
|
+
</h2>
|
|
50
|
+
</Motion>
|
|
51
|
+
|
|
52
|
+
<el-form ref="ruleFormRef" :model="ruleForm" :rules="loginRules" size="large">
|
|
53
|
+
<Motion :delay="100">
|
|
54
|
+
<el-form-item
|
|
55
|
+
:rules="[{ required: true, message: $t('message.username'), trigger: 'blur' }]"
|
|
56
|
+
prop="username"
|
|
57
|
+
>
|
|
58
|
+
<el-input v-model.trim="ruleForm.username" autofocus clearable :prefix-icon="useRenderIcon(User)" />
|
|
59
|
+
</el-form-item>
|
|
60
|
+
</Motion>
|
|
61
|
+
|
|
62
|
+
<Motion :delay="150">
|
|
63
|
+
<el-form-item prop="passWord">
|
|
64
|
+
<el-input v-model="ruleForm.passWord" clearable show-password :prefix-icon="useRenderIcon(Lock)" />
|
|
65
|
+
</el-form-item>
|
|
66
|
+
</Motion>
|
|
67
|
+
<Motion :delay="250">
|
|
68
|
+
<el-form-item>
|
|
69
|
+
<el-button
|
|
70
|
+
class="w-full mt-4"
|
|
71
|
+
size="default"
|
|
72
|
+
type="primary"
|
|
73
|
+
:loading="loading"
|
|
74
|
+
@click="onLogin(ruleFormRef)"
|
|
75
|
+
>
|
|
76
|
+
{{ $t('message.udp.login') }}
|
|
77
|
+
</el-button>
|
|
78
|
+
</el-form-item>
|
|
79
|
+
</Motion>
|
|
80
|
+
</el-form>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="fixed text-xs text-gray-500 bottom-4">Copyright ©2021{{ sysConfig['copyright'] }}版权所有</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</template>
|
|
87
|
+
|
|
88
|
+
<script setup lang="ts">
|
|
89
|
+
import { ref, reactive, onMounted, onBeforeMount, onBeforeUnmount } from 'vue';
|
|
90
|
+
import { useRouter } from 'vue-router';
|
|
91
|
+
import type { FormInstance } from 'element-plus';
|
|
92
|
+
import { storageLocal, cookies, successMessage, delay } from '@utogether/utils';
|
|
93
|
+
import { toDateString } from 'xe-utils';
|
|
94
|
+
import to from 'await-to-js';
|
|
95
|
+
|
|
96
|
+
import Motion from './utils/motion';
|
|
97
|
+
import { loginRules } from './utils/rule';
|
|
98
|
+
import TypeIt from '@/components/SuTypeit';
|
|
99
|
+
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
|
|
100
|
+
// import { useTranslationLang } from '@/layout/hooks/useTranslationLang';
|
|
101
|
+
import { useLayout } from '@/layout/hooks/useLayout';
|
|
102
|
+
// import { useNav } from '@/layout/hooks/useNav';
|
|
103
|
+
// import { useDataThemeChange } from '@/layout/hooks/useDataThemeChange';
|
|
104
|
+
import { useSystemStoreHook } from '@/store/modules/system';
|
|
105
|
+
|
|
106
|
+
import { getServiceApi } from '../../api';
|
|
107
|
+
import { initDict } from '../../api/user';
|
|
108
|
+
import { getPlatform, getBrower } from '@/utils/browers';
|
|
109
|
+
// import dayIcon from '@/assets/svg/day.svg?component';
|
|
110
|
+
// import darkIcon from '@/assets/svg/dark.svg?component';
|
|
111
|
+
// import globalization from '@/assets/svg/globalization.svg?component';
|
|
112
|
+
import Lock from '@iconify-icons/ri/lock-fill';
|
|
113
|
+
import User from '@iconify-icons/ri/user-3-fill';
|
|
114
|
+
|
|
115
|
+
defineOptions({ name: 'LoginView' });
|
|
116
|
+
|
|
117
|
+
interface IRSAPublic {
|
|
118
|
+
publicKeyExponent: string;
|
|
119
|
+
publicKeyModulus: string;
|
|
120
|
+
requestKey: string;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const router = useRouter();
|
|
124
|
+
|
|
125
|
+
// const bgStyle = ref({});
|
|
126
|
+
const sysConfig = ref({});
|
|
127
|
+
const loading = ref(false);
|
|
128
|
+
const ruleFormRef = ref<FormInstance>();
|
|
129
|
+
|
|
130
|
+
const serviceApi = getServiceApi();
|
|
131
|
+
|
|
132
|
+
const { initStorage } = useLayout();
|
|
133
|
+
initStorage();
|
|
134
|
+
// const { dataTheme, dataThemeChange } = useDataThemeChange();
|
|
135
|
+
// dataThemeChange();
|
|
136
|
+
// const { getDropdownItemStyle, getDropdownItemClass } = useNav();
|
|
137
|
+
// const { locale, translationCh, translationEn } = useTranslationLang();
|
|
138
|
+
|
|
139
|
+
const ruleForm = reactive({
|
|
140
|
+
username: '',
|
|
141
|
+
passWord: ''
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
const publicRSA: IRSAPublic = reactive({
|
|
145
|
+
publicKeyExponent: '10001',
|
|
146
|
+
publicKeyModulus:
|
|
147
|
+
'a12708ab26367e1711bd767f6bb1f29afbd85380185723d7b492230e2567c95cf5718eca745da0643400ca619fbeec892df61abe1f71ad3b822d076ed831080c53782edf8c0627ee95c57e2bee12fe55da2b3cadec59947a75ccccbbf36fb3b781c93b4bf51489789f1c0849f9023a16ec70bef41a504785e1082b6f13588e29',
|
|
148
|
+
requestKey: ''
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
const onLogin = async (formEl: FormInstance | undefined) => {
|
|
152
|
+
if (!formEl) return;
|
|
153
|
+
await formEl.validate(valid => {
|
|
154
|
+
if (valid) {
|
|
155
|
+
loading.value = true;
|
|
156
|
+
const { username, passWord } = ruleForm;
|
|
157
|
+
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
setMaxDigits(200);
|
|
160
|
+
// @ts-ignore
|
|
161
|
+
const rsakeypair = new RSAKeyPair(publicRSA.publicKeyExponent, '', publicRSA.publicKeyModulus);
|
|
162
|
+
// @ts-ignore
|
|
163
|
+
const password = encryptedString(rsakeypair, passWord.split('').reverse().join(''));
|
|
164
|
+
const param = {
|
|
165
|
+
username,
|
|
166
|
+
password,
|
|
167
|
+
requestKey: publicRSA.requestKey,
|
|
168
|
+
domain: window.location.origin
|
|
169
|
+
};
|
|
170
|
+
serviceApi
|
|
171
|
+
.post('/uath/login', param)
|
|
172
|
+
.then(async (data: IResponseData) => {
|
|
173
|
+
successMessage(`👏 恭喜,成功登录${sysConfig.value['title']}!!!🎉`);
|
|
174
|
+
useSystemStoreHook().setSessionKey(data);
|
|
175
|
+
cacheToken(data);
|
|
176
|
+
cookies.set('loginer', username);
|
|
177
|
+
if (!storageLocal.getItem('kLov')) {
|
|
178
|
+
initDict().then(res => useSystemStoreHook().setDict(res));
|
|
179
|
+
}
|
|
180
|
+
await delay(300);
|
|
181
|
+
router.push('/');
|
|
182
|
+
await insertLoginInfo(username);
|
|
183
|
+
})
|
|
184
|
+
.finally(() => {
|
|
185
|
+
loading.value = false;
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* @description: 缓存token
|
|
193
|
+
* @param {*} token token数据
|
|
194
|
+
* @return {*}
|
|
195
|
+
*/
|
|
196
|
+
const cacheToken = token => {
|
|
197
|
+
const { access_token, expires_in, refresh_token } = token;
|
|
198
|
+
const cache = {
|
|
199
|
+
accessToken: access_token,
|
|
200
|
+
refreshToken: refresh_token,
|
|
201
|
+
expires: Date.now() + expires_in * 1000
|
|
202
|
+
};
|
|
203
|
+
const kTOKENKEY = 'authorized-token';
|
|
204
|
+
|
|
205
|
+
cookies.set('kCookies_token', token.access_token);
|
|
206
|
+
const dataString = JSON.stringify(cache);
|
|
207
|
+
expires_in > 0 ? cookies.set(kTOKENKEY, dataString) : cookies.set(kTOKENKEY, dataString);
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
const insertLoginInfo = username => {
|
|
211
|
+
const userAgent = navigator.userAgent.toLowerCase();
|
|
212
|
+
const { browser, browserVersion } = getBrower(userAgent);
|
|
213
|
+
const obj = {
|
|
214
|
+
userName: username,
|
|
215
|
+
loginTime: toDateString(new Date()),
|
|
216
|
+
browser,
|
|
217
|
+
browserVersion,
|
|
218
|
+
operatingSystem: getPlatform(userAgent)
|
|
219
|
+
};
|
|
220
|
+
serviceApi.post('/upfm/v1/userMonitor', obj);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
/** 使用公共函数,避免`removeEventListener`失效 */
|
|
224
|
+
function onkeypress({ code }: KeyboardEvent) {
|
|
225
|
+
if (['Enter', 'NumpadEnter'].includes(code)) {
|
|
226
|
+
onLogin(ruleFormRef.value);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
onMounted(() => {
|
|
231
|
+
window.document.addEventListener('keypress', onkeypress);
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
onBeforeUnmount(() => {
|
|
235
|
+
window.document.removeEventListener('keypress', onkeypress);
|
|
236
|
+
});
|
|
237
|
+
/**
|
|
238
|
+
* @description: 获取系统配置
|
|
239
|
+
* @return {*}
|
|
240
|
+
*/
|
|
241
|
+
const getSysConfig = async () => {
|
|
242
|
+
const [err, data]: [Error, any] = await to(serviceApi.get('/upfm/v1/sysConfig', {}));
|
|
243
|
+
if (!err) {
|
|
244
|
+
const config = {};
|
|
245
|
+
data.list?.forEach(item => {
|
|
246
|
+
config[item.configCode] = item.configValue;
|
|
247
|
+
if (item.fileName) {
|
|
248
|
+
config[item.configCode] = window.location.origin + '/ufil' + item.configValue;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
const env = process.env.NODE_ENV;
|
|
252
|
+
const title = data.list?.find(f => f.configCode === `${env}Title` || f.configCode === 'title')?.configValue;
|
|
253
|
+
config['title'] = title || 'U-DP';
|
|
254
|
+
sysConfig.value = config;
|
|
255
|
+
setFavicon();
|
|
256
|
+
storageLocal.setItem('kSysConfig', config);
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
const setFavicon = () => {
|
|
261
|
+
let favicon = document.querySelector('link[rel="icon"]') as HTMLElement;
|
|
262
|
+
// console.log('app', favicon)
|
|
263
|
+
if (favicon !== null) {
|
|
264
|
+
favicon['href'] = sysConfig.value['favicon'] || '../../../public/favicon.ico';
|
|
265
|
+
} else {
|
|
266
|
+
favicon = document.createElement('link');
|
|
267
|
+
favicon['rel'] = 'icon';
|
|
268
|
+
favicon['href'] = sysConfig.value['favicon'] || '../../../public/favicon.ico';
|
|
269
|
+
document.head.appendChild(favicon);
|
|
270
|
+
}
|
|
271
|
+
};
|
|
272
|
+
|
|
273
|
+
onBeforeMount(() => {
|
|
274
|
+
getSysConfig();
|
|
275
|
+
});
|
|
276
|
+
</script>
|
|
277
|
+
|
|
278
|
+
<style scoped>
|
|
279
|
+
@import url('@/style/login2.css');
|
|
280
|
+
|
|
281
|
+
/* .translation {
|
|
282
|
+
::v-deep(.el-dropdown-menu__item) {
|
|
283
|
+
padding: 5px 40px;
|
|
284
|
+
}
|
|
285
|
+
} */
|
|
286
|
+
|
|
287
|
+
.check-zh {
|
|
288
|
+
position: absolute;
|
|
289
|
+
left: 20px;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.check-en {
|
|
293
|
+
position: absolute;
|
|
294
|
+
left: 20px;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
:deep(.el-input-group__append, .el-input-group__prepend) {
|
|
298
|
+
padding: 0;
|
|
299
|
+
}
|
|
300
|
+
</style>
|