centaline-data-driven-v3 0.1.14 → 0.1.16
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/dist/centaline-data-driven-v3.umd.js +132 -132
- package/package.json +1 -1
- package/src/assets/commonApp.css +6 -0
- package/src/assets/commonWeb.css +20 -11
- package/src/components/app/ComboBox.vue +2 -1
- package/src/components/app/DatePicker.vue +4 -2
- package/src/components/app/Field.vue +13 -9
- package/src/components/app/TextBox.vue +14 -11
- package/src/components/web/Button.vue +165 -6
- package/src/components/web/DatePicker.vue +25 -12
- package/src/components/web/DateTimePicker/DateTimePicker.vue +748 -0
- package/src/components/web/Field.vue +82 -35
- package/src/components/web/File.vue +4 -0
- package/src/components/web/Form.vue +7 -7
- package/src/components/web/SearchList/SearchTable.vue +5 -1
- package/src/components/web/SearchScreen.vue +26 -7
- package/src/loader/src/Button.js +5 -2
- package/src/loader/src/DatePicker.js +56 -22
- package/src/loader/src/Enum.ts +736 -727
- package/src/loader/src/Field.js +10 -1
- package/src/loader/src/LibFunction.js +1 -1
- package/src/loader/src/SearchScreen.js +26 -0
- package/src/main.js +4 -4
- package/src/views/Form.vue +8 -8
- package/src/views/SearchList.vue +5 -6
package/package.json
CHANGED
package/src/assets/commonApp.css
CHANGED
package/src/assets/commonWeb.css
CHANGED
|
@@ -128,7 +128,8 @@ body {
|
|
|
128
128
|
line-height: 26px;
|
|
129
129
|
color: var(--centalineGray);
|
|
130
130
|
}
|
|
131
|
-
|
|
131
|
+
|
|
132
|
+
.el-input__suffix {
|
|
132
133
|
font-size: 12px;
|
|
133
134
|
}
|
|
134
135
|
|
|
@@ -414,7 +415,7 @@ body {
|
|
|
414
415
|
}
|
|
415
416
|
|
|
416
417
|
.ct-searchtable .ct-tr>.ct-td {
|
|
417
|
-
padding: 2px
|
|
418
|
+
padding: 2px 10px;
|
|
418
419
|
box-sizing: border-box;
|
|
419
420
|
}
|
|
420
421
|
|
|
@@ -909,7 +910,11 @@ body {
|
|
|
909
910
|
background-color: var(--el-fill-color-light) !important;
|
|
910
911
|
}
|
|
911
912
|
|
|
912
|
-
|
|
913
|
+
.el-col1 {
|
|
914
|
+
display: flex;
|
|
915
|
+
flex-direction: column;
|
|
916
|
+
justify-content: flex-end;
|
|
917
|
+
}
|
|
913
918
|
|
|
914
919
|
.el-collapse {
|
|
915
920
|
border-top: none;
|
|
@@ -1044,21 +1049,25 @@ body {
|
|
|
1044
1049
|
background-color: #ed745f;
|
|
1045
1050
|
}
|
|
1046
1051
|
|
|
1047
|
-
.ct-location .el-location-input{
|
|
1052
|
+
.ct-location .el-location-input {
|
|
1048
1053
|
border: 1px solid var(--bagGray);
|
|
1049
1054
|
line-height: 24px;
|
|
1050
1055
|
padding-left: 5px;
|
|
1051
1056
|
color: var(--centalineBlue);
|
|
1052
1057
|
border-radius: 6px !important;
|
|
1053
1058
|
font-size: inherit;
|
|
1054
|
-
|
|
1055
|
-
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
.ct-location .el-location-input:hover {
|
|
1056
1062
|
border-color: var(--centalineBlue);
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
.ct-location .el-location-input:focus {
|
|
1066
|
+
outline: 0;
|
|
1067
|
+
}
|
|
1068
|
+
|
|
1069
|
+
.h26 {
|
|
1062
1070
|
height: 26px;
|
|
1063
1071
|
}
|
|
1072
|
+
|
|
1064
1073
|
/*elementPlus样式重置结束*/
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
<template v-if="!model.isList">
|
|
4
4
|
<van-field clearable :type="model.inputType" :rows="model.rows" v-bind="model.attrs"
|
|
5
5
|
:label="model.controlLabel" readonly :is-link="!model.locked" :placeholder="model.placeholder"
|
|
6
|
-
:label-class="[model.required ? 'requiredLabel' : ''
|
|
6
|
+
:label-class="[model.required ? 'requiredLabel' : '', { 'label-top': model.labelPlacement == '1' }]"
|
|
7
|
+
:class="[model.multiple ? 'multiple' : '']"
|
|
7
8
|
@click="visibleChange()">
|
|
8
9
|
<template v-if="model.unitName1" #button>
|
|
9
10
|
{{ model.unitName1 }}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-field">
|
|
3
3
|
<van-field clearable type="text" :rows="model.rows" v-bind="model.attrs" v-model="model.code1" readonly
|
|
4
|
-
:disabled="model.locked"
|
|
5
|
-
|
|
4
|
+
:disabled="model.locked"
|
|
5
|
+
:label-class="[ { 'label-top': model.labelPlacement == '1' }]"
|
|
6
|
+
>
|
|
7
|
+
<template #button>
|
|
6
8
|
{{ model.unitName1 }}
|
|
7
9
|
</template>
|
|
8
10
|
<template #label v-if="model.showLabel && model.controlLabel">
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="ct-field" v-if="model">
|
|
3
3
|
<van-field clearable :type="model.inputType" :rows="model.rows" v-bind="model.attrs" v-model="model.code1"
|
|
4
|
-
:readonly="model.readonly" :disabled="model.locked"
|
|
5
|
-
:
|
|
4
|
+
:readonly="model.readonly" :disabled="model.locked" :show-word-limit="model.showwordlimit"
|
|
5
|
+
:label-align="model.inputType == 'textarea' ? 'top' : 'left'"
|
|
6
|
+
:label-class="[{ 'label-top': model.labelPlacement == '1' }]">
|
|
6
7
|
<template #label v-if="model.showLabel && model.controlLabel">
|
|
7
8
|
<slot name="ControlLabel">
|
|
8
|
-
<div :class="[model.required ? 'requiredLabel' : '']"
|
|
9
|
+
<div :class="[model.required ? 'requiredLabel' : '']"
|
|
10
|
+
:style="model.isList ? 'white-space: nowrap' : ''">
|
|
9
11
|
<span>{{ model.controlLabel }}</span>
|
|
12
|
+
|
|
13
|
+
|
|
10
14
|
</div>
|
|
11
15
|
</slot>
|
|
12
16
|
</template>
|
|
13
|
-
|
|
14
|
-
<slot name="PreLabel">
|
|
15
|
-
<template v-if="model.preLabel1"><span style="display: flex;height: 28px;align-items: center;" v-html="model.preLabel1"></span></template>
|
|
16
|
-
</slot>
|
|
17
|
-
</template>
|
|
17
|
+
|
|
18
18
|
<template #input>
|
|
19
|
+
<template v-if="model.preLabel1"><span
|
|
20
|
+
style="display: flex;height: 28px;align-items: center;padding-left: 5px;"
|
|
21
|
+
v-html="model.preLabel1"></span></template>
|
|
19
22
|
<slot name="Control">
|
|
20
23
|
|
|
21
24
|
</slot>
|
|
@@ -26,7 +29,8 @@
|
|
|
26
29
|
</slot>
|
|
27
30
|
</template>
|
|
28
31
|
<template #extra>
|
|
29
|
-
<slot name="SufLabel"
|
|
32
|
+
<slot name="SufLabel"
|
|
33
|
+
v-if="model.controlType != Enum.ControlType.CheckBox && model.controlType != Enum.ControlType.Switch">
|
|
30
34
|
<span v-if="model.sufLabel1" v-html="model.sufLabel1"></span>
|
|
31
35
|
</slot>
|
|
32
36
|
</template>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<van-field readonly v-if="model.moreActionRouter && model.controlType == Enum.ControlType.MultiLineText"
|
|
3
|
+
<van-field readonly v-if="model.moreActionRouter && model.controlType == Enum.ControlType.MultiLineText"
|
|
4
|
+
:label-class="[{ 'label-top': model.labelPlacement == '1' }]">
|
|
4
5
|
<template #button>
|
|
5
6
|
<van-button class="van-button-app" v-if="!model.moreActionRouter.controlLabel" icon="search"
|
|
6
7
|
size="small" type="danger" @click="popupSearchListHandle"></van-button>
|
|
@@ -9,9 +10,11 @@
|
|
|
9
10
|
</template>
|
|
10
11
|
</van-field>
|
|
11
12
|
<van-field clearable :type="model.inputType" :rows="model.rows" v-bind="model.attrs" v-model="model.code1"
|
|
12
|
-
:readonly="model.readonly" :disabled="model.locked"
|
|
13
|
+
:readonly="model.readonly" :disabled="model.locked"
|
|
14
|
+
:maxlength="model.controlType !== Enum.ControlType.NumericTextBox ? model.maxValue1 : '9999999999'"
|
|
13
15
|
:show-word-limit="model.showWordLimit" :label-align="model.inputType == 'textarea' ? 'top' : 'left'"
|
|
14
|
-
@input="input()" @blur="change()" class="ct-text" autocomplete="off"
|
|
16
|
+
@input="input()" @blur="change()" class="ct-text" autocomplete="off"
|
|
17
|
+
:label-class="[{ 'label-top': model.labelPlacement == '1' }]">
|
|
15
18
|
<template #label v-if="model.showLabel && model.controlLabel">
|
|
16
19
|
<div :class="[model.required ? 'requiredLabel' : '']"
|
|
17
20
|
:style="model.isList ? 'white-space: nowrap' : ''">
|
|
@@ -19,7 +22,7 @@
|
|
|
19
22
|
</div>
|
|
20
23
|
</template>
|
|
21
24
|
<template #extra v-if="model.sufLabel1">
|
|
22
|
-
|
|
25
|
+
<span v-html="model.sufLabel1" style="margin-left: 5px;line-height: 32px;"></span>
|
|
23
26
|
</template>
|
|
24
27
|
<template v-if="model.unitName1" #button>
|
|
25
28
|
{{ model.unitName1 }}
|
|
@@ -62,14 +65,14 @@ function popupSearchListHandle() {
|
|
|
62
65
|
emit('popupSearchList', isSingle, model, model.value.moreActionRouter);
|
|
63
66
|
}
|
|
64
67
|
function input() {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
68
|
+
if (model.value.controlType === Enum.ControlType.MultiLineText || model.value.controlType === Enum.ControlType.TextBox) {
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
change();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
71
74
|
function change() {
|
|
72
|
-
|
|
75
|
+
changeHandler(model.value, emit);
|
|
73
76
|
}
|
|
74
77
|
defineExpose({
|
|
75
78
|
model
|
|
@@ -31,6 +31,42 @@
|
|
|
31
31
|
<el-checkbox v-else-if="model.isCheckbox" v-model="model.code1" @change="clickHandle">
|
|
32
32
|
{{ model.controlLabel }}
|
|
33
33
|
</el-checkbox>
|
|
34
|
+
|
|
35
|
+
<el-dropdown split-button trigger="click" ref="refsearchwhere" class="search-btn-dropdown" popper-class="earch-btn-dropdown-popper"
|
|
36
|
+
:type="model.isHyperLink ? 'text' : 'primary'" v-bind="model.attrs" @click="clickHandle"
|
|
37
|
+
v-else-if="model.isSearchRouterKey && fieldSearchWhere" :hide-on-click="false"
|
|
38
|
+
@visible-change="clickHandleDropdown"
|
|
39
|
+
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
40
|
+
:icon="model.icon" :disabled="model.disabled || model.locked" placement="bottom">
|
|
41
|
+
<div v-if="flagAppMode" :title="model.label">
|
|
42
|
+
<img :src="model.imgUrl" :height="model.buttonHeight + 'px'" />
|
|
43
|
+
<div style="margin-top:5px;" class="labelText">{{ model.label }}</div>
|
|
44
|
+
</div>
|
|
45
|
+
<div v-else>
|
|
46
|
+
<img v-if="model.imgUrl" :title="model.controlLabel" :src="model.imgUrl"
|
|
47
|
+
:height="model.buttonHeight + 'px'" />
|
|
48
|
+
<span v-else>{{ model.controlLabel }}</span>
|
|
49
|
+
</div>
|
|
50
|
+
<template #dropdown>
|
|
51
|
+
<el-dropdown-menu>
|
|
52
|
+
<el-dropdown-item>
|
|
53
|
+
<div style="width:100%;float: left;margin:10px 0;">
|
|
54
|
+
<el-button style="float: left" v-for="(field, index) in SearchWhereButtons" :key="index"
|
|
55
|
+
:type="field.isHyperLink ? 'text' : 'primary'" :disabled="field.locked"
|
|
56
|
+
@click="SaveSearchWhere(field)">{{ field.controlLabel }}</el-button>
|
|
57
|
+
<span style="margin-left:10px;margin-top:3px;float:left" @click="SearchWhereManage"
|
|
58
|
+
title="维维护已保存的查询条件,如:设置和取消默认、修改标签、删除等。"><el-icon :size="18">
|
|
59
|
+
<Tools />
|
|
60
|
+
</el-icon></span>
|
|
61
|
+
</div>
|
|
62
|
+
</el-dropdown-item>
|
|
63
|
+
<el-dropdown-item v-for="(col, index) in SearchWhereList" :key="index">
|
|
64
|
+
<span @click="clickDropdownItem(col)" style="width:100%;float: left;">{{ col.labelName }}</span>
|
|
65
|
+
</el-dropdown-item>
|
|
66
|
+
</el-dropdown-menu>
|
|
67
|
+
</template>
|
|
68
|
+
</el-dropdown>
|
|
69
|
+
|
|
34
70
|
<el-button v-else-if="model.subText" style="height: 100%;padding: 5px 0;" type="primary" v-bind="model.attrs"
|
|
35
71
|
@click="clickHandle"
|
|
36
72
|
:style="{ color: model.textColor, backgroundColor: model.bgColor, borderColor: model.borderColor }"
|
|
@@ -41,7 +77,7 @@
|
|
|
41
77
|
<!-- <ct-selectfile v-else-if="model.isOpenFileDialog" :form="model" :vmodel="model"></ct-selectfile> -->
|
|
42
78
|
<template v-else-if="model.isOpenFileDialog" :form="model" :vmodel="model">
|
|
43
79
|
<input type="file" multiple ref="fileInput" @change="handleFileChange" style="display: none"
|
|
44
|
-
:accept="model.fileAccept" />
|
|
80
|
+
:accept="model.fileAccept" />
|
|
45
81
|
<el-button type="primary" @click="triggerUpload" v-bind="model.attrs"
|
|
46
82
|
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
47
83
|
:disabled="model.disabled || model.locked" class="btn-add">
|
|
@@ -54,7 +90,7 @@
|
|
|
54
90
|
</template>
|
|
55
91
|
|
|
56
92
|
<el-button v-else type="primary" :loading="model.loading" v-bind="model.attrs" @click="clickHandle"
|
|
57
|
-
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null }"
|
|
93
|
+
:style="{ color: model.textColor, backgroundColor: model.imgUrl ? 'transparent' : model.bgColor, borderColor: model.imgUrl ? 'transparent' : model.borderColor, padding: model.imgUrl ? '0px' : null,'margin-bottom': model.labelPlacement=='1'? '1px':null }"
|
|
58
94
|
:disabled="model.disabled || model.locked">
|
|
59
95
|
<template #icon v-if="model.icon">
|
|
60
96
|
<i :class="model.icon"></i>
|
|
@@ -75,9 +111,8 @@ import { initData } from '../../utils/mixins';
|
|
|
75
111
|
import Button from '../../loader/src/Button';
|
|
76
112
|
import Enum from '../../utils/Enum'
|
|
77
113
|
import common from '../../utils/common'
|
|
78
|
-
import request from '../../utils/request'
|
|
79
114
|
import { ElMessage, UploadFile } from 'element-plus'
|
|
80
|
-
const emit = defineEmits(['input', 'fieldClick', 'importComplete'])
|
|
115
|
+
const emit = defineEmits(['input', 'fieldClick', 'importComplete', 'SearchWhereManage', 'SaveSearchWhere','clichSearchWhere'])
|
|
81
116
|
const props = defineProps({
|
|
82
117
|
parameterAction: String,
|
|
83
118
|
fileData: Object,
|
|
@@ -85,18 +120,28 @@ const props = defineProps({
|
|
|
85
120
|
source: Object,
|
|
86
121
|
flagAppMode: Boolean,
|
|
87
122
|
parentModel: Object,
|
|
123
|
+
actionRouters: Array,
|
|
88
124
|
})
|
|
89
125
|
|
|
90
126
|
interface FileItem {
|
|
91
127
|
name: string;
|
|
92
128
|
raw: File;
|
|
93
129
|
}
|
|
94
|
-
|
|
130
|
+
const fieldSearchWhere = ref(null)
|
|
131
|
+
const SearchWhereButtons = ref([])
|
|
132
|
+
const SearchWhereList = ref([])
|
|
133
|
+
const refsearchwhere = ref()
|
|
95
134
|
const fileInput = ref(null); // 获取 input 元素的引用
|
|
96
135
|
const fileList = ref<FileItem[]>([]);
|
|
97
136
|
|
|
98
137
|
|
|
99
138
|
const model = initData(props, Button)
|
|
139
|
+
if (props.actionRouters && model.value.routerKey) {
|
|
140
|
+
fieldSearchWhere.value = props.actionRouters.find((b) => {
|
|
141
|
+
return b.key === model.value.routerKey;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
100
145
|
if (model.value.controlType == Enum.ControlType.ButtonAdvancedSearch) {
|
|
101
146
|
model.value.icon = 'ico-open';
|
|
102
147
|
}
|
|
@@ -196,7 +241,43 @@ const handleFileChange = (event) => {
|
|
|
196
241
|
event.target.value = '';
|
|
197
242
|
|
|
198
243
|
};
|
|
199
|
-
|
|
244
|
+
function clickHandleDropdown(v) {
|
|
245
|
+
if (v) {
|
|
246
|
+
getSearchWherList();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function getSearchWherList() {
|
|
250
|
+
if (model.value.routerKey) {
|
|
251
|
+
let field = props.actionRouters.find((b) => {
|
|
252
|
+
return b.key === model.value.routerKey;
|
|
253
|
+
});
|
|
254
|
+
if (field) {
|
|
255
|
+
model.value.getApiData(loadSearchWher, field);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
function loadSearchWher(data, Buttons) {
|
|
260
|
+
SearchWhereList.value = [];
|
|
261
|
+
data.rows.forEach((row) => {
|
|
262
|
+
SearchWhereList.value.push(row);
|
|
263
|
+
});
|
|
264
|
+
SearchWhereButtons.value = Buttons;
|
|
265
|
+
}
|
|
266
|
+
function SearchWhereManage() {
|
|
267
|
+
refsearchwhere.value.handleClose();
|
|
268
|
+
emit('SearchWhereManage', model.value);
|
|
269
|
+
}
|
|
270
|
+
function SaveSearchWhere(field) {
|
|
271
|
+
if (field.locked) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
refsearchwhere.value.handleClose();
|
|
275
|
+
emit('SaveSearchWhere', field);
|
|
276
|
+
}
|
|
277
|
+
function clickDropdownItem(col) {
|
|
278
|
+
refsearchwhere.value.handleClose();
|
|
279
|
+
emit('clichSearchWhere', col);
|
|
280
|
+
}
|
|
200
281
|
function generateUUID() {
|
|
201
282
|
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, c =>
|
|
202
283
|
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
|
|
@@ -251,4 +332,82 @@ function generateUUID() {
|
|
|
251
332
|
border-color: var(--btnFocusRed);
|
|
252
333
|
color: #fff;
|
|
253
334
|
}
|
|
335
|
+
</style>
|
|
336
|
+
<style lang="css">
|
|
337
|
+
.search-btn-dropdown {
|
|
338
|
+
margin-right: 10px;
|
|
339
|
+
vertical-align: middle;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.search-btn-dropdown button {
|
|
343
|
+
height: 26px !important;
|
|
344
|
+
line-height: 26px !important;
|
|
345
|
+
background: var(--chinaRed);
|
|
346
|
+
border-color: var(--chinaRed);
|
|
347
|
+
box-shadow: 0 2px 4px #ee6b6b40;
|
|
348
|
+
border-radius: 6px;
|
|
349
|
+
color: #fff;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
/* 搜索按钮,重置按钮和更多按钮的hover */
|
|
353
|
+
.earch-btn-dropdown button:hover {
|
|
354
|
+
background-color: var(--btnHoverRed);
|
|
355
|
+
border-color: var(--btnHoverRed);
|
|
356
|
+
color: #fff;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.earch-btn-dropdown button:hover .open,
|
|
360
|
+
.earch-btn-dropdown button:hover .fold {
|
|
361
|
+
background-color: var(--btnHoverRed);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.search-btn-dropdown button:active,
|
|
365
|
+
.search-btn-dropdown button:focus {
|
|
366
|
+
background-color: var(--btnFocusRed);
|
|
367
|
+
border-color: var(--btnFocusRed);
|
|
368
|
+
color: #fff;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary:hover,
|
|
372
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--default:hover {
|
|
373
|
+
background: var(--btnHoverRed);
|
|
374
|
+
color: #FFF;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary {
|
|
378
|
+
background-color: var(--chinaRed);
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary:hover {
|
|
382
|
+
background: var(--btnHoverRed);
|
|
383
|
+
color: #FFF;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-icon:hover {
|
|
387
|
+
color: var(--btnHoverRed);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.earch-btn-dropdown-popper .el-dropdown-menu li:hover,
|
|
391
|
+
.earch-btn-dropdown-popper .el-dropdown-menu li:focus {
|
|
392
|
+
background: #ffffff;
|
|
393
|
+
color: #606266;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary.is-disabled,
|
|
397
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary.is-disabled:hover,
|
|
398
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary.is-disabled:focus,
|
|
399
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button--primary.is-disabled:active {
|
|
400
|
+
color: #FFF !important;
|
|
401
|
+
background-color: var(--chinaRed);
|
|
402
|
+
border-color: var(--chinaRed);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button.is-disabled,
|
|
406
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button.is-disabled:hover,
|
|
407
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button.is-disabled:focus,
|
|
408
|
+
.earch-btn-dropdown-popper .el-dropdown-menu .el-button.is-disabled:active {
|
|
409
|
+
color: var(--centalineMediumGray) !important;
|
|
410
|
+
background: #F3F3F3;
|
|
411
|
+
border: 1px solid var(--bagGray);
|
|
412
|
+
}
|
|
254
413
|
</style>
|
|
@@ -2,19 +2,34 @@
|
|
|
2
2
|
<ct-field :vmodel="model">
|
|
3
3
|
<template #Control>
|
|
4
4
|
<template v-if="model.flagtime">
|
|
5
|
-
<el-time-picker v-model="model.code1" v-bind="model.attrs" :disabled="model.locked"
|
|
5
|
+
<el-time-picker v-model="model.code1" v-bind="model.attrs" :disabled="model.locked" :format="model.format"
|
|
6
6
|
@change="changeHandler(model, emit)" class="fieldControl" />
|
|
7
7
|
<span class="range-span" v-if="model.flagrange"> - </span>
|
|
8
|
-
<el-time-picker v-if="model.flagrange" v-model="model.code2" v-bind="model.attrs" :
|
|
9
|
-
@change="changeHandler(model, emit)" class="fieldControl" />
|
|
8
|
+
<el-time-picker v-if="model.flagrange" v-model="model.code2" v-bind="model.attrs" :format="model.format"
|
|
9
|
+
:disabled="model.locked" @change="changeHandler(model, emit)" class="fieldControl" />
|
|
10
10
|
</template>
|
|
11
11
|
<template v-else>
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
<template v-if="model.flagDateTime">
|
|
13
|
+
<DateTimePicker v-model="model.code1" :format="model.format" :minute-step="model.minuteStep"
|
|
14
|
+
@change="changeHandler(model, emit)" class="fieldControl" :model="model"
|
|
15
|
+
:class="[!model.valid ? 'is-error' : '']">
|
|
16
|
+
</DateTimePicker>
|
|
17
|
+
|
|
18
|
+
<span class="range-span" v-if="model.flagrange"> - </span>
|
|
19
|
+
<DateTimePicker v-model="model.code2" :format="model.format" v-if="model.flagrange"
|
|
20
|
+
:minute-step="model.minuteStep" @change="changeHandler(model, emit)" class="fieldControl"
|
|
21
|
+
:model="model" :class="[!model.valid ? 'is-error' : '']">
|
|
22
|
+
</DateTimePicker>
|
|
23
|
+
</template>
|
|
24
|
+
<template v-else>
|
|
25
|
+
<el-date-picker v-model="model.code1" :type="model.dateType" v-bind="model.attrs"
|
|
26
|
+
:disabled="model.locked" :disabled-date="disabledDate" @change="changeHandler(model, emit)"
|
|
27
|
+
class="fieldControl" />
|
|
28
|
+
<span class="range-span" v-if="model.flagrange"> - </span>
|
|
29
|
+
<el-date-picker v-if="model.flagrange" v-model="model.code2" :type="model.dateType"
|
|
30
|
+
v-bind="model.attrs" :disabled="model.locked" :disabled-date="disabledDate"
|
|
31
|
+
@change="changeHandler(model, emit)" class="fieldControl" />
|
|
32
|
+
</template>
|
|
18
33
|
</template>
|
|
19
34
|
</template>
|
|
20
35
|
</ct-field>
|
|
@@ -22,6 +37,7 @@
|
|
|
22
37
|
<script lang="ts" setup>
|
|
23
38
|
import { initData, changeHandler } from '../../utils/mixins';
|
|
24
39
|
import DatePicker from '../../loader/src/DatePicker';
|
|
40
|
+
import DateTimePicker from './DateTimePicker/DateTimePicker.vue';
|
|
25
41
|
const emit = defineEmits(['input', 'change'])
|
|
26
42
|
const props = defineProps({
|
|
27
43
|
parameterAction: String,
|
|
@@ -29,7 +45,6 @@ const props = defineProps({
|
|
|
29
45
|
source: Object,
|
|
30
46
|
})
|
|
31
47
|
const model = initData(props, DatePicker)
|
|
32
|
-
|
|
33
48
|
//可以选择的日期区间
|
|
34
49
|
function disabledDate(time) {
|
|
35
50
|
let validate = false;
|
|
@@ -46,5 +61,3 @@ defineExpose({
|
|
|
46
61
|
model
|
|
47
62
|
})
|
|
48
63
|
</script>
|
|
49
|
-
|
|
50
|
-
|