cnhis-design-vue 2.1.66 → 2.1.69
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 +51 -2
- 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 +244 -164
- package/es/big-table/style.css +1 -1
- 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 +368 -353
- 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 +2195 -1114
- 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 +53 -53
- package/es/scale-view/style.css +1 -1
- 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/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 +1293 -293
- 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 +2286 -1215
- package/lib/cui.umd.js +2286 -1215
- package/lib/cui.umd.min.js +45 -45
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +23 -4
- package/packages/big-table/src/assets/style/table-base.less +2 -1
- package/packages/big-table/src/components/AutoLayoutButton.vue +59 -31
- package/packages/big-table/src/utils/eventBroadcast.js +24 -0
- package/packages/fabric-chart/src/fabric-chart/FabricLines.vue +128 -110
- package/packages/fabric-chart/src/fabric-chart/FabricPolylines.vue +27 -20
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +9 -8
- package/packages/fabric-chart/src/mixins/eventCommon.js +4 -4
- package/packages/fabric-chart/src/mixins/fabricCommon.js +8 -22
- package/packages/scale-view/formitem/r-choice.vue +29 -14
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +54 -6
- package/packages/table-filter/src/classification/Classification-com.vue +5 -1
- package/packages/table-filter/src/components/c-tree-select/tree-select.vue +1 -1
- package/packages/table-filter/src/components/multi-select/multi-select.vue +1 -1
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +2 -2
- package/packages/table-filter/src/components/render-widget/components/CheckboxGroup.vue +52 -0
- package/packages/table-filter/src/components/render-widget/components/Select.vue +51 -0
- package/packages/table-filter/src/components/render-widget/components/index.js +7 -0
- package/packages/table-filter/src/components/render-widget/enums.js +29 -0
- package/packages/table-filter/src/components/render-widget/helpers/presetValToTimestamp.js +68 -0
- package/packages/table-filter/src/components/render-widget/index.vue +92 -0
- package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +140 -0
- package/packages/table-filter/src/components/search-modal/set-classification.vue +48 -22
- package/packages/table-filter/src/components/table-modal/TableModal.vue +6 -2
- package/packages/table-filter/src/const/dataOptions.js +8 -8
- package/packages/table-filter/src/mixins/mixins.js +24 -4
- package/packages/table-filter/src/mixins/renderWidget.js +89 -0
- package/packages/table-filter/src/mixins/tableSearchCon.js +4 -4
- package/packages/table-filter/src/quick-search/QuickSearch.vue +46 -14
|
@@ -127,12 +127,11 @@ export default {
|
|
|
127
127
|
this.canvas.on('mouse:up', event => {
|
|
128
128
|
if (event.button === 3) {
|
|
129
129
|
const { x, y } = event.pointer;
|
|
130
|
-
|
|
131
|
-
if (!(x < originX || x > endX || y < originY || y > endY)) {
|
|
130
|
+
if (this.isGridLimit(x, y)) {
|
|
132
131
|
this.activeEvent = event;
|
|
133
|
-
document.querySelector('.upper-canvas').addEventListener('contextmenu', this.addEventListenerContextmenu, true);
|
|
132
|
+
!this.isAddEventListenerContextmenu && document.querySelector('.upper-canvas').addEventListener('contextmenu', this.addEventListenerContextmenu, true);
|
|
133
|
+
this.isAddEventListenerContextmenu = true;
|
|
134
134
|
}
|
|
135
|
-
// this.willUpdateLine = line;
|
|
136
135
|
}
|
|
137
136
|
// 左键松开鼠标-批量删除
|
|
138
137
|
this.isSelectArea = false;
|
|
@@ -464,7 +463,7 @@ export default {
|
|
|
464
463
|
top: top - 5
|
|
465
464
|
});
|
|
466
465
|
};
|
|
467
|
-
const isDraw = (isMaxOrMin, maxOrMin) => isMaxOrMin &&
|
|
466
|
+
const isDraw = (isMaxOrMin, maxOrMin) => isMaxOrMin && !maxOrMin?.flickerable;
|
|
468
467
|
|
|
469
468
|
if (isDraw(isMax, max)) {
|
|
470
469
|
const line = drawLine(max);
|
|
@@ -490,7 +489,7 @@ export default {
|
|
|
490
489
|
*/
|
|
491
490
|
drawPolyline(polyline, polylineIndex, polylineType, polylineTypeId) {
|
|
492
491
|
const { originY, endY } = this.propItems;
|
|
493
|
-
const { pointAttr, lineAttr, list = [], critical = {} } = polyline;
|
|
492
|
+
const { pointAttr, lineAttr, list = [], critical = {}, diffValue = {} } = polyline;
|
|
494
493
|
this._iconClassName = polyline.type === 'img' && pointAttr.iconClassName ? pointAttr.iconClassName : '';
|
|
495
494
|
|
|
496
495
|
const pointList = [];
|
|
@@ -566,17 +565,24 @@ export default {
|
|
|
566
565
|
this.canvas.add(...lineList, ...res);
|
|
567
566
|
|
|
568
567
|
// 缓存需要闪烁的节点
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
568
|
+
setFlickerablePoints.call(this, critical);
|
|
569
|
+
setFlickerablePoints.call(this, diffValue);
|
|
570
|
+
function setFlickerablePoints(diffObj) {
|
|
571
|
+
const { max, min } = diffObj;
|
|
572
|
+
if (max?.flickerable || min?.flickerable) {
|
|
573
|
+
const maxVal = max?.value;
|
|
574
|
+
const minVal = min?.value;
|
|
575
|
+
if (maxVal && max?.flickerable) {
|
|
576
|
+
this.flickerablePoints.push(...res.filter(point => +point.__value >= +maxVal).filter(point => !this.flickerablePoints.some(_point => isSamePoint(point, _point))));
|
|
577
|
+
}
|
|
578
|
+
if (minVal && min?.flickerable) {
|
|
579
|
+
this.flickerablePoints.push(...res.filter(point => +point.__value <= +minVal).filter(point => !this.flickerablePoints.some(_point => isSamePoint(point, _point))));
|
|
580
|
+
}
|
|
578
581
|
}
|
|
579
582
|
}
|
|
583
|
+
function isSamePoint(point, _point) {
|
|
584
|
+
return point.polylineTypeId == _point.polylineTypeId && point.polylineIndex === _point.polylineIndex && point.pointIndex === _point.pointIndex;
|
|
585
|
+
}
|
|
580
586
|
});
|
|
581
587
|
|
|
582
588
|
const params = { polyline, polylineIndex, polylineType, polylineTypeId };
|
|
@@ -1015,14 +1021,15 @@ export default {
|
|
|
1015
1021
|
}
|
|
1016
1022
|
},
|
|
1017
1023
|
// 打开右键菜单
|
|
1018
|
-
openRightModal(
|
|
1024
|
+
openRightModal() {
|
|
1025
|
+
const { clientX, pageX, clientY, pageY } = this.activeEvent.e;
|
|
1019
1026
|
this.rightPos = {
|
|
1020
|
-
clientX:
|
|
1021
|
-
clientY:
|
|
1027
|
+
clientX: clientX ?? pageX,
|
|
1028
|
+
clientY: clientY ?? pageY
|
|
1022
1029
|
};
|
|
1023
1030
|
this.isRightVisible = false;
|
|
1024
|
-
const target =
|
|
1025
|
-
const id = target
|
|
1031
|
+
const target = this.activeEvent.target;
|
|
1032
|
+
const id = target?.id || '';
|
|
1026
1033
|
this.$nextTick(() => {
|
|
1027
1034
|
if (id && id.includes('_polylinePoint_')) {
|
|
1028
1035
|
this._currentPoint = target;
|
|
@@ -117,23 +117,24 @@ export default {
|
|
|
117
117
|
this.canvas.on('mouse:up', event => {
|
|
118
118
|
if (event.button === 3) {
|
|
119
119
|
const { x, y } = event.pointer;
|
|
120
|
-
|
|
121
|
-
if (!(x < originX || x > endX || y < originY || y > endY)) {
|
|
120
|
+
if (this.isGridLimit(x, y)) {
|
|
122
121
|
this.activeEvent = event;
|
|
123
|
-
document.querySelector('.upper-canvas').addEventListener('contextmenu', this.addEventListenerContextmenu, true);
|
|
122
|
+
!this.isAddEventListenerContextmenu && document.querySelector('.upper-canvas').addEventListener('contextmenu', this.addEventListenerContextmenu, true);
|
|
123
|
+
this.isAddEventListenerContextmenu = true;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
},
|
|
128
128
|
// 打开右键菜单
|
|
129
|
-
openRightModal(
|
|
129
|
+
openRightModal() {
|
|
130
|
+
const { clientX, pageX, clientY, pageY } = this.activeEvent.e;
|
|
130
131
|
this.rightPos = {
|
|
131
|
-
clientX:
|
|
132
|
-
clientY:
|
|
132
|
+
clientX: clientX ?? pageX,
|
|
133
|
+
clientY: clientY ?? pageY
|
|
133
134
|
};
|
|
134
135
|
this.isRightVisible = false;
|
|
135
|
-
const target =
|
|
136
|
-
const id = target
|
|
136
|
+
const target = this.activeEvent.target;
|
|
137
|
+
const id = target?.id || '';
|
|
137
138
|
this.$nextTick(() => {
|
|
138
139
|
if (id && id.includes('_other')) {
|
|
139
140
|
this._currentPoint = target || '';
|
|
@@ -7,7 +7,8 @@ export default {
|
|
|
7
7
|
y: 0
|
|
8
8
|
},
|
|
9
9
|
dropTimer: null,
|
|
10
|
-
isRightVisible: false
|
|
10
|
+
isRightVisible: false,
|
|
11
|
+
isAddEventListenerContextmenu: false
|
|
11
12
|
};
|
|
12
13
|
},
|
|
13
14
|
watch: {
|
|
@@ -79,13 +80,12 @@ export default {
|
|
|
79
80
|
event.preventDefault();
|
|
80
81
|
const x = event.offsetX;
|
|
81
82
|
const y = event.offsetY;
|
|
82
|
-
|
|
83
|
-
if (!(x < originX || x > endX || y < originY || y > endY)) {
|
|
83
|
+
if (this.isGridLimit(x, y)) {
|
|
84
84
|
this._active = {
|
|
85
85
|
left: x,
|
|
86
86
|
top: y
|
|
87
87
|
};
|
|
88
|
-
this.openRightModal(
|
|
88
|
+
this.openRightModal();
|
|
89
89
|
}
|
|
90
90
|
return false;
|
|
91
91
|
},
|
|
@@ -31,18 +31,6 @@ export default {
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
methods: {
|
|
34
|
-
// 根据x轴坐标获取对应的时间点
|
|
35
|
-
// getXValue(left) {
|
|
36
|
-
// const { xScaleList, xScaleCell, originX } = this.propItems;
|
|
37
|
-
// const minScale = Math.min(...xScaleList);
|
|
38
|
-
// const time = minScale + (left - originX) / xScaleCell;
|
|
39
|
-
// let d = new Date(time);
|
|
40
|
-
// const month = `00${d.getMonth() + 1}`.slice(-2);
|
|
41
|
-
// const day = `00${d.getDate()}`.slice(-2);
|
|
42
|
-
// const hours = `00${d.getHours()}`.slice(-2);
|
|
43
|
-
// const minute = `00${d.getMinutes()}`.slice(-2);
|
|
44
|
-
// return `${d.getFullYear()}-${month}-${day} ${hours}:${minute}`;
|
|
45
|
-
// },
|
|
46
34
|
getXValue(left) {
|
|
47
35
|
const { xScaleCellList, originX, endX, xScaleList } = this.propItems;
|
|
48
36
|
let time;
|
|
@@ -80,16 +68,14 @@ export default {
|
|
|
80
68
|
!~index && (index = xScaleCellList.length);
|
|
81
69
|
const obj = xScaleCellList[index - 1];
|
|
82
70
|
return obj.x + (time - obj.time) / obj.xScaleTime;
|
|
71
|
+
},
|
|
72
|
+
isGridLimit(x, y) {
|
|
73
|
+
const { originX, originY, endX, endY } = this.propItems;
|
|
74
|
+
return x >= originX && x <= endX && y >= originY && y <= endY;
|
|
75
|
+
},
|
|
76
|
+
isTopTreeAndGridLimit(x, y) {
|
|
77
|
+
const { endX, endYTop, originYTop } = this.propItems;
|
|
78
|
+
return x >= 0 && x <= endX && y >= originYTop && y <= endYTop;
|
|
83
79
|
}
|
|
84
|
-
// // 根据时间戳计算x轴坐标
|
|
85
|
-
// cumputedX(value) {
|
|
86
|
-
// if (!value) {
|
|
87
|
-
// return '';
|
|
88
|
-
// }
|
|
89
|
-
// const { xScaleList, xScaleCell, originX } = this.propItems;
|
|
90
|
-
// const time = new Date(value).getTime();
|
|
91
|
-
// const minScale = Math.min(...xScaleList);
|
|
92
|
-
// return originX + (time - minScale) * xScaleCell;
|
|
93
|
-
// },
|
|
94
80
|
}
|
|
95
81
|
};
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
:value="o[choiceUseKey]"
|
|
18
18
|
:disabled="isLock"
|
|
19
19
|
:style="{ color: choiceColor(o) }"
|
|
20
|
+
:class="{'choice-radio-presuffix':showPreSuffix(o)}"
|
|
20
21
|
>
|
|
21
22
|
<template v-if="showImgWrap(o)">
|
|
22
23
|
<span class="scale-choice-img-wrap" @click.stop.prevent>
|
|
@@ -28,11 +29,11 @@
|
|
|
28
29
|
</template>
|
|
29
30
|
<template>
|
|
30
31
|
<template v-if="isRadioItem && showPreSuffix(o)">
|
|
31
|
-
<
|
|
32
|
+
<template
|
|
32
33
|
v-if="o.prefix"
|
|
33
34
|
class="prefix-span"
|
|
34
35
|
:style="{ color: choiceColor(o) }"
|
|
35
|
-
>{{ o.prefix }}</
|
|
36
|
+
>{{ o.prefix }}</template>
|
|
36
37
|
<a-input
|
|
37
38
|
v-model="optionsPreSuffixObj[o.key]"
|
|
38
39
|
:disabled="isLock || inputLock"
|
|
@@ -40,11 +41,11 @@
|
|
|
40
41
|
:style="{ color: choiceColor(o) }"
|
|
41
42
|
placeholder="请输入"
|
|
42
43
|
/>
|
|
43
|
-
<
|
|
44
|
+
<template
|
|
44
45
|
v-if="o.suffix"
|
|
45
46
|
class="suffix-span"
|
|
46
47
|
:style="{ color: choiceColor(o) }"
|
|
47
|
-
>{{ o.suffix }}</
|
|
48
|
+
>{{ o.suffix }}</template>
|
|
48
49
|
</template>
|
|
49
50
|
<span v-else :style="{ color: choiceColor(o) }">{{ o.label }}</span>
|
|
50
51
|
<a-input
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
:value="o[choiceUseKey]"
|
|
77
78
|
:disabled="isLock"
|
|
78
79
|
:style="{ color: choiceColor(o) }"
|
|
80
|
+
:class="{'choice-checkbox-presuffix':showPreSuffix(o)}"
|
|
79
81
|
>
|
|
80
82
|
<template v-if="showImgWrap(o)">
|
|
81
83
|
<span class="scale-choice-img-wrap" @click.stop.prevent>
|
|
@@ -87,11 +89,11 @@
|
|
|
87
89
|
</template>
|
|
88
90
|
<template>
|
|
89
91
|
<template v-if="isCheckboxItem && showPreSuffix(o)">
|
|
90
|
-
<
|
|
92
|
+
<template
|
|
91
93
|
v-if="o.prefix"
|
|
92
94
|
class="prefix-span"
|
|
93
95
|
:style="{ color: choiceColor(o) }"
|
|
94
|
-
>{{ o.prefix }}</
|
|
96
|
+
>{{ o.prefix }}</template>
|
|
95
97
|
<a-input
|
|
96
98
|
v-model="optionsPreSuffixObj[o.key]"
|
|
97
99
|
:disabled="isLock || inputLock"
|
|
@@ -99,11 +101,11 @@
|
|
|
99
101
|
:style="{ color: choiceColor(o) }"
|
|
100
102
|
placeholder="请输入"
|
|
101
103
|
/>
|
|
102
|
-
<
|
|
104
|
+
<template
|
|
103
105
|
v-if="o.suffix"
|
|
104
106
|
class="suffix-span"
|
|
105
107
|
:style="{ color: choiceColor(o) }"
|
|
106
|
-
>{{ o.suffix }}</
|
|
108
|
+
>{{ o.suffix }}</template>
|
|
107
109
|
</template>
|
|
108
110
|
<span
|
|
109
111
|
v-else
|
|
@@ -630,13 +632,8 @@ export default {
|
|
|
630
632
|
border-color: transparent !important;
|
|
631
633
|
border-bottom: 1px solid #d9d9d9 !important;
|
|
632
634
|
}
|
|
633
|
-
.prefix-span {
|
|
634
|
-
padding-right: 8px;
|
|
635
|
-
}
|
|
636
|
-
.suffix-span {
|
|
637
|
-
padding-left: 8px;
|
|
638
|
-
}
|
|
639
635
|
}
|
|
636
|
+
|
|
640
637
|
/deep/ .ant-select {
|
|
641
638
|
min-width: 160px;
|
|
642
639
|
}
|
|
@@ -726,6 +723,24 @@ export default {
|
|
|
726
723
|
/deep/ .ant-checkbox-inner {
|
|
727
724
|
vertical-align: top;
|
|
728
725
|
}
|
|
726
|
+
|
|
727
|
+
/deep/ .choice-radio-presuffix,
|
|
728
|
+
/deep/ .choice-checkbox-presuffix {
|
|
729
|
+
width: 100%;
|
|
730
|
+
box-sizing: border-box;
|
|
731
|
+
> span:last-child {
|
|
732
|
+
display: inline-table;
|
|
733
|
+
width: calc(100% - 20px);
|
|
734
|
+
max-width: calc(100% - 20px);
|
|
735
|
+
flex-wrap: wrap;
|
|
736
|
+
}
|
|
737
|
+
input {
|
|
738
|
+
flex: unset;
|
|
739
|
+
width: unset;
|
|
740
|
+
max-width: 300px;
|
|
741
|
+
min-width: 80px;
|
|
742
|
+
}
|
|
743
|
+
}
|
|
729
744
|
}
|
|
730
745
|
}
|
|
731
746
|
</style>
|
|
@@ -47,13 +47,16 @@
|
|
|
47
47
|
<slot name="classification"></slot>
|
|
48
48
|
<li v-if="showQuickSearch" ref="quickSearchLi">
|
|
49
49
|
<a-button class="search-default" type="default" @click="foldQuickSearch">
|
|
50
|
-
<svg-icon icon-class="anniushaixuan" style="color:
|
|
50
|
+
<svg-icon icon-class="anniushaixuan" style="color: inherit; margin-right: 6px"></svg-icon>
|
|
51
51
|
筛选 {{ qqConObjCount ? `(${qqConObjCount})` : '' }}
|
|
52
52
|
</a-button>
|
|
53
53
|
</li>
|
|
54
54
|
<!-- start--筛选外显--start -->
|
|
55
55
|
<template v-for="item in outSearchFieldList">
|
|
56
|
-
<
|
|
56
|
+
<li class="outQuickSearch-li" v-if="item.isRender" :key="item._frontId">
|
|
57
|
+
<RenderWidget style="margin: 0 8px 8px 0" :cfg="item" v-model="item.value" @outFilterChange="outFilterChange" />
|
|
58
|
+
</li>
|
|
59
|
+
<outQuickSearch v-else :key="item.id + item.random_key" :item="item" :ref="item.columnName + item.random_key" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
|
|
57
60
|
</template>
|
|
58
61
|
<!-- end--筛选外显--end -->
|
|
59
62
|
|
|
@@ -65,7 +68,7 @@
|
|
|
65
68
|
</template>
|
|
66
69
|
<!-- end--筛选外显 跨表--end -->
|
|
67
70
|
|
|
68
|
-
<li v-if="
|
|
71
|
+
<li v-if="isShowInputSearch" ref="inputSearchLi" class="baseSearch-input-search">
|
|
69
72
|
<template v-if="outSearchFieldList && outSearchFieldList.length">
|
|
70
73
|
<slot name="searchInput" :width="(searchInputWidth || inputSearchW)" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'outSearch'">
|
|
71
74
|
<a-input
|
|
@@ -116,6 +119,13 @@
|
|
|
116
119
|
查询
|
|
117
120
|
</a-button>
|
|
118
121
|
</li>
|
|
122
|
+
<!-- 无外显字段查询,且隐藏模糊搜索 -->
|
|
123
|
+
<li v-if="showApiSearch">
|
|
124
|
+
<a-button type="primary" @click="apiSearch" style="margin: 0 8px 8px 0">
|
|
125
|
+
<a-icon type="search" style="margin-right: 6px" />
|
|
126
|
+
查询
|
|
127
|
+
</a-button>
|
|
128
|
+
</li>
|
|
119
129
|
<li v-if="showResetFilterBtn">
|
|
120
130
|
<a-button @click="handleReset" style="margin: 0 8px 8px 0">
|
|
121
131
|
<svg-icon icon-class="xitongtubiaoliebiaocaozuoanniushanchu" style="margin-right: 6px"></svg-icon>
|
|
@@ -412,6 +422,8 @@ import preventReClick from '@/directive/preventReClick';
|
|
|
412
422
|
import getBtnIcon from '../components/button-icon/getBtnIcon.js';
|
|
413
423
|
import ButtonGroup from '../components/button-group/ButtonGroup.vue';
|
|
414
424
|
|
|
425
|
+
import RenderWidget from '../components/render-widget/index.vue';
|
|
426
|
+
|
|
415
427
|
const EVALUATEList = [
|
|
416
428
|
{
|
|
417
429
|
label: '一星',
|
|
@@ -465,6 +477,9 @@ export default create({
|
|
|
465
477
|
type: Number,
|
|
466
478
|
default: 0
|
|
467
479
|
},
|
|
480
|
+
searchInputPlaceHolder: {
|
|
481
|
+
type: String,
|
|
482
|
+
},
|
|
468
483
|
onSearch: Function,
|
|
469
484
|
rowBtnList: {
|
|
470
485
|
type: Array,
|
|
@@ -611,9 +626,13 @@ export default create({
|
|
|
611
626
|
default: 1000
|
|
612
627
|
},
|
|
613
628
|
isCardNewBatch: {type: Boolean, deafult: false},
|
|
614
|
-
isBatchSelect: {type: [Number, Boolean, String], default: ''}
|
|
629
|
+
isBatchSelect: {type: [Number, Boolean, String], default: ''},
|
|
630
|
+
isAvailableApiType: {type: Boolean, deafult: false},
|
|
631
|
+
apiSearch: Function,
|
|
632
|
+
tableDataType: String
|
|
615
633
|
},
|
|
616
634
|
components: {
|
|
635
|
+
RenderWidget,
|
|
617
636
|
[Button.name]: Button,
|
|
618
637
|
[Icon.name]: Icon,
|
|
619
638
|
[Dropdown.name]: Dropdown,
|
|
@@ -794,6 +813,8 @@ export default create({
|
|
|
794
813
|
};
|
|
795
814
|
},
|
|
796
815
|
searchPlaceHolder() {
|
|
816
|
+
if (this.searchInputPlaceHolder) return this.searchInputPlaceHolder;
|
|
817
|
+
|
|
797
818
|
if (!this.useFieldList?.length || this.showRelatedTreeBtn) return '请输入关键字搜索';
|
|
798
819
|
let str = '';
|
|
799
820
|
let strList = this.useFieldList
|
|
@@ -807,6 +828,9 @@ export default create({
|
|
|
807
828
|
return str || '请输入关键字搜索';
|
|
808
829
|
},
|
|
809
830
|
showRelatedSearch() {
|
|
831
|
+
// sql类型的列表, 且有筛选外显的时候不展示平铺列表的search
|
|
832
|
+
if (this.relatedSqlOutSearch) return false;
|
|
833
|
+
if (this.isAvailableApiType) return false;
|
|
810
834
|
return this.showRelatedTreeBtn && this.isShowSetting('hideSearch');
|
|
811
835
|
},
|
|
812
836
|
showQuickSearch() {
|
|
@@ -820,6 +844,18 @@ export default create({
|
|
|
820
844
|
},
|
|
821
845
|
isCard() {
|
|
822
846
|
return this.TypeOfDisplay === 'cardNew' && this.isBatchSelect == 1
|
|
847
|
+
},
|
|
848
|
+
showApiSearch(){
|
|
849
|
+
return !this.outSearchFieldList?.length && this.isAvailableApiType
|
|
850
|
+
},
|
|
851
|
+
// sql类型的列表, 且有筛选外显的时候不展示平铺列表的search
|
|
852
|
+
relatedSqlOutSearch() {
|
|
853
|
+
return this.tableDataType === 'SQL' && !!this.outSearchFieldList?.length
|
|
854
|
+
},
|
|
855
|
+
isShowInputSearch() {
|
|
856
|
+
if(!this.isShowSetting('hideSearch')) return false;
|
|
857
|
+
if(!this.showRelatedTreeBtn) return true;
|
|
858
|
+
return this.relatedSqlOutSearch;
|
|
823
859
|
}
|
|
824
860
|
},
|
|
825
861
|
data() {
|
|
@@ -1765,7 +1801,13 @@ export default create({
|
|
|
1765
1801
|
}
|
|
1766
1802
|
|
|
1767
1803
|
// 如有配置默认值
|
|
1768
|
-
|
|
1804
|
+
const isSetDefVal = this.outSearchFieldList.some(v => {
|
|
1805
|
+
if (this.isRender(v)) {
|
|
1806
|
+
return this.isExistDefValByRenderWidget(v);
|
|
1807
|
+
}
|
|
1808
|
+
return !!v.explicitDefaultVal
|
|
1809
|
+
});
|
|
1810
|
+
if (isSetDefVal) {
|
|
1769
1811
|
this.$emit('outSearchInit');
|
|
1770
1812
|
if ('reset' != config?.type) {
|
|
1771
1813
|
this.outFilterChange({ type: 'outSearchInit' });
|
|
@@ -2026,7 +2068,13 @@ export default create({
|
|
|
2026
2068
|
* 获取外显检索的默认值设置
|
|
2027
2069
|
*/
|
|
2028
2070
|
handleGetOutSearchInitValue() {
|
|
2029
|
-
|
|
2071
|
+
const isSetDefVal = this.outSearchFieldList.some(v => {
|
|
2072
|
+
if (this.isRender(v)) {
|
|
2073
|
+
return this.isExistDefValByRenderWidget(v);
|
|
2074
|
+
}
|
|
2075
|
+
return !!v.explicitDefaultVal
|
|
2076
|
+
});
|
|
2077
|
+
if (isSetDefVal) {
|
|
2030
2078
|
let conObj = this.getConObjParams() || [];
|
|
2031
2079
|
return conObj;
|
|
2032
2080
|
}
|
|
@@ -420,7 +420,11 @@
|
|
|
420
420
|
:tableId="tableId"
|
|
421
421
|
:classifyModal="classifyModal"
|
|
422
422
|
:filterApiConfig="filterApiConfig"
|
|
423
|
-
|
|
423
|
+
>
|
|
424
|
+
<template #searchCondition="{ attrs, listeners }">
|
|
425
|
+
<slot name="searchCondition" :attrs="attrs" :listeners="listeners"></slot>
|
|
426
|
+
</template>
|
|
427
|
+
</set-classification>
|
|
424
428
|
</div>
|
|
425
429
|
</template>
|
|
426
430
|
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
:allowClear="item.explicitRequired != 1"
|
|
16
16
|
treeNodeFilterProp="title"
|
|
17
17
|
ref="quickInputSelect"
|
|
18
|
-
:placeholder="`请选择${item.alias || item.title}`"
|
|
18
|
+
:placeholder="item.placeholder || `请选择${item.alias || item.title}`"
|
|
19
19
|
>
|
|
20
20
|
<a-icon slot="suffixIcon" type="smile" />
|
|
21
21
|
<span class="init-key-loading" v-if="key === '_init_key_'" slot="title" slot-scope="{ key, value }" style="color: #08c">
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<a-select
|
|
3
3
|
:mode="mode"
|
|
4
4
|
v-if="item.com == 'SelectMui'"
|
|
5
|
-
:placeholder="`请选择${item.alias || item.title}`"
|
|
5
|
+
:placeholder="item.placeholder || `请选择${item.alias || item.title}`"
|
|
6
6
|
:style="{width: `${item.advanceColWidth||160}px`}"
|
|
7
7
|
:dropdownMatchSelectWidth="false"
|
|
8
8
|
:maxTagCount="handleMaxTagCount(item)"
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
margin: '0 8px 8px 0',
|
|
10
10
|
'font-family': item.PASSWORDTYPE ? 'text-security-disc' : 'inherit'
|
|
11
11
|
}"
|
|
12
|
-
:placeholder="`搜索${item.alias || item.title}`"
|
|
12
|
+
:placeholder="item.placeholder || `搜索${item.alias || item.title}`"
|
|
13
13
|
v-model="item.value"
|
|
14
14
|
allowClear
|
|
15
15
|
>
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
@change="outFilterChange"
|
|
56
56
|
@ok="outFilterChange"
|
|
57
57
|
v-model="item.value"
|
|
58
|
-
:placeholder="`请选择${item.alias || item.title}`"
|
|
58
|
+
:placeholder="item.placeholder || `请选择${item.alias || item.title}`"
|
|
59
59
|
v-if="item.com == 'DayPicker'"
|
|
60
60
|
style="margin: 0 8px 8px 0"
|
|
61
61
|
:showTime="false"
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<CheckboxGroup v-bind="$attrs" :value="valueCp" @change="onChange"></CheckboxGroup>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { Checkbox } from 'ant-design-vue';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
components: {
|
|
11
|
+
CheckboxGroup: Checkbox.Group,
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
value: {
|
|
15
|
+
type: [Array, String, Number],
|
|
16
|
+
},
|
|
17
|
+
multiple: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false,
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
model: {
|
|
23
|
+
prop: "value",
|
|
24
|
+
event: "update:value"
|
|
25
|
+
},
|
|
26
|
+
computed: {
|
|
27
|
+
valueCp: {
|
|
28
|
+
set(val) {
|
|
29
|
+
this.$emit("update:value", val);
|
|
30
|
+
},
|
|
31
|
+
get() {
|
|
32
|
+
return Array.isArray(this.value) ? this.value : this.value ? [this.value] : [];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
methods: {
|
|
37
|
+
filterNewVal(val) {
|
|
38
|
+
return val.filter((v) => !this.valueCp.includes(v));
|
|
39
|
+
},
|
|
40
|
+
onChange(val) {
|
|
41
|
+
if (!this.multiple && Array.isArray(val)) {
|
|
42
|
+
this.valueCp = this.filterNewVal(val)[0];
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
this.valueCp = val;
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
</script>
|
|
51
|
+
<style lang='less'>
|
|
52
|
+
</style>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Select v-bind="$attrs" v-on="$listeners" v-model="valueCp" :maxTagCount="maxTagCount" :maxTagPlaceholder="maxTagPlaceholder"></Select>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
import { Select } from 'ant-design-vue';
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
components: {
|
|
11
|
+
Select,
|
|
12
|
+
},
|
|
13
|
+
props: {
|
|
14
|
+
value: {
|
|
15
|
+
type: [Array, String, Number],
|
|
16
|
+
},
|
|
17
|
+
componentCfg: {
|
|
18
|
+
type: Object
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
model: {
|
|
22
|
+
prop: "value",
|
|
23
|
+
event: "update:value"
|
|
24
|
+
},
|
|
25
|
+
computed: {
|
|
26
|
+
valueCp: {
|
|
27
|
+
set(val) {
|
|
28
|
+
this.$emit("update:value", val);
|
|
29
|
+
},
|
|
30
|
+
get() {
|
|
31
|
+
return this.value;
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
maxTagCount() {
|
|
35
|
+
if (!Array.isArray(this.value)) return undefined;
|
|
36
|
+
const len = this.value.length || 0;
|
|
37
|
+
return len > 1 ? 0 : 1;
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
methods: {
|
|
41
|
+
maxTagPlaceholder() {
|
|
42
|
+
if (!Array.isArray(this.value)) return undefined;
|
|
43
|
+
const { alias, title } = this.componentCfg;
|
|
44
|
+
const len = this.value.length || 0;
|
|
45
|
+
return this.value.length > 1 ? `已选${len}个${alias || title}` : "";
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
}
|
|
49
|
+
</script>
|
|
50
|
+
<style lang='less'>
|
|
51
|
+
</style>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const WidgetTypeEnums = {
|
|
2
|
+
INPUT_NUMBER: "NUMBER",
|
|
3
|
+
INPUT: "TEXT",
|
|
4
|
+
SELECT: "SELECT",
|
|
5
|
+
DATE: "DATE",
|
|
6
|
+
DATE_TIME: "DATETIME",
|
|
7
|
+
CHECKBOX_GROUP: 'CHECKBOX_GROUP',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export const DatePresetValEnums = {
|
|
11
|
+
CUSTOM: "CUSTOM", // 自定义输入,特殊处理
|
|
12
|
+
|
|
13
|
+
NOW: "NOW",
|
|
14
|
+
TODAY: "TODAY",
|
|
15
|
+
TODAY_START: "TODAY_START",
|
|
16
|
+
TODAY_END: "TODAY_END",
|
|
17
|
+
TOMORROW: "TOMORROW",
|
|
18
|
+
TOMORROW_START: "TOMORROW_START",
|
|
19
|
+
TOMORROW_END: "TOMORROW_END",
|
|
20
|
+
YESTERDAY: "YESTERDAY",
|
|
21
|
+
YESTERDAY_START: "YESTERDAY_START",
|
|
22
|
+
YESTERDAY_END: "YESTERDAY_END",
|
|
23
|
+
|
|
24
|
+
WEEK_START: "THIS_WEEK_START",
|
|
25
|
+
WEEK_END: "THIS_WEEK_END",
|
|
26
|
+
|
|
27
|
+
MONTH_START: "THIS_MONTH_START",
|
|
28
|
+
MONTH_END: "THIS_MONTH_END",
|
|
29
|
+
};
|