@utogether/udp-core 2.0.0-beta.25 → 2.0.0-beta.27
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/dist/403-gdcH0-Bo.js +65 -0
- package/dist/404-Se2SF97M.js +65 -0
- package/dist/500-B6j9AqLo.js +67 -0
- package/dist/AuthorityInfo-CQ8ydZvr.js +4 -0
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-C4NRvS8p.js +100 -0
- package/dist/AuthorityPanel-lVnZ5bce.js +4 -0
- package/dist/AuthorityPanel.vue_vue_type_style_index_0_lang-nsfhDlvV.js +113 -0
- package/dist/Company-BzSVBSC4.js +25 -0
- package/dist/CompanyPanel-DBjZB4aJ.js +204 -0
- package/dist/DataSet-iBHzs75s.js +147 -0
- package/dist/Department-BkgseHo8.js +25 -0
- package/dist/DepartmentPanel-Sen93_2M.js +249 -0
- package/dist/DesignPanel-pqDcwaFC.js +4 -0
- package/dist/DesignPanel.vue_vue_type_style_index_0_lang-BjtYyEw7.js +1013 -0
- package/dist/DictView-CJLG4LlE.js +110 -0
- package/dist/InvOrganization-D0Jq1IAa.js +74 -0
- package/dist/Org-CO_1WT39.js +39 -0
- package/dist/Preview-DLI4Bwel.js +48 -0
- package/dist/ReportDefine-Cw46OnJ_.js +10 -0
- package/dist/ReportDesign-D4sHTXT7.js +165 -0
- package/dist/ReportQuery-DtOCvQSN.js +74 -0
- package/dist/ReportQueryFrom-QjL-ETPq.js +4 -0
- package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-Dj9ne87n.js +177 -0
- package/dist/ReportTemplate-BxAgc_Aj.js +161 -0
- package/dist/Role-Df77BBD-.js +25 -0
- package/dist/RoleAssign-BrunouML.js +26 -0
- package/dist/RolePanel-DSVwqhiD.js +4 -0
- package/dist/RolePanel-HLA7XBlN.js +4 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CKlbqRa5.js +132 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-CN0rUxKz.js +152 -0
- package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-D_FeSXKv.js +99 -0
- package/dist/Staff-BeL1xcRf.js +26 -0
- package/dist/StaffInfo-CIfnltyX.js +4 -0
- package/dist/StaffInfo.vue_vue_type_script_setup_true_lang-DbLFwWfG.js +107 -0
- package/dist/StaffPanel-BV2CHWac.js +4 -0
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-CvT-Vp2G.js +153 -0
- package/dist/SysUser-DPfNvthk.js +15 -0
- package/dist/SysUserPanel-CoLKYlQE.js +4 -0
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-lcO3Cjbq.js +353 -0
- package/dist/SystemMenu-sdj1dRDA.js +156 -0
- package/dist/UserInfo-CTX4hhFl.js +4 -0
- package/dist/UserInfo.vue_vue_type_style_index_0_lang-ClhCd_8z.js +160 -0
- package/dist/await-to-js.es5-Bv3Eu4mi.js +10 -0
- package/dist/childView-BDmWwJO5.js +4 -0
- package/dist/childView-Dx3ACtHa.js +4 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-CfKq_0FN.js +183 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-DxZNtkhd.js +143 -0
- package/dist/code-rule-cvN4gYC_.js +148 -0
- package/dist/core.es.js +24 -6
- package/dist/cron-task-B0TkxFdp.js +135 -0
- package/dist/flow-task-PoDnE_kE.js +10 -0
- package/dist/frameView-5cy5BSgS.js +43 -0
- package/dist/img/minicolors.png +0 -0
- package/dist/index-C5WRTwvI.js +3006 -0
- package/dist/layout-home-DrARg-3o.js +232 -0
- package/dist/layoutView-25v_ngk5.js +3191 -0
- package/dist/log-in-Bmz5Uhbt.js +116 -0
- package/dist/log-out-B-8m3oNj.js +130 -0
- package/dist/login-Cmp2RvvW.js +217 -0
- package/dist/login-log-CVvRgZSu.js +70 -0
- package/dist/lov-view-BATtzw2X.js +99 -0
- package/dist/menuInfo-BIvrE7nm.js +4 -0
- package/dist/menuInfo.vue_vue_type_style_index_0_lang-B6USomit.js +360 -0
- package/dist/pda-app-CzHVyeEa.js +707 -0
- package/dist/redirect-DTz8GSnv.js +15 -0
- package/dist/resource-Y5lGB38n.js +97 -0
- package/dist/su-welcome-CXA6OzBw.js +878 -0
- package/dist/sys-config-CqO03LeC.js +385 -0
- package/dist/udp-core.css +1 -2
- package/dist/useNav-C-rCgubt.js +84 -0
- package/dist/utogether-MlnyYtNS.js +4 -0
- package/dist/wecom-push-B75FLee5.js +70 -0
- package/index.ts +3 -2
- package/package.json +1 -1
- package/src/App.vue +79 -73
- package/src/api/index.ts +1 -1
- package/src/components/SuQrcode/src/index.tsx +231 -236
- package/src/components/udp/grid/index.vue +9 -11
- package/src/components/udp/utils.ts +420 -414
- package/src/layout/components/lay-panel/index.vue +2 -6
- package/src/layout/components/lay-search/components/SearchModal.vue +7 -3
- package/src/main.ts +111 -110
- package/src/router/index.ts +156 -187
- package/src/router/utils.ts +2 -3
- package/src/store/modules/system.ts +7 -0
- package/src/style/vxetable.scss +372 -364
- package/src/utils/authority/index.ts +46 -29
- package/src/utils/udp/http/index.ts +115 -64
- package/src/utils/udp/http/types.d.ts +15 -14
- package/src/views/login/login-view.vue +280 -301
- package/src/views/organization/department/DepartmentPanel.vue +3 -4
- package/src/views/system/sys/sys-config.vue +344 -344
- package/src/views/uhome/components/home-todo.vue +179 -178
- package/src/views/ulogin/login.vue +8 -41
- package/tsconfig.json +2 -3
- package/types/global.d.ts +234 -234
- package/vite.config.ts +2 -1
- package/dist/403-QwBKrRZE.js +0 -72
- package/dist/404-Cr7MbzNV.js +0 -72
- package/dist/500-B7kCOeIA.js +0 -77
- package/dist/AuthorityInfo-Dwml2K4S.js +0 -91
- package/dist/AuthorityPanel-DzPhsPpa.js +0 -98
- package/dist/Company-BhOlvl7Q.js +0 -21
- package/dist/CompanyPanel-ByhY5-Sq.js +0 -199
- package/dist/DataSet-CuGZcKC-.js +0 -141
- package/dist/Department-QvngN63N.js +0 -21
- package/dist/DepartmentPanel-BCXqC39J.js +0 -2
- package/dist/DepartmentPanel-DntGycxr.js +0 -242
- package/dist/DesignPanel-BMN4DZ0R.js +0 -1196
- package/dist/DictView-ERFqZ5VD.js +0 -100
- package/dist/File-WJXjGYxr.js +0 -89
- package/dist/InvOrganization-BwMmD8Ua.js +0 -76
- package/dist/Org-HgnOWubi.js +0 -76
- package/dist/Preview-CVZdnHB1.js +0 -45
- package/dist/ReIcon-DecitXmg.js +0 -413
- package/dist/ReportDefine-BgLM-Rjk.js +0 -10
- package/dist/ReportDesign-CjfTyyy_.js +0 -158
- package/dist/ReportQuery-CP-E0Puv.js +0 -101
- package/dist/ReportQueryFrom-D7SPPAps.js +0 -198
- package/dist/ReportTemplate-DE25zc1f.js +0 -162
- package/dist/Role-K7v_ZhFE.js +0 -21
- package/dist/RoleAssign-C16fjLaX.js +0 -22
- package/dist/RolePanel-CV-xPlYJ.js +0 -176
- package/dist/RolePanel-DPCe9k8f.js +0 -131
- package/dist/ScrollPanel-DW30pGz1.js +0 -88
- package/dist/Staff-w2ly4qd0.js +0 -22
- package/dist/StaffInfo-DPDRpz6F.js +0 -149
- package/dist/StaffPanel-DI1eTTp9.js +0 -143
- package/dist/SysUser-BMTX1cJM.js +0 -12
- package/dist/SysUserPanel-xwZdVjdp.js +0 -365
- package/dist/SystemMenu-TXhiQZVm.js +0 -154
- package/dist/UserInfo-JQqw8FMT.js +0 -194
- package/dist/_plugin-vue_export-helper-C6QCLu9I.js +0 -8
- package/dist/api-BFNxcxSN.js +0 -30
- package/dist/authority-Bi6BGB5B.js +0 -20
- package/dist/await-to-js.es5-DkWYmPXW.js +0 -10
- package/dist/childView-Bk8OD9bV.js +0 -181
- package/dist/childView-CyrcwshT.js +0 -184
- package/dist/code-rule-QFrhqFrW.js +0 -151
- package/dist/contant-Q77dU_V3.js +0 -4
- package/dist/cron-task-BpUDKEAU.js +0 -131
- package/dist/flow-task-DAc2NrDU.js +0 -11
- package/dist/frameView-Di0zJZUR.js +0 -39
- package/dist/layout-home-BVp7vYLR.js +0 -239
- package/dist/layoutView-DFUjrqAS.js +0 -2662
- package/dist/log-in-BrNB0mLz.js +0 -117
- package/dist/log-out-dYfqvzy6.js +0 -111
- package/dist/login-BdCDnuXL.js +0 -233
- package/dist/login-log-CJak-ANA.js +0 -79
- package/dist/lov-view-DkmG4K57.js +0 -95
- package/dist/menuInfo-kp2wNYOp.js +0 -346
- package/dist/mitt-CQgI7DYU.js +0 -27
- package/dist/pda-app-CA7YI37u.js +0 -589
- package/dist/redirect-N0k4tImU.js +0 -16
- package/dist/resource-CfQTHFcs.js +0 -94
- package/dist/router-CeluSGiD.js +0 -1531
- package/dist/su-welcome-JeiovGpe.js +0 -799
- package/dist/sys-config-Ddb3vBpK.js +0 -316
- package/dist/udp-core-Dhm-BlAs.js +0 -2032
- package/dist/useDataThemeChange-BCy8JBG7.js +0 -226
- package/dist/useNav-DY8FkltH.js +0 -106
- package/dist/utogether-l7JXs4Lv.js +0 -4
- package/dist/water-mark-WDQZ9YqB.js +0 -119
- package/dist/wecom-push-kWkAVRCj.js +0 -77
|
@@ -1,301 +1,280 @@
|
|
|
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.udp.loginUser'), trigger: 'blur' }]"
|
|
56
|
-
:label="$t('message.udp.loginUser')"
|
|
57
|
-
prop="username"
|
|
58
|
-
>
|
|
59
|
-
<el-input v-model.trim="ruleForm.username" autofocus clearable :prefix-icon="useRenderIcon(User)" />
|
|
60
|
-
</el-form-item>
|
|
61
|
-
</Motion>
|
|
62
|
-
|
|
63
|
-
<Motion :delay="150">
|
|
64
|
-
<el-form-item prop="passWord">
|
|
65
|
-
<el-input v-model="ruleForm.passWord" clearable show-password :prefix-icon="useRenderIcon(Lock)" />
|
|
66
|
-
</el-form-item>
|
|
67
|
-
</Motion>
|
|
68
|
-
<Motion :delay="250">
|
|
69
|
-
<el-form-item>
|
|
70
|
-
<el-button
|
|
71
|
-
class="w-full mt-4"
|
|
72
|
-
size="default"
|
|
73
|
-
type="primary"
|
|
74
|
-
:loading="loading"
|
|
75
|
-
@click="onLogin(ruleFormRef)"
|
|
76
|
-
>
|
|
77
|
-
{{ $t('message.udp.login') }}
|
|
78
|
-
</el-button>
|
|
79
|
-
</el-form-item>
|
|
80
|
-
</Motion>
|
|
81
|
-
</el-form>
|
|
82
|
-
</div>
|
|
83
|
-
<div class="fixed text-xs text-gray-500 bottom-4">Copyright ©2021{{ sysConfig['copyright'] }}版权所有</div>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
</template>
|
|
88
|
-
|
|
89
|
-
<script setup lang="ts">
|
|
90
|
-
import { ref, reactive, onMounted, onBeforeMount, onBeforeUnmount } from 'vue';
|
|
91
|
-
import { useRouter } from 'vue-router';
|
|
92
|
-
import type { FormInstance } from 'element-plus';
|
|
93
|
-
import { storageLocal, cookies, successMessage, delay } from '@utogether/utils';
|
|
94
|
-
import
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
import
|
|
98
|
-
import
|
|
99
|
-
import
|
|
100
|
-
import {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
import {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
import
|
|
109
|
-
import
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
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
|
-
const
|
|
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
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
/* .translation {
|
|
283
|
-
::v-deep(.el-dropdown-menu__item) {
|
|
284
|
-
padding: 5px 40px;
|
|
285
|
-
}
|
|
286
|
-
} */
|
|
287
|
-
|
|
288
|
-
.check-zh {
|
|
289
|
-
position: absolute;
|
|
290
|
-
left: 20px;
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
.check-en {
|
|
294
|
-
position: absolute;
|
|
295
|
-
left: 20px;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
:deep(.el-input-group__append, .el-input-group__prepend) {
|
|
299
|
-
padding: 0;
|
|
300
|
-
}
|
|
301
|
-
</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.udp.loginUser'), trigger: 'blur' }]"
|
|
56
|
+
:label="$t('message.udp.loginUser')"
|
|
57
|
+
prop="username"
|
|
58
|
+
>
|
|
59
|
+
<el-input v-model.trim="ruleForm.username" autofocus clearable :prefix-icon="useRenderIcon(User)" />
|
|
60
|
+
</el-form-item>
|
|
61
|
+
</Motion>
|
|
62
|
+
|
|
63
|
+
<Motion :delay="150">
|
|
64
|
+
<el-form-item prop="passWord">
|
|
65
|
+
<el-input v-model="ruleForm.passWord" clearable show-password :prefix-icon="useRenderIcon(Lock)" />
|
|
66
|
+
</el-form-item>
|
|
67
|
+
</Motion>
|
|
68
|
+
<Motion :delay="250">
|
|
69
|
+
<el-form-item>
|
|
70
|
+
<el-button
|
|
71
|
+
class="w-full mt-4"
|
|
72
|
+
size="default"
|
|
73
|
+
type="primary"
|
|
74
|
+
:loading="loading"
|
|
75
|
+
@click="onLogin(ruleFormRef)"
|
|
76
|
+
>
|
|
77
|
+
{{ $t('message.udp.login') }}
|
|
78
|
+
</el-button>
|
|
79
|
+
</el-form-item>
|
|
80
|
+
</Motion>
|
|
81
|
+
</el-form>
|
|
82
|
+
</div>
|
|
83
|
+
<div class="fixed text-xs text-gray-500 bottom-4">Copyright ©2021{{ sysConfig['copyright'] }}版权所有</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
</template>
|
|
88
|
+
|
|
89
|
+
<script setup lang="ts">
|
|
90
|
+
import { ref, reactive, onMounted, onBeforeMount, onBeforeUnmount } from 'vue';
|
|
91
|
+
import { useRouter } from 'vue-router';
|
|
92
|
+
import type { FormInstance } from 'element-plus';
|
|
93
|
+
import { storageLocal, cookies, successMessage, delay } from '@utogether/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
|
+
|
|
103
|
+
import { useSystemStoreHook } from '@/store/modules/system';
|
|
104
|
+
|
|
105
|
+
import { getServiceApi } from '../../api';
|
|
106
|
+
import { userMonitor } from '../../api/user';
|
|
107
|
+
|
|
108
|
+
import Lock from '@iconify-icons/ri/lock-fill';
|
|
109
|
+
import User from '@iconify-icons/ri/user-3-fill';
|
|
110
|
+
|
|
111
|
+
defineOptions({ name: 'LoginView' });
|
|
112
|
+
|
|
113
|
+
interface IRSAPublic {
|
|
114
|
+
publicKeyExponent: string;
|
|
115
|
+
publicKeyModulus: string;
|
|
116
|
+
requestKey: string;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const router = useRouter();
|
|
120
|
+
|
|
121
|
+
// const bgStyle = ref({});
|
|
122
|
+
const sysConfig = ref({});
|
|
123
|
+
const loading = ref(false);
|
|
124
|
+
const ruleFormRef = ref<FormInstance>();
|
|
125
|
+
|
|
126
|
+
const serviceApi = getServiceApi();
|
|
127
|
+
|
|
128
|
+
const { initStorage } = useLayout();
|
|
129
|
+
initStorage();
|
|
130
|
+
// const { dataTheme, dataThemeChange } = useDataThemeChange();
|
|
131
|
+
// dataThemeChange();
|
|
132
|
+
// const { getDropdownItemStyle, getDropdownItemClass } = useNav();
|
|
133
|
+
// const { locale, translationCh, translationEn } = useTranslationLang();
|
|
134
|
+
|
|
135
|
+
const ruleForm = reactive({
|
|
136
|
+
username: '',
|
|
137
|
+
passWord: ''
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
const publicRSA: IRSAPublic = reactive({
|
|
141
|
+
publicKeyExponent: '10001',
|
|
142
|
+
publicKeyModulus:
|
|
143
|
+
'a12708ab26367e1711bd767f6bb1f29afbd85380185723d7b492230e2567c95cf5718eca745da0643400ca619fbeec892df61abe1f71ad3b822d076ed831080c53782edf8c0627ee95c57e2bee12fe55da2b3cadec59947a75ccccbbf36fb3b781c93b4bf51489789f1c0849f9023a16ec70bef41a504785e1082b6f13588e29',
|
|
144
|
+
requestKey: ''
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const onLogin = async (formEl: FormInstance | undefined) => {
|
|
148
|
+
if (!formEl) return;
|
|
149
|
+
await formEl.validate(valid => {
|
|
150
|
+
if (valid) {
|
|
151
|
+
loading.value = true;
|
|
152
|
+
const { username, passWord } = ruleForm;
|
|
153
|
+
|
|
154
|
+
// @ts-ignore
|
|
155
|
+
setMaxDigits(200);
|
|
156
|
+
// @ts-ignore
|
|
157
|
+
const rsakeypair = new RSAKeyPair(publicRSA.publicKeyExponent, '', publicRSA.publicKeyModulus);
|
|
158
|
+
// @ts-ignore
|
|
159
|
+
const password = encryptedString(rsakeypair, passWord.split('').reverse().join(''));
|
|
160
|
+
const param = {
|
|
161
|
+
username,
|
|
162
|
+
password,
|
|
163
|
+
requestKey: publicRSA.requestKey,
|
|
164
|
+
domain: window.location.origin
|
|
165
|
+
};
|
|
166
|
+
serviceApi
|
|
167
|
+
.post('/uath/login', param)
|
|
168
|
+
.then(async (data: IResponseData) => {
|
|
169
|
+
successMessage(`👏 恭喜,成功登录${sysConfig.value['title']}!!!🎉`);
|
|
170
|
+
useSystemStoreHook().setSessionKey(data);
|
|
171
|
+
cacheToken(data);
|
|
172
|
+
cookies.set('loginer', username);
|
|
173
|
+
await delay(300);
|
|
174
|
+
router.push('/');
|
|
175
|
+
userMonitor(username);
|
|
176
|
+
})
|
|
177
|
+
.finally(() => {
|
|
178
|
+
loading.value = false;
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* @description: 缓存token
|
|
186
|
+
* @param {*} token token数据
|
|
187
|
+
* @return {*}
|
|
188
|
+
*/
|
|
189
|
+
const cacheToken = token => {
|
|
190
|
+
const { access_token, expires_in, refresh_token } = token;
|
|
191
|
+
const cache = {
|
|
192
|
+
accessToken: access_token,
|
|
193
|
+
refreshToken: refresh_token,
|
|
194
|
+
expires: Date.now() + expires_in * 1000
|
|
195
|
+
};
|
|
196
|
+
const kTOKENKEY = 'authorized-token';
|
|
197
|
+
|
|
198
|
+
cookies.set('kCookies_token', token.access_token);
|
|
199
|
+
const dataString = JSON.stringify(cache);
|
|
200
|
+
expires_in > 0 ? cookies.set(kTOKENKEY, dataString) : cookies.set(kTOKENKEY, dataString);
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
/** 使用公共函数,避免`removeEventListener`失效 */
|
|
204
|
+
function onkeypress({ code }: KeyboardEvent) {
|
|
205
|
+
if (['Enter', 'NumpadEnter'].includes(code)) {
|
|
206
|
+
onLogin(ruleFormRef.value);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
onMounted(() => {
|
|
211
|
+
window.document.addEventListener('keypress', onkeypress);
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
onBeforeUnmount(() => {
|
|
215
|
+
window.document.removeEventListener('keypress', onkeypress);
|
|
216
|
+
});
|
|
217
|
+
/**
|
|
218
|
+
* @description: 获取系统配置
|
|
219
|
+
* @return {*}
|
|
220
|
+
*/
|
|
221
|
+
const getSysConfig = async () => {
|
|
222
|
+
const [err, data]: [Error, any] = await to(serviceApi.get('/upfm/v1/sysConfig', {}));
|
|
223
|
+
if (!err) {
|
|
224
|
+
const config = {};
|
|
225
|
+
data.list?.forEach(item => {
|
|
226
|
+
config[item.configCode] = item.configValue;
|
|
227
|
+
if (item.fileName) {
|
|
228
|
+
config[item.configCode] = window.location.origin + '/ufil' + item.configValue;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
const env = process.env.NODE_ENV;
|
|
232
|
+
const title = data.list?.find(f => f.configCode === `${env}Title` || f.configCode === 'title')?.configValue;
|
|
233
|
+
config['title'] = title || 'U-DP';
|
|
234
|
+
sysConfig.value = config;
|
|
235
|
+
setFavicon();
|
|
236
|
+
storageLocal.setItem('kSysConfig', config);
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
const setFavicon = () => {
|
|
241
|
+
let favicon = document.querySelector('link[rel="icon"]') as HTMLElement;
|
|
242
|
+
// console.log('app', favicon)
|
|
243
|
+
if (favicon !== null) {
|
|
244
|
+
favicon['href'] = sysConfig.value['favicon'] || '../../../public/favicon.ico';
|
|
245
|
+
} else {
|
|
246
|
+
favicon = document.createElement('link');
|
|
247
|
+
favicon['rel'] = 'icon';
|
|
248
|
+
favicon['href'] = sysConfig.value['favicon'] || '../../../public/favicon.ico';
|
|
249
|
+
document.head.appendChild(favicon);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
onBeforeMount(() => {
|
|
254
|
+
getSysConfig();
|
|
255
|
+
});
|
|
256
|
+
</script>
|
|
257
|
+
|
|
258
|
+
<style scoped>
|
|
259
|
+
@import url('@/style/login2.css');
|
|
260
|
+
|
|
261
|
+
/* .translation {
|
|
262
|
+
::v-deep(.el-dropdown-menu__item) {
|
|
263
|
+
padding: 5px 40px;
|
|
264
|
+
}
|
|
265
|
+
} */
|
|
266
|
+
|
|
267
|
+
.check-zh {
|
|
268
|
+
position: absolute;
|
|
269
|
+
left: 20px;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.check-en {
|
|
273
|
+
position: absolute;
|
|
274
|
+
left: 20px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
:deep(.el-input-group__append, .el-input-group__prepend) {
|
|
278
|
+
padding: 0;
|
|
279
|
+
}
|
|
280
|
+
</style>
|
|
@@ -113,15 +113,14 @@
|
|
|
113
113
|
|
|
114
114
|
<script setup lang="ts">
|
|
115
115
|
import { useI18n } from 'vue-i18n';
|
|
116
|
-
import { reactive, watch, inject } from 'vue';
|
|
117
|
-
import { templateRef } from '@vueuse/core';
|
|
116
|
+
import { reactive, watch, inject, ref } from 'vue';
|
|
118
117
|
import { clone } from 'xe-utils';
|
|
119
118
|
import to from 'await-to-js';
|
|
120
119
|
import { VxeUI } from 'vxe-table';
|
|
121
120
|
import { successMessage, warnMessage } from '@utogether/utils';
|
|
122
121
|
import { useSystemStoreHook } from '../../../store/modules/system';
|
|
123
122
|
import { getServiceApi } from '../../../api';
|
|
124
|
-
import hasAuthority from '../../../utils/authority';
|
|
123
|
+
import { hasAuthority } from '../../../utils/authority';
|
|
125
124
|
|
|
126
125
|
const data = reactive<IRecord>({
|
|
127
126
|
record: {},
|
|
@@ -186,7 +185,7 @@ const handleEdit = dataStatus => {
|
|
|
186
185
|
data.dialogFormVisible = true;
|
|
187
186
|
};
|
|
188
187
|
|
|
189
|
-
const xForm =
|
|
188
|
+
const xForm = ref<any>('xForm');
|
|
190
189
|
const handleComfirm = () => {
|
|
191
190
|
xForm.value.validate(async valid => {
|
|
192
191
|
if (!valid) {
|