cnhis-design-vue 2.1.140 → 2.1.143
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 -19
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +152 -112
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +2395 -253
- package/es/button/style.css +1 -1
- package/es/captcha/index.js +3 -3
- package/es/card-reader-sdk/index.js +1 -1
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/fabric-chart/index.js +280 -143
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +2822 -503
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +25 -25
- package/es/multi-chat-client/index.js +19 -19
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +4 -4
- package/es/multi-chat-setting/index.js +20 -20
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +4 -4
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +35 -28
- package/es/select-person/style.css +1 -1
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +2 -2
- package/es/slider-tree/index.js +1 -1
- package/es/table-filter/index.js +2301 -138
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +1 -1
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +3064 -716
- package/lib/cui.umd.js +3064 -716
- package/lib/cui.umd.min.js +66 -66
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +5 -4
- package/packages/big-table/src/utils/headerFilter.js +54 -18
- package/packages/button/src/ButtonPrint/index.vue +27 -691
- package/packages/button/src/ButtonPrint/js/print.es.min.js +1 -1
- package/packages/button/src/ButtonPrint/js/print.es.min1.js +1 -1
- package/packages/button/src/ButtonPrint/new.vue +1438 -0
- package/packages/button/src/ButtonPrint/old.vue +809 -0
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +90 -7
- package/packages/select-person/select-person.vue +79 -67
- package/packages/table-filter/src/components/render-widget/components/CheckboxGroup.vue +18 -4
- package/packages/table-filter/src/components/render-widget/index.vue +2 -2
- package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +2 -2
|
@@ -14,7 +14,7 @@ import DropPopup from '../components/DropPopup';
|
|
|
14
14
|
import MouseRightClick from '../components/MouseRightClick';
|
|
15
15
|
import eventCommon from '../mixins/eventCommon';
|
|
16
16
|
import Bus from '../utils/bus';
|
|
17
|
-
import { cloneDeep } from 'lodash';
|
|
17
|
+
import { cloneDeep, isNumber } from 'lodash';
|
|
18
18
|
import { sortByTime } from '../utils';
|
|
19
19
|
|
|
20
20
|
const rightClickNode = [
|
|
@@ -69,6 +69,8 @@ export default {
|
|
|
69
69
|
data() {
|
|
70
70
|
this.markData = sortByTime(cloneDeep(this.templateData.bottom?.list));
|
|
71
71
|
this.markObjs = [];
|
|
72
|
+
this.otherListPointHeightRange = [];
|
|
73
|
+
this.inputObj = null;
|
|
72
74
|
return {
|
|
73
75
|
leftStartX: 0,
|
|
74
76
|
isDropVisible: false,
|
|
@@ -79,7 +81,11 @@ export default {
|
|
|
79
81
|
activeEvent: null // 当前可右键活动的对象
|
|
80
82
|
};
|
|
81
83
|
},
|
|
82
|
-
mounted() {
|
|
84
|
+
mounted() {
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
document.addEventListener('keydown', this.handleInputBoxEnterEvent, true);
|
|
87
|
+
});
|
|
88
|
+
},
|
|
83
89
|
computed: {
|
|
84
90
|
girdLineStyle() {
|
|
85
91
|
return Object.assign({}, defaultVaule.borderStyle, this.templateData.borderStyle || {});
|
|
@@ -123,18 +129,82 @@ export default {
|
|
|
123
129
|
},
|
|
124
130
|
createEvent() {
|
|
125
131
|
this.canvas.on('mouse:up', event => {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
132
|
+
const { button, target, pointer } = event;
|
|
133
|
+
const { x, y } = pointer;
|
|
134
|
+
if (this.isGridLimit(x, y)) {
|
|
135
|
+
if (button === 3) {
|
|
129
136
|
this.activeEvent = event;
|
|
130
137
|
!this.isAddEventListenerContextmenu && this.canvas.wrapperEl.addEventListener('contextmenu', this.addEventListenerContextmenu, true);
|
|
131
138
|
this.isAddEventListenerContextmenu = true;
|
|
132
139
|
}
|
|
140
|
+
if (button === 1) {
|
|
141
|
+
if (!this.otherListPointHeightRange?.length || this.inputObj) return;
|
|
142
|
+
if (target?.id && (!target?.id?.includes('_other') || target?.type !== 'list' || target.isTitle)) return;
|
|
143
|
+
let content = '';
|
|
144
|
+
if (target) {
|
|
145
|
+
if (target.moving) {
|
|
146
|
+
target.moving = false;
|
|
147
|
+
return;
|
|
148
|
+
} else {
|
|
149
|
+
content = target.origin?.value?.toString();
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
const item = this.otherListPointHeightRange.find(({ y1, y2 }) => y >= y1 && y <= y2);
|
|
153
|
+
if (isNumber(item?.dataIndex)) {
|
|
154
|
+
this.inputObj = new this.fabric.Textbox(content, {
|
|
155
|
+
left: x,
|
|
156
|
+
top: y,
|
|
157
|
+
width: 100,
|
|
158
|
+
height: 100,
|
|
159
|
+
fontSize: 18,
|
|
160
|
+
objectCaching: false,
|
|
161
|
+
hasControls: false,
|
|
162
|
+
borderColor: '#000',
|
|
163
|
+
editingBorderColor: '#000',
|
|
164
|
+
backgroundColor: '#fff',
|
|
165
|
+
fontFamily: '微软雅黑',
|
|
166
|
+
otherListPointHeightRangeItem: { ...item, left: x, target }
|
|
167
|
+
});
|
|
168
|
+
this.canvas.add(this.inputObj).setActiveObject(this.inputObj);
|
|
169
|
+
this.inputObj.enterEditing();
|
|
170
|
+
if (content) {
|
|
171
|
+
this.inputObj.setSelectionEnd(content.length);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
|
|
178
|
+
this.canvas.on('selection:cleared', ({ deselected }) => {
|
|
179
|
+
if (deselected?.find(obj => obj.otherListPointHeightRangeItem)) {
|
|
180
|
+
let { text, otherListPointHeightRangeItem } = this.inputObj;
|
|
181
|
+
text = text.replace(/^\s+|\s+$/g, '');
|
|
182
|
+
this.canvas.remove(this.inputObj);
|
|
183
|
+
this.inputObj = null;
|
|
184
|
+
if (!text) return;
|
|
185
|
+
const { dataList, left, target } = otherListPointHeightRangeItem;
|
|
186
|
+
if (target) {
|
|
187
|
+
const params = this.getOtherParams(target);
|
|
188
|
+
if (text == target.origin?.value) return;
|
|
189
|
+
this.$emit('otherChange', { ...params, data: { ...params.data, value: text } });
|
|
190
|
+
} else {
|
|
191
|
+
const index = dataList.findIndex(_left => _left > left);
|
|
192
|
+
const params = this.getOtherParams(otherListPointHeightRangeItem);
|
|
193
|
+
this.$emit('addOhter', { ...params, index: !~index ? dataList.length : index, data: { ...params.data, value: text } });
|
|
194
|
+
}
|
|
133
195
|
}
|
|
134
196
|
});
|
|
135
197
|
|
|
136
198
|
Bus.$on('deleteOther', otherList => this.$emit('deleteOther', otherList));
|
|
137
199
|
},
|
|
200
|
+
handleInputBoxEnterEvent(e) {
|
|
201
|
+
if (!this.inputObj || ![13, 27].includes(e.keyCode)) return;
|
|
202
|
+
if (e.keyCode === 27) {
|
|
203
|
+
this.inputObj.text = '';
|
|
204
|
+
}
|
|
205
|
+
this.inputObj.exitEditing();
|
|
206
|
+
this.canvas.discardActiveObject(this.inputObj);
|
|
207
|
+
},
|
|
138
208
|
// 打开右键菜单
|
|
139
209
|
openRightModal() {
|
|
140
210
|
// 一下方法不会生效,因为,polylines组件中timeRangeData.enabled设置为false操作晚于当前操作,需换一种方式
|
|
@@ -288,6 +358,7 @@ export default {
|
|
|
288
358
|
this.canvas.add(...textList);
|
|
289
359
|
},
|
|
290
360
|
async drawTextDataGroupList(list) {
|
|
361
|
+
this.otherListPointHeightRange = [];
|
|
291
362
|
let textList = [];
|
|
292
363
|
const { originX, originY } = this.propItems;
|
|
293
364
|
let top = originY + 10;
|
|
@@ -313,10 +384,18 @@ export default {
|
|
|
313
384
|
hasBorders: false,
|
|
314
385
|
...originOptions,
|
|
315
386
|
...this.eventStyle,
|
|
316
|
-
dataList: []
|
|
387
|
+
dataList: [],
|
|
388
|
+
isTitle: true
|
|
317
389
|
});
|
|
318
390
|
this.setMovingEvent(title, originOptions);
|
|
319
391
|
textList.push(title);
|
|
392
|
+
this.otherListPointHeightRange.push({
|
|
393
|
+
type: 'list',
|
|
394
|
+
dataIndex: index,
|
|
395
|
+
dataList: title.dataList,
|
|
396
|
+
y1: top - title.height / 2,
|
|
397
|
+
y2: top + title.height / 2
|
|
398
|
+
});
|
|
320
399
|
const { icon: _icon = { type: 'circle' }, dataList } = item || {};
|
|
321
400
|
let prevPoint;
|
|
322
401
|
for (let i = 0, len = dataList.length; i < len; i++) {
|
|
@@ -412,7 +491,7 @@ export default {
|
|
|
412
491
|
const index = dataList.findIndex(_left => _left > left);
|
|
413
492
|
// 使用定时器,是因为:防止上方移除重绘过慢新增完后再次触发移除重绘导致页面多次重绘节点
|
|
414
493
|
setTimeout(() => {
|
|
415
|
-
this.$emit('addOhter', { ...this.getOtherParams(point), index: !~index ?
|
|
494
|
+
this.$emit('addOhter', { ...this.getOtherParams(point), index: !~index ? dataList.length : index });
|
|
416
495
|
});
|
|
417
496
|
}
|
|
418
497
|
});
|
|
@@ -424,6 +503,7 @@ export default {
|
|
|
424
503
|
if (this.eventStyle.evented) {
|
|
425
504
|
const { endX, originX } = this.propItems;
|
|
426
505
|
point.on('moving', () => {
|
|
506
|
+
point.moving = true;
|
|
427
507
|
point.setCoords();
|
|
428
508
|
const { prevPoint, nextPoint } = point;
|
|
429
509
|
const limitLeft = prevPoint?.left || originX;
|
|
@@ -825,6 +905,9 @@ export default {
|
|
|
825
905
|
);
|
|
826
906
|
}
|
|
827
907
|
}
|
|
908
|
+
},
|
|
909
|
+
beforeDestroy() {
|
|
910
|
+
document.removeEventListener('keydown', this.handleInputBoxEnterEvent);
|
|
828
911
|
}
|
|
829
912
|
};
|
|
830
913
|
</script>
|
|
@@ -18,70 +18,72 @@
|
|
|
18
18
|
<div class="type-btn" :class="{ 'type-active': typeActiveIndex === 1 }" @click="onTypeClick(1)">选科室</div>
|
|
19
19
|
<div class="type-btn" :class="{ 'type-active': typeActiveIndex === 2 }" @click="onTypeClick(2)">选角色</div>
|
|
20
20
|
</div>
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<div v-show="search.status == 3 || (search.status == 0 && treeData.temp && treeData.temp.length == 0)" class="no-data-tips">
|
|
34
|
-
查无结果
|
|
35
|
-
</div>
|
|
36
|
-
<!-- main tree -->
|
|
37
|
-
<a-tree
|
|
38
|
-
class="main-tree-container"
|
|
39
|
-
v-show="search.status == 0"
|
|
40
|
-
ref="antTree"
|
|
41
|
-
v-model="checkedKeys.temp"
|
|
42
|
-
@expand="onExpand"
|
|
43
|
-
@check="onTreeCheck"
|
|
44
|
-
checkable
|
|
45
|
-
:expandedKeys="expandedKeys"
|
|
46
|
-
:autoExpandParent="autoExpandParent"
|
|
47
|
-
:checkStrictly="checkStrictly"
|
|
48
|
-
:selectable="false"
|
|
49
|
-
:treeData="treeData.temp"
|
|
50
|
-
:load-data="getLoadChildData"
|
|
51
|
-
:disabled="isDetail"
|
|
52
|
-
>
|
|
53
|
-
<template slot="custom" slot-scope="scope">
|
|
54
|
-
<span v-if="scope.isLeaf">
|
|
55
|
-
<a-tooltip :title="`${scope.title} ${scope.sub_title}`" :mouseEnterDelay="0.3">
|
|
56
|
-
<span class="c-title">{{ scope.title || scope.key }}  </span>
|
|
57
|
-
<span class="c-sub-title">{{ scope.sub_title }}</span>
|
|
58
|
-
</a-tooltip>
|
|
59
|
-
</span>
|
|
60
|
-
<span v-else class="p-title">
|
|
61
|
-
<span v-if="scope.title">{{ scope.title }}</span>
|
|
62
|
-
<span v-else>{{ scope.key }}</span>
|
|
63
|
-
{{ treeCount(scope.count) }}
|
|
64
|
-
</span>
|
|
21
|
+
<div class="tree-wrap">
|
|
22
|
+
<template v-if="!isSingleCheck">
|
|
23
|
+
<a-checkbox v-if="searchTreeVisable" v-model="searchChecked" :indeterminate="searchIndeterminate" @change="radioChange">
|
|
24
|
+
<!-- {{ $t("1.10.139") }} -->
|
|
25
|
+
全选
|
|
26
|
+
</a-checkbox>
|
|
27
|
+
|
|
28
|
+
<a-checkbox v-else v-model="singleChecked" :indeterminate="indeterminate" @change="radioChange">
|
|
29
|
+
<!-- {{ $t("1.10.139") }} -->
|
|
30
|
+
全选
|
|
31
|
+
</a-checkbox>
|
|
65
32
|
</template>
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
33
|
+
|
|
34
|
+
<div v-show="search.status == 3 || (search.status == 0 && treeData.temp && treeData.temp.length == 0)" class="no-data-tips">
|
|
35
|
+
查无结果
|
|
36
|
+
</div>
|
|
37
|
+
<!-- main tree -->
|
|
38
|
+
<a-tree
|
|
39
|
+
class="main-tree-container"
|
|
40
|
+
v-show="search.status == 0"
|
|
41
|
+
ref="antTree"
|
|
42
|
+
v-model="checkedKeys.temp"
|
|
43
|
+
@expand="onExpand"
|
|
44
|
+
@check="onTreeCheck"
|
|
45
|
+
checkable
|
|
46
|
+
:expandedKeys="expandedKeys"
|
|
47
|
+
:autoExpandParent="autoExpandParent"
|
|
48
|
+
:checkStrictly="checkStrictly"
|
|
49
|
+
:selectable="false"
|
|
50
|
+
:treeData="treeData.temp"
|
|
51
|
+
:load-data="getLoadChildData"
|
|
52
|
+
:disabled="isDetail"
|
|
53
|
+
>
|
|
54
|
+
<template slot="custom" slot-scope="scope">
|
|
55
|
+
<span v-if="scope.isLeaf">
|
|
56
|
+
<a-tooltip :title="`${scope.title} ${scope.sub_title}`" :mouseEnterDelay="0.3">
|
|
57
|
+
<span class="c-title">{{ scope.title || scope.key }}  </span>
|
|
58
|
+
<span class="c-sub-title">{{ scope.sub_title }}</span>
|
|
59
|
+
</a-tooltip>
|
|
60
|
+
</span>
|
|
61
|
+
<span v-else class="p-title">
|
|
62
|
+
<span v-if="scope.title">{{ scope.title }}</span>
|
|
63
|
+
<span v-else>{{ scope.key }}</span>
|
|
64
|
+
{{ treeCount(scope.count) }}
|
|
65
|
+
</span>
|
|
66
|
+
</template>
|
|
67
|
+
</a-tree>
|
|
68
|
+
<!-- search tree -->
|
|
69
|
+
<searchTree
|
|
70
|
+
v-on="$listeners"
|
|
71
|
+
ref="searchTree"
|
|
72
|
+
:visable="searchTreeVisable"
|
|
73
|
+
:formatTreeData="treeData.search"
|
|
74
|
+
:searchValue="searchValue"
|
|
75
|
+
:allCheckedKeys="checkedKeys"
|
|
76
|
+
:defaultExpandedKeys="search.defaultExpandedKeys"
|
|
77
|
+
:dataListKeys="search.dataListKeys"
|
|
78
|
+
:searchNoMore="searchNoMore"
|
|
79
|
+
:loadMorenLoadinng="loadMorenLoadinng"
|
|
80
|
+
@addCheckedkeysMain="addCheckedkeysMain"
|
|
81
|
+
@removeCheckedkeysMain="removeCheckedkeysMain"
|
|
82
|
+
@addCheckedkeysOther="addCheckedkeysOther"
|
|
83
|
+
@removeCheckedkeysOther="removeCheckedkeysOther"
|
|
84
|
+
@searchOnloadMore="searchOnloadMore"
|
|
85
|
+
></searchTree>
|
|
86
|
+
</div>
|
|
85
87
|
</div>
|
|
86
88
|
<!-- 树已选的数据 -->
|
|
87
89
|
<div class="select-wrap">
|
|
@@ -425,8 +427,16 @@ export default create({
|
|
|
425
427
|
data: {
|
|
426
428
|
immediate: true,
|
|
427
429
|
handler() {
|
|
430
|
+
this.$set(this.treeData, 'main', []);
|
|
431
|
+
this.$set(this.treeData, 'dept', []);
|
|
432
|
+
this.$set(this.treeData, 'temp', []);
|
|
428
433
|
this.$set(this.dataList, 'main', []);
|
|
429
434
|
this.$set(this.dataList, 'dept', []);
|
|
435
|
+
this.$set(this.checkedKeys, 'main', []);
|
|
436
|
+
this.$set(this.checkedKeys, 'dept', []);
|
|
437
|
+
this.$set(this.checkedKeys, 'temp', []);
|
|
438
|
+
this.singleChecked = false;
|
|
439
|
+
this.indeterminate = false;
|
|
430
440
|
this.handleData();
|
|
431
441
|
this.staticDataInit();
|
|
432
442
|
this.staticDeptAndRoleDataInit();
|
|
@@ -453,17 +463,16 @@ export default create({
|
|
|
453
463
|
if (this.getLoadChildData) {
|
|
454
464
|
this.getDefaultList();
|
|
455
465
|
} else {
|
|
456
|
-
|
|
466
|
+
setTimeout(() => {
|
|
457
467
|
const userIds = this.defaultList.filter(item => item.itemType === 'person').map(item => item.id);
|
|
458
468
|
const deptIds = this.defaultList.filter(item => item.itemType === 'dept').map(item => item.id);
|
|
459
469
|
const roleIds = this.defaultList.filter(item => item.itemType === 'role').map(item => item.id);
|
|
460
470
|
const key = ['main', 'dept', 'role'][this.typeActiveIndex];
|
|
461
|
-
console.log(deptIds, key, '666 init');
|
|
462
471
|
this.checkedKeys.main = userIds;
|
|
463
472
|
this.checkedKeys.dept = deptIds;
|
|
464
473
|
this.checkedKeys.role = roleIds;
|
|
465
474
|
this.checkedKeys.temp = this.checkedKeys[key];
|
|
466
|
-
});
|
|
475
|
+
}, 300);
|
|
467
476
|
}
|
|
468
477
|
},
|
|
469
478
|
|
|
@@ -1527,7 +1536,6 @@ export default create({
|
|
|
1527
1536
|
padding: 22px 12px 0;
|
|
1528
1537
|
max-height: 376px;
|
|
1529
1538
|
height: 376px;
|
|
1530
|
-
overflow-y: auto;
|
|
1531
1539
|
&.people-tree-left {
|
|
1532
1540
|
display: flex;
|
|
1533
1541
|
flex-direction: column;
|
|
@@ -1550,6 +1558,10 @@ export default create({
|
|
|
1550
1558
|
border-bottom-left-radius: 0;
|
|
1551
1559
|
}
|
|
1552
1560
|
}
|
|
1561
|
+
.tree-wrap {
|
|
1562
|
+
flex: 1;
|
|
1563
|
+
overflow-y: auto;
|
|
1564
|
+
}
|
|
1553
1565
|
/deep/ .main-tree-container {
|
|
1554
1566
|
> li {
|
|
1555
1567
|
width: 100%;
|
|
@@ -14,10 +14,10 @@ export default {
|
|
|
14
14
|
value: {
|
|
15
15
|
type: [Array, String, Number],
|
|
16
16
|
},
|
|
17
|
-
multiple: {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
17
|
+
multiple: {type: Boolean, default: false},
|
|
18
|
+
explicitRequired: {type: Number, default: 0},
|
|
19
|
+
filterExplicit: {type: Number, default: 0},
|
|
20
|
+
showMode: {type: String, default: 'DROPDOWN'},
|
|
21
21
|
},
|
|
22
22
|
model: {
|
|
23
23
|
prop: "value",
|
|
@@ -31,6 +31,10 @@ export default {
|
|
|
31
31
|
get() {
|
|
32
32
|
return Array.isArray(this.value) ? this.value : this.value ? [this.value] : [];
|
|
33
33
|
}
|
|
34
|
+
},
|
|
35
|
+
// 筛选外显, 外显必填并且为平铺时, 最少得一个选项
|
|
36
|
+
isNotEmpty() {
|
|
37
|
+
return this.explicitRequired == 1 && this.filterExplicit == 1 && this.showMode === 'TILE'
|
|
34
38
|
}
|
|
35
39
|
},
|
|
36
40
|
methods: {
|
|
@@ -38,6 +42,16 @@ export default {
|
|
|
38
42
|
return val.filter((v) => !this.valueCp.includes(v));
|
|
39
43
|
},
|
|
40
44
|
onChange(val) {
|
|
45
|
+
if(this.isNotEmpty) {
|
|
46
|
+
if(Array.isArray(val) && (!val || !val.length)){
|
|
47
|
+
this.$message.warning('至少选中一个');
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
if(!Array.isArray(val) && !val){
|
|
51
|
+
this.$message.warning('至少选中一个');
|
|
52
|
+
return
|
|
53
|
+
}
|
|
54
|
+
}
|
|
41
55
|
if (!this.multiple && Array.isArray(val)) {
|
|
42
56
|
this.valueCp = this.filterNewVal(val)[0];
|
|
43
57
|
this.$emit("change");
|
|
@@ -79,11 +79,11 @@ export default {
|
|
|
79
79
|
return `unset`;
|
|
80
80
|
},
|
|
81
81
|
initComponentProps(cfg) {
|
|
82
|
-
const { widgetType, alias, title, placeholder: customPlaceholder, widgetCfg, fieldType, explicitRequired, optionSetting } = cfg;
|
|
82
|
+
const { widgetType, alias, title, placeholder: customPlaceholder, widgetCfg, fieldType, explicitRequired, optionSetting, filterExplicit } = cfg;
|
|
83
83
|
const { props, handlerProps } = WidgetCfgMaps.get(widgetType);
|
|
84
84
|
let Props = { ...props };
|
|
85
85
|
if (handlerProps) {
|
|
86
|
-
Props = handlerProps(Props, { ...widgetCfg, title: alias || title, fieldType, isQuick: this.isQuick, explicitRequired, optionSetting });
|
|
86
|
+
Props = handlerProps(Props, { ...widgetCfg, title: alias || title, fieldType, isQuick: this.isQuick, explicitRequired, optionSetting, filterExplicit });
|
|
87
87
|
}
|
|
88
88
|
if (customPlaceholder) {
|
|
89
89
|
Props.placeholder = customPlaceholder;
|
|
@@ -160,9 +160,9 @@ export const WidgetCfgMaps = new Map([
|
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
162
|
],
|
|
163
|
-
handlerProps(props, { valueList, multiple, explicitRequired } = {}) {
|
|
163
|
+
handlerProps(props, { valueList, multiple, explicitRequired, filterExplicit, showMode } = {}) {
|
|
164
164
|
const allowClear = explicitRequired != 1;
|
|
165
|
-
const Props = { ...props, multiple, allowClear };
|
|
165
|
+
const Props = { ...props, multiple, allowClear, explicitRequired, filterExplicit, showMode };
|
|
166
166
|
if (Array.isArray(valueList)) Props.options = valueList.map(({ value, label }) => ({ value, label }));
|
|
167
167
|
return Props;
|
|
168
168
|
},
|