n20-common-lib 1.3.49 → 1.3.52
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/package.json +1 -1
- package/src/assets/css/cl-form-item.scss +22 -5
- package/src/components/FileUploadTable/index.vue +42 -30
- package/src/components/Filters/index.vue +1 -1
- package/src/components/InputNumber/index.vue +21 -9
- package/src/components/InputSearch/index.vue +50 -10
- package/src/components/Layout/HeaderWrap/index.vue +52 -11
- package/src/components/Layout/HeaderWrap/switchUser.vue +67 -0
- package/src/components/LoginTemporary/index.vue +60 -1
- package/src/components/ShowColumn/index.vue +4 -1
- package/src/utils/auth.js +14 -14
- package/style/index.css +1 -1
- package/style/index.css.map +1 -1
- package/theme/blue.css +1 -1
- package/theme/green.css +1 -1
- package/theme/lightBlue.css +1 -1
- package/theme/orange.css +1 -1
- package/theme/purple.css +1 -1
- package/theme/red.css +1 -1
- package/theme/yellow.css +1 -1
package/package.json
CHANGED
|
@@ -106,11 +106,15 @@ $--input-max: 304px;
|
|
|
106
106
|
|
|
107
107
|
.el-input__inner {
|
|
108
108
|
padding-left: 10px;
|
|
109
|
-
|
|
109
|
+
padding-right: 10px;
|
|
110
110
|
&[oreadonly] {
|
|
111
111
|
border-color: $--border-color-base;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
+
.el-input-number.is-without-controls .el-input__inner {
|
|
115
|
+
padding-left: 10px;
|
|
116
|
+
padding-right: 10px;
|
|
117
|
+
}
|
|
114
118
|
|
|
115
119
|
.w-224 {
|
|
116
120
|
width: $--input-width !important;
|
|
@@ -510,7 +514,7 @@ $--input-max: 304px;
|
|
|
510
514
|
}
|
|
511
515
|
}
|
|
512
516
|
|
|
513
|
-
.el-select .el-input__inner{
|
|
517
|
+
.el-select .el-input__inner {
|
|
514
518
|
text-overflow: ellipsis;
|
|
515
519
|
}
|
|
516
520
|
|
|
@@ -679,6 +683,10 @@ $--input-max: 304px;
|
|
|
679
683
|
.el-input__suffix {
|
|
680
684
|
font-size: 14px;
|
|
681
685
|
}
|
|
686
|
+
.el-icon-circle-close {
|
|
687
|
+
pointer-events: all;
|
|
688
|
+
cursor: pointer;
|
|
689
|
+
}
|
|
682
690
|
}
|
|
683
691
|
|
|
684
692
|
/* 多选搜索框 */
|
|
@@ -693,10 +701,19 @@ $--input-max: 304px;
|
|
|
693
701
|
.el-select__input {
|
|
694
702
|
margin-left: 10px;
|
|
695
703
|
}
|
|
704
|
+
.el-input__suffix {
|
|
705
|
+
display: none;
|
|
706
|
+
}
|
|
696
707
|
}
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
708
|
+
&.is-clearable {
|
|
709
|
+
.el-select {
|
|
710
|
+
.el-input__inner {
|
|
711
|
+
padding-right: 50px;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
.el-input__suffix {
|
|
716
|
+
z-index: 1;
|
|
700
717
|
}
|
|
701
718
|
}
|
|
702
719
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<template v-if="dataPorp.slotHeader">
|
|
23
23
|
<el-table-column
|
|
24
24
|
v-for="item in dataPorp.slotHeader"
|
|
25
|
-
:key="item"
|
|
25
|
+
:key="item.prop"
|
|
26
26
|
:label="item.label"
|
|
27
27
|
:prop="item.prop"
|
|
28
28
|
:align="item.align || 'center'"
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<el-button
|
|
86
86
|
type="text"
|
|
87
87
|
icon="el-icon-download"
|
|
88
|
-
:disabled="!row[keys.url]
|
|
88
|
+
:disabled="!row[keys.url]"
|
|
89
89
|
@click="downFile(row)"
|
|
90
90
|
/>
|
|
91
91
|
</slot>
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
:ref="'upload' + $index"
|
|
173
173
|
class="n20-upload-table-up"
|
|
174
174
|
:file-name="row['_name'] || row[keys.name]"
|
|
175
|
-
:data="row['_fileData']"
|
|
175
|
+
:data="row['_fileData'] || fileData"
|
|
176
176
|
:msg-type="null"
|
|
177
177
|
:show-clear="false"
|
|
178
178
|
:action="action"
|
|
@@ -330,6 +330,7 @@
|
|
|
330
330
|
:auto-upload="false"
|
|
331
331
|
:multiple="true"
|
|
332
332
|
:action="action"
|
|
333
|
+
:data="fileData"
|
|
333
334
|
:headers="headers"
|
|
334
335
|
:accept="fileAccept"
|
|
335
336
|
:http-request="uploadHttpRequest"
|
|
@@ -339,9 +340,7 @@
|
|
|
339
340
|
<template slot="trigger">
|
|
340
341
|
<i class="drag-icon n20-icon-shangchuan"></i>
|
|
341
342
|
<span class="drag-text">点击或将文件拖拽到这里上传</span>
|
|
342
|
-
<span class="drag-tip">
|
|
343
|
-
<slot>支持扩展名:.rar .zip .doc .docx .pdf .jpg...</slot>
|
|
344
|
-
</span>
|
|
343
|
+
<span class="drag-tip">{{ fileAcceptTip }}</span>
|
|
345
344
|
</template>
|
|
346
345
|
</clUpload>
|
|
347
346
|
<div class="dialog-footer">
|
|
@@ -420,30 +419,6 @@ export default {
|
|
|
420
419
|
return {
|
|
421
420
|
imgType: /\.jpg|\.png|\.gif|\.svg$/i,
|
|
422
421
|
selectionList: [],
|
|
423
|
-
fileAccept: this.dataPorp.fileAccept || undefined,
|
|
424
|
-
fileSize: this.dataPorp.fileSize || undefined,
|
|
425
|
-
typeOptions: this.dataPorp.typeOptions || [
|
|
426
|
-
{
|
|
427
|
-
type: '001',
|
|
428
|
-
label: '信贷合同'
|
|
429
|
-
},
|
|
430
|
-
{
|
|
431
|
-
type: '002',
|
|
432
|
-
label: '贴现合同'
|
|
433
|
-
},
|
|
434
|
-
{
|
|
435
|
-
type: '003',
|
|
436
|
-
label: '其他合同'
|
|
437
|
-
}
|
|
438
|
-
],
|
|
439
|
-
keys: this.dataPorp.keys || {
|
|
440
|
-
rowKey: 'id',
|
|
441
|
-
type: 'type',
|
|
442
|
-
name: 'name',
|
|
443
|
-
url: 'url',
|
|
444
|
-
time: 'time',
|
|
445
|
-
user: 'user'
|
|
446
|
-
},
|
|
447
422
|
currFileList: [],
|
|
448
423
|
visibleP: false,
|
|
449
424
|
visibleBatch: false,
|
|
@@ -452,6 +427,29 @@ export default {
|
|
|
452
427
|
previewSameOrg: false
|
|
453
428
|
}
|
|
454
429
|
},
|
|
430
|
+
computed: {
|
|
431
|
+
fileAccept() {
|
|
432
|
+
return this.dataPorp.fileAccept || undefined
|
|
433
|
+
},
|
|
434
|
+
fileSize() {
|
|
435
|
+
return this.dataPorp.fileSize || undefined
|
|
436
|
+
},
|
|
437
|
+
fileAcceptTip() {
|
|
438
|
+
return (
|
|
439
|
+
this.dataPorp.fileAcceptTip ||
|
|
440
|
+
'支持扩展名:.rar .zip .doc .docx .pdf .jpg...'
|
|
441
|
+
)
|
|
442
|
+
},
|
|
443
|
+
fileData() {
|
|
444
|
+
return this.dataPorp.fileData || undefined
|
|
445
|
+
},
|
|
446
|
+
typeOptions() {
|
|
447
|
+
return this.dataPorp.typeOptions || typeOptionsD
|
|
448
|
+
},
|
|
449
|
+
keys() {
|
|
450
|
+
return this.dataPorp.keys || keysD
|
|
451
|
+
}
|
|
452
|
+
},
|
|
455
453
|
methods: {
|
|
456
454
|
batchUploadFn() {
|
|
457
455
|
let $uploadwrap = this.$refs['upload-batch']
|
|
@@ -580,4 +578,18 @@ export default {
|
|
|
580
578
|
}
|
|
581
579
|
}
|
|
582
580
|
}
|
|
581
|
+
|
|
582
|
+
const keysD = {
|
|
583
|
+
rowKey: 'id',
|
|
584
|
+
type: 'type',
|
|
585
|
+
name: 'name',
|
|
586
|
+
url: 'url',
|
|
587
|
+
time: 'time',
|
|
588
|
+
user: 'user'
|
|
589
|
+
}
|
|
590
|
+
const typeOptionsD = [
|
|
591
|
+
{ type: '001', label: '信贷合同' },
|
|
592
|
+
{ type: '002', label: '贴现合同' },
|
|
593
|
+
{ type: '003', label: '其他合同' }
|
|
594
|
+
]
|
|
583
595
|
</script>
|
|
@@ -205,7 +205,7 @@ export default {
|
|
|
205
205
|
},
|
|
206
206
|
getRemote() {
|
|
207
207
|
this.$refs['setRemote'].getColumns().then((list) => {
|
|
208
|
-
this.remoteList = list || this.filterList
|
|
208
|
+
this.remoteList = list || this.filterList.slice(0, this.defaultShow)
|
|
209
209
|
})
|
|
210
210
|
},
|
|
211
211
|
setRemoteChange(list) {
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
class="n20-num-w"
|
|
4
|
+
@mouseenter="isHove = true"
|
|
5
|
+
@mouseleave="isHove = false"
|
|
6
|
+
>
|
|
3
7
|
<el-input
|
|
4
8
|
v-if="showStr"
|
|
5
9
|
class="n20-stc"
|
|
6
|
-
:class="{ 'n20-num--rate': type === 'rate' }"
|
|
10
|
+
:class="{ 'n20-num--rate': type === 'rate' || isClearable }"
|
|
7
11
|
:value="valueStr"
|
|
8
12
|
:disabled="disabled"
|
|
9
13
|
:placeholder="phd"
|
|
@@ -14,7 +18,7 @@
|
|
|
14
18
|
v-else
|
|
15
19
|
ref="input-number"
|
|
16
20
|
class="n20-num"
|
|
17
|
-
:class="{ 'n20-num--rate': type === 'rate' }"
|
|
21
|
+
:class="{ 'n20-num--rate': type === 'rate' || isClearable }"
|
|
18
22
|
:controls="false"
|
|
19
23
|
v-bind="$attrs"
|
|
20
24
|
:value="valueNum"
|
|
@@ -24,11 +28,14 @@
|
|
|
24
28
|
@blur="blurFn"
|
|
25
29
|
@change="changeFn"
|
|
26
30
|
/>
|
|
27
|
-
<span v-if="
|
|
28
|
-
|
|
31
|
+
<span v-if="isClearable && isHove && value" class="el-input__suffix"
|
|
32
|
+
><i class="el-input__icon el-icon-circle-close" @click="closeFn"></i
|
|
33
|
+
></span>
|
|
34
|
+
<span v-else-if="type === 'rate'" class="el-input__suffix"
|
|
35
|
+
><span class="el-input__icon" style="display: inline-block">{{
|
|
29
36
|
suffix
|
|
30
|
-
}}</span
|
|
31
|
-
|
|
37
|
+
}}</span></span
|
|
38
|
+
>
|
|
32
39
|
</div>
|
|
33
40
|
</template>
|
|
34
41
|
|
|
@@ -52,7 +59,7 @@ export default {
|
|
|
52
59
|
type: Boolean,
|
|
53
60
|
default: undefined
|
|
54
61
|
},
|
|
55
|
-
|
|
62
|
+
isClearable: {
|
|
56
63
|
type: Boolean,
|
|
57
64
|
default: false
|
|
58
65
|
},
|
|
@@ -78,7 +85,8 @@ export default {
|
|
|
78
85
|
return {
|
|
79
86
|
valueStr: '',
|
|
80
87
|
valueNum: undefined,
|
|
81
|
-
showStr: true
|
|
88
|
+
showStr: true,
|
|
89
|
+
isHove: false
|
|
82
90
|
}
|
|
83
91
|
},
|
|
84
92
|
computed: {
|
|
@@ -178,6 +186,10 @@ export default {
|
|
|
178
186
|
} else {
|
|
179
187
|
this.preValue = target.value
|
|
180
188
|
}
|
|
189
|
+
},
|
|
190
|
+
closeFn() {
|
|
191
|
+
this.$emit('input', undefined)
|
|
192
|
+
this.$emit('change', undefined)
|
|
181
193
|
}
|
|
182
194
|
}
|
|
183
195
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
v-if="!select"
|
|
4
4
|
v-bind="$attrs"
|
|
5
5
|
:value="value"
|
|
6
|
+
:clearable="clearable"
|
|
6
7
|
v-on="$listeners"
|
|
7
8
|
@change="searchFn"
|
|
8
9
|
>
|
|
@@ -12,7 +13,13 @@
|
|
|
12
13
|
@click.stop="searchFn"
|
|
13
14
|
></i>
|
|
14
15
|
</el-input>
|
|
15
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
v-else
|
|
18
|
+
class="n20-input-search"
|
|
19
|
+
:class="{ 'is-clearable': clearable }"
|
|
20
|
+
@mouseenter="isHove = true"
|
|
21
|
+
@mouseleave="isHove = false"
|
|
22
|
+
>
|
|
16
23
|
<el-select
|
|
17
24
|
ref="input-search"
|
|
18
25
|
v-bind="$attrs"
|
|
@@ -26,12 +33,17 @@
|
|
|
26
33
|
>
|
|
27
34
|
<slot></slot>
|
|
28
35
|
</el-select>
|
|
29
|
-
<span class="el-input__suffix"
|
|
30
|
-
|
|
36
|
+
<span class="el-input__suffix"
|
|
37
|
+
><i
|
|
31
38
|
class="is-search el-input__icon el-icon-zoom-in"
|
|
32
39
|
@click.stop="searchFn"
|
|
33
|
-
></
|
|
34
|
-
|
|
40
|
+
></i
|
|
41
|
+
><i
|
|
42
|
+
v-if="clearable && isHove && hasVal"
|
|
43
|
+
class="is-search el-input__icon el-icon-circle-close"
|
|
44
|
+
@click="closeFn"
|
|
45
|
+
></i
|
|
46
|
+
></span>
|
|
35
47
|
</div>
|
|
36
48
|
</template>
|
|
37
49
|
|
|
@@ -51,20 +63,44 @@ export default {
|
|
|
51
63
|
type: Boolean,
|
|
52
64
|
default: false
|
|
53
65
|
},
|
|
66
|
+
clearable: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
54
70
|
allowCreate: {
|
|
55
71
|
type: Boolean,
|
|
56
72
|
default: true
|
|
57
73
|
}
|
|
58
74
|
},
|
|
59
75
|
data() {
|
|
60
|
-
|
|
61
|
-
|
|
76
|
+
return {
|
|
77
|
+
isHove: false
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
computed: {
|
|
81
|
+
hasVal() {
|
|
82
|
+
if (this.multiple) {
|
|
83
|
+
if (this.value && this.value.length) {
|
|
84
|
+
return true
|
|
85
|
+
} else {
|
|
86
|
+
return false
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
if (this.value || this.value === 0) {
|
|
90
|
+
return true
|
|
91
|
+
} else {
|
|
92
|
+
return false
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
62
96
|
},
|
|
63
97
|
methods: {
|
|
64
98
|
visibleChangeFn(val) {
|
|
65
|
-
if (val && !this
|
|
66
|
-
this
|
|
67
|
-
this.$refs['input-search']['
|
|
99
|
+
if (val && !this.multiple) {
|
|
100
|
+
if (this.value || this.value === 0) {
|
|
101
|
+
this.$refs['input-search']['selectedLabel'] =
|
|
102
|
+
this.$refs['input-search']['currentPlaceholder']
|
|
103
|
+
}
|
|
68
104
|
}
|
|
69
105
|
},
|
|
70
106
|
changeFn(val) {
|
|
@@ -73,6 +109,10 @@ export default {
|
|
|
73
109
|
},
|
|
74
110
|
searchFn() {
|
|
75
111
|
this.$emit('search', this.value)
|
|
112
|
+
},
|
|
113
|
+
closeFn() {
|
|
114
|
+
this.$emit('input', undefined)
|
|
115
|
+
this.$emit('change', undefined)
|
|
76
116
|
}
|
|
77
117
|
}
|
|
78
118
|
}
|
|
@@ -80,21 +80,20 @@
|
|
|
80
80
|
<el-dropdown-item command="changePassword" divided>{{
|
|
81
81
|
'修改密码' | $l(i18n)
|
|
82
82
|
}}</el-dropdown-item>
|
|
83
|
+
<el-dropdown-item v-if="customOpt.mydeal" command="myDeal" divided>{{
|
|
84
|
+
'我的交易' | $l(i18n)
|
|
85
|
+
}}</el-dropdown-item>
|
|
83
86
|
<el-dropdown-item
|
|
84
|
-
v-if="customOpt.
|
|
85
|
-
command="
|
|
86
|
-
divided
|
|
87
|
-
>{{ '我的交易' | $l(i18n) }}</el-dropdown-item
|
|
88
|
-
>
|
|
89
|
-
<el-dropdown-item
|
|
90
|
-
v-if="customOpt.agency && customOpt.agency.show"
|
|
91
|
-
command="myAgency"
|
|
87
|
+
v-if="customOpt.switchuser"
|
|
88
|
+
command="switchUser"
|
|
92
89
|
divided
|
|
90
|
+
>{{ '切换用户' | $l(i18n) }}</el-dropdown-item
|
|
93
91
|
>
|
|
92
|
+
<el-dropdown-item v-if="customOpt.agency" command="myAgency" divided>
|
|
94
93
|
<div class="flex-box flex-v">
|
|
95
94
|
<span>{{ '工作代理' | $l(i18n) }}</span>
|
|
96
95
|
<el-badge
|
|
97
|
-
v-if="
|
|
96
|
+
v-if="underway"
|
|
98
97
|
class="m-l-auto font-size-small color-primary"
|
|
99
98
|
is-dot
|
|
100
99
|
type="primary"
|
|
@@ -169,6 +168,14 @@
|
|
|
169
168
|
>
|
|
170
169
|
<noticePop ref="noticeContent" :num.sync="noticeNum" />
|
|
171
170
|
</el-popover>
|
|
171
|
+
<el-dialog
|
|
172
|
+
:visible.sync="scV"
|
|
173
|
+
:title="'切换用户' | $l(i18n)"
|
|
174
|
+
append-to-body
|
|
175
|
+
width="600px"
|
|
176
|
+
>
|
|
177
|
+
<switchUser :visible.sync="scV" :user-no="userNo" />
|
|
178
|
+
</el-dialog>
|
|
172
179
|
</div>
|
|
173
180
|
</template>
|
|
174
181
|
|
|
@@ -179,8 +186,9 @@ import { themeList } from '../../../utils/theme.config.js'
|
|
|
179
186
|
import dialogWrap from '../../Dialog/index.vue'
|
|
180
187
|
import changePwd from './changePwd.vue'
|
|
181
188
|
import noticePop from './noticePop.vue'
|
|
182
|
-
import
|
|
189
|
+
import switchUser from './switchUser.vue'
|
|
183
190
|
|
|
191
|
+
import axios from '../../../utils/axios'
|
|
184
192
|
import getJsonc from '../../../assets/getJsonc'
|
|
185
193
|
import realUrl from '../../../assets/realUrl'
|
|
186
194
|
import auth from '../../../utils/auth'
|
|
@@ -208,6 +216,9 @@ const i18n = {
|
|
|
208
216
|
我的交易: {
|
|
209
217
|
en: 'My deal'
|
|
210
218
|
},
|
|
219
|
+
切换用户: {
|
|
220
|
+
en: 'Switch User'
|
|
221
|
+
},
|
|
211
222
|
工作代理: {
|
|
212
223
|
en: 'My agency'
|
|
213
224
|
},
|
|
@@ -247,7 +258,8 @@ export default {
|
|
|
247
258
|
components: {
|
|
248
259
|
dialogWrap,
|
|
249
260
|
changePwd,
|
|
250
|
-
noticePop
|
|
261
|
+
noticePop,
|
|
262
|
+
switchUser
|
|
251
263
|
},
|
|
252
264
|
inject: {
|
|
253
265
|
customOpt: {
|
|
@@ -264,6 +276,7 @@ export default {
|
|
|
264
276
|
headerTitle: undefined,
|
|
265
277
|
headerUserUrl: undefined,
|
|
266
278
|
userInfo: {},
|
|
279
|
+
userNo: window.sessionStorage.getItem('userNo'),
|
|
267
280
|
durationTime: '00小时00分00秒',
|
|
268
281
|
cpwdV: false,
|
|
269
282
|
langV: false,
|
|
@@ -273,6 +286,8 @@ export default {
|
|
|
273
286
|
themeVal: window.localStorage.getItem('pageTheme') || 'default',
|
|
274
287
|
noticeNum: 0,
|
|
275
288
|
rolesList: [],
|
|
289
|
+
scV: false,
|
|
290
|
+
underway: false,
|
|
276
291
|
i18n
|
|
277
292
|
}
|
|
278
293
|
},
|
|
@@ -295,12 +310,16 @@ export default {
|
|
|
295
310
|
setUserVisible(v) {
|
|
296
311
|
if (v) {
|
|
297
312
|
let userInfo = JSON.parse(sessionStorage.getItem('userInfo') || '{}')
|
|
313
|
+
|
|
314
|
+
this.userNo = userInfo.uno
|
|
298
315
|
this.userInfo = {
|
|
299
316
|
userName: userInfo.uname,
|
|
300
317
|
companyName: userInfo.cltName
|
|
301
318
|
}
|
|
302
319
|
this.rolesList = userInfo.roles || []
|
|
303
320
|
|
|
321
|
+
this.customOpt.agency && this.getProxyAuthIing()
|
|
322
|
+
|
|
304
323
|
let loginTime = sessionStorage.getItem('loginTime')
|
|
305
324
|
if (loginTime) {
|
|
306
325
|
this.setDurationTime(loginTime)
|
|
@@ -356,6 +375,15 @@ export default {
|
|
|
356
375
|
case 'logOut':
|
|
357
376
|
this.logOut()
|
|
358
377
|
break
|
|
378
|
+
case 'myDeal':
|
|
379
|
+
this.$router.push('/activiti/alreadyToExamine')
|
|
380
|
+
break
|
|
381
|
+
case 'myAgency':
|
|
382
|
+
this.$router.push('/user-web/agency')
|
|
383
|
+
break
|
|
384
|
+
case 'switchUser':
|
|
385
|
+
this.switchUser()
|
|
386
|
+
break
|
|
359
387
|
default:
|
|
360
388
|
this.$emit('custom-event', { type: c })
|
|
361
389
|
break
|
|
@@ -393,6 +421,9 @@ export default {
|
|
|
393
421
|
// alert('修改密码')
|
|
394
422
|
this.cpwdV = true
|
|
395
423
|
},
|
|
424
|
+
switchUser() {
|
|
425
|
+
this.scV = true
|
|
426
|
+
},
|
|
396
427
|
logOut() {
|
|
397
428
|
// alert('退出登录')
|
|
398
429
|
this.$confirm(
|
|
@@ -406,6 +437,16 @@ export default {
|
|
|
406
437
|
).then(() => {
|
|
407
438
|
auth.removeToken()
|
|
408
439
|
})
|
|
440
|
+
},
|
|
441
|
+
// 检查是否代理中
|
|
442
|
+
async getProxyAuthIing() {
|
|
443
|
+
let res = await axios.get(
|
|
444
|
+
`/bems/prod_1.0/user/wfUserProxyAuth/check/ongoing/${this.userNo}`,
|
|
445
|
+
null,
|
|
446
|
+
{ loading: false, noMsg: true }
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
this.underway = !!res.data
|
|
409
450
|
}
|
|
410
451
|
}
|
|
411
452
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-table :data="userListBanck" style="width: 100%">
|
|
3
|
+
<el-table-column type="index" label="序号" />
|
|
4
|
+
<el-table-column prop="uno" label="账号" width="180" />
|
|
5
|
+
<el-table-column prop="cltName" label="单位" />
|
|
6
|
+
<el-table-column width="100" label="操作">
|
|
7
|
+
<template slot-scope="{ row }">
|
|
8
|
+
<el-button v-if="userNo === row.uno" type="text" disabled
|
|
9
|
+
>当前用户</el-button
|
|
10
|
+
>
|
|
11
|
+
<el-button v-else type="text" @click="handleChange(row.uno)"
|
|
12
|
+
>切换</el-button
|
|
13
|
+
>
|
|
14
|
+
</template>
|
|
15
|
+
</el-table-column>
|
|
16
|
+
</el-table>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script>
|
|
20
|
+
import axios from '../../../utils/axios'
|
|
21
|
+
import auth from '../../../utils/auth'
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
props: {
|
|
25
|
+
visible: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
29
|
+
userNo: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: undefined
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
userListBanck: [{}]
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
created() {
|
|
40
|
+
axios
|
|
41
|
+
.get(
|
|
42
|
+
`/bems/prod_1.0/user/api/userController/queryUserListByUserNo/${this.userNo}`
|
|
43
|
+
)
|
|
44
|
+
.then(({ data }) => {
|
|
45
|
+
this.userListBanck = data
|
|
46
|
+
})
|
|
47
|
+
},
|
|
48
|
+
methods: {
|
|
49
|
+
handleChange(uno) {
|
|
50
|
+
axios
|
|
51
|
+
.get(`/bems/prod_1.0/uas/api/authorization/switchUser/${uno}`)
|
|
52
|
+
.then(({ data }) => {
|
|
53
|
+
this.$emit('update:visible', false)
|
|
54
|
+
|
|
55
|
+
window.sessionStorage.setItem('_auto_login_ing_', true)
|
|
56
|
+
window.sessionStorage.setItem(
|
|
57
|
+
'_auto_login_data_',
|
|
58
|
+
JSON.stringify(data)
|
|
59
|
+
)
|
|
60
|
+
auth.toLogin()
|
|
61
|
+
})
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<style></style>
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<div v-if="alV" v-loading="alV" class="login-wrap">
|
|
3
|
+
<loginForm
|
|
4
|
+
ref="login-form"
|
|
5
|
+
:login-types="LOGIN_MODE || loginTypes"
|
|
6
|
+
:login-then="loginThen"
|
|
7
|
+
class="login-form"
|
|
8
|
+
style="display: none"
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
2
11
|
<div
|
|
12
|
+
v-else
|
|
3
13
|
class="login-wrap"
|
|
4
14
|
:style="{
|
|
5
15
|
backgroundImage: BgImage ? `url(${BgImage})` : `url(${loginBg})`
|
|
@@ -66,6 +76,14 @@ export default {
|
|
|
66
76
|
loginThen: {
|
|
67
77
|
type: Function,
|
|
68
78
|
default: undefined
|
|
79
|
+
},
|
|
80
|
+
autoLogin: {
|
|
81
|
+
type: Boolean,
|
|
82
|
+
default: false
|
|
83
|
+
},
|
|
84
|
+
autoLoginDate: {
|
|
85
|
+
type: Object,
|
|
86
|
+
default: undefined
|
|
69
87
|
}
|
|
70
88
|
},
|
|
71
89
|
data() {
|
|
@@ -82,10 +100,20 @@ export default {
|
|
|
82
100
|
loginLogoHeight: 'auto',
|
|
83
101
|
loginLogoText: '',
|
|
84
102
|
sloganHtml: '',
|
|
85
|
-
operateType: 'login'
|
|
103
|
+
operateType: 'login',
|
|
104
|
+
alV: false
|
|
86
105
|
}
|
|
87
106
|
},
|
|
88
107
|
created() {
|
|
108
|
+
if (this.autoLogin) {
|
|
109
|
+
this.autoLoginSC()
|
|
110
|
+
return
|
|
111
|
+
}
|
|
112
|
+
if (window.sessionStorage.getItem('_auto_login_ing_')) {
|
|
113
|
+
this.autoLoginSS()
|
|
114
|
+
return
|
|
115
|
+
}
|
|
116
|
+
|
|
89
117
|
this.removeStorage()
|
|
90
118
|
this.init()
|
|
91
119
|
},
|
|
@@ -159,6 +187,37 @@ export default {
|
|
|
159
187
|
},
|
|
160
188
|
getChangetype(val) {
|
|
161
189
|
this.operateType = val
|
|
190
|
+
},
|
|
191
|
+
autoLoginSC() {
|
|
192
|
+
this.alV = true
|
|
193
|
+
let alData = this.autoLoginDate
|
|
194
|
+
this.removeStorage()
|
|
195
|
+
if (alData && alData.accessToken) {
|
|
196
|
+
this.autoLoginFn(alData)
|
|
197
|
+
} else {
|
|
198
|
+
this.$watch('autoLoginDate', (alData) => {
|
|
199
|
+
if (alData && alData.accessToken) {
|
|
200
|
+
this.removeStorage()
|
|
201
|
+
this.autoLoginFn(alData)
|
|
202
|
+
}
|
|
203
|
+
})
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
autoLoginSS() {
|
|
207
|
+
this.alV = true
|
|
208
|
+
let alDataStr = window.sessionStorage.getItem('_auto_login_data_')
|
|
209
|
+
this.removeStorage()
|
|
210
|
+
if (alDataStr) {
|
|
211
|
+
let alData = JSON.parse(alDataStr)
|
|
212
|
+
if (alData && alData.accessToken) {
|
|
213
|
+
this.autoLoginFn(alData)
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
autoLoginFn(alData) {
|
|
218
|
+
this.$nextTick(() => {
|
|
219
|
+
this.$refs['login-form']?.loginAfter(alData)
|
|
220
|
+
})
|
|
162
221
|
}
|
|
163
222
|
}
|
|
164
223
|
}
|