n20-common-lib 2.1.5 → 2.1.7
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/components/InputNumber/index.vue +15 -21
- package/src/components/Layout/HeaderWrap/indexN.vue +11 -3
- package/src/components/Layout/indexN.vue +3 -3
- package/src/components/LoginSetting/index.vue +2 -2
- package/src/components/LoginSetting/indexN.vue +3 -3
- package/src/components/LoginSetting/setItem.vue +137 -134
- package/src/components/LoginTemporary/indexN.vue +16 -4
- package/src/components/Upload/index.vue +4 -4
- package/src/i18n.json +2 -2
- package/src/utils/axios.js +12 -15
package/package.json
CHANGED
|
@@ -154,7 +154,7 @@ export default {
|
|
|
154
154
|
val = ev.code === 'ArrowUp' ? val + this.step : val - this.step
|
|
155
155
|
let valueStr = Number(val.toFixed(9)).toString()
|
|
156
156
|
this.valueStr = valueStr
|
|
157
|
-
this.
|
|
157
|
+
this.changeFn(valueStr)
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
},
|
|
@@ -162,36 +162,30 @@ export default {
|
|
|
162
162
|
if (valStr !== '-' && isNaN(valStr)) {
|
|
163
163
|
this.valueStr = this.preValue
|
|
164
164
|
} else {
|
|
165
|
-
|
|
166
|
-
let val = Number(valStr)
|
|
167
|
-
if (val < this.min) {
|
|
168
|
-
this.valueStr = this.min
|
|
169
|
-
} else if (val > this.max) {
|
|
170
|
-
this.valueStr = this.max
|
|
171
|
-
} else if (this.stepStrictly) {
|
|
172
|
-
let N = val / this.step
|
|
173
|
-
if (Number(N.toFixed(9)) === Math.round(N)) {
|
|
174
|
-
this.preValue = valStr
|
|
175
|
-
} else {
|
|
176
|
-
val = Math.round(N) * this.step
|
|
177
|
-
this.valueStr = val.toString()
|
|
178
|
-
}
|
|
179
|
-
} else {
|
|
180
|
-
this.preValue = valStr
|
|
181
|
-
}
|
|
182
|
-
}
|
|
165
|
+
this.preValue = valStr
|
|
183
166
|
}
|
|
184
167
|
},
|
|
185
168
|
changeFn(valStr) {
|
|
186
169
|
valStr = valStr.replace(/,/g, '')
|
|
187
|
-
let val = Number(valStr)
|
|
188
170
|
|
|
189
|
-
if (!valStr.trim() || isNaN(
|
|
171
|
+
if (!valStr.trim() || isNaN(valStr)) {
|
|
190
172
|
this.valueStr = ''
|
|
191
173
|
this.$emit('input', undefined)
|
|
192
174
|
this.$emit('change', undefined)
|
|
193
175
|
return
|
|
194
176
|
}
|
|
177
|
+
|
|
178
|
+
let val = Number(valStr)
|
|
179
|
+
if (val < this.min) {
|
|
180
|
+
val = this.min
|
|
181
|
+
} else if (val > this.max) {
|
|
182
|
+
val = this.max
|
|
183
|
+
} else if (this.stepStrictly) {
|
|
184
|
+
let N = val / this.step
|
|
185
|
+
if (Number(N.toFixed(9)) !== Math.round(N)) {
|
|
186
|
+
val = Math.round(N) * this.step
|
|
187
|
+
}
|
|
188
|
+
}
|
|
195
189
|
this.valueStr = this.num2str(val)
|
|
196
190
|
|
|
197
191
|
switch (this.type) {
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
{{ '单位' | $lc }}: <span class="color-666">{{ userInfo.companyName }}</span>
|
|
37
37
|
</span>
|
|
38
38
|
</sapn>
|
|
39
|
+
<span v-else-if="byLabel && !inBack" class="header-uif-by">{{ byLabel }}</span>
|
|
39
40
|
<el-button v-if="inBack" class="header-hdyy f-s-s" plain round size="mini" @click="toSystem">回到应用</el-button>
|
|
40
41
|
<!-- YSCW-end -->
|
|
41
42
|
<el-dropdown class="m-l-lg" @command="setLang">
|
|
@@ -295,7 +296,7 @@ export default {
|
|
|
295
296
|
byV: false,
|
|
296
297
|
byLabel: '小毅要卷到地老天荒…',
|
|
297
298
|
headerUserInfoBg: realUrl('/server-assets/userInfoBg.png'),
|
|
298
|
-
inBack: window.
|
|
299
|
+
inBack: window.localStorage.getItem('pageInType') === 'inBack'
|
|
299
300
|
}
|
|
300
301
|
},
|
|
301
302
|
created() {
|
|
@@ -503,7 +504,7 @@ export default {
|
|
|
503
504
|
this.themeV = true
|
|
504
505
|
},
|
|
505
506
|
toBack() {
|
|
506
|
-
window.
|
|
507
|
+
window.localStorage.setItem('pageInType', 'toBack')
|
|
507
508
|
|
|
508
509
|
let { base = '/' } = this.$router.options
|
|
509
510
|
if (!/\/$/.test(base)) base += '/'
|
|
@@ -511,7 +512,7 @@ export default {
|
|
|
511
512
|
window.location.href = window.location.origin + base
|
|
512
513
|
},
|
|
513
514
|
toSystem() {
|
|
514
|
-
window.
|
|
515
|
+
window.localStorage.setItem('pageInType', 'toFront')
|
|
515
516
|
|
|
516
517
|
let { base = '/' } = this.$router.options
|
|
517
518
|
if (!/\/$/.test(base)) base += '/'
|
|
@@ -548,3 +549,10 @@ export default {
|
|
|
548
549
|
}
|
|
549
550
|
}
|
|
550
551
|
</script>
|
|
552
|
+
<style>
|
|
553
|
+
.header-uif-by {
|
|
554
|
+
color: #999;
|
|
555
|
+
font-size: 12px;
|
|
556
|
+
margin-right: 60px;
|
|
557
|
+
}
|
|
558
|
+
</style>
|
|
@@ -217,14 +217,14 @@ export default {
|
|
|
217
217
|
this.tabList = tabList
|
|
218
218
|
},
|
|
219
219
|
setTabList() {
|
|
220
|
-
let pageInType =
|
|
220
|
+
let pageInType = localStorage.getItem('pageInType')
|
|
221
221
|
|
|
222
222
|
if (pageInType === 'toFront') {
|
|
223
223
|
window.sessionStorage.removeItem('tab-list')
|
|
224
|
-
window.
|
|
224
|
+
window.localStorage.setItem('pageInType', 'inFront')
|
|
225
225
|
} else if (pageInType === 'toBack') {
|
|
226
226
|
window.sessionStorage.removeItem('tab-list')
|
|
227
|
-
window.
|
|
227
|
+
window.localStorage.setItem('pageInType', 'inBack')
|
|
228
228
|
} else {
|
|
229
229
|
window.sessionStorage.setItem('tab-list', JSON.stringify(this.tabList))
|
|
230
230
|
}
|
|
@@ -255,7 +255,7 @@ export default {
|
|
|
255
255
|
this.$message.error($lc('登录首页文字显示信息不能为空'))
|
|
256
256
|
break
|
|
257
257
|
case 'LOGIN_MODE':
|
|
258
|
-
this.$message.error($lc('
|
|
258
|
+
this.$message.error($lc('登录方式至少勾选一种方式'))
|
|
259
259
|
break
|
|
260
260
|
}
|
|
261
261
|
},
|
|
@@ -292,7 +292,7 @@ export default {
|
|
|
292
292
|
let secondsToGo = 5
|
|
293
293
|
this.$message({
|
|
294
294
|
type: 'success',
|
|
295
|
-
message: `设置成功,系统将在 ${secondsToGo}
|
|
295
|
+
message: `设置成功,系统将在 ${secondsToGo} 秒后退出到登录页面.`
|
|
296
296
|
})
|
|
297
297
|
const interval = setInterval(() => {
|
|
298
298
|
secondsToGo -= 1
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<div class="flex-box" style="height: 100%; overflow: auto">
|
|
4
4
|
<div class="bd-r" style="width: 290px">
|
|
5
5
|
<div class="flex-box flex-v p-l">
|
|
6
|
-
<span
|
|
6
|
+
<span>登录页设置</span>
|
|
7
7
|
<el-button class="m-l-auto bd-none" plain size="mini" @click="addItem"
|
|
8
8
|
><i class="n20-icon-xinzeng m-r-ss"></i>新增</el-button
|
|
9
9
|
>
|
|
@@ -89,7 +89,7 @@ export default {
|
|
|
89
89
|
})
|
|
90
90
|
},
|
|
91
91
|
async addItem() {
|
|
92
|
-
let { value } = await this.$prompt('
|
|
92
|
+
let { value } = await this.$prompt('请输入登录页名称', '新增', {
|
|
93
93
|
confirmButtonText: '确定',
|
|
94
94
|
cancelButtonText: '取消'
|
|
95
95
|
})
|
|
@@ -98,7 +98,7 @@ export default {
|
|
|
98
98
|
this.Init(value)
|
|
99
99
|
},
|
|
100
100
|
async updateItem(item) {
|
|
101
|
-
let { value } = await this.$prompt('
|
|
101
|
+
let { value } = await this.$prompt('请输入登录页名称', '修改', {
|
|
102
102
|
confirmButtonText: '确定',
|
|
103
103
|
cancelButtonText: '取消',
|
|
104
104
|
inputValue: item.logName
|
|
@@ -3,25 +3,12 @@
|
|
|
3
3
|
<div class="p-l-lg" style="overflow: auto">
|
|
4
4
|
<el-form ref="form" :model="form" class="m-l-lg" label-position="top">
|
|
5
5
|
<el-form-item
|
|
6
|
-
label="
|
|
6
|
+
label="登录页URL"
|
|
7
7
|
prop="LOGIN_URL"
|
|
8
|
-
:rules="{ required: true, message: '
|
|
8
|
+
:rules="{ required: true, message: '登录页URL不能为空', trigger: 'change' }"
|
|
9
9
|
>
|
|
10
10
|
<el-input v-model="form.LOGIN_URL" class="input-w-u" clearable />
|
|
11
11
|
</el-form-item>
|
|
12
|
-
<el-form-item
|
|
13
|
-
label="登录方式设置"
|
|
14
|
-
prop="LOGIN_MODE"
|
|
15
|
-
:rules="{ type: 'array', required: true, message: '至少选择一种登录方式', trigger: 'change' }"
|
|
16
|
-
>
|
|
17
|
-
<span slot="label"
|
|
18
|
-
><span>登录方式设置</span
|
|
19
|
-
><span class="color-danger m-l-s f-s-s">({{ '至少选择一种登录方式' | $lc }})</span></span
|
|
20
|
-
>
|
|
21
|
-
<el-checkbox-group v-model="form.LOGIN_MODE">
|
|
22
|
-
<el-checkbox v-for="item in plainOptions" :key="item.value" :label="item.value">{{ item.label }}</el-checkbox>
|
|
23
|
-
</el-checkbox-group>
|
|
24
|
-
</el-form-item>
|
|
25
12
|
<el-form-item
|
|
26
13
|
label="集团名称设置"
|
|
27
14
|
prop="GROUP_NAME"
|
|
@@ -29,105 +16,120 @@
|
|
|
29
16
|
>
|
|
30
17
|
<el-input v-model="form.GROUP_NAME" class="input-w-u" clearable />
|
|
31
18
|
</el-form-item>
|
|
32
|
-
<el-form-item
|
|
33
|
-
|
|
34
|
-
prop="LOGIN_SLOGAN"
|
|
35
|
-
:rules="{ required: true, message: '登录首页文字显示信息不能为空', trigger: 'change' }"
|
|
36
|
-
>
|
|
37
|
-
<el-input v-model="form.LOGIN_SLOGAN" class="input-w-u" clearable />
|
|
19
|
+
<el-form-item label="登录首页文字显示信息">
|
|
20
|
+
<el-input v-model="form.LOGIN_SLOGAN" type="textarea" class="input-w-u" rows="1" />
|
|
38
21
|
</el-form-item>
|
|
39
22
|
<el-form-item
|
|
40
23
|
label="登录背景图片设置"
|
|
41
24
|
prop="LOGIN_BG"
|
|
42
25
|
:rules="{ required: true, message: '登录背景图片不能为空', trigger: 'change' }"
|
|
43
26
|
>
|
|
44
|
-
<
|
|
45
|
-
:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
27
|
+
<div class="login-form-bg-box">
|
|
28
|
+
<img :key="key_1" class="login-preview" :src="form.LOGIN_BG" />
|
|
29
|
+
<div>
|
|
30
|
+
<div class="flex-box">
|
|
31
|
+
<span class="m-r">上传图片</span>
|
|
32
|
+
<cl-upload
|
|
33
|
+
:action="`/bems/1.0/upload/${idNo}_bg`"
|
|
34
|
+
:file-url.sync="form.LOGIN_BG"
|
|
35
|
+
accept="image/*"
|
|
36
|
+
msg-type="message"
|
|
37
|
+
placeholder="选择附件"
|
|
38
|
+
:on-success="() => (key_1 = key_1 + 1)"
|
|
39
|
+
/>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="color-placeholder f-s-s">建议图片尺寸:1920*1080,支持图片格式:png、jpg、bmp、svg。</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
58
44
|
</el-form-item>
|
|
59
45
|
<el-form-item
|
|
60
46
|
label="公司LOGO图片设置"
|
|
61
47
|
prop="LOGIN_LOGO"
|
|
62
48
|
:rules="{ required: true, message: '公司LOGO图片不能为空', trigger: 'change' }"
|
|
63
49
|
>
|
|
64
|
-
<
|
|
65
|
-
:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<div class="bd-l bd-t bd-r m-t-lg m-b">
|
|
81
|
-
<el-table :data="form.SYSTEM_LIST" highlight-current-row @row-click="sltRow">
|
|
82
|
-
<el-table-column label="系统名称" prop="NAME" />
|
|
83
|
-
<el-table-column label="是否在登陆页显示" align="center">
|
|
84
|
-
<template slot-scope="{ row }">
|
|
85
|
-
<el-switch v-model="row.OPEN" @change="openCg" />
|
|
86
|
-
</template>
|
|
87
|
-
</el-table-column>
|
|
88
|
-
</el-table>
|
|
50
|
+
<div class="login-form-bg-box">
|
|
51
|
+
<img :key="key_1" class="login-preview" :src="form.LOGIN_LOGO" />
|
|
52
|
+
<div>
|
|
53
|
+
<div class="flex-box">
|
|
54
|
+
<span class="m-r">上传图片</span>
|
|
55
|
+
<cl-upload
|
|
56
|
+
:action="`/bems/1.0/upload/${idNo}_logo`"
|
|
57
|
+
:file-url.sync="form.LOGIN_LOGO"
|
|
58
|
+
accept="image/*"
|
|
59
|
+
msg-type="message"
|
|
60
|
+
placeholder="选择附件"
|
|
61
|
+
:on-success="() => (key_2 = key_2 + 1)"
|
|
62
|
+
/>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="color-placeholder f-s-s">建议图片尺寸:108*30,支持图片格式:png、jpg、bmp、svg。</div>
|
|
65
|
+
</div>
|
|
89
66
|
</div>
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
>
|
|
94
|
-
<el-
|
|
95
|
-
|
|
96
|
-
<
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
67
|
+
</el-form-item>
|
|
68
|
+
|
|
69
|
+
<div class="bd-l bd-t bd-r m-t-lg m-b">
|
|
70
|
+
<el-table :data="form.SYSTEM_LIST">
|
|
71
|
+
<el-table-column label="系统名称" prop="NAME" />
|
|
72
|
+
<el-table-column label="是否在登录页显示" align="center">
|
|
73
|
+
<template slot-scope="{ row }">
|
|
74
|
+
<el-switch v-model="row.OPEN" />
|
|
75
|
+
</template>
|
|
76
|
+
</el-table-column>
|
|
77
|
+
</el-table>
|
|
78
|
+
</div>
|
|
79
|
+
<el-form-item
|
|
80
|
+
label="页面展示方式"
|
|
81
|
+
:rules="{ required: true, message: '页面展示方式不能为空', trigger: 'change' }"
|
|
82
|
+
>
|
|
83
|
+
<el-select v-model="form.LOGIN_TYPE" class="input-w-u">
|
|
84
|
+
<el-option label="左右切换" value="T1" />
|
|
85
|
+
<el-option label="平铺展示" value="T2" />
|
|
86
|
+
</el-select>
|
|
87
|
+
</el-form-item>
|
|
88
|
+
<cl-expandable-pane title="系统详情设置" title-class="m-t-0">
|
|
89
|
+
<template v-for="(systemItem, i) in form.SYSTEM_LIST">
|
|
90
|
+
<div v-if="systemItem.OPEN" :key="i">
|
|
91
|
+
<el-form-item
|
|
92
|
+
label="系统名称设置"
|
|
93
|
+
:prop="`SYSTEM_LIST.${i}.NAME`"
|
|
94
|
+
:rules="{ required: true, message: '系统名称不能为空', trigger: 'change' }"
|
|
112
95
|
>
|
|
113
|
-
<
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
96
|
+
<el-input ref="sys-name" v-model="systemItem.NAME" class="input-w-u" clearable />
|
|
97
|
+
</el-form-item>
|
|
98
|
+
<el-form-item label="系统标识图片设置" class="is-required">
|
|
99
|
+
<div class="login-form-bg-box">
|
|
100
|
+
<img :key="keyS[i]" class="login-preview" :src="systemItem.ICON || `/server-assets/N0${i + 1}.png`" />
|
|
101
|
+
<div>
|
|
102
|
+
<div class="flex-box">
|
|
103
|
+
<span class="m-r">上传图片</span>
|
|
104
|
+
<cl-upload
|
|
105
|
+
:action="`/bems/1.0/upload/${idNo}_${systemItem.NO}_icon`"
|
|
106
|
+
:file-url.sync="systemItem.ICON"
|
|
107
|
+
accept="image/*"
|
|
108
|
+
msg-type="message"
|
|
109
|
+
placeholder="选择附件"
|
|
110
|
+
:on-success="() => (keyS[i] = keyS[i] + 1)"
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="color-placeholder f-s-s">建议图片尺寸:80*80,支持图片格式:png、jpg、bmp、svg。</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</el-form-item>
|
|
117
|
+
<el-form-item
|
|
118
|
+
label="登录方式设置"
|
|
119
|
+
:prop="`SYSTEM_LIST.${i}.LOGIN_MODE`"
|
|
120
|
+
:rules="{ type: 'array', required: true, message: '至少选择一种登录方式', trigger: 'change' }"
|
|
124
121
|
>
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
122
|
+
<span slot="label"
|
|
123
|
+
><span>登录方式设置</span
|
|
124
|
+
><span class="color-danger m-l-s f-s-s">({{ '至少选择一种登录方式' | $lc }})</span></span
|
|
125
|
+
>
|
|
126
|
+
<el-checkbox-group v-model="systemItem.LOGIN_MODE">
|
|
127
|
+
<el-checkbox v-for="item in plainOptions" :key="item.value" :label="item.value">{{
|
|
128
|
+
item.label
|
|
129
|
+
}}</el-checkbox>
|
|
130
|
+
</el-checkbox-group>
|
|
131
|
+
</el-form-item>
|
|
132
|
+
</div>
|
|
131
133
|
</template>
|
|
132
134
|
</cl-expandable-pane>
|
|
133
135
|
</el-form>
|
|
@@ -152,69 +154,67 @@ export default {
|
|
|
152
154
|
this.setingId = {}
|
|
153
155
|
return {
|
|
154
156
|
userNo: sessionStorage.getItem('userNo'),
|
|
155
|
-
loginTypeDisabled: false,
|
|
156
157
|
form: {
|
|
157
158
|
LOGIN_URL: '',
|
|
158
|
-
LOGIN_MODE: [],
|
|
159
159
|
GROUP_NAME: '',
|
|
160
160
|
LOGIN_SLOGAN: '',
|
|
161
|
-
LOGIN_BG:
|
|
162
|
-
LOGIN_LOGO:
|
|
161
|
+
LOGIN_BG: '',
|
|
162
|
+
LOGIN_LOGO: '',
|
|
163
163
|
LOGIN_TYPE: 'T1',
|
|
164
164
|
SYSTEM_LIST: [
|
|
165
165
|
{
|
|
166
166
|
NO: 'CSZHYW',
|
|
167
167
|
NAME: '财司综合业务系统',
|
|
168
|
-
ICON:
|
|
168
|
+
ICON: '',
|
|
169
169
|
LOGIN_MODE: [],
|
|
170
170
|
OPEN: true
|
|
171
171
|
},
|
|
172
172
|
{
|
|
173
173
|
NO: 'CSYWGL',
|
|
174
174
|
NAME: '财司业务管理系统',
|
|
175
|
-
ICON:
|
|
175
|
+
ICON: '',
|
|
176
176
|
LOGIN_MODE: [],
|
|
177
177
|
OPEN: false
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
NO: 'CSFZJC',
|
|
181
181
|
NAME: '财司辅助决策系统',
|
|
182
|
-
ICON:
|
|
182
|
+
ICON: '',
|
|
183
183
|
LOGIN_MODE: [],
|
|
184
184
|
OPEN: false
|
|
185
185
|
},
|
|
186
186
|
{
|
|
187
187
|
NO: 'CSWY',
|
|
188
188
|
NAME: '财司网银系统',
|
|
189
|
-
ICON:
|
|
189
|
+
ICON: '',
|
|
190
190
|
LOGIN_MODE: [],
|
|
191
191
|
OPEN: false
|
|
192
192
|
},
|
|
193
193
|
{
|
|
194
194
|
NO: 'JTZL',
|
|
195
195
|
NAME: '财司直连平台系统',
|
|
196
|
-
ICON:
|
|
196
|
+
ICON: '',
|
|
197
197
|
LOGIN_MODE: [],
|
|
198
198
|
OPEN: false
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
NO: 'JRWG',
|
|
202
202
|
NAME: '金融网管系统',
|
|
203
|
-
ICON:
|
|
203
|
+
ICON: '',
|
|
204
204
|
LOGIN_MODE: [],
|
|
205
205
|
OPEN: false
|
|
206
206
|
},
|
|
207
207
|
{
|
|
208
208
|
NO: 'JTSKYWGK',
|
|
209
209
|
NAME: '集团司库业务管控系统',
|
|
210
|
-
ICON:
|
|
210
|
+
ICON: '',
|
|
211
211
|
LOGIN_MODE: [],
|
|
212
212
|
OPEN: false
|
|
213
213
|
},
|
|
214
214
|
{
|
|
215
215
|
NO: 'JTSKSJFX',
|
|
216
216
|
NAME: '集团数据分析系统',
|
|
217
|
-
ICON:
|
|
217
|
+
ICON: '',
|
|
218
218
|
LOGIN_MODE: [],
|
|
219
219
|
OPEN: false
|
|
220
220
|
}
|
|
@@ -226,7 +226,10 @@ export default {
|
|
|
226
226
|
{ label: $lc('二维码扫码登录'), value: 'qrcode' },
|
|
227
227
|
{ label: $lc('账户密码验证码登录'), value: 'accountPthon' }
|
|
228
228
|
],
|
|
229
|
-
systemItem: undefined
|
|
229
|
+
systemItem: undefined,
|
|
230
|
+
key_1: 0,
|
|
231
|
+
key_2: 0,
|
|
232
|
+
keyS: [0, 0, 0, 0, 0, 0, 0, 0]
|
|
230
233
|
}
|
|
231
234
|
},
|
|
232
235
|
created() {
|
|
@@ -270,34 +273,19 @@ export default {
|
|
|
270
273
|
})
|
|
271
274
|
}
|
|
272
275
|
}
|
|
273
|
-
this.openCg()
|
|
274
|
-
|
|
275
276
|
// this.$axios.get(`/bems/1.0/download/${this.idNo}_bg`, null, { responseType: 'blob' })
|
|
276
277
|
})
|
|
277
278
|
},
|
|
278
279
|
sltRow(row) {
|
|
279
280
|
this.systemItem = row
|
|
280
281
|
},
|
|
281
|
-
openCg() {
|
|
282
|
-
if (this.form.SYSTEM_LIST.filter((d) => d.OPEN).length <= 1) {
|
|
283
|
-
this.form.LOGIN_TYPE = 'T0'
|
|
284
|
-
this.loginTypeDisabled = true
|
|
285
|
-
} else {
|
|
286
|
-
this.loginTypeDisabled = false
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
async save() {
|
|
290
|
-
await this.$refs['form'].validate()
|
|
291
|
-
let errItem = this.form.SYSTEM_LIST.find((d) => d.OPEN && !d.NAME)
|
|
292
|
-
if (errItem) {
|
|
293
|
-
this.systemItem = errItem
|
|
294
|
-
this.$nextTick(() => {
|
|
295
|
-
this.$refs['sys-name'].focus()
|
|
296
|
-
})
|
|
297
|
-
this.$message.error($lc('系统名称设置不能为空'))
|
|
298
|
-
return
|
|
299
|
-
}
|
|
300
282
|
|
|
283
|
+
async save() {
|
|
284
|
+
let vPro = this.$refs['form'].validate()
|
|
285
|
+
vPro.catch(() => {
|
|
286
|
+
this.$message.error($lc('必填项不能为空'))
|
|
287
|
+
})
|
|
288
|
+
await vPro
|
|
301
289
|
let data = []
|
|
302
290
|
for (let k in this.form) {
|
|
303
291
|
if (k !== 'SYSTEM_LIST') {
|
|
@@ -334,7 +322,7 @@ export default {
|
|
|
334
322
|
let secondsToGo = 5
|
|
335
323
|
this.$message({
|
|
336
324
|
type: 'success',
|
|
337
|
-
message: `设置成功,系统将在 ${secondsToGo}
|
|
325
|
+
message: `设置成功,系统将在 ${secondsToGo} 秒后退出到登录页面.`
|
|
338
326
|
})
|
|
339
327
|
const interval = setInterval(() => {
|
|
340
328
|
secondsToGo -= 1
|
|
@@ -355,4 +343,19 @@ export default {
|
|
|
355
343
|
.input-w-u {
|
|
356
344
|
width: 430px;
|
|
357
345
|
}
|
|
346
|
+
.login-form-bg-box {
|
|
347
|
+
display: flex;
|
|
348
|
+
align-items: flex-end;
|
|
349
|
+
}
|
|
350
|
+
.login-preview {
|
|
351
|
+
width: 125px;
|
|
352
|
+
height: 125px;
|
|
353
|
+
margin-right: 16px;
|
|
354
|
+
}
|
|
355
|
+
.login-preview:hover {
|
|
356
|
+
background: rgba(0, 0, 0, 0.1);
|
|
357
|
+
}
|
|
358
|
+
::v-deep .el-upload {
|
|
359
|
+
width: 220px;
|
|
360
|
+
}
|
|
358
361
|
</style>
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
<div class="sys-carousel">
|
|
35
35
|
<div class="swiper-wrapper">
|
|
36
|
-
<div v-for="(item, i) in
|
|
37
|
-
<div class="sys-item" :onclick="`loginSwiperSys(${i})`">
|
|
36
|
+
<div v-for="(item, i) in systemListAs" :key="i" class="swiper-slide">
|
|
37
|
+
<div class="sys-item" :onclick="`loginSwiperSys(${i},'${item.NO}')`">
|
|
38
38
|
<div class="sys-item-title flex-box flex-v flex-c">
|
|
39
39
|
<span>{{ item.NAME }}</span>
|
|
40
40
|
</div>
|
|
@@ -303,6 +303,13 @@ export default {
|
|
|
303
303
|
systemList() {
|
|
304
304
|
return this.form.SYSTEM_LIST.filter((d) => d.OPEN)
|
|
305
305
|
},
|
|
306
|
+
systemListAs() {
|
|
307
|
+
if (this.systemList.length === 2) {
|
|
308
|
+
return [...this.systemList, ...this.systemList, ...this.systemList]
|
|
309
|
+
} else {
|
|
310
|
+
return this.systemList
|
|
311
|
+
}
|
|
312
|
+
},
|
|
306
313
|
extraForm() {
|
|
307
314
|
let form = {}
|
|
308
315
|
if (this?.sltSys?.NO) {
|
|
@@ -398,6 +405,10 @@ export default {
|
|
|
398
405
|
}
|
|
399
406
|
this.jsonData = _layoutData
|
|
400
407
|
|
|
408
|
+
if (this.systemList.length <= 1) {
|
|
409
|
+
this.$set(this.form, 'LOGIN_TYPE', 'T0')
|
|
410
|
+
}
|
|
411
|
+
|
|
401
412
|
this.$nextTick(() => {
|
|
402
413
|
let systemNo = localStorage.getItem('pageInSystemNo')
|
|
403
414
|
let acSysI = this.systemList.findIndex((s) => s.NO === systemNo)
|
|
@@ -469,9 +480,10 @@ export default {
|
|
|
469
480
|
centeredSlides: true,
|
|
470
481
|
loop: true
|
|
471
482
|
})
|
|
472
|
-
window.loginSwiperSys = (i) => {
|
|
483
|
+
window.loginSwiperSys = (i, NO) => {
|
|
473
484
|
this.swiper.slideTo(i + 3)
|
|
474
|
-
this.
|
|
485
|
+
let item = this.systemList.find((s) => (s.NO = NO))
|
|
486
|
+
this.selSystem(item)
|
|
475
487
|
}
|
|
476
488
|
},
|
|
477
489
|
slidePrev() {
|
|
@@ -274,12 +274,12 @@ export default {
|
|
|
274
274
|
}
|
|
275
275
|
},
|
|
276
276
|
successFn(response, file, fileList) {
|
|
277
|
+
this.fileNameC = this.multiple ? '' : file.name
|
|
278
|
+
this.fileUrlC = response.data
|
|
279
|
+
this.fileList = fileList
|
|
280
|
+
|
|
277
281
|
if (this.onSuccess) {
|
|
278
282
|
this.onSuccess(response, file, fileList)
|
|
279
|
-
} else {
|
|
280
|
-
this.fileNameC = this.multiple ? '' : file.name
|
|
281
|
-
this.fileUrlC = response.data
|
|
282
|
-
this.fileList = fileList
|
|
283
283
|
}
|
|
284
284
|
|
|
285
285
|
if (this.msgType === 'dialog') {
|
package/src/i18n.json
CHANGED
|
@@ -1466,7 +1466,7 @@
|
|
|
1466
1466
|
"登录首页文字显示信息不能为空": {
|
|
1467
1467
|
"en": "Login homepage text display information cannot be empty"
|
|
1468
1468
|
},
|
|
1469
|
-
"
|
|
1470
|
-
"en": "
|
|
1469
|
+
"登录方式至少勾选一种方式": {
|
|
1470
|
+
"en": "Check at least one login method"
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
package/src/utils/axios.js
CHANGED
|
@@ -63,26 +63,23 @@ axios.interceptors.request.use((opt) => {
|
|
|
63
63
|
return opt
|
|
64
64
|
})
|
|
65
65
|
|
|
66
|
-
function errorFn(status, msg, noMsg) {
|
|
67
|
-
if (status === 401) {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
66
|
+
function errorFn(status, msg, noMsg, isErr) {
|
|
67
|
+
if (status === 401 || (msg.includes('401') && isErr)) {
|
|
68
|
+
noMsg || showMsg($lc('超时未操作,请重新登录!'))
|
|
69
|
+
setTimeout(() => {
|
|
70
|
+
if (navigator.userAgent.includes('NSTC-WebEntry')) {
|
|
71
71
|
localStorage.clear()
|
|
72
72
|
sessionStorage.clear()
|
|
73
73
|
window.top.webQuit()
|
|
74
|
-
}
|
|
75
|
-
} else {
|
|
76
|
-
noMsg || showMsg($lc('超时未操作,请重新登录!'))
|
|
77
|
-
setTimeout(() => {
|
|
74
|
+
} else {
|
|
78
75
|
auth.removeToken()
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
} else if (status === 400) {
|
|
76
|
+
}
|
|
77
|
+
}, 1000)
|
|
78
|
+
} else if (status === 400 || (msg.includes('400') && isErr)) {
|
|
82
79
|
noMsg || showMsg($lc('400,参数错误!'))
|
|
83
|
-
} else if (status === 404) {
|
|
80
|
+
} else if (status === 404 || (msg.includes('404') && isErr)) {
|
|
84
81
|
noMsg || showMsg($lc('404,网络连接失败!'))
|
|
85
|
-
} else if (status === 500) {
|
|
82
|
+
} else if (status === 500 || (msg.includes('500') && isErr)) {
|
|
86
83
|
noMsg || showMsg($lc('500,服务器链接失败!'))
|
|
87
84
|
} else if (status === 'ECONNABORTED' && msg.includes('timeout')) {
|
|
88
85
|
showMsg($lc('请求超时'))
|
|
@@ -111,7 +108,7 @@ axios.interceptors.response.use(
|
|
|
111
108
|
let msg = err.message || ''
|
|
112
109
|
let noMsg = err.config && err.config.noMsg
|
|
113
110
|
|
|
114
|
-
return errorFn(status, msg, noMsg)
|
|
111
|
+
return errorFn(status, msg, noMsg, true)
|
|
115
112
|
}
|
|
116
113
|
)
|
|
117
114
|
|