eoss-ui 0.5.23 → 0.5.25
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/CHANGELOG.md +929 -0
- package/lib/button-group.js +55 -53
- package/lib/button.js +55 -53
- package/lib/checkbox-group.js +55 -53
- package/lib/config/api.js +1 -0
- package/lib/data-table-form.js +55 -53
- package/lib/data-table.js +67 -61
- package/lib/date-picker.js +55 -53
- package/lib/dialog.js +55 -53
- package/lib/eoss-ui.common.js +993 -635
- package/lib/flow-group.js +55 -53
- package/lib/flow-list.js +58 -56
- package/lib/flow.js +77 -75
- package/lib/form.js +66 -56
- package/lib/handle-user.js +56 -54
- package/lib/handler.js +56 -54
- package/lib/index.js +1 -1
- package/lib/input-number.js +55 -53
- package/lib/input.js +55 -53
- package/lib/login.js +435 -162
- package/lib/main.js +71 -65
- package/lib/nav.js +55 -53
- package/lib/notify.js +60 -58
- package/lib/page.js +55 -53
- package/lib/player.js +55 -53
- package/lib/qr-code.js +55 -53
- package/lib/radio-group.js +55 -53
- package/lib/retrial-auth.js +56 -54
- package/lib/select-ganged.js +55 -53
- package/lib/select.js +55 -53
- package/lib/selector-panel.js +55 -53
- package/lib/selector.js +479 -433
- package/lib/sizer.js +55 -53
- package/lib/steps.js +55 -53
- package/lib/switch.js +55 -53
- package/lib/table-form.js +88 -61
- package/lib/tabs.js +55 -53
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/tips.js +55 -53
- package/lib/tree-group.js +55 -53
- package/lib/tree.js +55 -53
- package/lib/upload.js +61 -59
- package/lib/wujie.js +55 -53
- package/lib/wxlogin.js +55 -53
- package/package.json +1 -1
- package/packages/data-table/src/column.vue +5 -1
- package/packages/form/src/main.vue +9 -1
- package/packages/form/src/table.vue +21 -2
- package/packages/login/src/main.vue +4 -0
- package/packages/login/src/resetPassword.vue +413 -95
- package/packages/main/src/main.vue +5 -1
- package/packages/selector/src/main.vue +144 -135
- package/packages/theme-chalk/lib/form.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/form.scss +13 -0
- package/src/config/api.js +1 -0
- package/src/index.js +1 -1
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
>
|
|
17
17
|
<el-menu-item index="6">短信验证</el-menu-item>
|
|
18
18
|
<el-menu-item index="11">邮箱验证</el-menu-item>
|
|
19
|
+
<el-menu-item index="0" v-if="this.operationCheckCode">原密码验证</el-menu-item>
|
|
19
20
|
</el-menu>
|
|
20
21
|
<es-form
|
|
21
22
|
ref="pwdForm"
|
|
@@ -36,7 +37,8 @@
|
|
|
36
37
|
import {
|
|
37
38
|
initModifyPassword,
|
|
38
39
|
getModifyPassCode,
|
|
39
|
-
codeModifyPass
|
|
40
|
+
codeModifyPass,
|
|
41
|
+
loginModifyPassword
|
|
40
42
|
} from 'eoss-ui/src/config/api.js';
|
|
41
43
|
import rules from 'eoss-ui/src/utils/rules.js';
|
|
42
44
|
import util from 'eoss-ui/src/utils/util';
|
|
@@ -45,13 +47,16 @@ export default {
|
|
|
45
47
|
props: {
|
|
46
48
|
secret: String,
|
|
47
49
|
isEncrypt: Boolean,
|
|
48
|
-
type: String
|
|
50
|
+
type: String,
|
|
51
|
+
operationCheckCode: String,
|
|
52
|
+
username: String
|
|
49
53
|
},
|
|
50
54
|
computed: {
|
|
51
55
|
page() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
switch (this.activeIndex) {
|
|
57
|
+
case '6':
|
|
58
|
+
return [
|
|
59
|
+
{
|
|
55
60
|
type: 'text',
|
|
56
61
|
name: 'target',
|
|
57
62
|
label: '手机号',
|
|
@@ -67,8 +72,86 @@ export default {
|
|
|
67
72
|
trigger: 'blur'
|
|
68
73
|
}
|
|
69
74
|
]
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
type: 'password',
|
|
78
|
+
name: 'password',
|
|
79
|
+
label: '新密码',
|
|
80
|
+
placeholder: '请输入新密码',
|
|
81
|
+
showPassword: true,
|
|
82
|
+
rules: [
|
|
83
|
+
this.checkPassword
|
|
84
|
+
? {
|
|
85
|
+
pattern: this.checkPassword,
|
|
86
|
+
message: this.checkPasswordMsg
|
|
87
|
+
? this.checkPasswordMsg
|
|
88
|
+
: '密码格式不合法',
|
|
89
|
+
trigger: 'blur'
|
|
90
|
+
}
|
|
91
|
+
: {},
|
|
92
|
+
{
|
|
93
|
+
required: true,
|
|
94
|
+
message: '请输入新密码',
|
|
95
|
+
trigger: 'blur'
|
|
96
|
+
}
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'password',
|
|
101
|
+
name: 'repassword',
|
|
102
|
+
placeholder: '请确认新密码',
|
|
103
|
+
label: '确认新密码',
|
|
104
|
+
showPassword: true,
|
|
105
|
+
rules: [
|
|
106
|
+
this.checkPassword
|
|
107
|
+
? {
|
|
108
|
+
pattern: this.checkPassword,
|
|
109
|
+
message: this.checkPasswordMsg
|
|
110
|
+
? this.checkPasswordMsg
|
|
111
|
+
: '密码格式不合法',
|
|
112
|
+
trigger: 'blur'
|
|
113
|
+
}
|
|
114
|
+
: {},
|
|
115
|
+
{
|
|
116
|
+
required: true,
|
|
117
|
+
message: '请输入新密码',
|
|
118
|
+
trigger: 'blur'
|
|
119
|
+
},
|
|
120
|
+
{ validator: this.reregExpValidate, trigger: 'blur' }
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: 'text',
|
|
125
|
+
name: 'verificationCode',
|
|
126
|
+
placeholder: '请输入验证码',
|
|
127
|
+
label: '验证码',
|
|
128
|
+
append: {
|
|
129
|
+
text: this.btnText,
|
|
130
|
+
attrs: { disabled: this.disabled },
|
|
131
|
+
event: this.getVerificationCode
|
|
132
|
+
},
|
|
133
|
+
rules: [
|
|
134
|
+
{
|
|
135
|
+
required: true,
|
|
136
|
+
message: '请输入验证码',
|
|
137
|
+
trigger: 'blur'
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
type: 'submit',
|
|
143
|
+
contents: [
|
|
144
|
+
{
|
|
145
|
+
type: 'primary',
|
|
146
|
+
text: '提交',
|
|
147
|
+
event: 'confirm'
|
|
148
|
+
}
|
|
149
|
+
]
|
|
70
150
|
}
|
|
71
|
-
|
|
151
|
+
];
|
|
152
|
+
case '11':
|
|
153
|
+
return [
|
|
154
|
+
{
|
|
72
155
|
type: 'text',
|
|
73
156
|
name: 'target',
|
|
74
157
|
label: '邮箱地址',
|
|
@@ -86,82 +169,288 @@ export default {
|
|
|
86
169
|
}
|
|
87
170
|
]
|
|
88
171
|
},
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
172
|
+
{
|
|
173
|
+
type: 'password',
|
|
174
|
+
name: 'password',
|
|
175
|
+
label: '新密码',
|
|
176
|
+
placeholder: '请输入新密码',
|
|
177
|
+
showPassword: true,
|
|
178
|
+
rules: [
|
|
179
|
+
this.checkPassword
|
|
180
|
+
? {
|
|
181
|
+
pattern: this.checkPassword,
|
|
182
|
+
message: this.checkPasswordMsg
|
|
183
|
+
? this.checkPasswordMsg
|
|
184
|
+
: '密码格式不合法',
|
|
185
|
+
trigger: 'blur'
|
|
186
|
+
}
|
|
187
|
+
: {},
|
|
188
|
+
{
|
|
189
|
+
required: true,
|
|
190
|
+
message: '请输入新密码',
|
|
102
191
|
trigger: 'blur'
|
|
103
192
|
}
|
|
104
|
-
|
|
193
|
+
]
|
|
194
|
+
},
|
|
105
195
|
{
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
196
|
+
type: 'password',
|
|
197
|
+
name: 'repassword',
|
|
198
|
+
placeholder: '请确认新密码',
|
|
199
|
+
label: '确认新密码',
|
|
200
|
+
showPassword: true,
|
|
201
|
+
rules: [
|
|
202
|
+
this.checkPassword
|
|
203
|
+
? {
|
|
204
|
+
pattern: this.checkPassword,
|
|
205
|
+
message: this.checkPasswordMsg
|
|
206
|
+
? this.checkPasswordMsg
|
|
207
|
+
: '密码格式不合法',
|
|
208
|
+
trigger: 'blur'
|
|
209
|
+
}
|
|
210
|
+
: {},
|
|
211
|
+
{
|
|
212
|
+
required: true,
|
|
213
|
+
message: '请输入新密码',
|
|
214
|
+
trigger: 'blur'
|
|
215
|
+
},
|
|
216
|
+
{ validator: this.reregExpValidate, trigger: 'blur' }
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
type: 'text',
|
|
221
|
+
name: 'verificationCode',
|
|
222
|
+
placeholder: '请输入验证码',
|
|
223
|
+
label: '验证码',
|
|
224
|
+
append: {
|
|
225
|
+
text: this.btnText,
|
|
226
|
+
attrs: { disabled: this.disabled },
|
|
227
|
+
event: this.getVerificationCode
|
|
228
|
+
},
|
|
229
|
+
rules: [
|
|
230
|
+
{
|
|
231
|
+
required: true,
|
|
232
|
+
message: '请输入验证码',
|
|
233
|
+
trigger: 'blur'
|
|
234
|
+
}
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
type: 'submit',
|
|
239
|
+
contents: [
|
|
240
|
+
{
|
|
241
|
+
type: 'primary',
|
|
242
|
+
text: '提交',
|
|
243
|
+
event: 'confirm'
|
|
244
|
+
}
|
|
245
|
+
]
|
|
109
246
|
}
|
|
110
|
-
]
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
247
|
+
];
|
|
248
|
+
case '0':
|
|
249
|
+
this.$set(
|
|
250
|
+
this.formData,
|
|
251
|
+
'username',
|
|
252
|
+
this.username ? this.username : ''
|
|
253
|
+
);
|
|
254
|
+
return [
|
|
255
|
+
{
|
|
256
|
+
type: 'text',
|
|
257
|
+
name: 'userName',
|
|
258
|
+
label: '用户名',
|
|
259
|
+
placeholder: '请输入用户名',
|
|
260
|
+
rules: [
|
|
261
|
+
{
|
|
262
|
+
required: true,
|
|
263
|
+
message: '请输入用户名',
|
|
125
264
|
trigger: 'blur'
|
|
126
265
|
}
|
|
127
|
-
|
|
266
|
+
]
|
|
267
|
+
},
|
|
128
268
|
{
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
269
|
+
type: 'password',
|
|
270
|
+
name: 'oldPassword',
|
|
271
|
+
label: '旧密码',
|
|
272
|
+
placeholder: '请输入旧密码',
|
|
273
|
+
showPassword: true,
|
|
274
|
+
rules: [
|
|
275
|
+
{
|
|
276
|
+
required: true,
|
|
277
|
+
message: '请输入旧密码',
|
|
278
|
+
trigger: 'blur'
|
|
279
|
+
}
|
|
280
|
+
]
|
|
132
281
|
},
|
|
133
|
-
{ validator: this.reregExpValidate, trigger: 'blur' }
|
|
134
|
-
]
|
|
135
|
-
},
|
|
136
|
-
{
|
|
137
|
-
type: 'text',
|
|
138
|
-
name: 'verificationCode',
|
|
139
|
-
placeholder: '请输入验证码',
|
|
140
|
-
label: '验证码',
|
|
141
|
-
append: {
|
|
142
|
-
text: this.btnText,
|
|
143
|
-
attrs: { disabled: this.disabled },
|
|
144
|
-
event: this.getVerificationCode
|
|
145
|
-
},
|
|
146
|
-
rules: [
|
|
147
282
|
{
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
283
|
+
type: 'password',
|
|
284
|
+
name: 'password',
|
|
285
|
+
label: '新密码',
|
|
286
|
+
placeholder: '请输入新密码',
|
|
287
|
+
showPassword: true,
|
|
288
|
+
rules: [
|
|
289
|
+
this.checkPassword
|
|
290
|
+
? {
|
|
291
|
+
pattern: this.checkPassword,
|
|
292
|
+
message: this.checkPasswordMsg
|
|
293
|
+
? this.checkPasswordMsg
|
|
294
|
+
: '密码格式不合法',
|
|
295
|
+
trigger: 'blur'
|
|
296
|
+
}
|
|
297
|
+
: {},
|
|
298
|
+
{
|
|
299
|
+
required: true,
|
|
300
|
+
message: '请输入新密码',
|
|
301
|
+
trigger: 'blur'
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
type: 'password',
|
|
307
|
+
name: 'repassword',
|
|
308
|
+
placeholder: '请确认新密码',
|
|
309
|
+
label: '确认新密码',
|
|
310
|
+
showPassword: true,
|
|
311
|
+
rules: [
|
|
312
|
+
this.checkPassword
|
|
313
|
+
? {
|
|
314
|
+
pattern: this.checkPassword,
|
|
315
|
+
message: this.checkPasswordMsg
|
|
316
|
+
? this.checkPasswordMsg
|
|
317
|
+
: '密码格式不合法',
|
|
318
|
+
trigger: 'blur'
|
|
319
|
+
}
|
|
320
|
+
: {},
|
|
321
|
+
{
|
|
322
|
+
required: true,
|
|
323
|
+
message: '请输入新密码',
|
|
324
|
+
trigger: 'blur'
|
|
325
|
+
},
|
|
326
|
+
{ validator: this.reregExpValidate, trigger: 'blur' }
|
|
327
|
+
]
|
|
328
|
+
},
|
|
157
329
|
{
|
|
158
|
-
type: '
|
|
159
|
-
|
|
160
|
-
|
|
330
|
+
type: 'submit',
|
|
331
|
+
contents: [
|
|
332
|
+
{
|
|
333
|
+
type: 'primary',
|
|
334
|
+
text: '提交',
|
|
335
|
+
event: 'confirm'
|
|
336
|
+
}
|
|
337
|
+
]
|
|
161
338
|
}
|
|
162
|
-
]
|
|
163
|
-
|
|
164
|
-
|
|
339
|
+
];
|
|
340
|
+
}
|
|
341
|
+
// return [
|
|
342
|
+
// this.activeIndex == '6'
|
|
343
|
+
// ? {
|
|
344
|
+
// type: 'text',
|
|
345
|
+
// name: 'target',
|
|
346
|
+
// label: '手机号',
|
|
347
|
+
// placeholder: '请输入手机号',
|
|
348
|
+
// rules: [
|
|
349
|
+
// {
|
|
350
|
+
// required: true,
|
|
351
|
+
// message: '请输入手机号',
|
|
352
|
+
// trigger: 'blur'
|
|
353
|
+
// },
|
|
354
|
+
// {
|
|
355
|
+
// ...rules.phone,
|
|
356
|
+
// trigger: 'blur'
|
|
357
|
+
// }
|
|
358
|
+
// ]
|
|
359
|
+
// }
|
|
360
|
+
// : {
|
|
361
|
+
// type: 'text',
|
|
362
|
+
// name: 'target',
|
|
363
|
+
// label: '邮箱地址',
|
|
364
|
+
// placeholder: '请输入邮箱地址',
|
|
365
|
+
// rules: [
|
|
366
|
+
// {
|
|
367
|
+
// required: true,
|
|
368
|
+
// message: '请输入邮箱地址',
|
|
369
|
+
// trigger: 'blur'
|
|
370
|
+
// },
|
|
371
|
+
// {
|
|
372
|
+
// type: 'email',
|
|
373
|
+
// message: '请输入正确的邮箱地址',
|
|
374
|
+
// trigger: 'blur'
|
|
375
|
+
// }
|
|
376
|
+
// ]
|
|
377
|
+
// },
|
|
378
|
+
// {
|
|
379
|
+
// type: 'password',
|
|
380
|
+
// name: 'password',
|
|
381
|
+
// label: '新密码',
|
|
382
|
+
// placeholder: '请输入新密码',
|
|
383
|
+
// showPassword: true,
|
|
384
|
+
// rules: [
|
|
385
|
+
// this.checkPassword
|
|
386
|
+
// ? {
|
|
387
|
+
// pattern: this.checkPassword,
|
|
388
|
+
// message: this.checkPasswordMsg
|
|
389
|
+
// ? this.checkPasswordMsg
|
|
390
|
+
// : '密码格式不合法',
|
|
391
|
+
// trigger: 'blur'
|
|
392
|
+
// }
|
|
393
|
+
// : {},
|
|
394
|
+
// {
|
|
395
|
+
// required: true,
|
|
396
|
+
// message: '请输入新密码',
|
|
397
|
+
// trigger: 'blur'
|
|
398
|
+
// }
|
|
399
|
+
// ]
|
|
400
|
+
// },
|
|
401
|
+
// {
|
|
402
|
+
// type: 'password',
|
|
403
|
+
// name: 'repassword',
|
|
404
|
+
// placeholder: '请确认新密码',
|
|
405
|
+
// label: '确认新密码',
|
|
406
|
+
// showPassword: true,
|
|
407
|
+
// rules: [
|
|
408
|
+
// this.checkPassword
|
|
409
|
+
// ? {
|
|
410
|
+
// pattern: this.checkPassword,
|
|
411
|
+
// message: this.checkPasswordMsg
|
|
412
|
+
// ? this.checkPasswordMsg
|
|
413
|
+
// : '密码格式不合法',
|
|
414
|
+
// trigger: 'blur'
|
|
415
|
+
// }
|
|
416
|
+
// : {},
|
|
417
|
+
// {
|
|
418
|
+
// required: true,
|
|
419
|
+
// message: '请输入新密码',
|
|
420
|
+
// trigger: 'blur'
|
|
421
|
+
// },
|
|
422
|
+
// { validator: this.reregExpValidate, trigger: 'blur' }
|
|
423
|
+
// ]
|
|
424
|
+
// },
|
|
425
|
+
// {
|
|
426
|
+
// type: 'text',
|
|
427
|
+
// name: 'verificationCode',
|
|
428
|
+
// placeholder: '请输入验证码',
|
|
429
|
+
// label: '验证码',
|
|
430
|
+
// append: {
|
|
431
|
+
// text: this.btnText,
|
|
432
|
+
// attrs: { disabled: this.disabled },
|
|
433
|
+
// event: this.getVerificationCode
|
|
434
|
+
// },
|
|
435
|
+
// rules: [
|
|
436
|
+
// {
|
|
437
|
+
// required: true,
|
|
438
|
+
// message: '请输入验证码',
|
|
439
|
+
// trigger: 'blur'
|
|
440
|
+
// }
|
|
441
|
+
// ]
|
|
442
|
+
// },
|
|
443
|
+
// {
|
|
444
|
+
// type: 'submit',
|
|
445
|
+
// contents: [
|
|
446
|
+
// {
|
|
447
|
+
// type: 'primary',
|
|
448
|
+
// text: '提交',
|
|
449
|
+
// event: 'confirm'
|
|
450
|
+
// }
|
|
451
|
+
// ]
|
|
452
|
+
// }
|
|
453
|
+
// ];
|
|
165
454
|
},
|
|
166
455
|
show() {
|
|
167
456
|
if (this.type) {
|
|
@@ -298,33 +587,62 @@ export default {
|
|
|
298
587
|
data: data.password,
|
|
299
588
|
key: this.secret
|
|
300
589
|
});
|
|
590
|
+
data.oldPassword = util.esmEncrypt({
|
|
591
|
+
data: data.oldPassword,
|
|
592
|
+
key: this.secret
|
|
593
|
+
});
|
|
301
594
|
}
|
|
302
|
-
if (this.activeIndex == '
|
|
303
|
-
data.
|
|
595
|
+
if (this.activeIndex == '0') {
|
|
596
|
+
data.operationCheckCode = this.operationCheckCode;
|
|
597
|
+
util
|
|
598
|
+
.ajax({
|
|
599
|
+
method: 'post',
|
|
600
|
+
url: loginModifyPassword,
|
|
601
|
+
data: data
|
|
602
|
+
})
|
|
603
|
+
.then((res) => {
|
|
604
|
+
this.submit = false;
|
|
605
|
+
if (res.rCode === 0) {
|
|
606
|
+
this.$message.success(res.msg);
|
|
607
|
+
this.$emit('success');
|
|
608
|
+
} else {
|
|
609
|
+
let msg = res.msg || '系统错误,请联系管理员!';
|
|
610
|
+
this.$message.error(msg);
|
|
611
|
+
}
|
|
612
|
+
})
|
|
613
|
+
.catch((err) => {
|
|
614
|
+
if (err.message && err.message !== 'canceled') {
|
|
615
|
+
this.$message.error(err.message);
|
|
616
|
+
}
|
|
617
|
+
});
|
|
304
618
|
} else {
|
|
305
|
-
|
|
619
|
+
if (this.activeIndex == '6') {
|
|
620
|
+
data.targetType = 'SMS';
|
|
621
|
+
} else {
|
|
622
|
+
data.targetType = 'EMAIL';
|
|
623
|
+
}
|
|
624
|
+
util
|
|
625
|
+
.ajax({
|
|
626
|
+
method: 'post',
|
|
627
|
+
url: codeModifyPass,
|
|
628
|
+
data: data
|
|
629
|
+
})
|
|
630
|
+
.then((res) => {
|
|
631
|
+
this.submit = false;
|
|
632
|
+
if (res.rCode === 0) {
|
|
633
|
+
this.$message.success(res.msg);
|
|
634
|
+
this.$emit('success');
|
|
635
|
+
} else {
|
|
636
|
+
let msg = res.msg || '系统错误,请联系管理员!';
|
|
637
|
+
this.$message.error(msg);
|
|
638
|
+
}
|
|
639
|
+
})
|
|
640
|
+
.catch((err) => {
|
|
641
|
+
if (err.message && err.message !== 'canceled') {
|
|
642
|
+
this.$message.error(err.message);
|
|
643
|
+
}
|
|
644
|
+
});
|
|
306
645
|
}
|
|
307
|
-
util
|
|
308
|
-
.ajax({
|
|
309
|
-
method: 'post',
|
|
310
|
-
url: codeModifyPass,
|
|
311
|
-
data: data
|
|
312
|
-
})
|
|
313
|
-
.then((res) => {
|
|
314
|
-
this.submit = false;
|
|
315
|
-
if (res.rCode === 0) {
|
|
316
|
-
this.$message.success(res.msg);
|
|
317
|
-
this.$emit('success');
|
|
318
|
-
} else {
|
|
319
|
-
let msg = res.msg || '系统错误,请联系管理员!';
|
|
320
|
-
this.$message.error(msg);
|
|
321
|
-
}
|
|
322
|
-
})
|
|
323
|
-
.catch((err) => {
|
|
324
|
-
if (err.message && err.message !== 'canceled') {
|
|
325
|
-
this.$message.error(err.message);
|
|
326
|
-
}
|
|
327
|
-
});
|
|
328
646
|
},
|
|
329
647
|
handleSelect(res) {
|
|
330
648
|
this.$refs.pwdForm.resetFields();
|
|
@@ -678,10 +678,13 @@ export default {
|
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
util.win.windowOpen = this.openPage;
|
|
681
|
+
util.win.addEventListener('popstate', this.stateHandle, false);
|
|
681
682
|
},
|
|
682
683
|
methods: {
|
|
684
|
+
stateHandle() {
|
|
685
|
+
util.win.location.reload();
|
|
686
|
+
},
|
|
683
687
|
menuSuccess(res) {
|
|
684
|
-
// this.menus
|
|
685
688
|
this.menuType = 'custom';
|
|
686
689
|
if (res && res.length) {
|
|
687
690
|
this.customMenu = res;
|
|
@@ -2088,6 +2091,7 @@ export default {
|
|
|
2088
2091
|
if (this.webSocket) {
|
|
2089
2092
|
this.webSocket.destroy();
|
|
2090
2093
|
}
|
|
2094
|
+
util.win.removeEventListener('popstate', this.tateHandle);
|
|
2091
2095
|
}
|
|
2092
2096
|
};
|
|
2093
2097
|
</script>
|