cnhis-design-vue 2.1.24 → 2.1.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 +2287 -2287
- package/es/affix/index.js +8 -8
- package/es/age/index.js +10 -10
- package/es/alert/index.js +8 -8
- package/es/anchor/index.js +8 -8
- package/es/auto-complete/index.js +8 -8
- package/es/avatar/index.js +8 -8
- package/es/back-top/index.js +8 -8
- package/es/badge/index.js +8 -8
- package/es/base/index.js +8 -8
- package/es/big-table/index.js +164 -164
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +31 -31
- package/es/calendar/index.js +8 -8
- package/es/captcha/index.js +3 -3
- package/es/card/index.js +8 -8
- package/es/carousel/index.js +8 -8
- package/es/cascader/index.js +8 -8
- package/es/checkbox/index.js +9 -9
- package/es/col/index.js +8 -8
- package/es/collapse/index.js +8 -8
- package/es/color-picker/index.js +1 -1
- package/es/comment/index.js +8 -8
- package/es/config-provider/index.js +8 -8
- package/es/date-picker/index.js +8 -8
- package/es/descriptions/index.js +8 -8
- package/es/divider/index.js +8 -8
- package/es/drag-layout/index.js +3 -3
- package/es/drawer/index.js +8 -8
- package/es/dropdown/index.js +8 -8
- package/es/editor/index.js +30 -25
- package/es/editor/style.css +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +65 -49
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +93 -87
- package/es/form-table/style.css +1 -1
- package/es/index/index.js +803 -764
- package/es/index/style.css +1 -1
- package/es/input/index.js +9 -9
- package/es/input-number/index.js +8 -8
- package/es/layout/index.js +8 -8
- package/es/list/index.js +8 -8
- package/es/locale-provider/index.js +8 -8
- package/es/map/index.js +9 -9
- package/es/mentions/index.js +8 -8
- package/es/menu/index.js +8 -8
- package/es/message/index.js +8 -8
- package/es/multi-chat/index.js +92 -92
- package/es/multi-chat-client/index.js +86 -86
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +14 -14
- package/es/multi-chat-setting/index.js +27 -27
- package/es/multi-chat-sip/index.js +1 -1
- package/es/notification/index.js +8 -8
- package/es/page-header/index.js +8 -8
- package/es/pagination/index.js +8 -8
- package/es/popconfirm/index.js +8 -8
- package/es/popover/index.js +8 -8
- package/es/progress/index.js +8 -8
- package/es/radio/index.js +9 -9
- package/es/rate/index.js +8 -8
- package/es/result/index.js +8 -8
- package/es/row/index.js +8 -8
- package/es/scale-view/index.js +33 -33
- package/es/select/index.js +11 -11
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +20 -20
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/space/index.js +8 -8
- package/es/spin/index.js +8 -8
- package/es/statistic/index.js +8 -8
- package/es/steps/index.js +8 -8
- package/es/switch/index.js +8 -8
- package/es/table-filter/index.js +212 -200
- package/es/table-filter/style.css +1 -1
- package/es/tabs/index.js +8 -8
- package/es/tag/index.js +9 -9
- package/es/time-picker/index.js +8 -8
- package/es/timeline/index.js +8 -8
- package/es/tooltip/index.js +8 -8
- package/es/transfer/index.js +8 -8
- package/es/tree/index.js +8 -8
- package/es/tree-select/index.js +8 -8
- package/es/upload/index.js +8 -8
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +806 -767
- package/lib/cui.umd.js +806 -767
- package/lib/cui.umd.min.js +21 -21
- package/package.json +107 -107
- package/packages/big-table/src/BigTable.vue +3044 -3044
- package/packages/big-table/src/assets/style/table-base.less +370 -370
- package/packages/big-table/src/components/AutoLayoutButton.vue +270 -270
- package/packages/big-table/src/utils/batchEditing.js +610 -610
- package/packages/big-table/src/utils/bigTableProps.js +95 -95
- package/packages/button/src/ButtonPrint/components/IdentityVerification.vue +181 -181
- package/packages/button/src/ButtonPrint/index.vue +739 -739
- package/packages/editor/src/Editor.vue +13 -4
- package/packages/fabric-chart/src/components/TimeScaleValue.vue +113 -113
- package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +1079 -1066
- package/packages/fabric-chart/src/fabric-chart/FabricScaleValue.vue +135 -135
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +558 -558
- package/packages/fabric-chart/src/fabric-chart2/FabricTop.vue +172 -172
- package/packages/form-table/src/FormTable.vue +5 -1
- package/packages/multi-chat/chat/chatFooter.vue +1594 -1594
- package/packages/multi-chat/chat/chatMain.vue +1466 -1466
- package/packages/multi-chat/chat/quickReply.vue +439 -439
- package/packages/multi-chat/chat/scrollList.vue +1232 -1232
- package/packages/multi-chat/setting/baseInfo/index.vue +1316 -1316
- package/packages/multi-chat/store/actions.js +448 -448
- package/packages/multi-chat/store/state.js +112 -112
- package/packages/scale-view/formitem/r-choice.vue +714 -714
- package/packages/scale-view/scaleView.vue +2010 -2010
- package/packages/select-person/select-person.vue +1680 -1680
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +2468 -2468
- package/packages/table-filter/src/components/c-tree-select/tree-select.vue +336 -336
- package/packages/table-filter/src/components/multi-select/multi-select.vue +219 -219
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +340 -340
- package/packages/table-filter/src/components/search-condition/SearchCondition.vue +1825 -1825
- package/packages/table-filter/src/const/dataOptions.js +43 -43
- package/packages/table-filter/src/mixins/mixins.js +692 -695
- package/packages/table-filter/src/quick-search/QuickSearch.vue +2116 -2109
- package/src/directive/preventReClick.js +12 -12
|
@@ -1,95 +1,95 @@
|
|
|
1
|
-
const bigTableProps = {
|
|
2
|
-
data: { type: Array, default: () => [] },
|
|
3
|
-
MAX_CHECK_SIZE: [String, Number],
|
|
4
|
-
showFooter: Boolean,
|
|
5
|
-
sumData: { type: Object, default: () => ({}) },
|
|
6
|
-
avgData: { type: Object, default: () => ({}) },
|
|
7
|
-
columnConfig: {
|
|
8
|
-
type: Object,
|
|
9
|
-
default: () => {
|
|
10
|
-
return {};
|
|
11
|
-
}
|
|
12
|
-
},
|
|
13
|
-
refreshRow: Number,
|
|
14
|
-
relatedItems: {
|
|
15
|
-
type: Object,
|
|
16
|
-
default: () => {
|
|
17
|
-
return {
|
|
18
|
-
triggerMethodPc: '', // 相关项打开方式
|
|
19
|
-
triggerMethodField: '' // 相关项打开字段
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
pageVO: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default: () => {
|
|
26
|
-
return {
|
|
27
|
-
pageIndex: 1, // 当前第几页
|
|
28
|
-
pageSize: 20, // 每页几条数据
|
|
29
|
-
total: 20 // 总数多少条
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
tableOptions: { type: Object, default: () => ({}) },
|
|
34
|
-
quickSearchConfig: { type: Array, default: () => [] },
|
|
35
|
-
primaryKey: String,
|
|
36
|
-
tableDataCache: { type: Array, default: () => [] },
|
|
37
|
-
oldtableData: { type: Array, default: () => [] }, // 原始数据
|
|
38
|
-
tableName: String,
|
|
39
|
-
fieldListOriginal: { type: Array, default: () => [] },
|
|
40
|
-
tableParams: { type: Object, default: () => ({}) },
|
|
41
|
-
emptyItems: {
|
|
42
|
-
type: Object,
|
|
43
|
-
default: () => {
|
|
44
|
-
return {
|
|
45
|
-
noDataImg: 'nodata',
|
|
46
|
-
noDataTip: ''
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
styleSetting: { type: Object, default: () => ({}) },
|
|
51
|
-
sysImageSize: { type: Array, default: () => [] },
|
|
52
|
-
height: String,
|
|
53
|
-
groupCountFields: { type: Array, default: () => [] },
|
|
54
|
-
groupCountMap: { type: Object, default: () => ({}) },
|
|
55
|
-
listFormUnionSetting: { type: Object, default: () => ({}) },
|
|
56
|
-
inlineEditFormConfig: { type: Object, default: () => ({}) },
|
|
57
|
-
clickRowData: { type: Object, default: () => ({}) },
|
|
58
|
-
btnList: { type: Array, default: () => [] },
|
|
59
|
-
spinning: Boolean,
|
|
60
|
-
rowGroupSetting: { type: Object, default: () => ({}) },
|
|
61
|
-
isInlineOperating: Boolean,
|
|
62
|
-
inlineEditCurrentOperateBtnId: String,
|
|
63
|
-
tableRefreshCache: { type: Object, default: () => ({}) }, // 记录需要刷新的列表,当切换到当前列表时更新
|
|
64
|
-
userInfo: { type: Object, default: () => ({}) },
|
|
65
|
-
isInlineAdding: Boolean,
|
|
66
|
-
isRowEditing: Boolean,
|
|
67
|
-
pageIndexOldtableData: {
|
|
68
|
-
// 原始数据
|
|
69
|
-
type: Array,
|
|
70
|
-
default: () => []
|
|
71
|
-
},
|
|
72
|
-
submitForm: Function,
|
|
73
|
-
isMatchComponent: { type: Boolean, default: true }, // 为了兼容低代码(组件内部)与二次开发平台(vuex)
|
|
74
|
-
asyncCount: Boolean,
|
|
75
|
-
showSettings: { type: Object, default: () => ({}) },
|
|
76
|
-
filterDomPortal: { // 表头筛选挂载的地方
|
|
77
|
-
type: String,
|
|
78
|
-
default: "body"
|
|
79
|
-
},
|
|
80
|
-
filterTopOffset: { // 表头 top 调节
|
|
81
|
-
type: Number,
|
|
82
|
-
default: 0
|
|
83
|
-
},
|
|
84
|
-
editFormApiConfig: Object, // 编辑表格api
|
|
85
|
-
defaultEditAllRow: Boolean,
|
|
86
|
-
editTableUid: [String, Number],
|
|
87
|
-
curBatchBtnData: { type: Object, default: () => ({}) },
|
|
88
|
-
rowBtnAutoLayout:{// 行内按钮自适应布局
|
|
89
|
-
type: Boolean,
|
|
90
|
-
default: true
|
|
91
|
-
},
|
|
92
|
-
listCountParams:{ type: Object, default: () => ({}) },
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
export default bigTableProps;
|
|
1
|
+
const bigTableProps = {
|
|
2
|
+
data: { type: Array, default: () => [] },
|
|
3
|
+
MAX_CHECK_SIZE: [String, Number],
|
|
4
|
+
showFooter: Boolean,
|
|
5
|
+
sumData: { type: Object, default: () => ({}) },
|
|
6
|
+
avgData: { type: Object, default: () => ({}) },
|
|
7
|
+
columnConfig: {
|
|
8
|
+
type: Object,
|
|
9
|
+
default: () => {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
refreshRow: Number,
|
|
14
|
+
relatedItems: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: () => {
|
|
17
|
+
return {
|
|
18
|
+
triggerMethodPc: '', // 相关项打开方式
|
|
19
|
+
triggerMethodField: '' // 相关项打开字段
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
pageVO: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: () => {
|
|
26
|
+
return {
|
|
27
|
+
pageIndex: 1, // 当前第几页
|
|
28
|
+
pageSize: 20, // 每页几条数据
|
|
29
|
+
total: 20 // 总数多少条
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
tableOptions: { type: Object, default: () => ({}) },
|
|
34
|
+
quickSearchConfig: { type: Array, default: () => [] },
|
|
35
|
+
primaryKey: String,
|
|
36
|
+
tableDataCache: { type: Array, default: () => [] },
|
|
37
|
+
oldtableData: { type: Array, default: () => [] }, // 原始数据
|
|
38
|
+
tableName: String,
|
|
39
|
+
fieldListOriginal: { type: Array, default: () => [] },
|
|
40
|
+
tableParams: { type: Object, default: () => ({}) },
|
|
41
|
+
emptyItems: {
|
|
42
|
+
type: Object,
|
|
43
|
+
default: () => {
|
|
44
|
+
return {
|
|
45
|
+
noDataImg: 'nodata',
|
|
46
|
+
noDataTip: ''
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
styleSetting: { type: Object, default: () => ({}) },
|
|
51
|
+
sysImageSize: { type: Array, default: () => [] },
|
|
52
|
+
height: String,
|
|
53
|
+
groupCountFields: { type: Array, default: () => [] },
|
|
54
|
+
groupCountMap: { type: Object, default: () => ({}) },
|
|
55
|
+
listFormUnionSetting: { type: Object, default: () => ({}) },
|
|
56
|
+
inlineEditFormConfig: { type: Object, default: () => ({}) },
|
|
57
|
+
clickRowData: { type: Object, default: () => ({}) },
|
|
58
|
+
btnList: { type: Array, default: () => [] },
|
|
59
|
+
spinning: Boolean,
|
|
60
|
+
rowGroupSetting: { type: Object, default: () => ({}) },
|
|
61
|
+
isInlineOperating: Boolean,
|
|
62
|
+
inlineEditCurrentOperateBtnId: String,
|
|
63
|
+
tableRefreshCache: { type: Object, default: () => ({}) }, // 记录需要刷新的列表,当切换到当前列表时更新
|
|
64
|
+
userInfo: { type: Object, default: () => ({}) },
|
|
65
|
+
isInlineAdding: Boolean,
|
|
66
|
+
isRowEditing: Boolean,
|
|
67
|
+
pageIndexOldtableData: {
|
|
68
|
+
// 原始数据
|
|
69
|
+
type: Array,
|
|
70
|
+
default: () => []
|
|
71
|
+
},
|
|
72
|
+
submitForm: Function,
|
|
73
|
+
isMatchComponent: { type: Boolean, default: true }, // 为了兼容低代码(组件内部)与二次开发平台(vuex)
|
|
74
|
+
asyncCount: Boolean,
|
|
75
|
+
showSettings: { type: Object, default: () => ({}) },
|
|
76
|
+
filterDomPortal: { // 表头筛选挂载的地方
|
|
77
|
+
type: String,
|
|
78
|
+
default: "body"
|
|
79
|
+
},
|
|
80
|
+
filterTopOffset: { // 表头 top 调节
|
|
81
|
+
type: Number,
|
|
82
|
+
default: 0
|
|
83
|
+
},
|
|
84
|
+
editFormApiConfig: Object, // 编辑表格api
|
|
85
|
+
defaultEditAllRow: Boolean,
|
|
86
|
+
editTableUid: [String, Number],
|
|
87
|
+
curBatchBtnData: { type: Object, default: () => ({}) },
|
|
88
|
+
rowBtnAutoLayout:{// 行内按钮自适应布局
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: true
|
|
91
|
+
},
|
|
92
|
+
listCountParams:{ type: Object, default: () => ({}) },
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export default bigTableProps;
|
|
@@ -1,181 +1,181 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<a-modal
|
|
3
|
-
centered
|
|
4
|
-
class="standard-modal standard-modal-white authentication-modal"
|
|
5
|
-
:visible="visible"
|
|
6
|
-
:maskClosable="false"
|
|
7
|
-
:width="style.width"
|
|
8
|
-
:bodyStyle="{ maxHeight: style.height, overflowY: 'auto' }"
|
|
9
|
-
:footer="null"
|
|
10
|
-
@cancel="handleClickClose"
|
|
11
|
-
>
|
|
12
|
-
<template #title>
|
|
13
|
-
{{ identityVerificationTitle }}
|
|
14
|
-
</template>
|
|
15
|
-
<div class="content">
|
|
16
|
-
<a-form-model class="login-form" ref="ruleForm" :model="form" :rules="rules">
|
|
17
|
-
<a-form-model-item ref="account" prop="account">
|
|
18
|
-
<a-input v-model="form.account" placeholder="请输入账号" />
|
|
19
|
-
</a-form-model-item>
|
|
20
|
-
<a-form-model-item ref="password" prop="password">
|
|
21
|
-
<a-input-password v-model="form.password" placeholder="请输入密码" />
|
|
22
|
-
</a-form-model-item>
|
|
23
|
-
<a-form-model-item>
|
|
24
|
-
<a-button type="primary" class="login-form-button" @click="handleClickSubmit">登录</a-button>
|
|
25
|
-
</a-form-model-item>
|
|
26
|
-
</a-form-model>
|
|
27
|
-
</div>
|
|
28
|
-
</a-modal>
|
|
29
|
-
</template>
|
|
30
|
-
<script>
|
|
31
|
-
import crypto from '@/utils/crypto.js';
|
|
32
|
-
let httpFn = null;
|
|
33
|
-
const DEFAULT_FORM = {
|
|
34
|
-
account: '',
|
|
35
|
-
password: ''
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
import Vue from 'vue';
|
|
39
|
-
import { Button, FormModel, Input, Modal } from 'ant-design-vue';
|
|
40
|
-
import axios from 'axios';
|
|
41
|
-
import qs from 'qs';
|
|
42
|
-
|
|
43
|
-
export default {
|
|
44
|
-
name: 'IdentityVerificationModal',
|
|
45
|
-
props: {
|
|
46
|
-
visible: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false
|
|
49
|
-
},
|
|
50
|
-
baseUrl: {
|
|
51
|
-
type: String,
|
|
52
|
-
require: true
|
|
53
|
-
},
|
|
54
|
-
verifyUserUrl: {
|
|
55
|
-
type: String,
|
|
56
|
-
default: '/verifyUser'
|
|
57
|
-
},
|
|
58
|
-
identityVerificationTitle: {
|
|
59
|
-
type: String
|
|
60
|
-
},
|
|
61
|
-
printConfig: {
|
|
62
|
-
type: Object,
|
|
63
|
-
default: () => ({})
|
|
64
|
-
},
|
|
65
|
-
authorizationKey:{
|
|
66
|
-
type: String,
|
|
67
|
-
default: ""
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
|
-
components: {
|
|
71
|
-
AModal: Modal
|
|
72
|
-
},
|
|
73
|
-
data() {
|
|
74
|
-
return {
|
|
75
|
-
form: JSON.parse(JSON.stringify(DEFAULT_FORM)),
|
|
76
|
-
rules: {
|
|
77
|
-
account: [{ required: true, message: '请输入账号' }],
|
|
78
|
-
password: [{ required: true, message: '请输入密码' }]
|
|
79
|
-
},
|
|
80
|
-
style: {
|
|
81
|
-
width: '416px',
|
|
82
|
-
height: '328px'
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
},
|
|
86
|
-
beforeCreate() {
|
|
87
|
-
Vue.use(Button)
|
|
88
|
-
.use(FormModel)
|
|
89
|
-
.use(Input);
|
|
90
|
-
},
|
|
91
|
-
mounted() {
|
|
92
|
-
let config = {
|
|
93
|
-
withCredentials: false,
|
|
94
|
-
timeout: 5000
|
|
95
|
-
};
|
|
96
|
-
let printUrlPrefix = this?.printConfig?.printUrlPrefix;
|
|
97
|
-
if (axios !== this.axios && printUrlPrefix) {
|
|
98
|
-
config.baseURL = printUrlPrefix;
|
|
99
|
-
}
|
|
100
|
-
httpFn = axios.create({
|
|
101
|
-
...config
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
watch: {
|
|
106
|
-
visible(val) {
|
|
107
|
-
if (val) return;
|
|
108
|
-
this.form = JSON.parse(JSON.stringify(DEFAULT_FORM));
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
// 方法
|
|
112
|
-
methods: {
|
|
113
|
-
handleClickClose() {
|
|
114
|
-
this.$emit('update:visible', false);
|
|
115
|
-
},
|
|
116
|
-
handleClickSubmit() {
|
|
117
|
-
this.$refs.ruleForm.validate(valid => {
|
|
118
|
-
if (valid) {
|
|
119
|
-
this.submit();
|
|
120
|
-
} else {
|
|
121
|
-
return false;
|
|
122
|
-
}
|
|
123
|
-
});
|
|
124
|
-
},
|
|
125
|
-
submit() {
|
|
126
|
-
const url = `${this.baseUrl}${this.verifyUserUrl}`;
|
|
127
|
-
|
|
128
|
-
return httpFn({
|
|
129
|
-
method: 'POST',
|
|
130
|
-
url,
|
|
131
|
-
data: qs.stringify({
|
|
132
|
-
loginName: this.form.account,
|
|
133
|
-
password: crypto.encrypt(this.form.password),
|
|
134
|
-
authorizationKey: this?.authorizationKey
|
|
135
|
-
})
|
|
136
|
-
})
|
|
137
|
-
.then(async ({ data }) => {
|
|
138
|
-
if (data.result !== 'SUCCESS') {
|
|
139
|
-
this.$message.error(data.resultMsg);
|
|
140
|
-
return false;
|
|
141
|
-
}
|
|
142
|
-
this.$emit('success', data.map.token);
|
|
143
|
-
return data;
|
|
144
|
-
})
|
|
145
|
-
.catch(e => {
|
|
146
|
-
return false;
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
};
|
|
151
|
-
</script>
|
|
152
|
-
<style lang="less" scoped>
|
|
153
|
-
.login-form {
|
|
154
|
-
padding-top: 15px;
|
|
155
|
-
/deep/ .ant-form-item {
|
|
156
|
-
margin-bottom: 16px;
|
|
157
|
-
.ant-form-explain {
|
|
158
|
-
margin: 2px 0 16px;
|
|
159
|
-
min-height: unset;
|
|
160
|
-
}
|
|
161
|
-
&.ant-form-item-with-help {
|
|
162
|
-
margin-bottom: 0;
|
|
163
|
-
}
|
|
164
|
-
input {
|
|
165
|
-
height: 50px;
|
|
166
|
-
font-size: 14px;
|
|
167
|
-
color: #757575;
|
|
168
|
-
border-radius: 6px;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
.login-form-button {
|
|
173
|
-
width: 100%;
|
|
174
|
-
height: 50px;
|
|
175
|
-
background: #2d7aff;
|
|
176
|
-
border-radius: 24px;
|
|
177
|
-
border-color: #2d7aff !important;
|
|
178
|
-
font-size: 16px;
|
|
179
|
-
color: #ffffff;
|
|
180
|
-
}
|
|
181
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<a-modal
|
|
3
|
+
centered
|
|
4
|
+
class="standard-modal standard-modal-white authentication-modal"
|
|
5
|
+
:visible="visible"
|
|
6
|
+
:maskClosable="false"
|
|
7
|
+
:width="style.width"
|
|
8
|
+
:bodyStyle="{ maxHeight: style.height, overflowY: 'auto' }"
|
|
9
|
+
:footer="null"
|
|
10
|
+
@cancel="handleClickClose"
|
|
11
|
+
>
|
|
12
|
+
<template #title>
|
|
13
|
+
{{ identityVerificationTitle }}
|
|
14
|
+
</template>
|
|
15
|
+
<div class="content">
|
|
16
|
+
<a-form-model class="login-form" ref="ruleForm" :model="form" :rules="rules">
|
|
17
|
+
<a-form-model-item ref="account" prop="account">
|
|
18
|
+
<a-input v-model="form.account" placeholder="请输入账号" />
|
|
19
|
+
</a-form-model-item>
|
|
20
|
+
<a-form-model-item ref="password" prop="password">
|
|
21
|
+
<a-input-password v-model="form.password" placeholder="请输入密码" />
|
|
22
|
+
</a-form-model-item>
|
|
23
|
+
<a-form-model-item>
|
|
24
|
+
<a-button type="primary" class="login-form-button" @click="handleClickSubmit">登录</a-button>
|
|
25
|
+
</a-form-model-item>
|
|
26
|
+
</a-form-model>
|
|
27
|
+
</div>
|
|
28
|
+
</a-modal>
|
|
29
|
+
</template>
|
|
30
|
+
<script>
|
|
31
|
+
import crypto from '@/utils/crypto.js';
|
|
32
|
+
let httpFn = null;
|
|
33
|
+
const DEFAULT_FORM = {
|
|
34
|
+
account: '',
|
|
35
|
+
password: ''
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
import Vue from 'vue';
|
|
39
|
+
import { Button, FormModel, Input, Modal } from 'ant-design-vue';
|
|
40
|
+
import axios from 'axios';
|
|
41
|
+
import qs from 'qs';
|
|
42
|
+
|
|
43
|
+
export default {
|
|
44
|
+
name: 'IdentityVerificationModal',
|
|
45
|
+
props: {
|
|
46
|
+
visible: {
|
|
47
|
+
type: Boolean,
|
|
48
|
+
default: false
|
|
49
|
+
},
|
|
50
|
+
baseUrl: {
|
|
51
|
+
type: String,
|
|
52
|
+
require: true
|
|
53
|
+
},
|
|
54
|
+
verifyUserUrl: {
|
|
55
|
+
type: String,
|
|
56
|
+
default: '/verifyUser'
|
|
57
|
+
},
|
|
58
|
+
identityVerificationTitle: {
|
|
59
|
+
type: String
|
|
60
|
+
},
|
|
61
|
+
printConfig: {
|
|
62
|
+
type: Object,
|
|
63
|
+
default: () => ({})
|
|
64
|
+
},
|
|
65
|
+
authorizationKey:{
|
|
66
|
+
type: String,
|
|
67
|
+
default: ""
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
components: {
|
|
71
|
+
AModal: Modal
|
|
72
|
+
},
|
|
73
|
+
data() {
|
|
74
|
+
return {
|
|
75
|
+
form: JSON.parse(JSON.stringify(DEFAULT_FORM)),
|
|
76
|
+
rules: {
|
|
77
|
+
account: [{ required: true, message: '请输入账号' }],
|
|
78
|
+
password: [{ required: true, message: '请输入密码' }]
|
|
79
|
+
},
|
|
80
|
+
style: {
|
|
81
|
+
width: '416px',
|
|
82
|
+
height: '328px'
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
beforeCreate() {
|
|
87
|
+
Vue.use(Button)
|
|
88
|
+
.use(FormModel)
|
|
89
|
+
.use(Input);
|
|
90
|
+
},
|
|
91
|
+
mounted() {
|
|
92
|
+
let config = {
|
|
93
|
+
withCredentials: false,
|
|
94
|
+
timeout: 5000
|
|
95
|
+
};
|
|
96
|
+
let printUrlPrefix = this?.printConfig?.printUrlPrefix;
|
|
97
|
+
if (axios !== this.axios && printUrlPrefix) {
|
|
98
|
+
config.baseURL = printUrlPrefix;
|
|
99
|
+
}
|
|
100
|
+
httpFn = axios.create({
|
|
101
|
+
...config
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
},
|
|
105
|
+
watch: {
|
|
106
|
+
visible(val) {
|
|
107
|
+
if (val) return;
|
|
108
|
+
this.form = JSON.parse(JSON.stringify(DEFAULT_FORM));
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
// 方法
|
|
112
|
+
methods: {
|
|
113
|
+
handleClickClose() {
|
|
114
|
+
this.$emit('update:visible', false);
|
|
115
|
+
},
|
|
116
|
+
handleClickSubmit() {
|
|
117
|
+
this.$refs.ruleForm.validate(valid => {
|
|
118
|
+
if (valid) {
|
|
119
|
+
this.submit();
|
|
120
|
+
} else {
|
|
121
|
+
return false;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
},
|
|
125
|
+
submit() {
|
|
126
|
+
const url = `${this.baseUrl}${this.verifyUserUrl}`;
|
|
127
|
+
|
|
128
|
+
return httpFn({
|
|
129
|
+
method: 'POST',
|
|
130
|
+
url,
|
|
131
|
+
data: qs.stringify({
|
|
132
|
+
loginName: this.form.account,
|
|
133
|
+
password: crypto.encrypt(this.form.password),
|
|
134
|
+
authorizationKey: this?.authorizationKey
|
|
135
|
+
})
|
|
136
|
+
})
|
|
137
|
+
.then(async ({ data }) => {
|
|
138
|
+
if (data.result !== 'SUCCESS') {
|
|
139
|
+
this.$message.error(data.resultMsg);
|
|
140
|
+
return false;
|
|
141
|
+
}
|
|
142
|
+
this.$emit('success', data.map.token);
|
|
143
|
+
return data;
|
|
144
|
+
})
|
|
145
|
+
.catch(e => {
|
|
146
|
+
return false;
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
</script>
|
|
152
|
+
<style lang="less" scoped>
|
|
153
|
+
.login-form {
|
|
154
|
+
padding-top: 15px;
|
|
155
|
+
/deep/ .ant-form-item {
|
|
156
|
+
margin-bottom: 16px;
|
|
157
|
+
.ant-form-explain {
|
|
158
|
+
margin: 2px 0 16px;
|
|
159
|
+
min-height: unset;
|
|
160
|
+
}
|
|
161
|
+
&.ant-form-item-with-help {
|
|
162
|
+
margin-bottom: 0;
|
|
163
|
+
}
|
|
164
|
+
input {
|
|
165
|
+
height: 50px;
|
|
166
|
+
font-size: 14px;
|
|
167
|
+
color: #757575;
|
|
168
|
+
border-radius: 6px;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
.login-form-button {
|
|
173
|
+
width: 100%;
|
|
174
|
+
height: 50px;
|
|
175
|
+
background: #2d7aff;
|
|
176
|
+
border-radius: 24px;
|
|
177
|
+
border-color: #2d7aff !important;
|
|
178
|
+
font-size: 16px;
|
|
179
|
+
color: #ffffff;
|
|
180
|
+
}
|
|
181
|
+
</style>
|