lw-cdp-ui 1.0.19 → 1.0.21
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/README.md +5 -5
- package/dist/components/lwForm/index.vue +312 -312
- package/dist/components/lwIconSelect/iconSelect.js +288 -288
- package/dist/components/lwIconSelect/index.vue +142 -142
- package/dist/components/lwLayout/components/NavMenu.vue +36 -36
- package/dist/components/lwLayout/components/aside.vue +291 -295
- package/dist/components/lwLayout/components/bu.vue +72 -70
- package/dist/components/lwLayout/components/iframeView.vue +57 -57
- package/dist/components/lwLayout/components/lang.vue +76 -76
- package/dist/components/lwLayout/components/setting.vue +80 -80
- package/dist/components/lwLayout/components/sideM.vue +137 -136
- package/dist/components/lwLayout/components/tags.vue +329 -329
- package/dist/components/lwLayout/components/topbar.vue +70 -70
- package/dist/components/lwLayout/components/userbar.vue +210 -209
- package/dist/components/lwLayout/index.vue +399 -398
- package/dist/components/lwLogin/index.vue +446 -383
- package/dist/components/lwSearch/date/date.vue +110 -110
- package/dist/components/lwSearch/dateRange/dateRange.vue +110 -110
- package/dist/components/lwSearch/dates/dates.vue +366 -366
- package/dist/components/lwSearch/index.vue +636 -636
- package/dist/components/lwSearch/input/input.vue +54 -54
- package/dist/components/lwSearch/locale/en-us.js +10 -10
- package/dist/components/lwSearch/locale/zh-cn.js +10 -10
- package/dist/components/lwSearch/select/select.vue +57 -57
- package/dist/components/lwSvgIcon/index.vue +28 -28
- package/dist/components/lwTable/index.js +425 -425
- package/dist/components/lwTable/index.scss +229 -229
- package/dist/components/lwTable/index.vue +225 -226
- package/dist/components/lwTable/locale/en-US.js +26 -26
- package/dist/components/lwTable/locale/zh-CN.js +26 -26
- package/dist/components/lwTable/useFullscreen.js +73 -73
- package/dist/components/lwTableSelect/index.vue +254 -254
- package/dist/components/lwTableSelect/tableSelect.js +23 -23
- package/dist/components/lwUpload/index.vue +365 -365
- package/dist/en-US-YCjgxjEt.js.map +1 -1
- package/dist/en-us-CziFtIQi.js.map +1 -1
- package/dist/lw-cdp-ui.esm.js +1484 -1459
- package/dist/lw-cdp-ui.esm.js.map +1 -1
- package/dist/lw-cdp-ui.umd.js +9 -9
- package/dist/lw-cdp-ui.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/zh-CN-BdDNsX4e.js.map +1 -1
- package/dist/zh-cn-DJpQp_O7.js.map +1 -1
- package/package.json +45 -45
|
@@ -1,383 +1,446 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="login_bg">
|
|
3
|
-
<div class="video-container">
|
|
4
|
-
<img class="mask"
|
|
5
|
-
src="
|
|
6
|
-
alt="videoMask" />
|
|
7
|
-
<video autoplay
|
|
8
|
-
loop
|
|
9
|
-
class="video"
|
|
10
|
-
muted>
|
|
11
|
-
<source src="
|
|
12
|
-
type="video/mp4" />
|
|
13
|
-
</video>
|
|
14
|
-
</div>
|
|
15
|
-
<div class="login_main">
|
|
16
|
-
<div class="login_config">
|
|
17
|
-
<Lang />
|
|
18
|
-
</div>
|
|
19
|
-
<div class="login-form">
|
|
20
|
-
<div class="login-header">
|
|
21
|
-
<div class="logo">
|
|
22
|
-
<img :alt="$config.APP_NAME"
|
|
23
|
-
src="
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<el-form ref="loginForm"
|
|
27
|
-
class="form-body"
|
|
28
|
-
:model="ruleForm"
|
|
29
|
-
:rules="rules"
|
|
30
|
-
label-width="0"
|
|
31
|
-
size="large">
|
|
32
|
-
<el-form-item>
|
|
33
|
-
<div class="title-name">{{$t('login.accountLogin')}}</div>
|
|
34
|
-
</el-form-item>
|
|
35
|
-
<el-form-item prop="user">
|
|
36
|
-
<el-input v-model="ruleForm.user"
|
|
37
|
-
prefix-icon="el-icon-user"
|
|
38
|
-
clearable
|
|
39
|
-
:placeholder="$t('login.userPlaceholder')">
|
|
40
|
-
</el-input>
|
|
41
|
-
</el-form-item>
|
|
42
|
-
<el-form-item prop="password">
|
|
43
|
-
<el-input v-model="ruleForm.password"
|
|
44
|
-
prefix-icon="el-icon-lock"
|
|
45
|
-
clearable
|
|
46
|
-
show-password
|
|
47
|
-
:placeholder="$t('login.PWPlaceholder')">
|
|
48
|
-
</el-input>
|
|
49
|
-
</el-form-item>
|
|
50
|
-
<el-form-item style="margin-bottom: 10px">
|
|
51
|
-
<el-row>
|
|
52
|
-
<el-col :span="12">
|
|
53
|
-
<el-checkbox :label="$t('login.rememberMe')"
|
|
54
|
-
v-model="ruleForm.autologin"></el-checkbox>
|
|
55
|
-
</el-col>
|
|
56
|
-
<el-col :span="12"
|
|
57
|
-
style="text-align: right">
|
|
58
|
-
<el-button type="primary"
|
|
59
|
-
text>{{ $t("login.forgetPassword") }}?
|
|
60
|
-
</el-button>
|
|
61
|
-
</el-col>
|
|
62
|
-
</el-row>
|
|
63
|
-
</el-form-item>
|
|
64
|
-
<el-form-item>
|
|
65
|
-
<el-button type="primary"
|
|
66
|
-
style="width: 100%"
|
|
67
|
-
:loading="islogin"
|
|
68
|
-
@click="login">{{ $t("login.signIn") }}</el-button>
|
|
69
|
-
</el-form-item>
|
|
70
|
-
</el-form>
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</div>
|
|
74
|
-
|
|
75
|
-
</template>
|
|
76
|
-
|
|
77
|
-
<script>
|
|
78
|
-
import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
|
|
79
|
-
import Lang from '../lwLayout/components/lang.vue'
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
{
|
|
116
|
-
required: true,
|
|
117
|
-
message: this.$t("login.
|
|
118
|
-
trigger: "blur",
|
|
119
|
-
},
|
|
120
|
-
],
|
|
121
|
-
|
|
122
|
-
|
|
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
|
-
let
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
if (
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
display: flex;
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
.
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
}
|
|
332
|
-
.login-form
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<div v-show="isShow" class="login_bg">
|
|
3
|
+
<div class="video-container">
|
|
4
|
+
<img class="mask"
|
|
5
|
+
:src="poster"
|
|
6
|
+
alt="videoMask" />
|
|
7
|
+
<video autoplay
|
|
8
|
+
loop
|
|
9
|
+
class="video"
|
|
10
|
+
muted>
|
|
11
|
+
<source :src="video"
|
|
12
|
+
type="video/mp4" />
|
|
13
|
+
</video>
|
|
14
|
+
</div>
|
|
15
|
+
<div class="login_main">
|
|
16
|
+
<div class="login_config">
|
|
17
|
+
<Lang />
|
|
18
|
+
</div>
|
|
19
|
+
<div class="login-form">
|
|
20
|
+
<div class="login-header">
|
|
21
|
+
<div class="logo">
|
|
22
|
+
<img :alt="$config.APP_NAME"
|
|
23
|
+
:src="logo2">
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<el-form ref="loginForm"
|
|
27
|
+
class="form-body"
|
|
28
|
+
:model="ruleForm"
|
|
29
|
+
:rules="rules"
|
|
30
|
+
label-width="0"
|
|
31
|
+
size="large">
|
|
32
|
+
<el-form-item>
|
|
33
|
+
<div class="title-name">{{$t('login.accountLogin')}}</div>
|
|
34
|
+
</el-form-item>
|
|
35
|
+
<el-form-item prop="user">
|
|
36
|
+
<el-input v-model="ruleForm.user"
|
|
37
|
+
prefix-icon="el-icon-user"
|
|
38
|
+
clearable
|
|
39
|
+
:placeholder="$t('login.userPlaceholder')">
|
|
40
|
+
</el-input>
|
|
41
|
+
</el-form-item>
|
|
42
|
+
<el-form-item prop="password">
|
|
43
|
+
<el-input v-model="ruleForm.password"
|
|
44
|
+
prefix-icon="el-icon-lock"
|
|
45
|
+
clearable
|
|
46
|
+
show-password
|
|
47
|
+
:placeholder="$t('login.PWPlaceholder')">
|
|
48
|
+
</el-input>
|
|
49
|
+
</el-form-item>
|
|
50
|
+
<el-form-item style="margin-bottom: 10px">
|
|
51
|
+
<el-row>
|
|
52
|
+
<el-col :span="12">
|
|
53
|
+
<el-checkbox :label="$t('login.rememberMe')"
|
|
54
|
+
v-model="ruleForm.autologin"></el-checkbox>
|
|
55
|
+
</el-col>
|
|
56
|
+
<el-col :span="12"
|
|
57
|
+
style="text-align: right">
|
|
58
|
+
<el-button type="primary"
|
|
59
|
+
text>{{ $t("login.forgetPassword") }}?
|
|
60
|
+
</el-button>
|
|
61
|
+
</el-col>
|
|
62
|
+
</el-row>
|
|
63
|
+
</el-form-item>
|
|
64
|
+
<el-form-item>
|
|
65
|
+
<el-button type="primary"
|
|
66
|
+
style="width: 100%"
|
|
67
|
+
:loading="islogin"
|
|
68
|
+
@click="login">{{ $t("login.signIn") }}</el-button>
|
|
69
|
+
</el-form-item>
|
|
70
|
+
</el-form>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
</template>
|
|
76
|
+
|
|
77
|
+
<script>
|
|
78
|
+
import JSEncrypt from 'jsencrypt/bin/jsencrypt.min'
|
|
79
|
+
import Lang from '../lwLayout/components/lang.vue'
|
|
80
|
+
|
|
81
|
+
import poster from '/images/video-poster.png';
|
|
82
|
+
import video from '/images/video-bg.mp4';
|
|
83
|
+
import logo2 from '/images/logo2.png';
|
|
84
|
+
export default {
|
|
85
|
+
name: 'lwLogin',
|
|
86
|
+
props: {
|
|
87
|
+
// 是否要校验初始化
|
|
88
|
+
isInitialized: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: true
|
|
91
|
+
},
|
|
92
|
+
// 是否手动合并菜单到同一个项目
|
|
93
|
+
isCombined: {
|
|
94
|
+
type: Boolean,
|
|
95
|
+
default: true
|
|
96
|
+
},
|
|
97
|
+
|
|
98
|
+
},
|
|
99
|
+
components: {
|
|
100
|
+
Lang,
|
|
101
|
+
},
|
|
102
|
+
data() {
|
|
103
|
+
return {
|
|
104
|
+
poster,
|
|
105
|
+
video,
|
|
106
|
+
logo2,
|
|
107
|
+
ruleForm: {
|
|
108
|
+
user: "",
|
|
109
|
+
password: "",
|
|
110
|
+
role: 0,
|
|
111
|
+
autologin: false,
|
|
112
|
+
},
|
|
113
|
+
rules: {
|
|
114
|
+
user: [
|
|
115
|
+
{
|
|
116
|
+
required: true,
|
|
117
|
+
message: this.$t("login.userError"),
|
|
118
|
+
trigger: "blur",
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
password: [
|
|
122
|
+
{
|
|
123
|
+
required: true,
|
|
124
|
+
message: this.$t("login.PWError"),
|
|
125
|
+
trigger: "blur",
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
islogin: false,
|
|
130
|
+
isShow: false,
|
|
131
|
+
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
created: function () {
|
|
136
|
+
this.$tool.data.clear();
|
|
137
|
+
this.$store.commit("clearViewTags");
|
|
138
|
+
this.$store.commit("clearKeepLive");
|
|
139
|
+
this.$store.commit("clearIframeList");
|
|
140
|
+
sessionStorage.clear()
|
|
141
|
+
|
|
142
|
+
// 旧项目处理兼容 后期要去掉
|
|
143
|
+
this.getOldData()
|
|
144
|
+
},
|
|
145
|
+
methods: {
|
|
146
|
+
// 旧项目处理兼容
|
|
147
|
+
getOldData() {
|
|
148
|
+
let curret_user = sessionStorage.getItem('easyweb_session_passport_current_user')
|
|
149
|
+
let curret_bu = sessionStorage.getItem('easyweb_session_passport_bu')
|
|
150
|
+
let curret_list = sessionStorage.getItem('easyweb_session_passport_bu_list')
|
|
151
|
+
function getCookie(name) {
|
|
152
|
+
// 构建目标 cookie 名称的前缀
|
|
153
|
+
const nameEQ = name + "=";
|
|
154
|
+
// 获取所有 cookies
|
|
155
|
+
const cookies = document.cookie.split(';');
|
|
156
|
+
|
|
157
|
+
// 遍历所有 cookies
|
|
158
|
+
for (let i = 0; i < cookies.length; i++) {
|
|
159
|
+
// 去掉 cookies 字符串的开头和结尾的空白字符
|
|
160
|
+
let cookie = cookies[i].trim();
|
|
161
|
+
|
|
162
|
+
// 检查这个 cookie 是否以目标名称开头
|
|
163
|
+
if (cookie.indexOf(nameEQ) === 0) {
|
|
164
|
+
// 如果是,返回 cookie 的值
|
|
165
|
+
return cookie.substring(nameEQ.length, cookie.length);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// 如果没有找到,返回 null
|
|
170
|
+
return null;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
if (curret_user) {
|
|
174
|
+
|
|
175
|
+
const authorization = getCookie('Authorization')
|
|
176
|
+
const decodedToken = decodeURIComponent(authorization)
|
|
177
|
+
const parts = decodedToken.split(' ');
|
|
178
|
+
this.$tool.data.set('TOKEN', parts[1])
|
|
179
|
+
|
|
180
|
+
let user = JSON.parse(curret_user)
|
|
181
|
+
let bu = JSON.parse(curret_bu)
|
|
182
|
+
let bu_list = JSON.parse(curret_list)
|
|
183
|
+
|
|
184
|
+
console.log(parts, user, bu, bu_list)
|
|
185
|
+
|
|
186
|
+
this.$tool.data.set('userAuthInfo', user.v.userAuthInfo)
|
|
187
|
+
this.$tool.data.set('MenuPath', user.v.userAuthInfo.grantedApplications)
|
|
188
|
+
this.$tool.data.set('buCode', bu.v.code)
|
|
189
|
+
this.$tool.data.set('tenantId', bu.v.tenantId)
|
|
190
|
+
this.$tool.data.set('buList', bu_list.v)
|
|
191
|
+
|
|
192
|
+
this.$router.push(this.$config.DASHBOARD_URL);
|
|
193
|
+
} else {
|
|
194
|
+
this.isShow = true;
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
// 加密
|
|
198
|
+
encrypt(publicKey, txt) {
|
|
199
|
+
const encryptor = new JSEncrypt()
|
|
200
|
+
encryptor.setPublicKey(publicKey) // 设置公钥
|
|
201
|
+
return encryptor.encrypt(txt) // 对数据进行加密
|
|
202
|
+
},
|
|
203
|
+
async login() {
|
|
204
|
+
let validate = await this.$refs.loginForm
|
|
205
|
+
.validate()
|
|
206
|
+
.catch(() => { });
|
|
207
|
+
if (!validate) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
this.islogin = true;
|
|
212
|
+
const publicKey = await this.$api.auth.key()
|
|
213
|
+
let data = {
|
|
214
|
+
username: this.encrypt(publicKey, this.ruleForm.user),
|
|
215
|
+
password: this.encrypt(publicKey, this.ruleForm.password),
|
|
216
|
+
};
|
|
217
|
+
//获取token
|
|
218
|
+
let token = await this.$api.auth.token(data);
|
|
219
|
+
this.$tool.data.set("TOKEN", token);
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
// 获取所有bu
|
|
223
|
+
let bu = await this.$api.auth.bu()
|
|
224
|
+
this.$tool.data.set('buList', bu)
|
|
225
|
+
this.$tool.data.set('buCode', bu[0].code)
|
|
226
|
+
|
|
227
|
+
// 获取用户信息
|
|
228
|
+
let user = await this.$api.auth.user()
|
|
229
|
+
this.$tool.data.set('tenantId', user.userAuthInfo.tenantId)
|
|
230
|
+
this.$tool.data.set('userAuthInfo', user.userAuthInfo)
|
|
231
|
+
this.$tool.data.set('MenuPath', user.userAuthInfo.grantedApplications)
|
|
232
|
+
this.$store.state.user = user.userAuthInfo
|
|
233
|
+
|
|
234
|
+
// 获取合并菜单信息 isCombined 这参数后期要加是否要合并菜单展示 现在默认tue
|
|
235
|
+
/**
|
|
236
|
+
* 此处进行 获取的数据路由router文件进行合并
|
|
237
|
+
* 需要开发一个接口返回 权限与具体页面路径映射数据 (这个功能要开发)
|
|
238
|
+
* 需要在 platform 菜单管理中 配置isCombined参数 用于标识是否合并项目菜单
|
|
239
|
+
* 原有的数据要加两个配置项 icon path
|
|
240
|
+
* 返回的数据是
|
|
241
|
+
* [
|
|
242
|
+
* {
|
|
243
|
+
"id": "ma_menu.workplace",
|
|
244
|
+
"tenantId": "connext",
|
|
245
|
+
"name": "工作台",
|
|
246
|
+
"type": "MENU",
|
|
247
|
+
...
|
|
248
|
+
"applications": ["ma"],
|
|
249
|
+
"icon": 'el-icon-discount', // icon
|
|
250
|
+
"path": '/reach/flow-template/, // 菜单路径
|
|
251
|
+
"authority": [
|
|
252
|
+
"ma.marketing_center.locate",
|
|
253
|
+
"ma.marketing_center_operation.locate",
|
|
254
|
+
]
|
|
255
|
+
}
|
|
256
|
+
* ]
|
|
257
|
+
*/
|
|
258
|
+
if (user.combined || this.isCombined) {
|
|
259
|
+
let menu = await this.$api.auth.menu();
|
|
260
|
+
this.$tool.data.set("MENUCOMBINED", menu);
|
|
261
|
+
// 注入 用于判断子项目 是否扁平化
|
|
262
|
+
this.$tool.data.set("MENUCOMBINEDNMAE", this.$config.APP_NAME);
|
|
263
|
+
} else {
|
|
264
|
+
this.$tool.data.remove("MENUCOMBINED");
|
|
265
|
+
this.$tool.data.remove("MENUCOMBINEDNMAE");
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// 检验是否初始化
|
|
269
|
+
|
|
270
|
+
if (this.isInitialized) {
|
|
271
|
+
let initialized = await this.$api.auth.initialized()
|
|
272
|
+
this.$tool.data.set('zoneInitialized', initialized)
|
|
273
|
+
if (initialized) {
|
|
274
|
+
this.$router.push(this.$config.DASHBOARD_URL);
|
|
275
|
+
} else {
|
|
276
|
+
this.$router.push(this.$config.INIT_URL);
|
|
277
|
+
}
|
|
278
|
+
} else {
|
|
279
|
+
this.$router.push(this.$config.DASHBOARD_URL);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
this.$message.success("登录成功");
|
|
284
|
+
this.islogin = false;
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
},
|
|
288
|
+
};
|
|
289
|
+
</script>
|
|
290
|
+
|
|
291
|
+
<style lang="scss" scoped>
|
|
292
|
+
.login_bg {
|
|
293
|
+
width: 100%;
|
|
294
|
+
height: 100%;
|
|
295
|
+
background: #fff;
|
|
296
|
+
display: flex;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
.video-container {
|
|
300
|
+
position: fixed;
|
|
301
|
+
top: 0;
|
|
302
|
+
left: 0;
|
|
303
|
+
width: 100vw;
|
|
304
|
+
height: 100vh;
|
|
305
|
+
|
|
306
|
+
.mask {
|
|
307
|
+
position: fixed;
|
|
308
|
+
z-index: 1;
|
|
309
|
+
top: 0;
|
|
310
|
+
left: 0;
|
|
311
|
+
width: 100%;
|
|
312
|
+
height: 100%;
|
|
313
|
+
object-fit: cover;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.video {
|
|
317
|
+
position: absolute;
|
|
318
|
+
z-index: 0;
|
|
319
|
+
top: 0;
|
|
320
|
+
left: 0;
|
|
321
|
+
width: 100%;
|
|
322
|
+
height: 100%;
|
|
323
|
+
object-fit: cover;
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
.login_main {
|
|
328
|
+
flex: 1;
|
|
329
|
+
overflow: auto;
|
|
330
|
+
display: flex;
|
|
331
|
+
}
|
|
332
|
+
.login-form {
|
|
333
|
+
margin: auto;
|
|
334
|
+
padding: 20px 0;
|
|
335
|
+
position: relative;
|
|
336
|
+
z-index: 9;
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: center;
|
|
339
|
+
gap: 150px;
|
|
340
|
+
}
|
|
341
|
+
.login-header {
|
|
342
|
+
margin-bottom: 40px;
|
|
343
|
+
}
|
|
344
|
+
.login-header .logo {
|
|
345
|
+
display: flex;
|
|
346
|
+
align-items: center;
|
|
347
|
+
}
|
|
348
|
+
.login-header .logo img {
|
|
349
|
+
width: auto;
|
|
350
|
+
height: 40px;
|
|
351
|
+
vertical-align: bottom;
|
|
352
|
+
margin-right: 10px;
|
|
353
|
+
}
|
|
354
|
+
.login-header .logo label {
|
|
355
|
+
font-size: 26px;
|
|
356
|
+
font-weight: bold;
|
|
357
|
+
}
|
|
358
|
+
.login-oauth {
|
|
359
|
+
display: flex;
|
|
360
|
+
justify-content: space-around;
|
|
361
|
+
}
|
|
362
|
+
.login-form .el-divider {
|
|
363
|
+
margin-top: 40px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.form-body {
|
|
367
|
+
width: 364px;
|
|
368
|
+
height: 324px;
|
|
369
|
+
padding: 24px;
|
|
370
|
+
overflow: hidden;
|
|
371
|
+
border-radius: 4px;
|
|
372
|
+
background-color: #fff;
|
|
373
|
+
box-shadow: 0 4px 16px rgba(39, 40, 42, 0.5);
|
|
374
|
+
color: #27282a;
|
|
375
|
+
.title-name {
|
|
376
|
+
font-size: 20px;
|
|
377
|
+
font-weight: 500;
|
|
378
|
+
line-height: 28px;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.login-form:deep(.el-tabs) .el-tabs__header {
|
|
383
|
+
margin-bottom: 25px;
|
|
384
|
+
}
|
|
385
|
+
.login-form:deep(.el-tabs) .el-tabs__header .el-tabs__item {
|
|
386
|
+
font-size: 14px;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.login-form:deep(.login-forgot) {
|
|
390
|
+
text-align: right;
|
|
391
|
+
}
|
|
392
|
+
.login-form:deep(.login-forgot) a {
|
|
393
|
+
color: var(--el-color-primary);
|
|
394
|
+
}
|
|
395
|
+
.login-form:deep(.login-forgot) a:hover {
|
|
396
|
+
color: var(--el-color-primary-light-3);
|
|
397
|
+
}
|
|
398
|
+
.login-form:deep(.login-reg) {
|
|
399
|
+
font-size: 14px;
|
|
400
|
+
color: var(--el-text-color-primary);
|
|
401
|
+
}
|
|
402
|
+
.login-form:deep(.login-reg) a {
|
|
403
|
+
color: var(--el-color-primary);
|
|
404
|
+
}
|
|
405
|
+
.login-form:deep(.login-reg) a:hover {
|
|
406
|
+
color: var(--el-color-primary-light-3);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.login_config {
|
|
410
|
+
position: absolute;
|
|
411
|
+
top: 20px;
|
|
412
|
+
right: 20px;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.login-form:deep(.login-msg-yzm) {
|
|
416
|
+
display: flex;
|
|
417
|
+
width: 100%;
|
|
418
|
+
}
|
|
419
|
+
.login-form:deep(.login-msg-yzm) .el-button {
|
|
420
|
+
margin-left: 10px;
|
|
421
|
+
--el-button-size: 42px;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.qrCodeLogin {
|
|
425
|
+
text-align: center;
|
|
426
|
+
position: relative;
|
|
427
|
+
padding: 20px 0;
|
|
428
|
+
}
|
|
429
|
+
.qrCodeLogin img.qrCode {
|
|
430
|
+
background: #fff;
|
|
431
|
+
padding: 20px;
|
|
432
|
+
border-radius: 10px;
|
|
433
|
+
}
|
|
434
|
+
.qrCodeLogin p.msg {
|
|
435
|
+
margin-top: 15px;
|
|
436
|
+
}
|
|
437
|
+
.qrCodeLogin .qrCodeLogin-result {
|
|
438
|
+
position: absolute;
|
|
439
|
+
top: 0;
|
|
440
|
+
left: 0;
|
|
441
|
+
right: 0;
|
|
442
|
+
bottom: 0;
|
|
443
|
+
text-align: center;
|
|
444
|
+
background: var(--el-mask-color);
|
|
445
|
+
}
|
|
446
|
+
</style>
|