cnhis-design-vue 2.1.116 → 2.1.118
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 +39 -20
- 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 +3801 -3630
- 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/card-reader-sdk/index.js +1 -1
- 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/direct/index.js +16 -16
- 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/full-calendar/index.js +4 -4
- package/es/index/index.js +1688 -1338
- 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 +4 -4
- package/es/shortcut-setter/index.js +10 -10
- package/es/skeleton/index.js +8 -8
- package/es/slider/index.js +8 -8
- package/es/slider-tree/index.js +9 -9
- 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 +480 -301
- 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 +80498 -59498
- package/lib/cui.umd.js +80498 -59498
- package/lib/cui.umd.min.js +84 -84
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +25 -432
- package/packages/big-table/src/utils/bigTableProps.js +3 -1
- package/packages/big-table/src/utils/headerFilter.js +491 -0
- package/packages/button/src/ButtonPrint/js/print.es.min.js +3 -3
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +1 -0
- package/packages/table-filter/src/components/multi-select/multi-select.vue +1 -1
- package/packages/table-filter/src/components/render-widget/components/SelectDynamic.vue +1 -1
- package/packages/table-filter/src/components/render-widget/index.vue +2 -2
- package/packages/table-filter/src/components/render-widget/widgetCfgMaps.js +41 -38
- package/packages/table-filter/src/mixins/mixins.js +100 -17
- package/packages/table-filter/src/quick-search/QuickSearch.vue +38 -33
|
@@ -455,6 +455,83 @@ export const outQuickSearchDefCommon = {
|
|
|
455
455
|
export const outQuickSearchFn = {
|
|
456
456
|
mixins: [renderWidget],
|
|
457
457
|
methods: {
|
|
458
|
+
isFieldFilterField(columnName) {
|
|
459
|
+
return this.originFieldList.find(v => {
|
|
460
|
+
const filterField = this.tableDataType === 'API' ? v.filterSettingMap?.filterField : v.fieldSetting?.mapping?.type === 'manual' && v.isMerge != 1 && v.notParticipatingSearch != 1;
|
|
461
|
+
return filterField && v.columnName === columnName;
|
|
462
|
+
});
|
|
463
|
+
},
|
|
464
|
+
clearOutSearchItem(item, index) {
|
|
465
|
+
if (this.isRender(item)) {
|
|
466
|
+
this.$set(this.outSearchFieldList[index], 'value', this.getDefValByRenderWidget(item));
|
|
467
|
+
return;
|
|
468
|
+
}
|
|
469
|
+
let advanceOptionSetting = item?.advanceOptionSetting;
|
|
470
|
+
// 单选
|
|
471
|
+
let optionSetting0 = String(advanceOptionSetting) == '0';
|
|
472
|
+
if (optionSetting0) {
|
|
473
|
+
this.$set(this.outSearchFieldList[index], 'value', undefined);
|
|
474
|
+
} else {
|
|
475
|
+
if (item.CONVERT && Array.isArray(item.CONVERT)) {
|
|
476
|
+
this.$set(this.outSearchFieldList[index], 'CONVERT', []);
|
|
477
|
+
}
|
|
478
|
+
this.$set(this.outSearchFieldList[index], 'value', []);
|
|
479
|
+
}
|
|
480
|
+
},
|
|
481
|
+
setOutSearchItem(item, index, find) {
|
|
482
|
+
if (this.isRender(item)) {
|
|
483
|
+
this.$set(this.outSearchFieldList[index], 'value', this.getDefValByRenderConObj(find, item));
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
let optionSetting0 = String(item.advanceOptionSetting) == '0';
|
|
487
|
+
|
|
488
|
+
let value = find?.value ?? '';
|
|
489
|
+
let isTrance = (item.CONVERT && Array.isArray(item.CONVERT)) || (item.comType == 'SelectMui' && item.con == 'CONVERT');
|
|
490
|
+
// wordbook多选
|
|
491
|
+
let isWordBookMulti = value && item.comType === 'SelectMuiWordBook' && typeof value === 'string' && value.includes('|#|');
|
|
492
|
+
if (isWordBookMulti) {
|
|
493
|
+
value = value.split('|#|');
|
|
494
|
+
}
|
|
495
|
+
if (Array.isArray(value) && isTrance) {
|
|
496
|
+
let value = find?.value?.map?.(item => JSON.stringify(item)) || find.value;
|
|
497
|
+
value = value.filter(Boolean);
|
|
498
|
+
this.$set(this.outSearchFieldList[index], 'CONVERT', value);
|
|
499
|
+
if (value.length) {
|
|
500
|
+
if (optionSetting0) {
|
|
501
|
+
let i = value[0] ? item.labelList.findIndex(v => v.value == value[0]) : '';
|
|
502
|
+
this.$set(this.outSearchFieldList[index], 'value', i);
|
|
503
|
+
} else {
|
|
504
|
+
let resVal = [];
|
|
505
|
+
item.labelList?.forEach((v, i) => {
|
|
506
|
+
if (value.includes(v.value)) {
|
|
507
|
+
resVal.push(i);
|
|
508
|
+
}
|
|
509
|
+
});
|
|
510
|
+
resVal.length && this.$set(this.outSearchFieldList[index], 'value', resVal);
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
} else {
|
|
514
|
+
this.$set(this.outSearchFieldList[index], 'value', value);
|
|
515
|
+
}
|
|
516
|
+
},
|
|
517
|
+
setOutDefaultCon(val, headerFilterFieldList) {
|
|
518
|
+
// 表头筛选/高级筛选 -> 同步到筛选外显中
|
|
519
|
+
if (!this.outSearchFieldList?.length || !this.originFieldList?.length) return;
|
|
520
|
+
headerFilterFieldList.forEach(h => {
|
|
521
|
+
let hKey = h.filterSettingMap?.filterField && h.filterSettingMap?.headerFilterKey;
|
|
522
|
+
if (!hKey) return;
|
|
523
|
+
let mItem = this.outSearchFieldList.find(o => o.columnName === hKey);
|
|
524
|
+
if (!mItem) return;
|
|
525
|
+
let mHeader = val?.length && val.find(v => v.field_key === hKey);
|
|
526
|
+
let oIndex = this.outSearchFieldList.findIndex(c => c.columnName === hKey);
|
|
527
|
+
let oItem = this.outSearchFieldList[oIndex];
|
|
528
|
+
if (mHeader) {
|
|
529
|
+
this.setOutSearchItem(oItem, oIndex, mHeader);
|
|
530
|
+
} else {
|
|
531
|
+
this.clearOutSearchItem(oItem, oIndex);
|
|
532
|
+
}
|
|
533
|
+
});
|
|
534
|
+
},
|
|
458
535
|
handlerInitSearchItem(arr) {
|
|
459
536
|
if (!Array.isArray(arr)) return;
|
|
460
537
|
arr.forEach(el => {
|
|
@@ -504,6 +581,7 @@ export const outQuickSearchFn = {
|
|
|
504
581
|
this.$set(el, 'value', tvalue);
|
|
505
582
|
const labelList = el.setting?.showSetting.map(i => {
|
|
506
583
|
i.labelName = i.change_text;
|
|
584
|
+
i.value = i.filter && JSON.stringify(i.filter);
|
|
507
585
|
return i;
|
|
508
586
|
});
|
|
509
587
|
this.$set(el, 'labelList', labelList);
|
|
@@ -576,6 +654,7 @@ export const outQuickSearchFn = {
|
|
|
576
654
|
if (attr == 'EVALUATE') {
|
|
577
655
|
let list = EVALUATEList.map(i => {
|
|
578
656
|
i.labelName = i.label;
|
|
657
|
+
i.value = i.filter && JSON.stringify(i.filter);
|
|
579
658
|
return i;
|
|
580
659
|
});
|
|
581
660
|
this.$set(el, 'labelList', list);
|
|
@@ -638,21 +717,25 @@ export const outQuickSearchFn = {
|
|
|
638
717
|
temp.value = item.value;
|
|
639
718
|
conObj.push(temp);
|
|
640
719
|
}
|
|
720
|
+
|
|
721
|
+
let useValue = item.value ?? '';
|
|
722
|
+
|
|
641
723
|
let advanceOptionSetting = item.advanceOptionSetting;
|
|
642
|
-
if (item.com === 'SelectMui' && vexutils.anyNotEmpty(
|
|
724
|
+
if (item.com === 'SelectMui' && vexutils.anyNotEmpty(useValue)) {
|
|
643
725
|
// 单选模式
|
|
644
726
|
let single = String(advanceOptionSetting) === '0';
|
|
645
727
|
if (single) {
|
|
646
|
-
if (!Array.isArray(
|
|
647
|
-
|
|
728
|
+
if (!Array.isArray(useValue)) {
|
|
729
|
+
useValue = [useValue];
|
|
730
|
+
temp.value = useValue;
|
|
648
731
|
}
|
|
649
732
|
}
|
|
650
|
-
let hasArr = Array.isArray(
|
|
733
|
+
let hasArr = Array.isArray(useValue) && useValue.length > 0;
|
|
651
734
|
if (item.comType == 'SelectMuiWordBook' && hasArr) {
|
|
652
|
-
temp.value =
|
|
735
|
+
temp.value = useValue.join('|#|');
|
|
653
736
|
} else if (item.comType == 'treeSelect') {
|
|
654
737
|
// 樹狀
|
|
655
|
-
let value =
|
|
738
|
+
let value = useValue;
|
|
656
739
|
if (typeof value === 'string') {
|
|
657
740
|
[value] = value.split('<&=&>');
|
|
658
741
|
} else if (Array.isArray(value)) {
|
|
@@ -666,7 +749,7 @@ export const outQuickSearchFn = {
|
|
|
666
749
|
} else if (item.settingObj.attr === 'EVALUATE') {
|
|
667
750
|
if (hasArr) {
|
|
668
751
|
let value = [];
|
|
669
|
-
value =
|
|
752
|
+
value = useValue.map(i => {
|
|
670
753
|
return item.labelList[i].value;
|
|
671
754
|
});
|
|
672
755
|
temp.value = value.join('|#|');
|
|
@@ -676,13 +759,13 @@ export const outQuickSearchFn = {
|
|
|
676
759
|
if (item.con == 'CONVERT') {
|
|
677
760
|
// 存在映射
|
|
678
761
|
let value = [];
|
|
679
|
-
value =
|
|
762
|
+
value = useValue.map(i => {
|
|
680
763
|
return item.labelList[i].filter;
|
|
681
764
|
});
|
|
682
765
|
temp.value = value;
|
|
683
766
|
} else {
|
|
684
767
|
let value = [];
|
|
685
|
-
value =
|
|
768
|
+
value = useValue.map(i => {
|
|
686
769
|
return item.labelList[i].labelName;
|
|
687
770
|
});
|
|
688
771
|
temp.value = value.join('|#|');
|
|
@@ -691,9 +774,9 @@ export const outQuickSearchFn = {
|
|
|
691
774
|
}
|
|
692
775
|
conObj.push(temp);
|
|
693
776
|
}
|
|
694
|
-
if (item.com === 'DatePicker' &&
|
|
695
|
-
const start_val =
|
|
696
|
-
const end_val =
|
|
777
|
+
if (item.com === 'DatePicker' && useValue.length) {
|
|
778
|
+
const start_val = useValue[0].format(item.showFormat);
|
|
779
|
+
const end_val = useValue[1].format(item.showFormat);
|
|
697
780
|
if (item.settingObj.attr === 'BIRTHDAY') {
|
|
698
781
|
temp.limit_date = `${start_val}~${end_val}`;
|
|
699
782
|
} else {
|
|
@@ -702,9 +785,9 @@ export const outQuickSearchFn = {
|
|
|
702
785
|
}
|
|
703
786
|
conObj.push(temp);
|
|
704
787
|
}
|
|
705
|
-
if (item.com === 'DayPicker' &&
|
|
706
|
-
const start_val =
|
|
707
|
-
const end_val =
|
|
788
|
+
if (item.com === 'DayPicker' && useValue) {
|
|
789
|
+
const start_val = useValue.startOf('day').format('YYYY-MM-DD HH:mm:ss');
|
|
790
|
+
const end_val = useValue.endOf('day').format('YYYY-MM-DD HH:mm:ss');
|
|
708
791
|
if (item.settingObj.attr === 'BIRTHDAY') {
|
|
709
792
|
temp.limit_date = `${start_val}~${end_val}`;
|
|
710
793
|
} else {
|
|
@@ -738,8 +821,8 @@ export const outQuickSearchFn = {
|
|
|
738
821
|
temp.con = 'EQ';
|
|
739
822
|
conObj.push(JSON.parse(JSON.stringify(temp)));
|
|
740
823
|
}
|
|
741
|
-
if (item.com === 'SelectQuote' &&
|
|
742
|
-
temp.value =
|
|
824
|
+
if (item.com === 'SelectQuote' && useValue.length) {
|
|
825
|
+
temp.value = useValue.join('|#|');
|
|
743
826
|
conObj.push(temp);
|
|
744
827
|
}
|
|
745
828
|
});
|
|
@@ -990,27 +990,29 @@ export default create({
|
|
|
990
990
|
});
|
|
991
991
|
this.parentNames = parentNames;
|
|
992
992
|
},
|
|
993
|
+
clearQuickItem(item, index) {
|
|
994
|
+
if (this.isRender(item)) {
|
|
995
|
+
this.$set(this.quickSearch[index], "value", this.getDefValByRenderWidget(item));
|
|
996
|
+
return;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
let advanceOptionSetting = item?.advanceOptionSetting;
|
|
1000
|
+
// 单选
|
|
1001
|
+
let optionSetting0 =String(advanceOptionSetting) == '0';
|
|
1002
|
+
let settingLen = item.setting?.showSetting?.length;
|
|
1003
|
+
let isCheck = optionSetting0 && settingLen && settingLen < 10;
|
|
1004
|
+
if(optionSetting0 && !isCheck){
|
|
1005
|
+
this.$set(this.quickSearch[index], "value", undefined);
|
|
1006
|
+
} else {
|
|
1007
|
+
if (item.CONVERT && Array.isArray(item.CONVERT)) {
|
|
1008
|
+
this.$set(this.quickSearch[index], "CONVERT", []);
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
},
|
|
993
1012
|
setDefaultCon(val) {
|
|
994
1013
|
if (!val.length) {
|
|
995
1014
|
this.quickSearch.forEach((item, index) => {
|
|
996
|
-
|
|
997
|
-
this.$set(this.quickSearch[index], "value", this.getDefValByRenderWidget(item));
|
|
998
|
-
return;
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
let advanceOptionSetting = item?.advanceOptionSetting;
|
|
1002
|
-
// 单选
|
|
1003
|
-
let optionSetting0 =String(advanceOptionSetting) == '0';
|
|
1004
|
-
let settingLen = item.setting?.showSetting?.length;
|
|
1005
|
-
let isCheck = optionSetting0 && settingLen && settingLen < 10;
|
|
1006
|
-
if(optionSetting0 && !isCheck){
|
|
1007
|
-
this.$set(this.quickSearch[index], "value", undefined);
|
|
1008
|
-
} else {
|
|
1009
|
-
if (item.CONVERT && Array.isArray(item.CONVERT)) {
|
|
1010
|
-
this.$set(this.quickSearch[index], "CONVERT", []);
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
|
|
1015
|
+
this.clearQuickItem(item, index)
|
|
1014
1016
|
});
|
|
1015
1017
|
return false;
|
|
1016
1018
|
}
|
|
@@ -1045,7 +1047,7 @@ export default create({
|
|
|
1045
1047
|
this.$set(this.quickSearch[index], "value", value);
|
|
1046
1048
|
}
|
|
1047
1049
|
} else {
|
|
1048
|
-
this
|
|
1050
|
+
this.clearQuickItem(item, index)
|
|
1049
1051
|
}
|
|
1050
1052
|
});
|
|
1051
1053
|
},
|
|
@@ -1315,27 +1317,30 @@ export default create({
|
|
|
1315
1317
|
this.resetChangeWindow();
|
|
1316
1318
|
|
|
1317
1319
|
if (!this.validConObj(mergeConObj, this.searchFieldList, this.searchFieldLimit)) return false;
|
|
1318
|
-
this.$emit("onSave", mergeConObj);
|
|
1320
|
+
this.$emit("onSave", mergeConObj, false, [], [], { isQuickSearch: true });
|
|
1319
1321
|
return this.quickSearch;
|
|
1320
1322
|
},
|
|
1321
1323
|
// 方便外部调用
|
|
1322
1324
|
getMergeConObj() {
|
|
1323
1325
|
let conObj = this.getConObjParams() || [];
|
|
1324
1326
|
let mergeConObj = [...conObj];
|
|
1325
|
-
//
|
|
1326
|
-
this.
|
|
1327
|
-
|
|
1328
|
-
|
|
1327
|
+
// 兼容二次开发平台逻辑
|
|
1328
|
+
if(this.libSource != 'lowCode') {
|
|
1329
|
+
// 合并表格表头未设置高级筛选的筛选项
|
|
1330
|
+
this.quickSearchConfig.forEach(i => {
|
|
1331
|
+
let find = mergeConObj.find(j => {
|
|
1332
|
+
return i.field_key === j.field_key;
|
|
1333
|
+
});
|
|
1334
|
+
if (
|
|
1335
|
+
!find &&
|
|
1336
|
+
!this.quickSearch.find(item => {
|
|
1337
|
+
return item.columnName === i.field_key;
|
|
1338
|
+
})
|
|
1339
|
+
) {
|
|
1340
|
+
mergeConObj.push(i);
|
|
1341
|
+
}
|
|
1329
1342
|
});
|
|
1330
|
-
|
|
1331
|
-
!find &&
|
|
1332
|
-
!this.quickSearch.find(item => {
|
|
1333
|
-
return item.columnName === i.field_key;
|
|
1334
|
-
})
|
|
1335
|
-
) {
|
|
1336
|
-
mergeConObj.push(i);
|
|
1337
|
-
}
|
|
1338
|
-
});
|
|
1343
|
+
}
|
|
1339
1344
|
return mergeConObj || [];
|
|
1340
1345
|
},
|
|
1341
1346
|
getConObjParams() {
|