cnhis-design-vue 2.1.138 → 2.1.141
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 +46 -7
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +26 -26
- package/es/button/index.js +66 -50
- 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 +309 -172
- package/es/fabric-chart/style.css +1 -1
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +722 -496
- 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 +59 -52
- package/es/scale-view/style.css +1 -1
- package/es/select/index.js +4 -4
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +41 -31
- 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 +198 -126
- 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 +825 -599
- package/lib/cui.umd.js +825 -599
- package/lib/cui.umd.min.js +24 -24
- package/package.json +1 -1
- package/packages/button/src/ButtonPrint/index.vue +8 -3
- package/packages/button/src/ButtonPrint/js/print.es.min.js +1 -1
- package/packages/button/src/ButtonPrint/js/print.es.min1.js +1 -3
- package/packages/fabric-chart/src/components/TimeScaleValue.vue +2 -2
- package/packages/fabric-chart/src/fabric-chart/FabricTextGroup.vue +91 -8
- package/packages/scale-view/scaleView.vue +7 -2
- package/packages/select-person/select-person.vue +82 -68
- package/packages/table-filter/src/components/render-widget/components/CheckboxGroup.vue +20 -4
- package/packages/table-filter/src/components/render-widget/index.vue +7 -3
- package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +13 -2
|
@@ -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,6 +427,13 @@ export default create({
|
|
|
425
427
|
data: {
|
|
426
428
|
immediate: true,
|
|
427
429
|
handler() {
|
|
430
|
+
this.$set(this.dataList, 'main', []);
|
|
431
|
+
this.$set(this.dataList, 'dept', []);
|
|
432
|
+
this.$set(this.checkedKeys, 'main', []);
|
|
433
|
+
this.$set(this.checkedKeys, 'dept', []);
|
|
434
|
+
this.$set(this.checkedKeys, 'temp', []);
|
|
435
|
+
this.singleChecked = false;
|
|
436
|
+
this.indeterminate = false;
|
|
428
437
|
this.handleData();
|
|
429
438
|
this.staticDataInit();
|
|
430
439
|
this.staticDeptAndRoleDataInit();
|
|
@@ -451,17 +460,16 @@ export default create({
|
|
|
451
460
|
if (this.getLoadChildData) {
|
|
452
461
|
this.getDefaultList();
|
|
453
462
|
} else {
|
|
454
|
-
|
|
463
|
+
setTimeout(() => {
|
|
455
464
|
const userIds = this.defaultList.filter(item => item.itemType === 'person').map(item => item.id);
|
|
456
465
|
const deptIds = this.defaultList.filter(item => item.itemType === 'dept').map(item => item.id);
|
|
457
466
|
const roleIds = this.defaultList.filter(item => item.itemType === 'role').map(item => item.id);
|
|
458
467
|
const key = ['main', 'dept', 'role'][this.typeActiveIndex];
|
|
459
|
-
console.log(deptIds, key, '666 init');
|
|
460
468
|
this.checkedKeys.main = userIds;
|
|
461
469
|
this.checkedKeys.dept = deptIds;
|
|
462
470
|
this.checkedKeys.role = roleIds;
|
|
463
471
|
this.checkedKeys.temp = this.checkedKeys[key];
|
|
464
|
-
});
|
|
472
|
+
}, 300);
|
|
465
473
|
}
|
|
466
474
|
},
|
|
467
475
|
|
|
@@ -1387,7 +1395,10 @@ export default create({
|
|
|
1387
1395
|
childKeys.push(item.key);
|
|
1388
1396
|
});
|
|
1389
1397
|
const allParentIds = getAllParentId(this.treeData[propStr], node.eventKey)?.filter(Boolean) || [];
|
|
1390
|
-
totalCheckedKeys = [...new Set(preChecked.concat(checkedKeys, childKeys))]
|
|
1398
|
+
totalCheckedKeys = [...new Set(preChecked.concat(checkedKeys, childKeys))];
|
|
1399
|
+
if (!this.checkStrictly) {
|
|
1400
|
+
totalCheckedKeys = totalCheckedKeys.filter(id => !allParentIds.includes(id));
|
|
1401
|
+
}
|
|
1391
1402
|
} else {
|
|
1392
1403
|
// 如果是取消从之前的选择中把当前点击的及其子级去除选中作为temp值(兼容搜索的情况)
|
|
1393
1404
|
let keyData = {};
|
|
@@ -1522,7 +1533,6 @@ export default create({
|
|
|
1522
1533
|
padding: 22px 12px 0;
|
|
1523
1534
|
max-height: 376px;
|
|
1524
1535
|
height: 376px;
|
|
1525
|
-
overflow-y: auto;
|
|
1526
1536
|
&.people-tree-left {
|
|
1527
1537
|
display: flex;
|
|
1528
1538
|
flex-direction: column;
|
|
@@ -1545,6 +1555,10 @@ export default create({
|
|
|
1545
1555
|
border-bottom-left-radius: 0;
|
|
1546
1556
|
}
|
|
1547
1557
|
}
|
|
1558
|
+
.tree-wrap {
|
|
1559
|
+
flex: 1;
|
|
1560
|
+
overflow-y: auto;
|
|
1561
|
+
}
|
|
1548
1562
|
/deep/ .main-tree-container {
|
|
1549
1563
|
> li {
|
|
1550
1564
|
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,11 +42,23 @@ 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];
|
|
57
|
+
this.$emit("change");
|
|
43
58
|
return;
|
|
44
59
|
}
|
|
45
60
|
this.valueCp = val;
|
|
61
|
+
this.$emit("change");
|
|
46
62
|
},
|
|
47
63
|
},
|
|
48
64
|
}
|
|
@@ -69,17 +69,21 @@ export default {
|
|
|
69
69
|
return `${width||defW}px`;
|
|
70
70
|
},
|
|
71
71
|
getEleMinWidth(cfg){
|
|
72
|
-
if(!this.isQuick) return `${cfg.advanceColWidth|| 195}px`;
|
|
73
72
|
const { widgetType } = cfg;
|
|
73
|
+
if(!this.isQuick) {
|
|
74
|
+
if(widgetType === WidgetTypeEnums.CHECKBOX_GROUP) return;
|
|
75
|
+
return `${cfg.advanceColWidth|| 195}px`;
|
|
76
|
+
}
|
|
77
|
+
|
|
74
78
|
if (!unsetMinWidth.includes(widgetType)) return;
|
|
75
79
|
return `unset`;
|
|
76
80
|
},
|
|
77
81
|
initComponentProps(cfg) {
|
|
78
|
-
const { widgetType, alias, title, placeholder: customPlaceholder, widgetCfg, fieldType, explicitRequired, optionSetting } = cfg;
|
|
82
|
+
const { widgetType, alias, title, placeholder: customPlaceholder, widgetCfg, fieldType, explicitRequired, optionSetting, filterExplicit } = cfg;
|
|
79
83
|
const { props, handlerProps } = WidgetCfgMaps.get(widgetType);
|
|
80
84
|
let Props = { ...props };
|
|
81
85
|
if (handlerProps) {
|
|
82
|
-
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 });
|
|
83
87
|
}
|
|
84
88
|
if (customPlaceholder) {
|
|
85
89
|
Props.placeholder = customPlaceholder;
|
|
@@ -149,9 +149,20 @@ export const WidgetCfgMaps = new Map([
|
|
|
149
149
|
style: {
|
|
150
150
|
'line-height': '32px'
|
|
151
151
|
},
|
|
152
|
-
|
|
152
|
+
eventsBySearch: [
|
|
153
|
+
{
|
|
154
|
+
name: 'change',
|
|
155
|
+
handler(e, search, props, item) {
|
|
156
|
+
const { filterExplicit, widgetCfg = {} } = item || {};
|
|
157
|
+
const { multiple, showMode } = widgetCfg;
|
|
158
|
+
if (filterExplicit != 1 || multiple || showMode != 'TILE') return;
|
|
159
|
+
search();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
],
|
|
163
|
+
handlerProps(props, { valueList, multiple, explicitRequired, filterExplicit, showMode } = {}) {
|
|
153
164
|
const allowClear = explicitRequired != 1;
|
|
154
|
-
const Props = { ...props, multiple, allowClear };
|
|
165
|
+
const Props = { ...props, multiple, allowClear, explicitRequired, filterExplicit, showMode };
|
|
155
166
|
if (Array.isArray(valueList)) Props.options = valueList.map(({ value, label }) => ({ value, label }));
|
|
156
167
|
return Props;
|
|
157
168
|
},
|