cnhis-design-vue 2.1.80 → 2.1.81
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 +31 -4
- 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 +68 -68
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +22 -22
- 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/ellipsis/index.js +1 -1
- package/es/empty/index.js +8 -8
- package/es/fabric-chart/index.js +9 -9
- package/es/form/index.js +8 -8
- package/es/form-model/index.js +8 -8
- package/es/form-table/index.js +66 -66
- package/es/index/index.js +1771 -610
- 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 +76 -76
- package/es/multi-chat-client/index.js +70 -70
- 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 +22 -22
- 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-container/index.js +1 -1
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +12 -12
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4248 -0
- package/es/select-tag/style.css +1 -0
- package/es/shortcut-setter/index.js +10 -10
- 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 +686 -228
- 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 +1827 -674
- package/lib/cui.umd.js +1827 -674
- package/lib/cui.umd.min.js +70 -70
- package/package.json +1 -1
- package/packages/index.js +3 -0
- package/packages/select-tag/index.js +14 -0
- package/packages/select-tag/label-classify.vue +133 -0
- package/packages/select-tag/labelFormContent.vue +295 -0
- package/packages/select-tag/select-label.vue +274 -0
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +4 -0
- package/packages/table-filter/src/components/render-widget/components/DateRangeQuick.vue +7 -3
- package/packages/table-filter/src/components/render-widget/components/Label.vue +209 -0
- package/packages/table-filter/src/components/render-widget/components/NumberRange.vue +7 -5
- package/packages/table-filter/src/components/render-widget/components/SelectDynamic.vue +11 -35
- package/packages/table-filter/src/components/render-widget/components/SelectLabel.vue +80 -0
- package/packages/table-filter/src/components/render-widget/components/index.js +3 -1
- package/packages/table-filter/src/components/render-widget/enums.js +3 -1
- package/packages/table-filter/src/components/render-widget/index.vue +13 -6
- package/packages/table-filter/src/components/render-widget/mixins/dynamic-method.js +7 -1
- package/packages/table-filter/src/components/render-widget/mixins/label-method.js +23 -0
- package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +48 -5
- package/packages/table-filter/src/components/search-modal/set-classification.vue +5 -1
- package/packages/table-filter/src/mixins/renderWidget.js +1 -1
- package/packages/table-filter/src/quick-search/QuickSearch.vue +57 -12
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<a-select
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
v-on="$listeners"
|
|
5
|
+
v-model="valueCp"
|
|
6
|
+
:maxTagCount="maxTagCount"
|
|
7
|
+
:maxTagPlaceholder="maxTagPlaceholder"
|
|
8
|
+
>
|
|
9
|
+
<a-select-option v-for="tag in optionList" :value="tag" :key="tag">{{ tag }}</a-select-option>
|
|
10
|
+
</a-select>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import { Select } from 'ant-design-vue';
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
inheritAttrs: false,
|
|
18
|
+
components: {
|
|
19
|
+
Select,
|
|
20
|
+
[Select.name]: Select,
|
|
21
|
+
[Select.Option.name]: Select.Option,
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
value: {
|
|
25
|
+
type: [Array, String, Number],
|
|
26
|
+
},
|
|
27
|
+
componentCfg: {
|
|
28
|
+
type: Object
|
|
29
|
+
},
|
|
30
|
+
getLabelListMethodRender: Function
|
|
31
|
+
},
|
|
32
|
+
model: {
|
|
33
|
+
prop: "value",
|
|
34
|
+
event: "update:value"
|
|
35
|
+
},
|
|
36
|
+
created() {
|
|
37
|
+
this.getLabelListMethodRender(this.componentCfg)
|
|
38
|
+
},
|
|
39
|
+
computed: {
|
|
40
|
+
valueCp: {
|
|
41
|
+
set(val) {
|
|
42
|
+
const valueStr = val ? val.join('|#|') : val;
|
|
43
|
+
this.$emit("update:value", valueStr);
|
|
44
|
+
},
|
|
45
|
+
get() {
|
|
46
|
+
const valueList = this.value ? this.value.split('|#|') : [];
|
|
47
|
+
return valueList;
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
maxTagCount() {
|
|
51
|
+
if (!Array.isArray(this.valueCp)) return undefined;
|
|
52
|
+
const len = this.valueCp.length || 0;
|
|
53
|
+
return len > 1 ? 0 : 1;
|
|
54
|
+
},
|
|
55
|
+
optionList() {
|
|
56
|
+
const {
|
|
57
|
+
tagList = []
|
|
58
|
+
} = this.componentCfg;
|
|
59
|
+
if (tagList && tagList.length > 0) {
|
|
60
|
+
let result = [];
|
|
61
|
+
tagList.forEach(category => {
|
|
62
|
+
category.labelList.forEach(label => {
|
|
63
|
+
if(!result.includes(label.labelShowText)) result.push(label.labelShowText);
|
|
64
|
+
})
|
|
65
|
+
})
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
return []
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
methods: {
|
|
72
|
+
maxTagPlaceholder() {
|
|
73
|
+
if (!Array.isArray(this.valueCp)) return undefined;
|
|
74
|
+
const { alias, title } = this.componentCfg;
|
|
75
|
+
const len = this.valueCp.length || 0;
|
|
76
|
+
return this.valueCp.length > 1 ? `已选${len}个${alias || title}` : "";
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
</script>
|
|
@@ -3,5 +3,7 @@ import Select from './Select.vue';
|
|
|
3
3
|
import NumberRange from './NumberRange.vue';
|
|
4
4
|
import DateRangeQuick from './DateRangeQuick.vue';
|
|
5
5
|
import SelectDynamic from './SelectDynamic.vue';
|
|
6
|
+
import Label from './Label.vue';
|
|
7
|
+
import SelectLabel from './SelectLabel.vue'
|
|
6
8
|
|
|
7
|
-
export { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic };
|
|
9
|
+
export { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic, Label, SelectLabel };
|
|
@@ -9,7 +9,9 @@ export const WidgetTypeEnums = {
|
|
|
9
9
|
INPUT_NUMBER_RANGE: 'NUMBER_RANGE',
|
|
10
10
|
DATE_RANGE: 'DATE_RANGE',
|
|
11
11
|
DATETIME_RANGE: 'DATETIME_RANGE',
|
|
12
|
-
DATE_RANGE_QUICK: 'DATE_RANGE_QUICK'
|
|
12
|
+
DATE_RANGE_QUICK: 'DATE_RANGE_QUICK',
|
|
13
|
+
LABEL: 'LABEL',
|
|
14
|
+
SELECT_LABEL: 'SELECT_LABEL'
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
export const DatePresetValEnums = {
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
import { WidgetTypeEnums } from './enums';
|
|
3
3
|
import { WidgetCfgMaps } from './widgetCfgMaps';
|
|
4
4
|
import { filterApiFn } from '../../mixins/mixins';
|
|
5
|
-
import dynamicMethod from './mixins/dynamic-method'
|
|
5
|
+
import dynamicMethod from './mixins/dynamic-method';
|
|
6
|
+
import labelMethod from './mixins/label-method';
|
|
6
7
|
import { debounce } from "lodash";
|
|
7
8
|
|
|
8
9
|
const UseSelfWidth = [WidgetTypeEnums.DATE, WidgetTypeEnums.DATE_TIME, WidgetTypeEnums.CHECKBOX_GROUP];
|
|
@@ -22,7 +23,7 @@ export default {
|
|
|
22
23
|
default: () => ({})
|
|
23
24
|
},
|
|
24
25
|
},
|
|
25
|
-
mixins: [filterApiFn, dynamicMethod],
|
|
26
|
+
mixins: [filterApiFn, dynamicMethod, labelMethod],
|
|
26
27
|
model: {
|
|
27
28
|
event: "update:value",
|
|
28
29
|
prop: "value",
|
|
@@ -35,6 +36,9 @@ export default {
|
|
|
35
36
|
get() {
|
|
36
37
|
return this.cfg.value;
|
|
37
38
|
}
|
|
39
|
+
},
|
|
40
|
+
isQuick() {
|
|
41
|
+
return this.source === 'quickSearch'
|
|
38
42
|
}
|
|
39
43
|
},
|
|
40
44
|
data() {
|
|
@@ -47,7 +51,7 @@ export default {
|
|
|
47
51
|
this.$emit("outFilterChange");
|
|
48
52
|
},
|
|
49
53
|
getEleWidth(cfg) {
|
|
50
|
-
if(this.
|
|
54
|
+
if(this.isQuick) return '100%';
|
|
51
55
|
const { widgetType } = cfg;
|
|
52
56
|
if (UseSelfWidth.includes(widgetType)) return;
|
|
53
57
|
let defW = 200
|
|
@@ -57,7 +61,7 @@ export default {
|
|
|
57
61
|
return `${cfg.advanceColWidth||defW}px`;
|
|
58
62
|
},
|
|
59
63
|
getEleMinWidth(cfg){
|
|
60
|
-
if(this.
|
|
64
|
+
if(!this.isQuick) return `${cfg.advanceColWidth|| 195}px`;
|
|
61
65
|
const { widgetType } = cfg;
|
|
62
66
|
if (!unsetMinWidth.includes(widgetType)) return;
|
|
63
67
|
return `unset`;
|
|
@@ -67,7 +71,7 @@ export default {
|
|
|
67
71
|
const { props, handlerProps } = WidgetCfgMaps.get(widgetType);
|
|
68
72
|
let Props = { ...props };
|
|
69
73
|
if (handlerProps) {
|
|
70
|
-
Props = handlerProps(Props, { ...widgetCfg, title: alias || title, fieldType });
|
|
74
|
+
Props = handlerProps(Props, { ...widgetCfg, title: alias || title, fieldType, isQuick: this.isQuick });
|
|
71
75
|
}
|
|
72
76
|
if (customPlaceholder) {
|
|
73
77
|
Props.placeholder = customPlaceholder;
|
|
@@ -76,6 +80,9 @@ export default {
|
|
|
76
80
|
Props.dropdownVisibleChangeRender = this.dropdownVisibleChangeRender;
|
|
77
81
|
Props.handleWordBookSearchRender = this.handleWordBookSearchRender;
|
|
78
82
|
}
|
|
83
|
+
if(widgetType === 'LABEL' || widgetType === 'SELECT_LABEL') {
|
|
84
|
+
Props.getLabelListMethodRender = this.getLabelListMethodRender;
|
|
85
|
+
}
|
|
79
86
|
this.initialProps = Props;
|
|
80
87
|
if (Props.value) {
|
|
81
88
|
this.valueCp = Props.value;
|
|
@@ -89,7 +96,7 @@ export default {
|
|
|
89
96
|
const { value } = cfg;
|
|
90
97
|
const { component, style, eventsBySearch = [] } = WidgetCfgMaps.get(widgetType);
|
|
91
98
|
const props = { ...this.initialProps, value };
|
|
92
|
-
|
|
99
|
+
|
|
93
100
|
|
|
94
101
|
const EventsBySearch = eventsBySearch.reduce((evts, item) => {
|
|
95
102
|
const { name, handler } = item;
|
|
@@ -151,7 +151,13 @@ export default {
|
|
|
151
151
|
},
|
|
152
152
|
handleWordBookSearchDef(value, item, config = {}) {
|
|
153
153
|
let params = this.wordbookDataParamsRender(item.widgetCfg.dynamicOptionInfo);
|
|
154
|
-
let
|
|
154
|
+
let { tableDataType, filterKeys } = item?.widgetCfg?.dynamicOptionInfo || {};
|
|
155
|
+
let searchKeyName = 'keyword';
|
|
156
|
+
// API类型的列表, keyword名字为filterKeys的值
|
|
157
|
+
if (tableDataType === 'API' && Array.isArray(filterKeys) && filterKeys.length) {
|
|
158
|
+
searchKeyName = filterKeys[0] || 'keyword';
|
|
159
|
+
}
|
|
160
|
+
let rp = { [searchKeyName]: value, ...params, ...config };
|
|
155
161
|
this.wordbookDataMethodRender(rp, item);
|
|
156
162
|
}
|
|
157
163
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {},
|
|
3
|
+
data() {
|
|
4
|
+
return {};
|
|
5
|
+
},
|
|
6
|
+
methods: {
|
|
7
|
+
getLabelDataRender(params) {
|
|
8
|
+
return this.handleGetConfigApi(params, 'requestListByClassify').then(res => {
|
|
9
|
+
if (typeof res.data === 'object') {
|
|
10
|
+
res.data.reqParams = params;
|
|
11
|
+
}
|
|
12
|
+
return res;
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
getLabelListMethodRender(item) {
|
|
16
|
+
const { classifyStr = '' } = item.widgetCfg || {};
|
|
17
|
+
this.getLabelDataRender({ classifyStr }).then(({ data }) => {
|
|
18
|
+
const { list = [] } = data;
|
|
19
|
+
this.$set(item, 'tagList', list);
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WidgetTypeEnums, DatePresetValEnums } from './enums';
|
|
2
2
|
import { InputNumber, Input, DatePicker } from 'ant-design-vue';
|
|
3
|
-
import { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic } from './components';
|
|
3
|
+
import { CheckboxGroup, Select, NumberRange, DateRangeQuick, SelectDynamic, Label, SelectLabel } from './components';
|
|
4
4
|
import moment from 'moment';
|
|
5
5
|
import { presetValToTimestamp } from './helpers/presetValToTimestamp';
|
|
6
6
|
|
|
@@ -149,8 +149,10 @@ export const WidgetCfgMaps = new Map([
|
|
|
149
149
|
{
|
|
150
150
|
component: NumberRange,
|
|
151
151
|
props: {},
|
|
152
|
-
handlerProps(props, { valueList, multiple } = {}) {
|
|
153
|
-
const
|
|
152
|
+
handlerProps(props, { valueList, multiple, title, isQuick } = {}) {
|
|
153
|
+
const placeholderS = isQuick ? '最小值' : `起始${title}`;
|
|
154
|
+
const placeholderE = isQuick ? '最大值' : `截止${title}`;
|
|
155
|
+
const Props = { ...props, multiple, placeholderS, placeholderE };
|
|
154
156
|
if (Array.isArray(valueList)) Props.options = valueList.map(({ value, label }) => ({ value, label }));
|
|
155
157
|
return Props;
|
|
156
158
|
},
|
|
@@ -212,7 +214,8 @@ export const WidgetCfgMaps = new Map([
|
|
|
212
214
|
component: DateRangeQuick,
|
|
213
215
|
props: {},
|
|
214
216
|
handlerProps(props, { fieldType } = {}) {
|
|
215
|
-
|
|
217
|
+
let str = fieldType === 'DATE' ? '日期' : '时间';
|
|
218
|
+
const Props = { ...props, placeholderS: `开始${str}`, placeholderE: `结束${str}`, fieldType };
|
|
216
219
|
return Props;
|
|
217
220
|
},
|
|
218
221
|
setDefaultValue: SetDefVal
|
|
@@ -241,5 +244,45 @@ export const WidgetCfgMaps = new Map([
|
|
|
241
244
|
},
|
|
242
245
|
setDefaultValue: SetDefVal
|
|
243
246
|
}
|
|
244
|
-
]
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
WidgetTypeEnums.LABEL,
|
|
250
|
+
{
|
|
251
|
+
component: Label,
|
|
252
|
+
props: {},
|
|
253
|
+
handlerProps(props) {
|
|
254
|
+
const Props = { ...props };
|
|
255
|
+
return Props;
|
|
256
|
+
},
|
|
257
|
+
setDefaultValue(defaultValue, defValueUnit) {
|
|
258
|
+
if (defaultValue && Array.isArray(defaultValue)) {
|
|
259
|
+
return defaultValue.join('|#|');
|
|
260
|
+
}
|
|
261
|
+
return defaultValue;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
],
|
|
265
|
+
[
|
|
266
|
+
WidgetTypeEnums.SELECT_LABEL,
|
|
267
|
+
{
|
|
268
|
+
component: SelectLabel,
|
|
269
|
+
props: {
|
|
270
|
+
allowClear: true,
|
|
271
|
+
showSearch: true,
|
|
272
|
+
mode: 'default',
|
|
273
|
+
showArrow: true
|
|
274
|
+
},
|
|
275
|
+
handlerProps(props, { multiple, title } = {}) {
|
|
276
|
+
const Props = { ...props, placeholder: `请选择${title}` };
|
|
277
|
+
Props.mode = multiple ? 'multiple' : 'default';
|
|
278
|
+
return Props;
|
|
279
|
+
},
|
|
280
|
+
setDefaultValue(defaultValue, defValueUnit) {
|
|
281
|
+
if (defaultValue && Array.isArray(defaultValue)) {
|
|
282
|
+
return defaultValue.join('|#|');
|
|
283
|
+
}
|
|
284
|
+
return defaultValue;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
],
|
|
245
288
|
]);
|
|
@@ -191,7 +191,7 @@ export default {
|
|
|
191
191
|
});
|
|
192
192
|
},
|
|
193
193
|
// 保存列表搜索分类
|
|
194
|
-
async saveAdd(params) {
|
|
194
|
+
async saveAdd(params, isValidConObj, config = {}) {
|
|
195
195
|
try {
|
|
196
196
|
Object.assign(params, {
|
|
197
197
|
tableId: this.$attrs.tableId,
|
|
@@ -202,9 +202,13 @@ export default {
|
|
|
202
202
|
let res = await this.handleGetConfigApi(params, 'requestSaveTableCondiTion');
|
|
203
203
|
if (!res) return;
|
|
204
204
|
let searchFilter = this.$refs.searchFilter;
|
|
205
|
+
let {cancelSaveAdd} = config
|
|
205
206
|
if (searchFilter) {
|
|
206
207
|
searchFilter.cancelSaveAdd();
|
|
207
208
|
}
|
|
209
|
+
if(!searchFilter && typeof cancelSaveAdd === 'function') {
|
|
210
|
+
cancelSaveAdd()
|
|
211
|
+
}
|
|
208
212
|
this.$emit('saveGetTableCondiTionList');
|
|
209
213
|
this.addVisible = false;
|
|
210
214
|
} catch (error) {
|
|
@@ -10,7 +10,7 @@ function randomkey() {
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// 外层换行
|
|
13
|
-
const BlockEle = [WidgetTypeEnums.CHECKBOX_GROUP, WidgetTypeEnums.DATE_RANGE_QUICK];
|
|
13
|
+
const BlockEle = [WidgetTypeEnums.CHECKBOX_GROUP, WidgetTypeEnums.DATE_RANGE_QUICK, WidgetTypeEnums.CHECKBOX_GROUP, WidgetTypeEnums.LABEL];
|
|
14
14
|
|
|
15
15
|
export default {
|
|
16
16
|
methods: {
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
<div class="edit-label">{{ k }}:</div>
|
|
50
50
|
|
|
51
51
|
<div
|
|
52
|
-
class="
|
|
52
|
+
class="quickSearch_label-container"
|
|
53
53
|
:class="{
|
|
54
54
|
'label-container-height': !v.isUnfold && v.itemList && v.isShowBtn
|
|
55
55
|
}"
|
|
56
56
|
>
|
|
57
|
-
<div class="label-content" v-resize="el => onResize(el, v)">
|
|
57
|
+
<div class="quick-label-content" v-resize="el => onResize(el, v)">
|
|
58
58
|
<a-checkable-tag
|
|
59
59
|
v-for="(v, i) in v.itemList"
|
|
60
60
|
v-model="v.isSelect"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
:key="i"
|
|
63
63
|
:style="handleLabelColor(v)"
|
|
64
64
|
>
|
|
65
|
-
<a-tooltip placement="topLeft">
|
|
65
|
+
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5" :mouseLeaveDelay="0">
|
|
66
66
|
<template slot="title">
|
|
67
67
|
<span>{{ v.labelName }}</span>
|
|
68
68
|
</template>
|
|
@@ -393,8 +393,8 @@
|
|
|
393
393
|
<slot v-if="item.labelObj && Object.keys(item.labelObj || {}).length > 0">
|
|
394
394
|
<div v-for="(v, k) in item.labelObj" :key="k" class="edit-label-content">
|
|
395
395
|
<div class="edit-label">{{ k }}:</div>
|
|
396
|
-
<div class="
|
|
397
|
-
<div class="label-content">
|
|
396
|
+
<div class="quickSearch_label-container">
|
|
397
|
+
<div class="quick-label-content">
|
|
398
398
|
<a-checkable-tag
|
|
399
399
|
v-for="(v, i) in v.itemList"
|
|
400
400
|
v-model="v.isSelect"
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
:key="i"
|
|
403
403
|
:class="['label-tag-' + handleLabelColorClass(v)]"
|
|
404
404
|
>
|
|
405
|
-
<a-tooltip placement="topLeft">
|
|
405
|
+
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5" :mouseLeaveDelay="0">
|
|
406
406
|
<template slot="title">
|
|
407
407
|
<span>{{ v.labelName }}</span>
|
|
408
408
|
</template>
|
|
@@ -722,6 +722,8 @@ import TextOverTooltip from "../components/TextOverTooltip";
|
|
|
722
722
|
import CheckboxGroup from '../components/checkbox-group/CheckboxGroup.vue'
|
|
723
723
|
import svgIcon from '@/component/svg/index.vue';
|
|
724
724
|
|
|
725
|
+
const baseActiveColor = 'rgb(85, 133, 245)';
|
|
726
|
+
|
|
725
727
|
export default create({
|
|
726
728
|
name: "quick-search",
|
|
727
729
|
mixins: [durationMixin, $utils, filterApiFn, tableSearchCon, renderWidget],
|
|
@@ -913,8 +915,14 @@ export default create({
|
|
|
913
915
|
filterOption(...arg) {
|
|
914
916
|
return utils.filterOption(...arg);
|
|
915
917
|
},
|
|
916
|
-
handleLabelColor(
|
|
917
|
-
|
|
918
|
+
handleLabelColor(item) {
|
|
919
|
+
if('backgroundColor' in item) {
|
|
920
|
+
return item.isSelect ? {
|
|
921
|
+
background: item.backgroundColor || baseActiveColor,
|
|
922
|
+
borderColor: item.backgroundColor || baseActiveColor
|
|
923
|
+
} : {}
|
|
924
|
+
}
|
|
925
|
+
return utils.handleLabelColor(item);
|
|
918
926
|
},
|
|
919
927
|
init() {
|
|
920
928
|
this.quickSearch = [];
|
|
@@ -1777,13 +1785,18 @@ export default create({
|
|
|
1777
1785
|
|
|
1778
1786
|
/* 获取 label */
|
|
1779
1787
|
handleRequestedLabel(v) {
|
|
1788
|
+
let requestedLabel = this.filterApiConfig?.requestedLabel
|
|
1789
|
+
if (requestedLabel && typeof requestedLabel === 'function') {
|
|
1790
|
+
return this.handleGetConfigApi(v, 'requestedLabel')
|
|
1791
|
+
}
|
|
1780
1792
|
let params = { type: v, pageSize: 10000 };
|
|
1781
1793
|
return this.axios.get("/label/list", { params: params });
|
|
1782
1794
|
},
|
|
1783
1795
|
|
|
1784
1796
|
async handleSetLabelOptions(labelType, el) {
|
|
1785
1797
|
let labelObj = {};
|
|
1786
|
-
let
|
|
1798
|
+
let res = (await this.handleRequestedLabel(labelType)) || {};
|
|
1799
|
+
let labelList = res?.data?.map?.rows ||[]
|
|
1787
1800
|
labelList.forEach(n => {
|
|
1788
1801
|
this.$set(n, 'isSelect', false);
|
|
1789
1802
|
if (labelObj[n.typeName]) {
|
|
@@ -2069,14 +2082,46 @@ export default create({
|
|
|
2069
2082
|
line-height: 32px;
|
|
2070
2083
|
padding-left: 0;;
|
|
2071
2084
|
}
|
|
2085
|
+
.quickSearch_label-container{
|
|
2086
|
+
padding: 0;
|
|
2087
|
+
}
|
|
2072
2088
|
.label-container-height {
|
|
2073
2089
|
overflow: hidden;
|
|
2074
|
-
// width: 380px;
|
|
2075
2090
|
height: 74px;
|
|
2076
2091
|
flex: none;
|
|
2077
2092
|
}
|
|
2078
|
-
.
|
|
2079
|
-
|
|
2093
|
+
.quick-label-content {
|
|
2094
|
+
display: flex;
|
|
2095
|
+
flex-wrap: wrap;
|
|
2096
|
+
line-height: 34px;
|
|
2097
|
+
.ant-tag-checkable{
|
|
2098
|
+
cursor: pointer;
|
|
2099
|
+
position: relative;
|
|
2100
|
+
height: 32px;
|
|
2101
|
+
line-height: 32px;
|
|
2102
|
+
text-align: center;
|
|
2103
|
+
min-width: 108px;
|
|
2104
|
+
max-width: 108px;
|
|
2105
|
+
color: rgba(33, 33, 33, 0.6);
|
|
2106
|
+
background: rgb(250, 250, 250);
|
|
2107
|
+
border-color: rgba(213, 213, 213, 0.8);
|
|
2108
|
+
font-size: 14px;
|
|
2109
|
+
border-radius: 4px;
|
|
2110
|
+
margin-bottom: 8px;
|
|
2111
|
+
box-sizing: border-box;
|
|
2112
|
+
span {
|
|
2113
|
+
display: inline-block;
|
|
2114
|
+
width: 80px;
|
|
2115
|
+
height: 100%;
|
|
2116
|
+
line-height: 30px;
|
|
2117
|
+
overflow: hidden;
|
|
2118
|
+
text-overflow: ellipsis;
|
|
2119
|
+
white-space: nowrap;
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
.ant-tag-checkable-checked {
|
|
2123
|
+
color: #fff !important;
|
|
2124
|
+
}
|
|
2080
2125
|
}
|
|
2081
2126
|
.label-unfold-btn {
|
|
2082
2127
|
margin: 8px 0;
|