cnhis-design-vue 2.1.18 → 2.1.19
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 +2219 -2219
- 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 +207 -206
- package/es/big-table/style.css +1 -1
- 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 +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +427 -314
- package/es/fabric-chart/style.css +1 -1
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +62 -62
- package/es/index/index.js +1078 -963
- 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 +142 -141
- 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 +1073 -958
- package/lib/cui.umd.js +1073 -958
- package/lib/cui.umd.min.js +77 -77
- package/package.json +106 -106
- package/packages/big-table/src/BigTable.vue +3039 -3038
- 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 +728 -728
- package/packages/fabric-chart/src/components/TimeScaleValue.vue +113 -117
- package/packages/fabric-chart/src/const/defaultVaule.js +59 -59
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +1035 -960
- 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/fabric-chart/src/mixins/draw.js +70 -62
- package/packages/fabric-chart/src/mixins/eventCommon.js +9 -10
- package/packages/multi-chat/chat/chatFooter.vue +1598 -1598
- package/packages/multi-chat/chat/chatMain.vue +1442 -1442
- 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 +1658 -1658
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +2462 -2462
- 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 +3 -2
- package/packages/table-filter/src/const/dataOptions.js +43 -43
- package/packages/table-filter/src/mixins/mixins.js +695 -695
- package/packages/table-filter/src/quick-search/QuickSearch.vue +2083 -2083
- package/src/directive/preventReClick.js +12 -12
|
@@ -1,340 +1,340 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<li class="outQuickSearch-li">
|
|
3
|
-
<slot v-if="item.com == 'Text'">
|
|
4
|
-
<a-input
|
|
5
|
-
@pressEnter="outFilterChange"
|
|
6
|
-
class="CL-input"
|
|
7
|
-
:style="{
|
|
8
|
-
width: `${item.advanceColWidth || 200}px`,
|
|
9
|
-
margin: '0 8px 8px 0',
|
|
10
|
-
'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
|
|
11
|
-
}"
|
|
12
|
-
:placeholder="`搜索${item.alias || item.title}`"
|
|
13
|
-
v-model="item.value"
|
|
14
|
-
allowClear
|
|
15
|
-
>
|
|
16
|
-
</a-input>
|
|
17
|
-
</slot>
|
|
18
|
-
<template v-if="item.com == 'SelectMui'">
|
|
19
|
-
<c-tree-select
|
|
20
|
-
v-if="item.comType === 'treeSelect'"
|
|
21
|
-
:item="item"
|
|
22
|
-
:handleGetConfigApi="handleGetConfigApi"
|
|
23
|
-
:maxTagPlaceholder="maxTagPlaceholder"
|
|
24
|
-
:outFilterChange="outFilterChange"
|
|
25
|
-
style="margin: 0 8px 8px 0"
|
|
26
|
-
/>
|
|
27
|
-
<multiSelect
|
|
28
|
-
v-else
|
|
29
|
-
:item="item"
|
|
30
|
-
:maxTagPlaceholder="maxTagPlaceholder"
|
|
31
|
-
:outFilterChange="outFilterChange"
|
|
32
|
-
:handleWordBookSearch="handleWordBookSearch"
|
|
33
|
-
:dropdownVisibleChange="dropdownVisibleChange"
|
|
34
|
-
:fetchingWordbook="fetchingWordbook"
|
|
35
|
-
style="margin: 0 8px 8px 0"
|
|
36
|
-
></multiSelect>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<a-range-picker
|
|
40
|
-
:allowClear="item.explicitRequired != 1"
|
|
41
|
-
:format="item.showFormat"
|
|
42
|
-
@change="value => rangePickerChange(value, item)"
|
|
43
|
-
@ok="outFilterChange"
|
|
44
|
-
v-model="item.value"
|
|
45
|
-
:placeholder="[`${item.alias || item.title}起始日期`, `${item.alias || item.title}截止日期`]"
|
|
46
|
-
v-if="item.com == 'DatePicker'"
|
|
47
|
-
style="margin: 0 8px 8px 0"
|
|
48
|
-
:showTime="handlePickerShowTime(item)"
|
|
49
|
-
:title="`选择${item.alias || item.title}`"
|
|
50
|
-
/>
|
|
51
|
-
<a-date-picker
|
|
52
|
-
:inputReadOnly="item.explicitRequired == 1"
|
|
53
|
-
:allowClear="item.explicitRequired != 1"
|
|
54
|
-
:format="item.showFormat"
|
|
55
|
-
@change="outFilterChange"
|
|
56
|
-
@ok="outFilterChange"
|
|
57
|
-
v-model="item.value"
|
|
58
|
-
:placeholder="`请选择${item.alias || item.title}`"
|
|
59
|
-
v-if="item.com == 'DayPicker'"
|
|
60
|
-
style="margin: 0 8px 8px 0"
|
|
61
|
-
:showTime="false"
|
|
62
|
-
:title="`选择${item.alias || item.title}`"
|
|
63
|
-
/>
|
|
64
|
-
<span
|
|
65
|
-
v-if="item.com == 'Number'"
|
|
66
|
-
class="ant-calendar-picker"
|
|
67
|
-
style="margin: 0 8px 8px 0; width: 200px"
|
|
68
|
-
>
|
|
69
|
-
<span
|
|
70
|
-
class="ant-calendar-picker-input ant-input num-picker"
|
|
71
|
-
:class="{ 'num-picker-unit': item.inputUnit }"
|
|
72
|
-
>
|
|
73
|
-
<input
|
|
74
|
-
v-model="item.lessValue"
|
|
75
|
-
@keyup.enter="() => changeOutFilterNumber(item)"
|
|
76
|
-
:title="`起始${item.alias || item.title}`"
|
|
77
|
-
:placeholder="`起始${item.alias || item.title}`"
|
|
78
|
-
class="ant-calendar-range-picker-input"/>
|
|
79
|
-
<span class="ant-calendar-range-picker-separator"> ~ </span>
|
|
80
|
-
<input
|
|
81
|
-
v-model="item.bigValue"
|
|
82
|
-
:title="`截止${item.alias || item.title}`"
|
|
83
|
-
@keyup.enter="() => changeOutFilterNumber(item)"
|
|
84
|
-
:placeholder="`截止${item.alias || item.title}`"
|
|
85
|
-
class="ant-calendar-range-picker-input"/>
|
|
86
|
-
<template v-if="item.inputUnit"> {{ item.inputUnit }}</template>
|
|
87
|
-
<span
|
|
88
|
-
class="ant-input-suffix clear-number-icon"
|
|
89
|
-
v-if="item.lessValue || item.bigValue"
|
|
90
|
-
@click="clearOutFilterNumber(item)"
|
|
91
|
-
><i
|
|
92
|
-
aria-label="图标: close-circle"
|
|
93
|
-
tabindex="-1"
|
|
94
|
-
class="anticon anticon-close-circle ant-input-clear-icon"
|
|
95
|
-
><svg
|
|
96
|
-
viewBox="64 64 896 896"
|
|
97
|
-
data-icon="close-circle"
|
|
98
|
-
width="1em"
|
|
99
|
-
height="1em"
|
|
100
|
-
fill="currentColor"
|
|
101
|
-
aria-hidden="true"
|
|
102
|
-
focusable="false"
|
|
103
|
-
class=""
|
|
104
|
-
>
|
|
105
|
-
<path
|
|
106
|
-
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
|
|
107
|
-
></path></svg></i
|
|
108
|
-
></span>
|
|
109
|
-
<span class="ant-calendar-picker-icon"></span
|
|
110
|
-
></span>
|
|
111
|
-
</span>
|
|
112
|
-
</li>
|
|
113
|
-
</template>
|
|
114
|
-
<script>
|
|
115
|
-
|
|
116
|
-
import multiSelect from '../multi-select/multi-select';
|
|
117
|
-
import cTreeSelect from '../c-tree-select/tree-select';
|
|
118
|
-
import { filterApiFn } from '../../mixins/mixins';
|
|
119
|
-
import wordBookutils from '../../mixins/wordBookutils';
|
|
120
|
-
import moment from 'moment';
|
|
121
|
-
import { DatePicker} from 'ant-design-vue';
|
|
122
|
-
const EVALUATEList = [
|
|
123
|
-
{
|
|
124
|
-
label: "一星",
|
|
125
|
-
value: "1",
|
|
126
|
-
isSelect: false
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
label: "二星",
|
|
130
|
-
value: "2",
|
|
131
|
-
isSelect: false
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
label: "三星",
|
|
135
|
-
value: "3",
|
|
136
|
-
isSelect: false
|
|
137
|
-
},
|
|
138
|
-
{
|
|
139
|
-
label: "四星",
|
|
140
|
-
value: "4",
|
|
141
|
-
isSelect: false
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
label: "五星",
|
|
145
|
-
value: "5",
|
|
146
|
-
isSelect: false
|
|
147
|
-
}
|
|
148
|
-
];
|
|
149
|
-
export default {
|
|
150
|
-
name: "OutQuickSearch",
|
|
151
|
-
mixins: [filterApiFn],
|
|
152
|
-
components: { multiSelect,cTreeSelect, [DatePicker.name]:DatePicker, [DatePicker.RangePicker.name]: DatePicker.RangePicker },
|
|
153
|
-
props: {
|
|
154
|
-
item: Object
|
|
155
|
-
},
|
|
156
|
-
data() {
|
|
157
|
-
return {
|
|
158
|
-
fetchingWordbook: false,
|
|
159
|
-
initSearch: false,
|
|
160
|
-
curDefaultValue: null,
|
|
161
|
-
};
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
computed: {
|
|
165
|
-
handlePickerShowTime() {
|
|
166
|
-
return function(item) {
|
|
167
|
-
if (!item.showTime) return false;
|
|
168
|
-
return {
|
|
169
|
-
defaultValue: [moment("00:00:00", "HH:mm:ss"), moment("23:59:59", "HH:mm:ss")]
|
|
170
|
-
};
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
},
|
|
174
|
-
watch: {},
|
|
175
|
-
// 生命周期
|
|
176
|
-
created() {},
|
|
177
|
-
mounted() {
|
|
178
|
-
this.init();
|
|
179
|
-
},
|
|
180
|
-
|
|
181
|
-
// 方法
|
|
182
|
-
methods: {
|
|
183
|
-
|
|
184
|
-
init(){
|
|
185
|
-
let item = this.item;
|
|
186
|
-
let df = item.explicitDefaultVal;
|
|
187
|
-
if(item.com == 'SelectMui' && df){
|
|
188
|
-
this.dropdownVisibleChange(true, item, {type:'hasDefaultInit'})
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
|
|
192
|
-
handleWordBookSearch(value, item, config = {}) {
|
|
193
|
-
if (item.comType != "SelectMuiWordBook") return;
|
|
194
|
-
let curAutograph = item.settingObj.wordbook && item.settingObj.wordbook.autograph;
|
|
195
|
-
let params = {
|
|
196
|
-
keyword: value,
|
|
197
|
-
autograph: curAutograph
|
|
198
|
-
};
|
|
199
|
-
let obj = {};
|
|
200
|
-
let p = item?.setting?.wordbook?.params || undefined;
|
|
201
|
-
if (p) {
|
|
202
|
-
item.setting.wordbook.params.forEach(item => {
|
|
203
|
-
obj[item.p_name] = item.p_value;
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
let rp = { ...params, ...obj, ...config }
|
|
207
|
-
this.getWordbookData(item.setting.wordbook, rp).then(({ data }) => {
|
|
208
|
-
this.handleWordbookData(item, data, rp);
|
|
209
|
-
});
|
|
210
|
-
},
|
|
211
|
-
dropdownVisibleChange(open, item, config={}) {
|
|
212
|
-
if (item.comType != "SelectMuiWordBook") return;
|
|
213
|
-
if (open) {
|
|
214
|
-
let obj = {};
|
|
215
|
-
if (item.setting.wordbook.params) {
|
|
216
|
-
item.setting.wordbook.params.forEach(item => {
|
|
217
|
-
obj[item.p_name] = item.p_value;
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
if (item.settingObj.wordbook) {
|
|
221
|
-
obj.autograph = item.settingObj.wordbook.autograph;
|
|
222
|
-
}
|
|
223
|
-
let df = item.explicitDefaultVal;
|
|
224
|
-
if(df != 'firstOption'){
|
|
225
|
-
obj.keyword = df;
|
|
226
|
-
}
|
|
227
|
-
this.getWordbookData(item.setting.wordbook, obj).then(({ data }) => {
|
|
228
|
-
this.handleWordbookData(item, data, obj);
|
|
229
|
-
if('hasDefaultInit' == config?.type){
|
|
230
|
-
this.outFilterChange({type:'outSearchInit'});
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
handleWordbookData(item, data, params) {
|
|
236
|
-
this.$set(item, "hasFieldList", false);
|
|
237
|
-
const {rows,hasFieldList,searchPageConfig} = wordBookutils.handleWordbookData(item,data,params);
|
|
238
|
-
this.$set(item, "hasFieldList", hasFieldList);
|
|
239
|
-
this.$set(item, "dataSource", rows);
|
|
240
|
-
let showKeys = item?.setting?.wordbook?.showKeys || [];
|
|
241
|
-
item.searchPageConfig = Object.assign(item.searchPageConfig, searchPageConfig);
|
|
242
|
-
// 初始化获取值
|
|
243
|
-
if(!this.initSearch){
|
|
244
|
-
let df = item.explicitDefaultVal;
|
|
245
|
-
if(df){
|
|
246
|
-
let defval = [];
|
|
247
|
-
if(df === 'firstOption'){
|
|
248
|
-
let [v,k] = rows;
|
|
249
|
-
// 如果有添加提示标题,取第二个
|
|
250
|
-
if(showKeys.length > 0 && item.hasFieldList){
|
|
251
|
-
v = k;
|
|
252
|
-
}
|
|
253
|
-
v && (defval = [v.myName])
|
|
254
|
-
} else {
|
|
255
|
-
let f = rows.find(v => v.myName.includes(df));
|
|
256
|
-
if(f){
|
|
257
|
-
defval = [f.myName]
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
item.value = [...defval]
|
|
261
|
-
item.search_DefaultValue= [...defval]
|
|
262
|
-
}
|
|
263
|
-
this.initSearch = true;
|
|
264
|
-
}
|
|
265
|
-
},
|
|
266
|
-
getWordbookData(o, obj) {
|
|
267
|
-
let { id, filterKeys, wordbookType } = o;
|
|
268
|
-
this.fetchingWordbook = true;
|
|
269
|
-
let resFieldKeys = Array.isArray(filterKeys) ? JSON.stringify(filterKeys) : filterKeys;
|
|
270
|
-
let url = `/tableReader/getWordbookData`;
|
|
271
|
-
let params = {
|
|
272
|
-
wordbookId: id,
|
|
273
|
-
fieldKeys: resFieldKeys,
|
|
274
|
-
wordbookType: wordbookType || "WORDBOOK",
|
|
275
|
-
asyncCount: 1, // 开启性能模式
|
|
276
|
-
...obj
|
|
277
|
-
};
|
|
278
|
-
return this.handleGetConfigApi(params, 'requestGetWordbookData', { fields: o }).then(res => {
|
|
279
|
-
this.fetchingWordbook = false;
|
|
280
|
-
if(typeof res.data === 'object'){
|
|
281
|
-
res.data.reqParams = params;
|
|
282
|
-
}
|
|
283
|
-
return res;
|
|
284
|
-
}).catch(() => {
|
|
285
|
-
this.fetchingWordbook = false;
|
|
286
|
-
});
|
|
287
|
-
// return this.axios
|
|
288
|
-
// .post(url, this.$qs.stringify(params))
|
|
289
|
-
// .then(res => {
|
|
290
|
-
// this.fetchingWordbook = false;
|
|
291
|
-
// return res;
|
|
292
|
-
// })
|
|
293
|
-
// .catch(() => {
|
|
294
|
-
// this.fetchingWordbook = false;
|
|
295
|
-
// });
|
|
296
|
-
},
|
|
297
|
-
rangePickerChange(value, item) {
|
|
298
|
-
if (item.showTime) {
|
|
299
|
-
if (!value.length && item.showTime) {
|
|
300
|
-
this.outFilterChange();
|
|
301
|
-
return;
|
|
302
|
-
}
|
|
303
|
-
} else {
|
|
304
|
-
this.outFilterChange();
|
|
305
|
-
}
|
|
306
|
-
},
|
|
307
|
-
outFilterChange(config = {}) {
|
|
308
|
-
this.$emit("outFilterChange",config);
|
|
309
|
-
},
|
|
310
|
-
maxTagPlaceholder(item) {
|
|
311
|
-
if (Array.isArray(item.value)) {
|
|
312
|
-
return item.value.length;
|
|
313
|
-
} else {
|
|
314
|
-
return 1;
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
changeOutFilterNumber(item) {
|
|
318
|
-
if (item.lessValue && item.bigValue) {
|
|
319
|
-
const lessValue = item.lessValue;
|
|
320
|
-
const bigValue = item.bigValue;
|
|
321
|
-
if (bigValue < lessValue) {
|
|
322
|
-
this.$set(item, "lessValue", bigValue);
|
|
323
|
-
this.$set(item, "bigValue", lessValue);
|
|
324
|
-
}
|
|
325
|
-
this.outFilterChange();
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
if (item.lessValue == "" && item.bigValue == "") {
|
|
329
|
-
this.outFilterChange();
|
|
330
|
-
}
|
|
331
|
-
},
|
|
332
|
-
clearOutFilterNumber(item) {
|
|
333
|
-
this.$set(item, "lessValue", "");
|
|
334
|
-
this.$set(item, "bigValue", "");
|
|
335
|
-
this.outFilterChange();
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
</script>
|
|
340
|
-
<style lang="less" scoped></style>
|
|
1
|
+
<template>
|
|
2
|
+
<li class="outQuickSearch-li">
|
|
3
|
+
<slot v-if="item.com == 'Text'">
|
|
4
|
+
<a-input
|
|
5
|
+
@pressEnter="outFilterChange"
|
|
6
|
+
class="CL-input"
|
|
7
|
+
:style="{
|
|
8
|
+
width: `${item.advanceColWidth || 200}px`,
|
|
9
|
+
margin: '0 8px 8px 0',
|
|
10
|
+
'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
|
|
11
|
+
}"
|
|
12
|
+
:placeholder="`搜索${item.alias || item.title}`"
|
|
13
|
+
v-model="item.value"
|
|
14
|
+
allowClear
|
|
15
|
+
>
|
|
16
|
+
</a-input>
|
|
17
|
+
</slot>
|
|
18
|
+
<template v-if="item.com == 'SelectMui'">
|
|
19
|
+
<c-tree-select
|
|
20
|
+
v-if="item.comType === 'treeSelect'"
|
|
21
|
+
:item="item"
|
|
22
|
+
:handleGetConfigApi="handleGetConfigApi"
|
|
23
|
+
:maxTagPlaceholder="maxTagPlaceholder"
|
|
24
|
+
:outFilterChange="outFilterChange"
|
|
25
|
+
style="margin: 0 8px 8px 0"
|
|
26
|
+
/>
|
|
27
|
+
<multiSelect
|
|
28
|
+
v-else
|
|
29
|
+
:item="item"
|
|
30
|
+
:maxTagPlaceholder="maxTagPlaceholder"
|
|
31
|
+
:outFilterChange="outFilterChange"
|
|
32
|
+
:handleWordBookSearch="handleWordBookSearch"
|
|
33
|
+
:dropdownVisibleChange="dropdownVisibleChange"
|
|
34
|
+
:fetchingWordbook="fetchingWordbook"
|
|
35
|
+
style="margin: 0 8px 8px 0"
|
|
36
|
+
></multiSelect>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<a-range-picker
|
|
40
|
+
:allowClear="item.explicitRequired != 1"
|
|
41
|
+
:format="item.showFormat"
|
|
42
|
+
@change="value => rangePickerChange(value, item)"
|
|
43
|
+
@ok="outFilterChange"
|
|
44
|
+
v-model="item.value"
|
|
45
|
+
:placeholder="[`${item.alias || item.title}起始日期`, `${item.alias || item.title}截止日期`]"
|
|
46
|
+
v-if="item.com == 'DatePicker'"
|
|
47
|
+
style="margin: 0 8px 8px 0"
|
|
48
|
+
:showTime="handlePickerShowTime(item)"
|
|
49
|
+
:title="`选择${item.alias || item.title}`"
|
|
50
|
+
/>
|
|
51
|
+
<a-date-picker
|
|
52
|
+
:inputReadOnly="item.explicitRequired == 1"
|
|
53
|
+
:allowClear="item.explicitRequired != 1"
|
|
54
|
+
:format="item.showFormat"
|
|
55
|
+
@change="outFilterChange"
|
|
56
|
+
@ok="outFilterChange"
|
|
57
|
+
v-model="item.value"
|
|
58
|
+
:placeholder="`请选择${item.alias || item.title}`"
|
|
59
|
+
v-if="item.com == 'DayPicker'"
|
|
60
|
+
style="margin: 0 8px 8px 0"
|
|
61
|
+
:showTime="false"
|
|
62
|
+
:title="`选择${item.alias || item.title}`"
|
|
63
|
+
/>
|
|
64
|
+
<span
|
|
65
|
+
v-if="item.com == 'Number'"
|
|
66
|
+
class="ant-calendar-picker"
|
|
67
|
+
style="margin: 0 8px 8px 0; width: 200px"
|
|
68
|
+
>
|
|
69
|
+
<span
|
|
70
|
+
class="ant-calendar-picker-input ant-input num-picker"
|
|
71
|
+
:class="{ 'num-picker-unit': item.inputUnit }"
|
|
72
|
+
>
|
|
73
|
+
<input
|
|
74
|
+
v-model="item.lessValue"
|
|
75
|
+
@keyup.enter="() => changeOutFilterNumber(item)"
|
|
76
|
+
:title="`起始${item.alias || item.title}`"
|
|
77
|
+
:placeholder="`起始${item.alias || item.title}`"
|
|
78
|
+
class="ant-calendar-range-picker-input"/>
|
|
79
|
+
<span class="ant-calendar-range-picker-separator"> ~ </span>
|
|
80
|
+
<input
|
|
81
|
+
v-model="item.bigValue"
|
|
82
|
+
:title="`截止${item.alias || item.title}`"
|
|
83
|
+
@keyup.enter="() => changeOutFilterNumber(item)"
|
|
84
|
+
:placeholder="`截止${item.alias || item.title}`"
|
|
85
|
+
class="ant-calendar-range-picker-input"/>
|
|
86
|
+
<template v-if="item.inputUnit"> {{ item.inputUnit }}</template>
|
|
87
|
+
<span
|
|
88
|
+
class="ant-input-suffix clear-number-icon"
|
|
89
|
+
v-if="item.lessValue || item.bigValue"
|
|
90
|
+
@click="clearOutFilterNumber(item)"
|
|
91
|
+
><i
|
|
92
|
+
aria-label="图标: close-circle"
|
|
93
|
+
tabindex="-1"
|
|
94
|
+
class="anticon anticon-close-circle ant-input-clear-icon"
|
|
95
|
+
><svg
|
|
96
|
+
viewBox="64 64 896 896"
|
|
97
|
+
data-icon="close-circle"
|
|
98
|
+
width="1em"
|
|
99
|
+
height="1em"
|
|
100
|
+
fill="currentColor"
|
|
101
|
+
aria-hidden="true"
|
|
102
|
+
focusable="false"
|
|
103
|
+
class=""
|
|
104
|
+
>
|
|
105
|
+
<path
|
|
106
|
+
d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 0 1-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"
|
|
107
|
+
></path></svg></i
|
|
108
|
+
></span>
|
|
109
|
+
<span class="ant-calendar-picker-icon"></span
|
|
110
|
+
></span>
|
|
111
|
+
</span>
|
|
112
|
+
</li>
|
|
113
|
+
</template>
|
|
114
|
+
<script>
|
|
115
|
+
|
|
116
|
+
import multiSelect from '../multi-select/multi-select';
|
|
117
|
+
import cTreeSelect from '../c-tree-select/tree-select';
|
|
118
|
+
import { filterApiFn } from '../../mixins/mixins';
|
|
119
|
+
import wordBookutils from '../../mixins/wordBookutils';
|
|
120
|
+
import moment from 'moment';
|
|
121
|
+
import { DatePicker} from 'ant-design-vue';
|
|
122
|
+
const EVALUATEList = [
|
|
123
|
+
{
|
|
124
|
+
label: "一星",
|
|
125
|
+
value: "1",
|
|
126
|
+
isSelect: false
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
label: "二星",
|
|
130
|
+
value: "2",
|
|
131
|
+
isSelect: false
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
label: "三星",
|
|
135
|
+
value: "3",
|
|
136
|
+
isSelect: false
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: "四星",
|
|
140
|
+
value: "4",
|
|
141
|
+
isSelect: false
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
label: "五星",
|
|
145
|
+
value: "5",
|
|
146
|
+
isSelect: false
|
|
147
|
+
}
|
|
148
|
+
];
|
|
149
|
+
export default {
|
|
150
|
+
name: "OutQuickSearch",
|
|
151
|
+
mixins: [filterApiFn],
|
|
152
|
+
components: { multiSelect,cTreeSelect, [DatePicker.name]:DatePicker, [DatePicker.RangePicker.name]: DatePicker.RangePicker },
|
|
153
|
+
props: {
|
|
154
|
+
item: Object
|
|
155
|
+
},
|
|
156
|
+
data() {
|
|
157
|
+
return {
|
|
158
|
+
fetchingWordbook: false,
|
|
159
|
+
initSearch: false,
|
|
160
|
+
curDefaultValue: null,
|
|
161
|
+
};
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
computed: {
|
|
165
|
+
handlePickerShowTime() {
|
|
166
|
+
return function(item) {
|
|
167
|
+
if (!item.showTime) return false;
|
|
168
|
+
return {
|
|
169
|
+
defaultValue: [moment("00:00:00", "HH:mm:ss"), moment("23:59:59", "HH:mm:ss")]
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
watch: {},
|
|
175
|
+
// 生命周期
|
|
176
|
+
created() {},
|
|
177
|
+
mounted() {
|
|
178
|
+
this.init();
|
|
179
|
+
},
|
|
180
|
+
|
|
181
|
+
// 方法
|
|
182
|
+
methods: {
|
|
183
|
+
|
|
184
|
+
init(){
|
|
185
|
+
let item = this.item;
|
|
186
|
+
let df = item.explicitDefaultVal;
|
|
187
|
+
if(item.com == 'SelectMui' && df){
|
|
188
|
+
this.dropdownVisibleChange(true, item, {type:'hasDefaultInit'})
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
handleWordBookSearch(value, item, config = {}) {
|
|
193
|
+
if (item.comType != "SelectMuiWordBook") return;
|
|
194
|
+
let curAutograph = item.settingObj.wordbook && item.settingObj.wordbook.autograph;
|
|
195
|
+
let params = {
|
|
196
|
+
keyword: value,
|
|
197
|
+
autograph: curAutograph
|
|
198
|
+
};
|
|
199
|
+
let obj = {};
|
|
200
|
+
let p = item?.setting?.wordbook?.params || undefined;
|
|
201
|
+
if (p) {
|
|
202
|
+
item.setting.wordbook.params.forEach(item => {
|
|
203
|
+
obj[item.p_name] = item.p_value;
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
let rp = { ...params, ...obj, ...config }
|
|
207
|
+
this.getWordbookData(item.setting.wordbook, rp).then(({ data }) => {
|
|
208
|
+
this.handleWordbookData(item, data, rp);
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
dropdownVisibleChange(open, item, config={}) {
|
|
212
|
+
if (item.comType != "SelectMuiWordBook") return;
|
|
213
|
+
if (open) {
|
|
214
|
+
let obj = {};
|
|
215
|
+
if (item.setting.wordbook.params) {
|
|
216
|
+
item.setting.wordbook.params.forEach(item => {
|
|
217
|
+
obj[item.p_name] = item.p_value;
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
if (item.settingObj.wordbook) {
|
|
221
|
+
obj.autograph = item.settingObj.wordbook.autograph;
|
|
222
|
+
}
|
|
223
|
+
let df = item.explicitDefaultVal;
|
|
224
|
+
if(df != 'firstOption'){
|
|
225
|
+
obj.keyword = df;
|
|
226
|
+
}
|
|
227
|
+
this.getWordbookData(item.setting.wordbook, obj).then(({ data }) => {
|
|
228
|
+
this.handleWordbookData(item, data, obj);
|
|
229
|
+
if('hasDefaultInit' == config?.type){
|
|
230
|
+
this.outFilterChange({type:'outSearchInit'});
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
handleWordbookData(item, data, params) {
|
|
236
|
+
this.$set(item, "hasFieldList", false);
|
|
237
|
+
const {rows,hasFieldList,searchPageConfig} = wordBookutils.handleWordbookData(item,data,params);
|
|
238
|
+
this.$set(item, "hasFieldList", hasFieldList);
|
|
239
|
+
this.$set(item, "dataSource", rows);
|
|
240
|
+
let showKeys = item?.setting?.wordbook?.showKeys || [];
|
|
241
|
+
item.searchPageConfig = Object.assign(item.searchPageConfig, searchPageConfig);
|
|
242
|
+
// 初始化获取值
|
|
243
|
+
if(!this.initSearch){
|
|
244
|
+
let df = item.explicitDefaultVal;
|
|
245
|
+
if(df){
|
|
246
|
+
let defval = [];
|
|
247
|
+
if(df === 'firstOption'){
|
|
248
|
+
let [v,k] = rows;
|
|
249
|
+
// 如果有添加提示标题,取第二个
|
|
250
|
+
if(showKeys.length > 0 && item.hasFieldList){
|
|
251
|
+
v = k;
|
|
252
|
+
}
|
|
253
|
+
v && (defval = [v.myName])
|
|
254
|
+
} else {
|
|
255
|
+
let f = rows.find(v => v.myName.includes(df));
|
|
256
|
+
if(f){
|
|
257
|
+
defval = [f.myName]
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
item.value = [...defval]
|
|
261
|
+
item.search_DefaultValue= [...defval]
|
|
262
|
+
}
|
|
263
|
+
this.initSearch = true;
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
getWordbookData(o, obj) {
|
|
267
|
+
let { id, filterKeys, wordbookType } = o;
|
|
268
|
+
this.fetchingWordbook = true;
|
|
269
|
+
let resFieldKeys = Array.isArray(filterKeys) ? JSON.stringify(filterKeys) : filterKeys;
|
|
270
|
+
let url = `/tableReader/getWordbookData`;
|
|
271
|
+
let params = {
|
|
272
|
+
wordbookId: id,
|
|
273
|
+
fieldKeys: resFieldKeys,
|
|
274
|
+
wordbookType: wordbookType || "WORDBOOK",
|
|
275
|
+
asyncCount: 1, // 开启性能模式
|
|
276
|
+
...obj
|
|
277
|
+
};
|
|
278
|
+
return this.handleGetConfigApi(params, 'requestGetWordbookData', { fields: o }).then(res => {
|
|
279
|
+
this.fetchingWordbook = false;
|
|
280
|
+
if(typeof res.data === 'object'){
|
|
281
|
+
res.data.reqParams = params;
|
|
282
|
+
}
|
|
283
|
+
return res;
|
|
284
|
+
}).catch(() => {
|
|
285
|
+
this.fetchingWordbook = false;
|
|
286
|
+
});
|
|
287
|
+
// return this.axios
|
|
288
|
+
// .post(url, this.$qs.stringify(params))
|
|
289
|
+
// .then(res => {
|
|
290
|
+
// this.fetchingWordbook = false;
|
|
291
|
+
// return res;
|
|
292
|
+
// })
|
|
293
|
+
// .catch(() => {
|
|
294
|
+
// this.fetchingWordbook = false;
|
|
295
|
+
// });
|
|
296
|
+
},
|
|
297
|
+
rangePickerChange(value, item) {
|
|
298
|
+
if (item.showTime) {
|
|
299
|
+
if (!value.length && item.showTime) {
|
|
300
|
+
this.outFilterChange();
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
} else {
|
|
304
|
+
this.outFilterChange();
|
|
305
|
+
}
|
|
306
|
+
},
|
|
307
|
+
outFilterChange(config = {}) {
|
|
308
|
+
this.$emit("outFilterChange",config);
|
|
309
|
+
},
|
|
310
|
+
maxTagPlaceholder(item) {
|
|
311
|
+
if (Array.isArray(item.value)) {
|
|
312
|
+
return item.value.length;
|
|
313
|
+
} else {
|
|
314
|
+
return 1;
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
changeOutFilterNumber(item) {
|
|
318
|
+
if (item.lessValue && item.bigValue) {
|
|
319
|
+
const lessValue = item.lessValue;
|
|
320
|
+
const bigValue = item.bigValue;
|
|
321
|
+
if (bigValue < lessValue) {
|
|
322
|
+
this.$set(item, "lessValue", bigValue);
|
|
323
|
+
this.$set(item, "bigValue", lessValue);
|
|
324
|
+
}
|
|
325
|
+
this.outFilterChange();
|
|
326
|
+
return;
|
|
327
|
+
}
|
|
328
|
+
if (item.lessValue == "" && item.bigValue == "") {
|
|
329
|
+
this.outFilterChange();
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
clearOutFilterNumber(item) {
|
|
333
|
+
this.$set(item, "lessValue", "");
|
|
334
|
+
this.$set(item, "bigValue", "");
|
|
335
|
+
this.outFilterChange();
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
</script>
|
|
340
|
+
<style lang="less" scoped></style>
|