cloud-web-corejs 1.0.54-dev.196 → 1.0.54-dev.198
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/excelExport/mixins.js +3 -1
- package/src/components/table/index.js +3 -3
- package/src/components/table/index2.js +1371 -0
- package/src/components/table/util/index.js +328 -0
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +4 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +7 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +8 -2
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +6 -0
- package/src/layout/components/AppMain.vue +5 -1
- package/src/layout/components/watermark/index.vue +77 -0
- package/src/views/bd/setting/bd_attach_setting/edit.vue +2 -2
- package/src/views/bd/setting/bd_attach_setting/mixins/list.js +219 -1
- package/src/views/bd/setting/form_script/edit.vue +2 -2
- package/src/views/bd/setting/form_script/edit1.vue +2 -2
- package/src/views/bd/setting/form_script/mixins/form_list.js +283 -1
- package/src/views/bd/setting/form_script/mixins/list.js +191 -1
- package/src/views/bd/setting/form_script/mixins/list1.js +347 -1
- package/src/views/bd/setting/form_template/edit.vue +2 -2
- package/src/views/bd/setting/form_template/mixins/list.js +600 -1
- package/src/views/bd/setting/table_model/mixins/list.js +365 -1
- package/src/views/user/login/default.vue +31 -2
- package/src/views/user/login/indexMixin.js +114 -3
- package/src/views/user/project_tag/list.vue +9 -4
- package/src/views/user/login/index2.vue +0 -131
@@ -1,7 +1,7 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="login-container" :class="backgroundClass" ref="login-container" v-show="showContent">
|
3
3
|
<div class="login-main" style="height: auto;">
|
4
|
-
<el-tabs v-model="activeName">
|
4
|
+
<el-tabs v-model="activeName" @tab-click="changeTab">
|
5
5
|
<el-tab-pane label="账号登录" name="first">
|
6
6
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="box-form login" autocomplete="on"
|
7
7
|
label-position="left">
|
@@ -37,7 +37,7 @@
|
|
37
37
|
<el-button :loading="loading" type="primary" @click.prevent.stop="handleLogin" class="btn">登录</el-button>
|
38
38
|
</el-form>
|
39
39
|
</el-tab-pane>
|
40
|
-
<el-tab-pane label="
|
40
|
+
<el-tab-pane label="手机登录" name="second" v-if="settingConfig.mobileLoginEnabled">
|
41
41
|
<el-form ref="loginForm" :model="loginForm2" :rules="loginRules" class="box-form login" autocomplete="on"
|
42
42
|
label-position="left">
|
43
43
|
<el-form-item prop="username" class="txt" style="width:66%">
|
@@ -56,6 +56,13 @@
|
|
56
56
|
<el-button :loading="loading" type="primary" @click.prevent.stop="handleLogin" class="btn">登录</el-button>
|
57
57
|
</el-form>
|
58
58
|
</el-tab-pane>
|
59
|
+
<el-tab-pane label="扫码登录" name="third" v-if="settingConfig.qrLoginEnabled">
|
60
|
+
<div class="login-qr">
|
61
|
+
<img class="qr__img" :src="qrBase64" v-if="activeName==='third'"/>
|
62
|
+
<span class="qr__txt">扫一扫,登录系统</span>
|
63
|
+
<div v-if="qrExpired" @click="initQR" class="qr__lose"><span><i class="el-icon-refresh"></i>二维码失效</span></div>
|
64
|
+
</div>
|
65
|
+
</el-tab-pane>
|
59
66
|
</el-tabs>
|
60
67
|
</div>
|
61
68
|
<div class="tc copyright">
|
@@ -128,4 +135,26 @@ export default {
|
|
128
135
|
color: #8a8686;
|
129
136
|
}
|
130
137
|
}
|
138
|
+
|
139
|
+
::v-deep .login-main .el-tabs__header .el-tabs__nav .el-tabs__item {
|
140
|
+
width: 33%;
|
141
|
+
}
|
142
|
+
.login-qr{height: 305px;text-align: center;position: relative;
|
143
|
+
.qr__img{width: 220px;margin-top:25px;}
|
144
|
+
.qr__txt{color: #666;font-size: 15px;display: block;}
|
145
|
+
.qr__lose{
|
146
|
+
position: absolute;cursor: pointer;
|
147
|
+
width: 192px;
|
148
|
+
height: 192px;
|
149
|
+
background: rgb(255 255 255 / 76%);
|
150
|
+
top: 40px;
|
151
|
+
left: 136px;
|
152
|
+
color: #000;
|
153
|
+
line-height: 64px;
|
154
|
+
font-weight: 600;
|
155
|
+
font-size: 26px;
|
156
|
+
span{line-height: 1;margin-top:30px;}
|
157
|
+
i{display: block;font-size:42px;margin-top: 46px;}
|
158
|
+
}
|
159
|
+
}
|
131
160
|
</style>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import {encode} from "js-base64";
|
2
2
|
import settingConfig from "@/settings";
|
3
|
+
import QRcode from "qrcode";
|
3
4
|
|
4
5
|
function getUrlParams(url) {
|
5
6
|
let result = {};
|
@@ -19,6 +20,7 @@ export default {
|
|
19
20
|
isCounting: false,
|
20
21
|
countdown: 0,
|
21
22
|
buttonText: '获取验证码',
|
23
|
+
smsTimer: null,
|
22
24
|
isRememberPassword: false,
|
23
25
|
loginForm: {
|
24
26
|
username: '',
|
@@ -54,7 +56,15 @@ export default {
|
|
54
56
|
},
|
55
57
|
activeName: "first",
|
56
58
|
searchParam: {},
|
57
|
-
showContent: true
|
59
|
+
showContent: true,
|
60
|
+
|
61
|
+
qrTimer1: null,
|
62
|
+
qrTimer2: null,
|
63
|
+
qrContent: null,
|
64
|
+
qrCodeFlag: 0,
|
65
|
+
qrBase64: "",
|
66
|
+
settingConfig: settingConfig,
|
67
|
+
qrExpired: false
|
58
68
|
};
|
59
69
|
},
|
60
70
|
watch: {
|
@@ -69,6 +79,10 @@ export default {
|
|
69
79
|
immediate: true
|
70
80
|
}
|
71
81
|
},
|
82
|
+
beforeDestroy() {
|
83
|
+
this.clearQrLoginTimer();
|
84
|
+
this.clearSmsTimer();
|
85
|
+
},
|
72
86
|
created() {
|
73
87
|
this.init();
|
74
88
|
},
|
@@ -110,6 +124,7 @@ export default {
|
|
110
124
|
if (e.keyCode == 13 && e.target.nodeName != 'INPUT') {
|
111
125
|
let closeBtn = document.querySelector('.el-dialog__close');
|
112
126
|
closeBtn && closeBtn.click();
|
127
|
+
if (this.activeName == "third") return
|
113
128
|
this.handleLogin();
|
114
129
|
}
|
115
130
|
},
|
@@ -325,6 +340,7 @@ export default {
|
|
325
340
|
this.$baseAlert("请输入手机号");
|
326
341
|
return
|
327
342
|
}
|
343
|
+
|
328
344
|
this.$http({
|
329
345
|
url: USER_PREFIX + '/auth/sendSmsCode',
|
330
346
|
method: `post`,
|
@@ -339,11 +355,12 @@ export default {
|
|
339
355
|
this.isCounting = true
|
340
356
|
this.countdown = 60
|
341
357
|
this.buttonText = '60秒后重新获取'
|
342
|
-
|
358
|
+
this.clearSmsTimer();
|
359
|
+
this.smsTimer = setInterval(() => {
|
343
360
|
this.countdown--;
|
344
361
|
this.buttonText = this.countdown + '秒后重新获取'
|
345
362
|
if (this.countdown == 0) {
|
346
|
-
|
363
|
+
this.clearSmsTimer();
|
347
364
|
this.isCounting = false
|
348
365
|
this.buttonText = '获取验证码'
|
349
366
|
}
|
@@ -352,6 +369,12 @@ export default {
|
|
352
369
|
});
|
353
370
|
|
354
371
|
},
|
372
|
+
clearSmsTimer() {
|
373
|
+
if (this.smsTimer) {
|
374
|
+
clearInterval(this.smsTimer);
|
375
|
+
this.smsTimer = null;
|
376
|
+
}
|
377
|
+
},
|
355
378
|
mobileLogin() {
|
356
379
|
|
357
380
|
},
|
@@ -420,6 +443,94 @@ export default {
|
|
420
443
|
});
|
421
444
|
}
|
422
445
|
});
|
446
|
+
},
|
447
|
+
|
448
|
+
/**二维码登录begin*/
|
449
|
+
guid() {
|
450
|
+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (t) {
|
451
|
+
var e = 16 * Math.random() | 0;
|
452
|
+
return ("x" == t ? e : 3 & e | 8).toString(16);
|
453
|
+
});
|
454
|
+
},
|
455
|
+
initQR() {
|
456
|
+
this.clearQrLoginTimer();
|
457
|
+
this.qrCodeFlag = 0;
|
458
|
+
this.qrExpired = false;
|
459
|
+
let option = {width: 300, height: 300};
|
460
|
+
this.qrContent = this.guid();
|
461
|
+
this.createQR(this.qrContent, option).then(url => {
|
462
|
+
this.qrExpired = false;
|
463
|
+
this.qrBase64 = url
|
464
|
+
this.qrCodeFlag = 1;
|
465
|
+
this.createQrLoginTimer();
|
466
|
+
})
|
467
|
+
},
|
468
|
+
// 生成二维码
|
469
|
+
createQR(content, options) {
|
470
|
+
return new Promise((resolve, reject) => {
|
471
|
+
QRcode.toDataURL(content, options).then(url => {
|
472
|
+
resolve(url)
|
473
|
+
})
|
474
|
+
})
|
475
|
+
},
|
476
|
+
changeTab() {
|
477
|
+
// this.initQR();
|
478
|
+
// return
|
479
|
+
if (this.activeName == "third") {
|
480
|
+
this.initQR();
|
481
|
+
} else {
|
482
|
+
this.clearQrLoginTimer();
|
483
|
+
}
|
484
|
+
},
|
485
|
+
clearQrLoginTimer() {
|
486
|
+
if (this.qrTimer1) {
|
487
|
+
clearInterval(this.qrTimer1)
|
488
|
+
this.qrTimer1 = null;
|
489
|
+
}
|
490
|
+
if (this.qrTimer2) {
|
491
|
+
clearTimeout(this.qrTimer2)
|
492
|
+
this.qrTimer2 = null;
|
493
|
+
}
|
494
|
+
},
|
495
|
+
createQrLoginTimer() {
|
496
|
+
this.qrTimer1 = setInterval(() => {
|
497
|
+
this.checkQrLoginStatus();
|
498
|
+
}, 3000)
|
499
|
+
this.qrTimer2 = setTimeout(() => {
|
500
|
+
debugger
|
501
|
+
this.qrExpired = true;
|
502
|
+
this.clearQrLoginTimer();
|
503
|
+
}, 60000)
|
504
|
+
},
|
505
|
+
checkQrLoginStatus() {
|
506
|
+
if (this.qrExpired) return
|
507
|
+
if (this.qrCodeFlag !== 1) return
|
508
|
+
this.$http({
|
509
|
+
url: USER_PREFIX + '/auth/login',
|
510
|
+
method: `post`,
|
511
|
+
data: {as: this.qrContent},
|
512
|
+
// isLoading: true,
|
513
|
+
failMsg: false,
|
514
|
+
success: res => {
|
515
|
+
let token = res.objx;
|
516
|
+
if (token) {
|
517
|
+
this.$message({
|
518
|
+
message: "登录成功",
|
519
|
+
type: 'success'
|
520
|
+
});
|
521
|
+
this.clearQrLoginTimer();
|
522
|
+
this.$store.dispatch('user/addToken', {token}).then(res => {
|
523
|
+
localStorage.removeItem('currentMenuId');
|
524
|
+
this.rememberPassword();
|
525
|
+
this.loading = false;
|
526
|
+
window.removeEventListener('keydown', this.keyDown, false);
|
527
|
+
this.handleRedirectUrl();
|
528
|
+
});
|
529
|
+
}
|
530
|
+
}
|
531
|
+
});
|
423
532
|
}
|
533
|
+
/**二维码登录end*/
|
534
|
+
|
424
535
|
}
|
425
536
|
}
|
@@ -114,13 +114,13 @@ export default {
|
|
114
114
|
width: 250
|
115
115
|
},
|
116
116
|
{
|
117
|
-
field: '
|
118
|
-
title: this.$t1('
|
117
|
+
field: '_createBy',
|
118
|
+
title: this.$t1('创建人'),
|
119
119
|
width: 150
|
120
120
|
},
|
121
121
|
{
|
122
|
-
field: '
|
123
|
-
title: this.$t1('
|
122
|
+
field: 'createDate',
|
123
|
+
title: this.$t1('创建时间'),
|
124
124
|
width: 150
|
125
125
|
},
|
126
126
|
{
|
@@ -128,6 +128,11 @@ export default {
|
|
128
128
|
title: this.$t1('更新人'),
|
129
129
|
width: 150
|
130
130
|
},
|
131
|
+
{
|
132
|
+
field: 'modifyDate',
|
133
|
+
title: this.$t1('更新时间'),
|
134
|
+
width: 150
|
135
|
+
},
|
131
136
|
{
|
132
137
|
width: 47,
|
133
138
|
fixed: 'right',
|
@@ -1,131 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="login-container" :class="backgroundClass" ref="login-container" v-show="showContent">
|
3
|
-
<div class="login-main" style="height: auto;">
|
4
|
-
<el-tabs v-model="activeName">
|
5
|
-
<el-tab-pane label="账号登录" name="first">
|
6
|
-
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="box-form login" autocomplete="on"
|
7
|
-
label-position="left">
|
8
|
-
<el-form-item prop="username" class="txt">
|
9
|
-
<span class="svg-container"><i class="el-icon-user"/></span>
|
10
|
-
<el-input ref="username" v-model="loginForm.username" placeholder="请输入用户名" name="" type="text"
|
11
|
-
tabindex="1" autocomplete="on" @keyup.enter.native="handleLogin"/>
|
12
|
-
</el-form-item>
|
13
|
-
<el-tooltip :enterable="false" v-model="capsTooltip" content="Caps lock is On" placement="right" manual>
|
14
|
-
<el-form-item prop="password" class="txt">
|
15
|
-
<span class="svg-container"><i class="el-icon-lock"/></span>
|
16
|
-
<el-input
|
17
|
-
:key="passwordType"
|
18
|
-
ref="password"
|
19
|
-
v-model="loginForm.password"
|
20
|
-
:type="passwordType"
|
21
|
-
placeholder="请输入密码"
|
22
|
-
name=""
|
23
|
-
tabindex="2"
|
24
|
-
autocomplete="on"
|
25
|
-
auto-complete="new-password"
|
26
|
-
@keyup.native="checkCapslock"
|
27
|
-
@blur="capsTooltip = false"
|
28
|
-
@keyup.enter.native="handleLogin"
|
29
|
-
/>
|
30
|
-
<span class="show-pwd" @click="showPwd"><svg-icon
|
31
|
-
:icon-class="passwordType === 'password' ? 'eye' : 'eye-open'"/></span>
|
32
|
-
</el-form-item>
|
33
|
-
</el-tooltip>
|
34
|
-
<div class="">
|
35
|
-
<el-checkbox v-model="isRememberPassword">记住密码</el-checkbox>
|
36
|
-
</div>
|
37
|
-
<el-button :loading="loading" type="primary" @click.prevent.stop="handleLogin" class="btn">登录</el-button>
|
38
|
-
</el-form>
|
39
|
-
</el-tab-pane>
|
40
|
-
<el-tab-pane label="手机验证码登录" name="second">
|
41
|
-
<el-form ref="loginForm" :model="loginForm2" :rules="loginRules" class="box-form login" autocomplete="on"
|
42
|
-
label-position="left">
|
43
|
-
<el-form-item prop="username" class="txt" style="width:66%">
|
44
|
-
<span class="svg-container"><i class="el-icon-mobile-phone"/></span>
|
45
|
-
<el-input ref="mobile" v-model="loginForm2.username" placeholder="请输入手机号" name="" type="text"
|
46
|
-
tabindex="1" autocomplete="on" @keyup.enter.native="handleLogin"/>
|
47
|
-
</el-form-item>
|
48
|
-
<el-button class="btn-send" type="success" :class="{'gray-btn':isCounting}" @click="sendCode">
|
49
|
-
{{ buttonText }}
|
50
|
-
</el-button>
|
51
|
-
<el-form-item prop="smsCode" class="txt">
|
52
|
-
<span class="svg-container"><i class="el-icon-message"/></span>
|
53
|
-
<el-input ref="smsCode" v-model="loginForm2.smsCode" placeholder="请输入验证码" name="" type="text"
|
54
|
-
tabindex="1" autocomplete="on" @keyup.enter.native="handleLogin"/>
|
55
|
-
</el-form-item>
|
56
|
-
<el-button :loading="loading" type="primary" @click.prevent.stop="handleLogin" class="btn">登录</el-button>
|
57
|
-
</el-form>
|
58
|
-
</el-tab-pane>
|
59
|
-
</el-tabs>
|
60
|
-
</div>
|
61
|
-
<div class="tc copyright">
|
62
|
-
<slot name="footer">
|
63
|
-
© 广州同望科技发展有限公司
|
64
|
-
<span style="margin-left:50px;">4000646100</span>
|
65
|
-
</slot>
|
66
|
-
</div>
|
67
|
-
</div>
|
68
|
-
</template>
|
69
|
-
|
70
|
-
<script>
|
71
|
-
import mixin from "@base/views/user/login/indexMixin";
|
72
|
-
|
73
|
-
export default {
|
74
|
-
name: 'Login',
|
75
|
-
mixins: [mixin]
|
76
|
-
}
|
77
|
-
</script>
|
78
|
-
<style lang="scss" scoped>
|
79
|
-
@import '@/resources/css/login.scss';
|
80
|
-
|
81
|
-
.login-container.tc {
|
82
|
-
background: url(~@/resources/images/bg-login5.jpg) center center/cover no-repeat;
|
83
|
-
}
|
84
|
-
|
85
|
-
.login-container.chigo {
|
86
|
-
background: url(~@/resources/images/bg-login6.jpg) center center/cover no-repeat;
|
87
|
-
}
|
88
|
-
|
89
|
-
.login-container.pcp {
|
90
|
-
background: url(~@/resources/images/bg-login8.jpg) center center/cover no-repeat;
|
91
|
-
}
|
92
|
-
|
93
|
-
.el-select-dropdown {
|
94
|
-
right: 5px;
|
95
|
-
top: 25px;
|
96
|
-
}
|
97
|
-
|
98
|
-
::v-deep .login-main .el-tabs__header {
|
99
|
-
margin-bottom: 0;
|
100
|
-
|
101
|
-
.el-tabs__nav {
|
102
|
-
line-height: 65px;
|
103
|
-
margin: 0 25px;
|
104
|
-
width: calc(100% - 50px);
|
105
|
-
|
106
|
-
.el-tabs__item {
|
107
|
-
font-size: 18px;
|
108
|
-
width: 50%;
|
109
|
-
text-align: center;
|
110
|
-
margin-right: 0;
|
111
|
-
padding-right: 0 !important;
|
112
|
-
line-height: 65px;
|
113
|
-
height: 65px;
|
114
|
-
}
|
115
|
-
}
|
116
|
-
}
|
117
|
-
|
118
|
-
.btn-send {
|
119
|
-
position: absolute;
|
120
|
-
margin-top: -74px;
|
121
|
-
right: 35px;
|
122
|
-
height: 52px;
|
123
|
-
width: 27%;
|
124
|
-
|
125
|
-
&.gray-btn {
|
126
|
-
background: #dedede;
|
127
|
-
border-color: #dedede;
|
128
|
-
color: #8a8686;
|
129
|
-
}
|
130
|
-
}
|
131
|
-
</style>
|