@utogether/udp-core 2.0.0-beta.26 → 2.0.0-beta.28
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-CyoOD-Ik.js +65 -0
- package/dist/404-Ch_OHTw0.js +65 -0
- package/dist/500-Cf9am7HK.js +67 -0
- package/dist/AuthorityInfo-BJ427cqG.js +4 -0
- package/dist/AuthorityInfo.vue_vue_type_style_index_0_lang-D9y7AwbB.js +99 -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-qo-lKPkv.js +25 -0
- package/dist/CompanyPanel-DkKWAKvY.js +204 -0
- package/dist/DataSet-iBHzs75s.js +147 -0
- package/dist/Department-CHUQByKX.js +25 -0
- package/dist/DepartmentPanel-C742dfOO.js +248 -0
- package/dist/DesignPanel-D9oE5R7m.js +4 -0
- package/dist/DesignPanel.vue_vue_type_style_index_0_lang-hYldVEbo.js +1097 -0
- package/dist/DictView-CrFXprP9.js +110 -0
- package/dist/InvOrganization-Cz8SzIgs.js +73 -0
- package/dist/Org-Bzt6yKox.js +38 -0
- package/dist/Preview-jonigfMQ.js +48 -0
- package/dist/ReportDefine-BpiM5Ovq.js +10 -0
- package/dist/ReportDesign-fp09cXJ7.js +164 -0
- package/dist/ReportQuery-52ZP1PYP.js +74 -0
- package/dist/ReportQueryFrom-DSYavJb1.js +4 -0
- package/dist/ReportQueryFrom.vue_vue_type_style_index_0_lang-DBGYEp0u.js +177 -0
- package/dist/ReportTemplate-CA_UW0eD.js +161 -0
- package/dist/Role-DqOt8Bk0.js +25 -0
- package/dist/RoleAssign-BdxhefhQ.js +26 -0
- package/dist/RolePanel-2gZ3H0ET.js +4 -0
- package/dist/RolePanel-BsNd0svJ.js +4 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DLOwgF99.js +152 -0
- package/dist/RolePanel.vue_vue_type_script_setup_true_lang-DmzD9kab.js +131 -0
- package/dist/ScrollPanel.vue_vue_type_style_index_0_lang-B9ptUMeI.js +99 -0
- package/dist/Staff-D3L8fEoY.js +26 -0
- package/dist/StaffInfo-DYRw6ZYJ.js +4 -0
- package/dist/StaffInfo.vue_vue_type_script_setup_true_lang-xqEOQnMs.js +107 -0
- package/dist/StaffPanel-DkrNH6Px.js +4 -0
- package/dist/StaffPanel.vue_vue_type_script_setup_true_lang-BPBMnliy.js +152 -0
- package/dist/SysUser-Bl1-cIpJ.js +15 -0
- package/dist/SysUserPanel-yxNLaBwt.js +4 -0
- package/dist/SysUserPanel.vue_vue_type_script_setup_true_lang-BDcsgSl5.js +352 -0
- package/dist/SystemMenu-C4_Arn12.js +155 -0
- package/dist/UserInfo-QcNwJCUR.js +4 -0
- package/dist/UserInfo.vue_vue_type_style_index_0_lang-DLIeUphX.js +159 -0
- package/dist/childView-B23DEO2u.js +4 -0
- package/dist/childView-saDZQv9x.js +4 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-RsKR6CAC.js +182 -0
- package/dist/childView.vue_vue_type_style_index_0_lang-ZFEfavUY.js +142 -0
- package/dist/code-rule-2_Ihx_by.js +147 -0
- package/dist/core.es.js +26 -6
- package/dist/cron-task-BFOPJQIk.js +134 -0
- package/dist/flow-task-PoDnE_kE.js +10 -0
- package/dist/frameView-f7Ya0Knj.js +43 -0
- package/dist/index-BpdTDaTk.js +3213 -0
- package/dist/layout-home-v3DPJ7rB.js +231 -0
- package/dist/layoutView-DZHoQDH1.js +3190 -0
- package/dist/log-in-BPAMJTwH.js +115 -0
- package/dist/log-out-DZACF0jg.js +129 -0
- package/dist/login-B8cwozax.js +216 -0
- package/dist/login-log-CVvRgZSu.js +70 -0
- package/dist/lov-view-Ba7Y7xy0.js +98 -0
- package/dist/menuInfo-BpRKFYK8.js +4 -0
- package/dist/menuInfo.vue_vue_type_style_index_0_lang-DJ5sUC6m.js +359 -0
- package/dist/pda-app-C0jJecrL.js +706 -0
- package/dist/redirect-DTz8GSnv.js +15 -0
- package/dist/resource-BG22Cw4P.js +97 -0
- package/dist/su-welcome-DaxhbrC6.js +879 -0
- package/dist/sys-config-CG2fMtak.js +384 -0
- package/dist/udp-core.css +1 -2
- package/dist/useNav-_u2UAQWk.js +84 -0
- package/dist/utogether-MlnyYtNS.js +4 -0
- package/dist/wecom-push-B75FLee5.js +70 -0
- package/index.ts +54 -50
- package/package.json +21 -21
- package/src/App.vue +79 -78
- package/src/api/http.ts +10 -4
- package/src/api/index.ts +51 -51
- package/src/api/user.ts +64 -64
- package/src/components/SuQrcode/src/index.tsx +231 -236
- package/src/components/udp/content/index.vue +93 -93
- package/src/components/udp/form-upload/form-upload.vue +496 -496
- package/src/components/udp/grid/index.vue +643 -544
- package/src/components/udp/index.ts +2 -1
- package/src/components/udp/modal-form/index.vue +326 -0
- package/src/components/udp/utils.ts +420 -420
- package/src/layout/components/lay-navbar/index.vue +240 -240
- package/src/layout/components/lay-panel/index.vue +2 -6
- package/src/layout/components/lay-search/components/SearchModal.vue +185 -181
- package/src/layout/components/lay-sidebar/mixNav.vue +261 -261
- package/src/layout/components/lay-sidebar/sidebarItem.vue +199 -195
- package/src/layout/components/lay-sidebar/vertical.vue +92 -92
- package/src/layout/layoutView.vue +1 -0
- package/src/main.ts +111 -109
- package/src/plugins/i18n/zh.ts +5 -1
- package/src/plugins/vxe-table/index.ts +116 -116
- package/src/router/index.ts +5 -34
- package/src/router/utils.ts +434 -430
- package/src/store/modules/permission.ts +1 -1
- package/src/store/modules/system.ts +193 -186
- package/src/style/print-lock.css +380 -375
- package/src/style/suprint.css +990 -985
- package/src/style/vxetable.scss +372 -364
- package/src/utils/authority/index.ts +19 -2
- package/src/utils/dataFormat/index.ts +309 -222
- package/src/utils/udp/http/index.ts +126 -67
- package/src/utils/udp/http/types.d.ts +15 -14
- package/src/views/login/login-view.vue +4 -21
- 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 +191 -178
- package/src/views/uhome/dynamic-card.vue +31 -31
- package/src/views/uhome/su-welcome.vue +310 -310
- package/src/views/ulogin/login.vue +292 -296
- package/src/views/urpt/design/DesignPanel.vue +538 -507
- package/src/views/urpt/design/print-data.ts +39 -59
- package/tsconfig.json +2 -3
- package/types/global.d.ts +234 -234
- package/vite.config.ts +2 -1
- package/dist/403-D6Wb3JJh.js +0 -72
- package/dist/404-B_HNbPNV.js +0 -72
- package/dist/500-BMemTTy1.js +0 -77
- package/dist/AuthorityInfo-6wHxwiFM.js +0 -91
- package/dist/AuthorityPanel-OqF_DvXA.js +0 -98
- package/dist/Company-BLXSfow0.js +0 -21
- package/dist/CompanyPanel-B4kRZ5Cg.js +0 -199
- package/dist/DataSet-CuGZcKC-.js +0 -141
- package/dist/Department-oFhsa7cd.js +0 -21
- package/dist/DepartmentPanel-B1UGpu-r.js +0 -242
- package/dist/DepartmentPanel-BL58AdoT.js +0 -2
- package/dist/DesignPanel-DmkFVw1N.js +0 -1196
- package/dist/DictView-CC5yMzOq.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-CAzWxLmP.js +0 -45
- package/dist/ReIcon-DecitXmg.js +0 -413
- package/dist/ReportDefine-BgLM-Rjk.js +0 -10
- package/dist/ReportDesign-DwchGG2P.js +0 -158
- package/dist/ReportQuery-D5jaRJEn.js +0 -101
- package/dist/ReportQueryFrom-CNlmtYey.js +0 -198
- package/dist/ReportTemplate-CNcTmccs.js +0 -162
- package/dist/Role-Be8WfdCA.js +0 -21
- package/dist/RoleAssign-CtehGAUf.js +0 -22
- package/dist/RolePanel-CAwITg_q.js +0 -131
- package/dist/RolePanel-SN0FGFZ7.js +0 -176
- package/dist/ScrollPanel-DW30pGz1.js +0 -88
- package/dist/Staff-V2YsNKcj.js +0 -22
- package/dist/StaffInfo-CKRPW0r4.js +0 -149
- package/dist/StaffPanel-BxcgMg7u.js +0 -143
- package/dist/SysUser-Dxyj5w5m.js +0 -12
- package/dist/SysUserPanel-DI6CWcZo.js +0 -365
- package/dist/SystemMenu-BBHREM8T.js +0 -154
- package/dist/UserInfo-BMVQ0xwE.js +0 -194
- package/dist/_plugin-vue_export-helper-C6QCLu9I.js +0 -8
- package/dist/api-BFNxcxSN.js +0 -30
- package/dist/authority-BJFEUdrh.js +0 -20
- package/dist/await-to-js.es5-DkWYmPXW.js +0 -10
- package/dist/childView-BBjPEraB.js +0 -184
- package/dist/childView-DNqG2UVm.js +0 -181
- 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-B6Mx2ERA.js +0 -2662
- package/dist/log-in-BrNB0mLz.js +0 -117
- package/dist/log-out-dYfqvzy6.js +0 -111
- package/dist/login-D_Hjy3Jd.js +0 -231
- package/dist/login-log-CJak-ANA.js +0 -79
- package/dist/lov-view-DM5Nm5tW.js +0 -95
- package/dist/menuInfo-BlOY1KZW.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/su-welcome-DVD3S_du.js +0 -799
- package/dist/sys-config-Ddb3vBpK.js +0 -316
- package/dist/system-Cm3lyBas.js +0 -1528
- package/dist/udp-core-DaQd5CF1.js +0 -2028
- package/dist/useDataThemeChange-DJ4K3VGp.js +0 -226
- package/dist/useNav-BhOJIdrJ.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,296 +1,292 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- <img :src="bg" class="wave" /> -->
|
|
3
|
-
<div :key="refreshKey" class="login-container" :style="bgStyle">
|
|
4
|
-
<div v-if="!bgStyle.backgroundImage" class="img pr-24">
|
|
5
|
-
<img :src="welcome" />
|
|
6
|
-
</div>
|
|
7
|
-
<div class="login-box">
|
|
8
|
-
<div class="login-form">
|
|
9
|
-
<h2 v-motion :initial="{ opacity: 0, y: 100 }" :enter="{ opacity: 1, y: 0, transition: { delay: 100 } }">
|
|
10
|
-
{{ sysConfig['title'] }}
|
|
11
|
-
</h2>
|
|
12
|
-
<div
|
|
13
|
-
v-motion
|
|
14
|
-
class="input-group user focus"
|
|
15
|
-
:initial="{ opacity: 0, y: 100 }"
|
|
16
|
-
:enter="{ opacity: 1, y: 0, transition: { delay: 200 } }"
|
|
17
|
-
>
|
|
18
|
-
<div class="icon">
|
|
19
|
-
<
|
|
20
|
-
</div>
|
|
21
|
-
<div>
|
|
22
|
-
<i class="ri-logout-box-line" />
|
|
23
|
-
<h5>{{ $t('message.udp.loginAccount') }}</h5>
|
|
24
|
-
<input
|
|
25
|
-
v-model.trim="contextInfo.username"
|
|
26
|
-
v-focus
|
|
27
|
-
type="text"
|
|
28
|
-
class="input"
|
|
29
|
-
@blur="onUserBlur"
|
|
30
|
-
@keyup.enter="onLogin"
|
|
31
|
-
/>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
<div
|
|
35
|
-
v-motion
|
|
36
|
-
class="input-group pwd focus"
|
|
37
|
-
:initial="{ opacity: 0, y: 100 }"
|
|
38
|
-
:enter="{
|
|
39
|
-
opacity: 1,
|
|
40
|
-
y: 0,
|
|
41
|
-
transition: { delay: 300 }
|
|
42
|
-
}"
|
|
43
|
-
>
|
|
44
|
-
<div class="icon">
|
|
45
|
-
<
|
|
46
|
-
</div>
|
|
47
|
-
<div>
|
|
48
|
-
<h5>{{ $t('message.udp.password') }}</h5>
|
|
49
|
-
<input
|
|
50
|
-
v-model.trim="contextInfo.passWord"
|
|
51
|
-
type="password"
|
|
52
|
-
class="input"
|
|
53
|
-
@blur="onPwdBlur"
|
|
54
|
-
@keyup.enter="onLogin"
|
|
55
|
-
/>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
<button
|
|
59
|
-
v-motion
|
|
60
|
-
class="btn"
|
|
61
|
-
:initial="{ opacity: 0, y: 10 }"
|
|
62
|
-
:enter="{ opacity: 1, y: 0, transition: { delay: 400 } }"
|
|
63
|
-
:disabled="loading"
|
|
64
|
-
:class="{ loading: loading }"
|
|
65
|
-
@click="onLogin"
|
|
66
|
-
>
|
|
67
|
-
{{ $t('message.udp.login') }}
|
|
68
|
-
</button>
|
|
69
|
-
</div>
|
|
70
|
-
</div>
|
|
71
|
-
<div v-if="sysConfig.techSupport === 'Y'" class="absolute flex justify-center w-full font-bold bottom-1">
|
|
72
|
-
<img :src="utogether" class="
|
|
73
|
-
<span class="flex flex-row justify-center" style="width: 300px">
|
|
74
|
-
<span style="font-size: 0; text-align: center">
|
|
75
|
-
<a
|
|
76
|
-
href="http://www.u-together.cn/"
|
|
77
|
-
target="_blank"
|
|
78
|
-
class="
|
|
79
|
-
style="margin-bottom: -5px; font-size: 17px; color: #fff; mix-blend-mode: difference"
|
|
80
|
-
:style="{ color: sysConfig.baseColor || '#FFF' }"
|
|
81
|
-
>
|
|
82
|
-
深圳友聚信息技术有限公司
|
|
83
|
-
</a>
|
|
84
|
-
<a
|
|
85
|
-
href="http://www.u-together.cn/"
|
|
86
|
-
target="_blank"
|
|
87
|
-
class="
|
|
88
|
-
style="font-size: 12px; color: #fff; mix-blend-mode: difference"
|
|
89
|
-
:style="{ color: sysConfig.baseColor || '#FFF' }"
|
|
90
|
-
>
|
|
91
|
-
SHENZHEN U-TOGETHER CO. LTD
|
|
92
|
-
</a>
|
|
93
|
-
</span>
|
|
94
|
-
<span class="flex items-center text-white" style="width: 75px; font-size: 10px">技术支持</span>
|
|
95
|
-
</span>
|
|
96
|
-
</div>
|
|
97
|
-
</div>
|
|
98
|
-
</template>
|
|
99
|
-
|
|
100
|
-
<script lang="ts">
|
|
101
|
-
export default { name: 'LoginView' };
|
|
102
|
-
</script>
|
|
103
|
-
|
|
104
|
-
<script setup lang="ts">
|
|
105
|
-
import { ref, reactive, onBeforeMount } from 'vue';
|
|
106
|
-
import { useRouter } from 'vue-router';
|
|
107
|
-
import { useI18n } from 'vue-i18n';
|
|
108
|
-
// import io from 'socket.io-client';
|
|
109
|
-
import { useFavicon } from '@vueuse/core';
|
|
110
|
-
import { isEmpty } from 'xe-utils';
|
|
111
|
-
import { removeClass, storageLocal, errorMessage, cookies, delay } from '@utogether/utils';
|
|
112
|
-
import to from 'await-to-js';
|
|
113
|
-
import CryptoJS from 'crypto-js';
|
|
114
|
-
import { useSystemStoreHook } from '../../store/modules/system';
|
|
115
|
-
import { useLayout } from '../../layout/hooks/useLayout';
|
|
116
|
-
import { useDataThemeChange } from '../../layout/hooks/useDataThemeChange';
|
|
117
|
-
import { getBaseURL, getServiceApi } from '../../api';
|
|
118
|
-
import { userMonitor } from '../../api/user';
|
|
119
|
-
import { kTOKEN, kCKTOKEN, kLOGINER, kSYSCONFIG, kCRYPTO, kPASSWORD } from '../../contant';
|
|
120
|
-
import { onLogined, onBeforeLogined } from '../../utils/lifecycle';
|
|
121
|
-
|
|
122
|
-
import
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
const {
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
// @ts-ignore
|
|
181
|
-
|
|
182
|
-
//
|
|
183
|
-
|
|
184
|
-
//
|
|
185
|
-
|
|
186
|
-
// const
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
cookies.set(
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
function
|
|
224
|
-
if (contextInfo.
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
</
|
|
293
|
-
|
|
294
|
-
<style scoped>
|
|
295
|
-
@import url('../../style/login.css');
|
|
296
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<!-- <img :src="bg" class="wave" /> -->
|
|
3
|
+
<div :key="refreshKey" class="login-container" :style="bgStyle">
|
|
4
|
+
<div v-if="!bgStyle.backgroundImage" class="img pr-24">
|
|
5
|
+
<img :src="welcome" />
|
|
6
|
+
</div>
|
|
7
|
+
<div class="login-box">
|
|
8
|
+
<div class="login-form">
|
|
9
|
+
<h2 v-motion :initial="{ opacity: 0, y: 100 }" :enter="{ opacity: 1, y: 0, transition: { delay: 100 } }">
|
|
10
|
+
{{ sysConfig['title'] }}
|
|
11
|
+
</h2>
|
|
12
|
+
<div
|
|
13
|
+
v-motion
|
|
14
|
+
class="input-group user focus"
|
|
15
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
16
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 200 } }"
|
|
17
|
+
>
|
|
18
|
+
<div class="icon">
|
|
19
|
+
<i class="ri-user-fill ri-lg" />
|
|
20
|
+
</div>
|
|
21
|
+
<div>
|
|
22
|
+
<i class="ri-logout-box-line" />
|
|
23
|
+
<h5>{{ $t('message.udp.loginAccount') }}</h5>
|
|
24
|
+
<input
|
|
25
|
+
v-model.trim="contextInfo.username"
|
|
26
|
+
v-focus
|
|
27
|
+
type="text"
|
|
28
|
+
class="input"
|
|
29
|
+
@blur="onUserBlur"
|
|
30
|
+
@keyup.enter="onLogin"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
<div
|
|
35
|
+
v-motion
|
|
36
|
+
class="input-group pwd focus"
|
|
37
|
+
:initial="{ opacity: 0, y: 100 }"
|
|
38
|
+
:enter="{
|
|
39
|
+
opacity: 1,
|
|
40
|
+
y: 0,
|
|
41
|
+
transition: { delay: 300 }
|
|
42
|
+
}"
|
|
43
|
+
>
|
|
44
|
+
<div class="icon">
|
|
45
|
+
<i class="ri-lock-fill ri-lg" />
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<h5>{{ $t('message.udp.password') }}</h5>
|
|
49
|
+
<input
|
|
50
|
+
v-model.trim="contextInfo.passWord"
|
|
51
|
+
type="password"
|
|
52
|
+
class="input"
|
|
53
|
+
@blur="onPwdBlur"
|
|
54
|
+
@keyup.enter="onLogin"
|
|
55
|
+
/>
|
|
56
|
+
</div>
|
|
57
|
+
</div>
|
|
58
|
+
<button
|
|
59
|
+
v-motion
|
|
60
|
+
class="btn"
|
|
61
|
+
:initial="{ opacity: 0, y: 10 }"
|
|
62
|
+
:enter="{ opacity: 1, y: 0, transition: { delay: 400 } }"
|
|
63
|
+
:disabled="loading"
|
|
64
|
+
:class="{ loading: loading }"
|
|
65
|
+
@click="onLogin"
|
|
66
|
+
>
|
|
67
|
+
{{ $t('message.udp.login') }}
|
|
68
|
+
</button>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div v-if="sysConfig.techSupport === 'Y'" class="absolute flex justify-center w-full font-bold bottom-1">
|
|
72
|
+
<img :src="utogether" class="h-10!" style="height: 40px" />
|
|
73
|
+
<span class="flex flex-row justify-center" style="width: 300px">
|
|
74
|
+
<span style="font-size: 0; text-align: center">
|
|
75
|
+
<a
|
|
76
|
+
href="http://www.u-together.cn/"
|
|
77
|
+
target="_blank"
|
|
78
|
+
class="inline-block!"
|
|
79
|
+
style="margin-bottom: -5px; font-size: 17px; color: #fff; mix-blend-mode: difference"
|
|
80
|
+
:style="{ color: sysConfig.baseColor || '#FFF' }"
|
|
81
|
+
>
|
|
82
|
+
深圳友聚信息技术有限公司
|
|
83
|
+
</a>
|
|
84
|
+
<a
|
|
85
|
+
href="http://www.u-together.cn/"
|
|
86
|
+
target="_blank"
|
|
87
|
+
class="inline-block!"
|
|
88
|
+
style="font-size: 12px; color: #fff; mix-blend-mode: difference"
|
|
89
|
+
:style="{ color: sysConfig.baseColor || '#FFF' }"
|
|
90
|
+
>
|
|
91
|
+
SHENZHEN U-TOGETHER CO. LTD
|
|
92
|
+
</a>
|
|
93
|
+
</span>
|
|
94
|
+
<span class="flex items-center text-white" style="width: 75px; font-size: 10px">技术支持</span>
|
|
95
|
+
</span>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<script lang="ts">
|
|
101
|
+
export default { name: 'LoginView' };
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<script setup lang="ts">
|
|
105
|
+
import { ref, reactive, onBeforeMount } from 'vue';
|
|
106
|
+
import { useRouter } from 'vue-router';
|
|
107
|
+
import { useI18n } from 'vue-i18n';
|
|
108
|
+
// import io from 'socket.io-client';
|
|
109
|
+
import { useFavicon } from '@vueuse/core';
|
|
110
|
+
import { isEmpty } from 'xe-utils';
|
|
111
|
+
import { removeClass, storageLocal, errorMessage, cookies, delay } from '@utogether/utils';
|
|
112
|
+
import to from 'await-to-js';
|
|
113
|
+
import CryptoJS from 'crypto-js';
|
|
114
|
+
import { useSystemStoreHook } from '../../store/modules/system';
|
|
115
|
+
import { useLayout } from '../../layout/hooks/useLayout';
|
|
116
|
+
import { useDataThemeChange } from '../../layout/hooks/useDataThemeChange';
|
|
117
|
+
import { getBaseURL, getServiceApi } from '../../api';
|
|
118
|
+
import { userMonitor } from '../../api/user';
|
|
119
|
+
import { kTOKEN, kCKTOKEN, kLOGINER, kSYSCONFIG, kCRYPTO, kPASSWORD } from '../../contant';
|
|
120
|
+
import { onLogined, onBeforeLogined } from '../../utils/lifecycle';
|
|
121
|
+
import utogether from '../../assets/images/utogether.png';
|
|
122
|
+
import welcome from '../../assets/images/welcome.png';
|
|
123
|
+
|
|
124
|
+
interface IContextProps {
|
|
125
|
+
username: string;
|
|
126
|
+
passWord: string;
|
|
127
|
+
verify: number | null;
|
|
128
|
+
svg: any;
|
|
129
|
+
domain: string;
|
|
130
|
+
}
|
|
131
|
+
interface IRSAPublic {
|
|
132
|
+
publicKeyExponent: string;
|
|
133
|
+
publicKeyModulus: string;
|
|
134
|
+
requestKey: string;
|
|
135
|
+
}
|
|
136
|
+
const contextInfo: IContextProps = reactive({
|
|
137
|
+
username: '',
|
|
138
|
+
passWord: '',
|
|
139
|
+
requestKey: '',
|
|
140
|
+
verify: null,
|
|
141
|
+
svg: null,
|
|
142
|
+
domain: ''
|
|
143
|
+
});
|
|
144
|
+
const publicRSA: IRSAPublic = reactive({
|
|
145
|
+
publicKeyExponent: '10001',
|
|
146
|
+
publicKeyModulus:
|
|
147
|
+
'a12708ab26367e1711bd767f6bb1f29afbd85380185723d7b492230e2567c95cf5718eca745da0643400ca619fbeec892df61abe1f71ad3b822d076ed831080c53782edf8c0627ee95c57e2bee12fe55da2b3cadec59947a75ccccbbf36fb3b781c93b4bf51489789f1c0849f9023a16ec70bef41a504785e1082b6f13588e29',
|
|
148
|
+
requestKey: ''
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
const bgStyle = ref({
|
|
152
|
+
backgroundImage: '',
|
|
153
|
+
backgroundRepeat: 'no-repeat',
|
|
154
|
+
backgroundPosition: 'center'
|
|
155
|
+
});
|
|
156
|
+
const refreshKey = ref(0);
|
|
157
|
+
|
|
158
|
+
const sysConfig = ref<IRecord>({});
|
|
159
|
+
const router = useRouter();
|
|
160
|
+
const { t } = useI18n();
|
|
161
|
+
const serviceApi = getServiceApi();
|
|
162
|
+
// const { $config } = useGlobal();
|
|
163
|
+
|
|
164
|
+
const { initStorage } = useLayout();
|
|
165
|
+
const { overallStyle, dataThemeChange } = useDataThemeChange();
|
|
166
|
+
initStorage();
|
|
167
|
+
|
|
168
|
+
const loading = ref(false);
|
|
169
|
+
// 登录
|
|
170
|
+
const onLogin = async () => {
|
|
171
|
+
// return;
|
|
172
|
+
const { username, passWord, verify } = contextInfo;
|
|
173
|
+
if (isEmpty(username) || isEmpty(passWord)) {
|
|
174
|
+
return errorMessage(t('message.tip.loginFailure'));
|
|
175
|
+
}
|
|
176
|
+
// @ts-ignore
|
|
177
|
+
setMaxDigits(200);
|
|
178
|
+
// @ts-ignore
|
|
179
|
+
const rsakeypair = new RSAKeyPair(publicRSA.publicKeyExponent, '', publicRSA.publicKeyModulus);
|
|
180
|
+
// @ts-ignore
|
|
181
|
+
const password = encryptedString(rsakeypair, passWord.split('').reverse().join(''));
|
|
182
|
+
// const key = new JSEencrypt();
|
|
183
|
+
// key.setPublicKey(
|
|
184
|
+
// '-----BEGIN PUBLIC KEY-----MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQChJwirJjZ+FxG9dn9rsfKa+9hTgBhXI9e0kiMOJWfJXPVxjsp0XaBkNADKYZ++7Ikt9hq+H3GtO4ItB27YMQgMU3gu34wGJ+6VxX4r7hL+VdorPK3sWZR6dczMu/Nvs7eByTtL9RSJeJ8cCEn5AjoW7HC+9BpQR4XhCCtvE1iOKQIDAQAB-----END PUBLIC KEY-----'
|
|
185
|
+
// );
|
|
186
|
+
// const password = key.encrypt(passWord);
|
|
187
|
+
// // console.log('password1 ===', password1);
|
|
188
|
+
// console.log('password ===', password);
|
|
189
|
+
// 执行登录成功后的函数
|
|
190
|
+
onBeforeLogined();
|
|
191
|
+
const param = {
|
|
192
|
+
username,
|
|
193
|
+
password,
|
|
194
|
+
requestKey: publicRSA.requestKey,
|
|
195
|
+
verify: verify,
|
|
196
|
+
domain: getBaseURL()
|
|
197
|
+
};
|
|
198
|
+
loading.value = true;
|
|
199
|
+
const [err, data] = await to(serviceApi.post('/uath/login', param));
|
|
200
|
+
if (err) {
|
|
201
|
+
loading.value = false;
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
cookies.set(kPASSWORD, CryptoJS.AES.encrypt(contextInfo.passWord, kCRYPTO));
|
|
205
|
+
useSystemStoreHook().setPassword(contextInfo.passWord);
|
|
206
|
+
useSystemStoreHook().setSessionKey(data);
|
|
207
|
+
cacheToken(data);
|
|
208
|
+
cookies.set(kLOGINER, username);
|
|
209
|
+
|
|
210
|
+
// initSocket(username);
|
|
211
|
+
await delay(64);
|
|
212
|
+
// 执行登录成功后的函数
|
|
213
|
+
onLogined();
|
|
214
|
+
router.push('/');
|
|
215
|
+
userMonitor(username);
|
|
216
|
+
loading.value = false;
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
function onUserBlur() {
|
|
220
|
+
if (contextInfo.username.length === 0) removeClass(document.querySelector('.user'), 'focus');
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
function onPwdBlur() {
|
|
224
|
+
if (contextInfo.passWord.length === 0) removeClass(document.querySelector('.pwd'), 'focus');
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/**
|
|
228
|
+
* @description: 缓存token
|
|
229
|
+
* @param {*} token token数据
|
|
230
|
+
* @return {*}
|
|
231
|
+
*/
|
|
232
|
+
const cacheToken = token => {
|
|
233
|
+
const { access_token, expires_in, refresh_token } = token;
|
|
234
|
+
const cache = {
|
|
235
|
+
accessToken: access_token,
|
|
236
|
+
refreshToken: refresh_token,
|
|
237
|
+
expires: Date.now() + expires_in
|
|
238
|
+
// expires: Date.now() + expires_in * 1000
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
cookies.set(kCKTOKEN, token.access_token);
|
|
242
|
+
const dataString = JSON.stringify(cache);
|
|
243
|
+
expires_in > 0 ? cookies.set(kTOKEN, dataString) : cookies.set(kTOKEN, dataString);
|
|
244
|
+
};
|
|
245
|
+
|
|
246
|
+
// let socketIo = null;
|
|
247
|
+
// const initSocket = username => {
|
|
248
|
+
// socketIo = io(`ws://119.145.169.186:10006/webSocket/${username}`, {
|
|
249
|
+
// transports: ['websocket']
|
|
250
|
+
// });
|
|
251
|
+
// socketIo.on('connection', res => {
|
|
252
|
+
// console.log('connection', res);
|
|
253
|
+
// });
|
|
254
|
+
// socketIo.on('connected', res => {
|
|
255
|
+
// console.log('connected', res);
|
|
256
|
+
// });
|
|
257
|
+
// socketIo.on('close', res => {
|
|
258
|
+
// console.log('connected', res);
|
|
259
|
+
// });
|
|
260
|
+
// socketIo.on('message', res => {
|
|
261
|
+
// console.log('message', res);
|
|
262
|
+
// // ElNotification({
|
|
263
|
+
// // title: '您有一条新的消息',
|
|
264
|
+
// // message: res,
|
|
265
|
+
// // type: 'success'
|
|
266
|
+
// // });
|
|
267
|
+
// });
|
|
268
|
+
// };
|
|
269
|
+
|
|
270
|
+
const getSysConfig = async () => {
|
|
271
|
+
sysConfig.value = storageLocal.getItem(kSYSCONFIG);
|
|
272
|
+
|
|
273
|
+
bgStyle.value = {
|
|
274
|
+
backgroundImage: sysConfig.value['backgroundImg'] ? `url(${sysConfig.value['backgroundImg']})` : ``,
|
|
275
|
+
backgroundRepeat: 'no-repeat',
|
|
276
|
+
backgroundPosition: 'center'
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
const favicon = useFavicon();
|
|
280
|
+
favicon.value = sysConfig.value.favicon || utogether;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
dataThemeChange(overallStyle.value);
|
|
284
|
+
|
|
285
|
+
onBeforeMount(() => {
|
|
286
|
+
getSysConfig();
|
|
287
|
+
});
|
|
288
|
+
</script>
|
|
289
|
+
|
|
290
|
+
<style scoped>
|
|
291
|
+
@import url('../../style/login.css');
|
|
292
|
+
</style>
|