cnhis-design-vue 2.1.45 → 2.1.46
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 +17 -3
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +76 -50
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +2 -2
- package/es/captcha/index.js +3 -3
- 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/fabric-chart/index.js +9 -9
- package/es/form-table/index.js +17 -17
- package/es/index/index.js +409 -261
- 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 +24 -24
- package/es/multi-chat-client/index.js +18 -18
- 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-view/index.js +79 -58
- 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 +2 -2
- package/es/shortcut-setter/index.js +2 -2
- package/es/table-filter/index.js +162 -61
- 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 +482 -334
- package/lib/cui.umd.js +482 -334
- package/lib/cui.umd.min.js +18 -18
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +18 -3
- package/packages/big-table/src/utils/bigTableProps.js +4 -0
- package/packages/scale-view/formitem/r-choice.vue +13 -1
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +121 -50
- package/packages/table-filter/src/components/multi-select/multi-select.vue +8 -0
package/package.json
CHANGED
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
iconOpen: 'iconfont icon-a-xitongtubiaozhediejian',
|
|
99
99
|
iconClose: 'iconfont icon-a-xitongtubiaotianjia'
|
|
100
100
|
}"
|
|
101
|
+
v-bind="tableAttrs"
|
|
101
102
|
>
|
|
102
103
|
<template v-slot:empty>
|
|
103
104
|
<div v-if="isShowEmpty">
|
|
@@ -363,6 +364,9 @@ export default create({
|
|
|
363
364
|
tableFieldMap[v.tableField] = v;
|
|
364
365
|
});
|
|
365
366
|
return tableFieldMap;
|
|
367
|
+
},
|
|
368
|
+
tableAttrs(){
|
|
369
|
+
return this?.tableProps || {}
|
|
366
370
|
}
|
|
367
371
|
},
|
|
368
372
|
watch: {
|
|
@@ -2956,6 +2960,10 @@ export default create({
|
|
|
2956
2960
|
}
|
|
2957
2961
|
},
|
|
2958
2962
|
setRowStatus(vxeTable, rowIndex, value) {
|
|
2963
|
+
/**
|
|
2964
|
+
* 行编辑状态切换,样式修改
|
|
2965
|
+
* 目前行编辑的状态行高度为66px,普通状态的高度应取配置值(如果有)
|
|
2966
|
+
*/
|
|
2959
2967
|
if (!vxeTable) return false;
|
|
2960
2968
|
|
|
2961
2969
|
let tableWrap = [
|
|
@@ -2975,14 +2983,21 @@ export default create({
|
|
|
2975
2983
|
|
|
2976
2984
|
let height = value ? `${value}px` : value;
|
|
2977
2985
|
let lineHeight = value ? `${value - 14}px` : value;
|
|
2978
|
-
|
|
2986
|
+
// 如value 没有值,则是恢复默认的行高
|
|
2987
|
+
if(!value){
|
|
2988
|
+
let rowheight = this?.tableAttrs?.rowConfig?.height;
|
|
2989
|
+
if(rowheight){
|
|
2990
|
+
height = `${rowheight}px`;
|
|
2991
|
+
lineHeight = '30px';
|
|
2992
|
+
}
|
|
2993
|
+
}
|
|
2979
2994
|
rowWrap.forEach(wrap => {
|
|
2980
2995
|
let rowItemWrap = [...wrap.querySelectorAll('.vxe-cell')];
|
|
2981
2996
|
rowItemWrap.push(...[...wrap.querySelectorAll('.vxe-body--column')]);
|
|
2982
2997
|
rowItemWrap.forEach(dom => {
|
|
2983
|
-
dom.style.setProperty('height', height, 'important');
|
|
2998
|
+
dom.style.setProperty('height', height, value? 'important': undefined);
|
|
2984
2999
|
dom.style.lineHeight = lineHeight;
|
|
2985
|
-
if (
|
|
3000
|
+
if (value) {
|
|
2986
3001
|
dom.style.backgroundColor = '#EFF5FF';
|
|
2987
3002
|
setTimeout(() => {
|
|
2988
3003
|
dom.title = '';
|
|
@@ -503,7 +503,7 @@ export default {
|
|
|
503
503
|
},
|
|
504
504
|
handleDynamic2StaticOptions(options) {
|
|
505
505
|
if (!options || !options.length) return [];
|
|
506
|
-
|
|
506
|
+
let arr = options.map(item => {
|
|
507
507
|
if ('cascadeData' in item) {
|
|
508
508
|
Object.assign(item, {
|
|
509
509
|
...item.cascadeData
|
|
@@ -518,10 +518,22 @@ export default {
|
|
|
518
518
|
}
|
|
519
519
|
return item;
|
|
520
520
|
});
|
|
521
|
+
|
|
522
|
+
return this.uniqArrObj(arr, this.columnKey);
|
|
523
|
+
},
|
|
524
|
+
// 数组对象去重
|
|
525
|
+
uniqArrObj(arr, name = "value") {
|
|
526
|
+
let obj = {};
|
|
527
|
+
return arr.reduce((cur, next) => {
|
|
528
|
+
obj[next[name]] ? "" : (obj[next[name]] = true && cur.push(next));
|
|
529
|
+
return cur;
|
|
530
|
+
}, []);
|
|
521
531
|
},
|
|
522
532
|
// 下拉组件搜索
|
|
523
533
|
async handleSearch(value) {
|
|
524
534
|
try {
|
|
535
|
+
// 动态数据源转静态数据
|
|
536
|
+
if (this.cloneItem?.type == 'SELECT' && this.isDynamic2Static) return
|
|
525
537
|
this.curOptions = await this.getSearchOptions(
|
|
526
538
|
{
|
|
527
539
|
values: this.columnKey,
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
</li>
|
|
54
54
|
<!-- start--筛选外显--start -->
|
|
55
55
|
<template v-for="item in outSearchFieldList">
|
|
56
|
-
<outQuickSearch :key="item.id + item.random_key" :item="item" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
|
|
56
|
+
<outQuickSearch :key="item.id + item.random_key" :item="item" :ref="item.columnName + item.random_key" :filterApiConfig="filterApiConfigOutSearch" @outFilterChange="outFilterChange"></outQuickSearch>
|
|
57
57
|
</template>
|
|
58
58
|
<!-- end--筛选外显--end -->
|
|
59
59
|
|
|
@@ -67,41 +67,48 @@
|
|
|
67
67
|
|
|
68
68
|
<li v-if="isShowSetting('hideSearch') && !showRelatedTreeBtn" ref="inputSearchLi" class="baseSearch-input-search">
|
|
69
69
|
<template v-if="outSearchFieldList && outSearchFieldList.length">
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
<a-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
70
|
+
<slot name="searchInput" :width="(searchInputWidth || inputSearchW)" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'outSearch'">
|
|
71
|
+
<a-input
|
|
72
|
+
:style="{ width: (searchInputWidth || inputSearchW) + 'px', margin: '0 8px 8px 0' }"
|
|
73
|
+
allowClear
|
|
74
|
+
:placeholder="searchPlaceHolder"
|
|
75
|
+
:value="currentValue"
|
|
76
|
+
@input="$emit('input', $event.target.value)"
|
|
77
|
+
@pressEnter="outFilterChange"
|
|
78
|
+
class="input-search-com"
|
|
79
|
+
>
|
|
80
|
+
<template slot="prefix" v-if="showPlaceholderPrefix">
|
|
81
|
+
<a-tooltip :title="searchPlaceHolder" overlayClassName="basesearch-placeholder-tooltip">
|
|
82
|
+
<a-icon type="info-circle" class="search-placeholder-icon" />
|
|
83
|
+
</a-tooltip>
|
|
84
|
+
</template>
|
|
85
|
+
</a-input>
|
|
86
|
+
</slot>
|
|
85
87
|
</template>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
88
|
+
|
|
89
|
+
<template v-else>
|
|
90
|
+
<slot name="searchInput" :width="(searchInputWidth || inputSearchW)" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'default'">
|
|
91
|
+
<a-input-search
|
|
92
|
+
class="my-input-search input-search-com"
|
|
93
|
+
:style="{ width: (searchInputWidth || inputSearchW) + 'px' }"
|
|
94
|
+
@search="onSearch"
|
|
95
|
+
allowClear
|
|
96
|
+
:placeholder="searchPlaceHolder"
|
|
97
|
+
:value="currentValue"
|
|
98
|
+
@input="$emit('input', $event.target.value)"
|
|
99
|
+
>
|
|
100
|
+
<template slot="prefix" v-if="showPlaceholderPrefix">
|
|
101
|
+
<a-tooltip :title="searchPlaceHolder" overlayClassName="basesearch-placeholder-tooltip">
|
|
102
|
+
<a-icon type="info-circle" class="search-placeholder-icon" />
|
|
103
|
+
</a-tooltip>
|
|
104
|
+
</template>
|
|
105
|
+
<a-button slot="enterButton" type="primary">
|
|
106
|
+
<svg-icon icon-class="xitongtubiaosousuo"></svg-icon>
|
|
107
|
+
</a-button>
|
|
108
|
+
</a-input-search>
|
|
109
|
+
</slot>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
105
112
|
</li>
|
|
106
113
|
<li v-if="outSearchFieldList && outSearchFieldList.length">
|
|
107
114
|
<a-button type="primary" @click="outFilterChange" style="margin: 0 8px 8px 0">
|
|
@@ -129,20 +136,22 @@
|
|
|
129
136
|
<!-- 平铺列表 tree -->
|
|
130
137
|
<template v-if="showRelatedTreeBtn">
|
|
131
138
|
<li v-if="showRelatedSearch" :class="[isRelatedSearchFold ? 'related-search-input' : 'related-search-input-expand']">
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
<a-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
139
|
+
<slot name="searchInput" :searchPlaceHolder="searchPlaceHolder" :showPlaceholderPrefix="showPlaceholderPrefix" :type="'relatedTreeSearch'" :isRelatedSearchFold="isRelatedSearchFold" >
|
|
140
|
+
<a-input-search
|
|
141
|
+
ref="relatedSearchInput"
|
|
142
|
+
class="my-input-search my-input-search-related"
|
|
143
|
+
placeholder="请输入关键字搜索"
|
|
144
|
+
@search="onRelatedSearch"
|
|
145
|
+
allowClear
|
|
146
|
+
:value="currentValue"
|
|
147
|
+
@input="$emit('input', $event.target.value)"
|
|
148
|
+
>
|
|
149
|
+
<a-button slot="enterButton" type="primary">
|
|
150
|
+
<a-icon type="search" />
|
|
151
|
+
<!-- <svg-icon icon-class="xitongtubiaosousuo"></svg-icon> -->
|
|
152
|
+
</a-button>
|
|
153
|
+
</a-input-search>
|
|
154
|
+
</slot>
|
|
146
155
|
</li>
|
|
147
156
|
<template v-if="rowTileBtnListTree && rowTileBtnListTree.length === 1">
|
|
148
157
|
<a-button type="primary" style="margin-right: 8px; margin-bottom: 8px" @click="handleAddType(rowTileBtnListTree[0])">
|
|
@@ -368,6 +377,16 @@
|
|
|
368
377
|
* 3、右侧快速弹框保存搜索函数onSave(obj);
|
|
369
378
|
* 完整例子:<BaseSearch :onSearch='onSearch' @changeSearch='changeSearch' @onSave='onSave'/>
|
|
370
379
|
*/
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* slot:searchInput
|
|
383
|
+
* width: {number}宽度
|
|
384
|
+
* searchPlaceHolder:{string} 检索 input 的placeHolder
|
|
385
|
+
* showPlaceholderPrefix: {boolean} input 是否展示前缀icon
|
|
386
|
+
* isRelatedSearchFold: {boolean} 平铺列表树状表的检索框是否收起
|
|
387
|
+
* type:{string} relatedTreeSearch(平铺列表树状表)/outSearch(检索外显)/default(默认)
|
|
388
|
+
*/
|
|
389
|
+
|
|
371
390
|
import moment from 'moment';
|
|
372
391
|
import 'moment/locale/zh-cn';
|
|
373
392
|
|
|
@@ -1446,7 +1465,7 @@ export default create({
|
|
|
1446
1465
|
}
|
|
1447
1466
|
if (!rowBtnList?.length) return;
|
|
1448
1467
|
this.setBatchRelationBtnIds(rowBtnList);
|
|
1449
|
-
|
|
1468
|
+
|
|
1450
1469
|
|
|
1451
1470
|
// 子列表只留下行级按钮
|
|
1452
1471
|
// if (this.isNestTableClick) {
|
|
@@ -2039,6 +2058,58 @@ export default create({
|
|
|
2039
2058
|
|
|
2040
2059
|
setPrintNumberCache(obj) {
|
|
2041
2060
|
this.$emit('setPrintNumberCache', obj);
|
|
2061
|
+
},
|
|
2062
|
+
|
|
2063
|
+
getRef(key){
|
|
2064
|
+
let ref = this.$refs[key];
|
|
2065
|
+
if(Array.isArray(ref)){
|
|
2066
|
+
return ref[0];
|
|
2067
|
+
}
|
|
2068
|
+
return ref;
|
|
2069
|
+
},
|
|
2070
|
+
|
|
2071
|
+
/**
|
|
2072
|
+
* 赋值给检索外显
|
|
2073
|
+
*/
|
|
2074
|
+
async setOutFilterValues(obj){
|
|
2075
|
+
if(typeof obj === 'object'){
|
|
2076
|
+
|
|
2077
|
+
const outObj = this.outSearchFieldList.reduce((pre,cur)=>{
|
|
2078
|
+
cur.columnName && (pre[cur.columnName]=cur)
|
|
2079
|
+
return pre;
|
|
2080
|
+
},{});
|
|
2081
|
+
|
|
2082
|
+
// 遍历对象赋值
|
|
2083
|
+
Object.keys(obj).forEach(k=>{
|
|
2084
|
+
let val = obj[k];
|
|
2085
|
+
let item = outObj[k] || {}
|
|
2086
|
+
if(vexutils.isObject(val)){
|
|
2087
|
+
let ks = ['bigValue','lessValue'];
|
|
2088
|
+
ks.forEach(kk=>{
|
|
2089
|
+
this.$set(item,kk,val[kk]);
|
|
2090
|
+
})
|
|
2091
|
+
} else {
|
|
2092
|
+
this.$set(item,'value',val);
|
|
2093
|
+
}
|
|
2094
|
+
// 检索组件,触发检索方法
|
|
2095
|
+
if (item?.comType == "SelectMuiWordBook"){
|
|
2096
|
+
this.setSelectMuiWordBookType(item,val)
|
|
2097
|
+
}
|
|
2098
|
+
})
|
|
2099
|
+
|
|
2100
|
+
await this.$nextTick();
|
|
2101
|
+
this.outFilterChange()
|
|
2102
|
+
}
|
|
2103
|
+
},
|
|
2104
|
+
|
|
2105
|
+
setSelectMuiWordBookType(item,val){
|
|
2106
|
+
if(Array.isArray(item.dataSource)){
|
|
2107
|
+
let f = item.dataSource.find(v=>v.myName == val);
|
|
2108
|
+
if(f) return
|
|
2109
|
+
}
|
|
2110
|
+
let rKey = item.columnName + item.random_key
|
|
2111
|
+
let ref = this.getRef(rKey);
|
|
2112
|
+
ref && ref.handleWordBookSearch(val,item)
|
|
2042
2113
|
}
|
|
2043
2114
|
|
|
2044
2115
|
/* */
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
:filterOption="false"
|
|
12
12
|
v-model="item.value"
|
|
13
13
|
@search="handleWordBookSearch($event, item)"
|
|
14
|
+
@change="handleChange"
|
|
14
15
|
@dropdownVisibleChange="dropdownVisibleChange($event, item)"
|
|
15
16
|
class="quick-input-select"
|
|
16
17
|
:allowClear="item.explicitRequired != 1"
|
|
@@ -164,6 +165,13 @@ export default {
|
|
|
164
165
|
let { page, keyword = undefined } = this?.item?.searchPageConfig;
|
|
165
166
|
page = cType === 'next' ? page + 1 : page - 1;
|
|
166
167
|
this.handleWordBookSearch(keyword, this.item, { page });
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
handleChange(){
|
|
171
|
+
if(this.mode === 'default'){
|
|
172
|
+
// this.$emit('change')
|
|
173
|
+
this.outFilterChange()
|
|
174
|
+
}
|
|
167
175
|
}
|
|
168
176
|
}
|
|
169
177
|
};
|