cnhis-design-vue 0.2.66-beta → 0.2.69-beta
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/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 +1808 -1302
- package/es/big-table/style.css +1 -1
- package/es/breadcrumb/index.js +8 -8
- package/es/button/index.js +28 -28
- 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/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 +62 -62
- package/es/index/index.js +2206 -1720
- 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 +75 -75
- package/es/multi-chat-client/index.js +69 -69
- 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-view/index.js +24 -24
- package/es/select/index.js +11 -11
- package/es/select-label/index.js +11 -11
- package/es/select-person/index.js +2 -2
- 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 +199 -177
- 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/utils/utils-map.js +33 -0
- package/es/utils/vexutils.js +21 -0
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +4824 -3817
- package/lib/cui.umd.js +4824 -3817
- package/lib/cui.umd.min.js +67 -67
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +107 -221
- package/packages/big-table/src/assets/style/table-base.less +16 -0
- package/packages/big-table/src/components/edit-form/EditForm.vue +27 -9
- package/packages/big-table/src/components/edit-form/edit-component/config-data/index.js +2 -1
- package/packages/big-table/src/components/edit-form/edit-component/edit-search/edit-search.vue +2 -3
- package/packages/big-table/src/components/edit-form/edit-component/edit-search-more/edit-search-more.vue +2 -2
- package/packages/big-table/src/components/edit-form/edit-component/edit-select/edit-select.vue +1 -1
- package/packages/big-table/src/components/edit-form/edit-component/edit-select-multiple/edit-select-multiple.vue +1 -1
- package/packages/big-table/src/components/edit-form/edit-component/edit-switch/edit-switch.vue +43 -0
- package/packages/big-table/src/components/edit-form/edit-component/mixins/dateType.js +5 -4
- package/packages/big-table/src/components/edit-form/edit-component/mixins/item-default.js +50 -5
- package/packages/big-table/src/components/edit-form/edit-component/mixins/search.js +202 -153
- package/packages/big-table/src/components/edit-form/edit-item/form-event.js +3 -2
- package/packages/big-table/src/components/edit-form/edit-item/validate-rules.js +6 -6
- package/packages/big-table/src/components/edit-form/edit-mixins/form-commom.js +25 -20
- package/packages/big-table/src/components/player-vod/video-list.vue +3 -2
- package/packages/big-table/src/utils/batchEditing.js +144 -75
- package/packages/big-table/src/utils/bigTableProps.js +9 -13
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +45 -47
- package/packages/table-filter/src/components/out-quick-search/out-quick-search.vue +3 -0
- package/packages/table-filter/src/components/search-condition/SearchCondition.vue +9 -4
- package/packages/table-filter/src/components/search-filter/SearchFilter.vue +11 -3
- package/src/utils/utils-map.js +34 -0
- package/src/utils/vexutils.js +96 -77
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const SELECT_LIST = ["SEARCH_MORE", "SEARCH", "SEARCH_CASCADE", "LEVEL_SEARCH_CASCADE"];
|
|
2
|
+
import vexutils from '@/utils/vexutils';
|
|
2
3
|
export default {
|
|
3
4
|
components: {
|
|
4
5
|
VNodes: {
|
|
@@ -42,7 +43,8 @@ export default {
|
|
|
42
43
|
isclose: true
|
|
43
44
|
},
|
|
44
45
|
|
|
45
|
-
searchShowHotList: false
|
|
46
|
+
searchShowHotList: false,
|
|
47
|
+
optionsRequestSource: null
|
|
46
48
|
};
|
|
47
49
|
},
|
|
48
50
|
computed: {
|
|
@@ -74,6 +76,7 @@ export default {
|
|
|
74
76
|
if (html_type == "SEARCH") {
|
|
75
77
|
if (targetStr) {
|
|
76
78
|
this.$nextTick(() => {
|
|
79
|
+
console.log('handleRequestedOptions---6');
|
|
77
80
|
this.handleRequestedOptions(this.item, targetStr, true);
|
|
78
81
|
});
|
|
79
82
|
}
|
|
@@ -144,7 +147,7 @@ export default {
|
|
|
144
147
|
this.curOptions = [...defOptions];
|
|
145
148
|
this.selectedOptions = [...(defOptions || [])];
|
|
146
149
|
}
|
|
147
|
-
defList =
|
|
150
|
+
defList = vexutils.uniqArrObj(defList, "key");
|
|
148
151
|
this.defList = defList;
|
|
149
152
|
this.$set(this.item, "useFormValue", defList);
|
|
150
153
|
this.$emit("valueOnChange", [...defOptions], this.item);
|
|
@@ -379,6 +382,7 @@ export default {
|
|
|
379
382
|
defFalg = false,
|
|
380
383
|
otherConfig = {}
|
|
381
384
|
) {
|
|
385
|
+
console.log('handleRequestedOptions---1');
|
|
382
386
|
const closeLoading = () => {
|
|
383
387
|
this.fetching = false;
|
|
384
388
|
this.searchPageConfig.isFetching = false;
|
|
@@ -436,112 +440,128 @@ export default {
|
|
|
436
440
|
if (!html_type.includes("SEARCH_CASCADE")) {
|
|
437
441
|
this.cancelOptionsRequest && this.cancelOptionsRequest();
|
|
438
442
|
}
|
|
439
|
-
this.optionsRequestSource =
|
|
443
|
+
// this.optionsRequestSource = axios.CancelToken.source();
|
|
440
444
|
if (keyword && !defFalg) {
|
|
441
445
|
let key = typeof keyword === "string" ? keyword.trim() : keyword;
|
|
442
446
|
key && this.handleSearchTracher(itemData, { keyword: key });
|
|
443
447
|
}
|
|
444
448
|
Object.assign(params, { asyncCount: 1 });
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
449
|
+
let handleEditFormGetWordbookData = this.editFormApiConfig?.handleEditFormGetWordbookData
|
|
450
|
+
if (!handleEditFormGetWordbookData || typeof handleEditFormGetWordbookData !== 'function') {
|
|
451
|
+
handleEditFormGetWordbookData = this.getWordbookDataRequest
|
|
452
|
+
}
|
|
453
|
+
return handleEditFormGetWordbookData(params, { optionsRequestSource: this.optionsRequestSource }).then((data) => {
|
|
454
|
+
this.optionsRequestSource = null;
|
|
455
|
+
this.fetching = false;
|
|
456
|
+
if (otherConfig.page) {
|
|
457
|
+
this.handleSearchScrollTop(itemData);
|
|
458
|
+
}
|
|
459
|
+
closeLoading();
|
|
460
|
+
if (!data) return [];
|
|
461
|
+
this.searchAddObj[`${itemData.val_key}_${itemData.name}`] = true;
|
|
462
|
+
let { rows, fieldList, page, total } = data.map;
|
|
463
|
+
this.searchPageConfig = Object.assign(this.searchPageConfig, {
|
|
464
|
+
page,
|
|
465
|
+
total,
|
|
466
|
+
isRequest: true,
|
|
467
|
+
keyword
|
|
468
|
+
});
|
|
469
|
+
let rowData = [];
|
|
470
|
+
if (isCascade) {
|
|
471
|
+
wordbook.myUniqueLabel = myUniqueKey;
|
|
472
|
+
wordbook.myUniqueKey = myUniqueKey;
|
|
473
|
+
wordbook.isLoadData = html_type == "LEVEL_SEARCH_CASCADE";
|
|
474
|
+
if (wordbook.isLoadData) {
|
|
475
|
+
this.levelNum = defFalg ? 1 : this.levelNum;
|
|
452
476
|
}
|
|
453
|
-
this.
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
let rowData = [];
|
|
465
|
-
if (isCascade) {
|
|
466
|
-
wordbook.myUniqueLabel = myUniqueKey;
|
|
467
|
-
wordbook.myUniqueKey = myUniqueKey;
|
|
468
|
-
wordbook.isLoadData = html_type == "LEVEL_SEARCH_CASCADE";
|
|
469
|
-
if (wordbook.isLoadData) {
|
|
470
|
-
this.levelNum = defFalg ? 1 : this.levelNum;
|
|
471
|
-
}
|
|
472
|
-
rows = this.hanldeRemoveDuplicates(rows, {
|
|
473
|
-
key: wordbook.value_key
|
|
474
|
-
});
|
|
475
|
-
this.handleFormCascade(rows, wordbook);
|
|
476
|
-
rowData = rows;
|
|
477
|
-
} else {
|
|
478
|
-
// 去重
|
|
479
|
-
rowData = this.handleRowUnique(rows, itemData, {
|
|
480
|
-
myUniqueKey: myUniqueKey,
|
|
481
|
-
reqUniqueKey: reqUniqueKey
|
|
482
|
-
});
|
|
483
|
-
|
|
484
|
-
// 获取显示字段title
|
|
485
|
-
if (rowData.length > 0 && wordbook.render_key && wordbook.render_key.length > 1) {
|
|
486
|
-
rowData.unshift(
|
|
487
|
-
Object.assign(
|
|
488
|
-
{},
|
|
489
|
-
{
|
|
490
|
-
showLabel: this.getTitleHeader(fieldList, wordbook.render_key),
|
|
491
|
-
myUniqueKey: Math.random()
|
|
492
|
-
}
|
|
493
|
-
)
|
|
494
|
-
);
|
|
495
|
-
}
|
|
496
|
-
}
|
|
497
|
-
const searchList = [
|
|
498
|
-
"SEARCH",
|
|
499
|
-
"SEARCH_CASCADE",
|
|
500
|
-
"SEARCH_MORE",
|
|
501
|
-
"LEVEL_SEARCH_CASCADE"
|
|
502
|
-
];
|
|
503
|
-
if (searchList.includes(html_type)) {
|
|
504
|
-
if (html_type != "LEVEL_SEARCH_CASCADE") {
|
|
505
|
-
this.curOptions = rowData;
|
|
506
|
-
} else {
|
|
507
|
-
(defFalg || !this.loadDataPrimary_key) && (this.curOptions = rowData);
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
// 默认值处理
|
|
511
|
-
this.handleGetSearchDefVal(defFalg, rowData, itemData, {
|
|
512
|
-
myUniqueKey: myUniqueKey,
|
|
513
|
-
reqUniqueKey: reqUniqueKey,
|
|
514
|
-
keyword: keyword,
|
|
515
|
-
...otherConfig
|
|
516
|
-
});
|
|
517
|
-
|
|
518
|
-
// 自由输入
|
|
519
|
-
if (!defFalg && html_type == "SEARCH" && keyword && free_entry == "1") {
|
|
520
|
-
this.handleFreeEntry({
|
|
521
|
-
rowData,
|
|
522
|
-
keyword,
|
|
523
|
-
wordbook,
|
|
524
|
-
fieldList,
|
|
525
|
-
myUniqueKey
|
|
526
|
-
});
|
|
527
|
-
}
|
|
477
|
+
rows = this.hanldeRemoveDuplicates(rows, {
|
|
478
|
+
key: wordbook.value_key
|
|
479
|
+
});
|
|
480
|
+
this.handleFormCascade(rows, wordbook);
|
|
481
|
+
rowData = rows;
|
|
482
|
+
} else {
|
|
483
|
+
// 去重
|
|
484
|
+
rowData = this.handleRowUnique(rows, itemData, {
|
|
485
|
+
myUniqueKey: myUniqueKey,
|
|
486
|
+
reqUniqueKey: reqUniqueKey
|
|
487
|
+
});
|
|
528
488
|
|
|
529
|
-
|
|
489
|
+
// 获取显示字段title
|
|
490
|
+
if (rowData.length > 0 && wordbook.render_key && wordbook.render_key.length > 1) {
|
|
491
|
+
rowData.unshift(
|
|
492
|
+
Object.assign(
|
|
493
|
+
{},
|
|
494
|
+
{
|
|
495
|
+
showLabel: this.getTitleHeader(fieldList, wordbook.render_key),
|
|
496
|
+
myUniqueKey: Math.random()
|
|
497
|
+
}
|
|
498
|
+
)
|
|
499
|
+
);
|
|
530
500
|
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
501
|
+
}
|
|
502
|
+
const searchList = [
|
|
503
|
+
"SEARCH",
|
|
504
|
+
"SEARCH_CASCADE",
|
|
505
|
+
"SEARCH_MORE",
|
|
506
|
+
"LEVEL_SEARCH_CASCADE"
|
|
507
|
+
];
|
|
508
|
+
if (searchList.includes(html_type)) {
|
|
509
|
+
if (html_type != "LEVEL_SEARCH_CASCADE") {
|
|
510
|
+
this.curOptions = rowData;
|
|
511
|
+
} else {
|
|
512
|
+
(defFalg || !this.loadDataPrimary_key) && (this.curOptions = rowData);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
// 默认值处理
|
|
516
|
+
this.handleGetSearchDefVal(defFalg, rowData, itemData, {
|
|
517
|
+
myUniqueKey: myUniqueKey,
|
|
518
|
+
reqUniqueKey: reqUniqueKey,
|
|
519
|
+
keyword: keyword,
|
|
520
|
+
...otherConfig
|
|
538
521
|
});
|
|
522
|
+
|
|
523
|
+
// 自由输入
|
|
524
|
+
if (!defFalg && html_type == "SEARCH" && keyword && free_entry == "1") {
|
|
525
|
+
this.handleFreeEntry({
|
|
526
|
+
rowData,
|
|
527
|
+
keyword,
|
|
528
|
+
wordbook,
|
|
529
|
+
fieldList,
|
|
530
|
+
myUniqueKey
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
return rowData;
|
|
535
|
+
|
|
536
|
+
}).catch(() => {
|
|
537
|
+
closeLoading();
|
|
538
|
+
})
|
|
539
|
+
|
|
539
540
|
} catch (error) {
|
|
540
541
|
closeLoading();
|
|
541
542
|
console.log(error);
|
|
542
543
|
}
|
|
543
544
|
},
|
|
544
545
|
|
|
546
|
+
getWordbookDataRequest(params, config) {
|
|
547
|
+
let { optionsRequestSource } = config;
|
|
548
|
+
optionsRequestSource = this.axios.CancelToken.source();
|
|
549
|
+
return new Promise((resolve, reject) => {
|
|
550
|
+
this.axios
|
|
551
|
+
.post(`/tableReader/getWordbookData`, this.$qs.stringify(params), {
|
|
552
|
+
cancelToken: optionsRequestSource.token
|
|
553
|
+
})
|
|
554
|
+
.then(({ data }) => {
|
|
555
|
+
optionsRequestSource = null;
|
|
556
|
+
if (data.result === "SUCCESS") return resolve(data);
|
|
557
|
+
resolve(null);
|
|
558
|
+
})
|
|
559
|
+
.catch(err => {
|
|
560
|
+
reject(err);
|
|
561
|
+
});
|
|
562
|
+
});
|
|
563
|
+
},
|
|
564
|
+
|
|
545
565
|
handleFreeEntry(option = {}) {
|
|
546
566
|
const { rowData, keyword, wordbook, fieldList, myUniqueKey } = option;
|
|
547
567
|
if (!keyword) return;
|
|
@@ -663,6 +683,7 @@ export default {
|
|
|
663
683
|
this.searchPageConfig.keyword = val || undefined;
|
|
664
684
|
if (this.dropdownHide && !val) return;
|
|
665
685
|
this.timeout = setTimeout(() => {
|
|
686
|
+
console.log('handleRequestedOptions---2');
|
|
666
687
|
this.handleRequestedOptions(itemData, val);
|
|
667
688
|
}, 200);
|
|
668
689
|
},
|
|
@@ -786,6 +807,7 @@ export default {
|
|
|
786
807
|
this.loadDataPrimary_key = targetOption[this.item.wordbook.primary_key];
|
|
787
808
|
targetOption.loading = true;
|
|
788
809
|
try {
|
|
810
|
+
console.log('handleRequestedOptions---3');
|
|
789
811
|
const res = await this.handleRequestedOptions(this.item, "", false);
|
|
790
812
|
targetOption.loading = false;
|
|
791
813
|
targetOption.children = res && res.length ? [...res] : undefined;
|
|
@@ -799,6 +821,8 @@ export default {
|
|
|
799
821
|
handlerDropdownVisibleChange(e, data) {
|
|
800
822
|
const searchList = ["SEARCH_MORE", "SEARCH"];
|
|
801
823
|
if (e) {
|
|
824
|
+
e.preventDefault && e.preventDefault();
|
|
825
|
+
e.stopPropagation && e.stopPropagation();
|
|
802
826
|
this.handleCalculateOptionsMaxWidth();
|
|
803
827
|
}
|
|
804
828
|
|
|
@@ -818,6 +842,7 @@ export default {
|
|
|
818
842
|
this.handlerSearchOnFocus(data);
|
|
819
843
|
}
|
|
820
844
|
if (e && isRequest) {
|
|
845
|
+
console.log('handleRequestedOptions---4');
|
|
821
846
|
this.handleRequestedOptions(data);
|
|
822
847
|
}
|
|
823
848
|
if (!e && this.noAllow_check_mid_level && searchList.includes(data.html_type)) {
|
|
@@ -904,6 +929,7 @@ export default {
|
|
|
904
929
|
let cType = type || "next";
|
|
905
930
|
let { page, keyword = undefined } = this.searchPageConfig;
|
|
906
931
|
page = cType === "next" ? page + 1 : page - 1;
|
|
932
|
+
console.log('handleRequestedOptions---5');
|
|
907
933
|
this.handleRequestedOptions(this.item, keyword, false, { page });
|
|
908
934
|
},
|
|
909
935
|
|
|
@@ -916,7 +942,7 @@ export default {
|
|
|
916
942
|
try {
|
|
917
943
|
let item = this.$el.querySelector(".ant-select");
|
|
918
944
|
const itemRect = item.getBoundingClientRect();
|
|
919
|
-
let baseDom = this.mainForm.$el.querySelector(".
|
|
945
|
+
let baseDom = this.mainForm.$el.querySelector(".big-table");
|
|
920
946
|
const baseRect = baseDom.getBoundingClientRect();
|
|
921
947
|
maxwith = baseRect.right - itemRect.left;
|
|
922
948
|
|
|
@@ -1026,29 +1052,38 @@ export default {
|
|
|
1026
1052
|
}
|
|
1027
1053
|
},
|
|
1028
1054
|
|
|
1029
|
-
getHotSearchConfig() {
|
|
1055
|
+
async getHotSearchConfig() {
|
|
1030
1056
|
const { item, mainForm } = this;
|
|
1031
1057
|
if (!SELECT_LIST.includes(item.html_type) || item.is_recommend != "1") return;
|
|
1032
|
-
|
|
1033
|
-
.
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1058
|
+
let params = {
|
|
1059
|
+
formId: mainForm.params_formId,
|
|
1060
|
+
valKey: item.val_key,
|
|
1061
|
+
htmlType: item.html_type
|
|
1062
|
+
}
|
|
1063
|
+
let handleEditFormCommonLatestAndHot = this.editFormApiConfig?.handleEditFormCommonLatestAndHot
|
|
1064
|
+
if (!handleEditFormCommonLatestAndHot || typeof handleEditFormCommonLatestAndHot !== 'function') {
|
|
1065
|
+
handleEditFormCommonLatestAndHot = this.commonLatestAndHotRequest
|
|
1066
|
+
}
|
|
1067
|
+
let data = await handleEditFormCommonLatestAndHot(params)
|
|
1068
|
+
if (!data) return;
|
|
1069
|
+
this.hotSearchConfig.isRequest = true;
|
|
1070
|
+
let hotList = (data?.map?.hotList || []).filter(Boolean);
|
|
1071
|
+
let latestList = (data?.map?.latestList || []).filter(Boolean);
|
|
1072
|
+
let config = Object.assign(this.hotSearchConfig, { hotList, latestList });
|
|
1073
|
+
this.$set(this, "hotSearchConfig", config);
|
|
1074
|
+
},
|
|
1075
|
+
commonLatestAndHotRequest(params) {
|
|
1076
|
+
return new Promise((resolve, reject) => {
|
|
1077
|
+
this.axios
|
|
1078
|
+
.get(`/tableReader/commonLatestAndHot`, { params })
|
|
1079
|
+
.then(({ data }) => {
|
|
1080
|
+
if (data.result === "SUCCESS") return resolve(data);
|
|
1081
|
+
resolve(null);
|
|
1082
|
+
})
|
|
1083
|
+
.catch(err => {
|
|
1084
|
+
reject(err);
|
|
1085
|
+
});
|
|
1086
|
+
});
|
|
1052
1087
|
},
|
|
1053
1088
|
|
|
1054
1089
|
handleSelectHotKeyword(key) {
|
|
@@ -1080,25 +1115,30 @@ export default {
|
|
|
1080
1115
|
|
|
1081
1116
|
hanldeClearLately() {
|
|
1082
1117
|
const { item, mainForm } = this;
|
|
1083
|
-
|
|
1084
|
-
.
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1118
|
+
let params = {
|
|
1119
|
+
formId: mainForm.params_formId,
|
|
1120
|
+
valKey: item.val_key,
|
|
1121
|
+
htmlType: item.html_type
|
|
1122
|
+
}
|
|
1123
|
+
let handleEditFormDeleteLatestAndHot = this.editFormApiConfig?.handleEditFormDeleteLatestAndHot;
|
|
1124
|
+
if (!handleEditFormDeleteLatestAndHot || typeof handleEditFormDeleteLatestAndHot !== 'function') {
|
|
1125
|
+
handleEditFormDeleteLatestAndHot = this.deleteLatestAndHotRequest
|
|
1126
|
+
}
|
|
1127
|
+
handleEditFormDeleteLatestAndHot(params);
|
|
1128
|
+
},
|
|
1129
|
+
deleteLatestAndHotRequest(params) {
|
|
1130
|
+
return new Promise((resolve, reject) => {
|
|
1131
|
+
this.axios
|
|
1132
|
+
.post(`/form/deleteLatestAndHot`, this.$qs.stringify(params))
|
|
1133
|
+
.then(({ data }) => {
|
|
1134
|
+
if (data.result == "SUCCESS") return resolve(data);
|
|
1135
|
+
this.$message.warning(data.resultMsg || "删除失败");
|
|
1136
|
+
resolve(null);
|
|
1090
1137
|
})
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
// this.hotSearchConfig.hotList = [];
|
|
1096
|
-
// 点击清除成功,刷新“常用值”数据
|
|
1097
|
-
// this.getHotSearchConfig();
|
|
1098
|
-
} else {
|
|
1099
|
-
this.$message.warning(data.resultMsg || this.$t("1.7.1.10"));
|
|
1100
|
-
}
|
|
1101
|
-
});
|
|
1138
|
+
.catch(err => {
|
|
1139
|
+
reject(err);
|
|
1140
|
+
});
|
|
1141
|
+
});
|
|
1102
1142
|
},
|
|
1103
1143
|
closeHotSearch() {
|
|
1104
1144
|
this.hideHotSearch = false;
|
|
@@ -1108,26 +1148,35 @@ export default {
|
|
|
1108
1148
|
if (!SELECT_LIST.includes(item?.html_type || undefined)) return;
|
|
1109
1149
|
const { mainForm } = this;
|
|
1110
1150
|
const { keyword = "", select = "" } = obj || {};
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
});
|
|
1128
|
-
} catch (error) {
|
|
1129
|
-
console.log(error);
|
|
1151
|
+
// 埋点
|
|
1152
|
+
let key =
|
|
1153
|
+
item.html_type === "SEARCH_MORE"
|
|
1154
|
+
? "表单搜索多选框"
|
|
1155
|
+
: item.html_type === "SEARCH"
|
|
1156
|
+
? "表单搜索框"
|
|
1157
|
+
: item.html_type === "SEARCH_CASCADE"
|
|
1158
|
+
? "表单级联搜索"
|
|
1159
|
+
: "表单逐级级联";
|
|
1160
|
+
let params = {
|
|
1161
|
+
key,
|
|
1162
|
+
params_formId: mainForm.params_formId,
|
|
1163
|
+
val_key: item.val_key,
|
|
1164
|
+
name: item.name,
|
|
1165
|
+
keyword,
|
|
1166
|
+
select
|
|
1130
1167
|
}
|
|
1168
|
+
this.handleGetConfigApi(params, 'handleEditFormSearchTracher');
|
|
1169
|
+
// try {
|
|
1170
|
+
// this.$_handleTracherLog(key, {
|
|
1171
|
+
// 表单ID: mainForm.params_formId,
|
|
1172
|
+
// 字段Key: item.val_key,
|
|
1173
|
+
// 字段名称: item.name,
|
|
1174
|
+
// 搜索关键字: keyword,
|
|
1175
|
+
// 选中值: select
|
|
1176
|
+
// });
|
|
1177
|
+
// } catch (error) {
|
|
1178
|
+
// console.log(error);
|
|
1179
|
+
// }
|
|
1131
1180
|
},
|
|
1132
1181
|
|
|
1133
1182
|
hanldercheckOption(data) {
|
|
@@ -1167,7 +1216,7 @@ export default {
|
|
|
1167
1216
|
if (Array.isArray(selectedOptions) && selectedOptions.length > 0) {
|
|
1168
1217
|
let val = this.handleGetAllFormValue()[item.val_key];
|
|
1169
1218
|
let keyword = "";
|
|
1170
|
-
if (
|
|
1219
|
+
if (vexutils.isJSON(val)) {
|
|
1171
1220
|
keyword = JSON.parse(val)?.objStr || "";
|
|
1172
1221
|
}
|
|
1173
1222
|
if (!keyword) return;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import vexutils from '@/utils/vexutils';
|
|
1
2
|
export const formEvent = {
|
|
2
3
|
methods: {
|
|
3
4
|
/**
|
|
@@ -28,7 +29,7 @@ export const formEvent = {
|
|
|
28
29
|
};
|
|
29
30
|
operationalForm.forEach(v => {
|
|
30
31
|
let itemRes;
|
|
31
|
-
let operationalRule =
|
|
32
|
+
let operationalRule = vexutils.handleSysParams(v.operationalRule, obj, 0);
|
|
32
33
|
let operationFormParam = v.operationFormParam;
|
|
33
34
|
let f = operationFormParam.find(v => v.includes(curKey));
|
|
34
35
|
if (!f) return;
|
|
@@ -57,7 +58,7 @@ export const formEvent = {
|
|
|
57
58
|
handleGetOperationalKey(str) {
|
|
58
59
|
// table.dept_name 提取 dept_name
|
|
59
60
|
const getVal = (t, r) => {
|
|
60
|
-
return t.replace(r, function() {
|
|
61
|
+
return t.replace(r, function () {
|
|
61
62
|
var pKey = arguments[1];
|
|
62
63
|
return pKey || '';
|
|
63
64
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* 表单检验
|
|
3
3
|
*/
|
|
4
|
+
import vexutils from '@/utils/vexutils';
|
|
4
5
|
const validateRules = {
|
|
5
6
|
data() {
|
|
6
7
|
return {};
|
|
@@ -119,7 +120,7 @@ const validateRules = {
|
|
|
119
120
|
if (validate && vali_obj == "mobile" && !validate.phone_idcard_type && is_null == 0) {
|
|
120
121
|
initRules.push({
|
|
121
122
|
pattern: /(^[0-9]{11,11}$)/,
|
|
122
|
-
message:
|
|
123
|
+
message: '请正确输入手机号',
|
|
123
124
|
trigger: "change"
|
|
124
125
|
});
|
|
125
126
|
}
|
|
@@ -148,7 +149,7 @@ const validateRules = {
|
|
|
148
149
|
const { min_value, max_value } = validate || {};
|
|
149
150
|
let showName = alias || name;
|
|
150
151
|
// max_value min_value
|
|
151
|
-
if (isNaN(+value)) {
|
|
152
|
+
if (value && isNaN(+value)) {
|
|
152
153
|
callback("只能输入数字");
|
|
153
154
|
return;
|
|
154
155
|
}
|
|
@@ -257,7 +258,7 @@ const validateRules = {
|
|
|
257
258
|
if (Array.isArray(value)) {
|
|
258
259
|
if (is_null == 0) {
|
|
259
260
|
if (value.length === 0) {
|
|
260
|
-
callback(
|
|
261
|
+
callback(`请选择${alias || name}`);
|
|
261
262
|
return;
|
|
262
263
|
}
|
|
263
264
|
}
|
|
@@ -298,7 +299,6 @@ const validateRules = {
|
|
|
298
299
|
let max = strlen > max_length,
|
|
299
300
|
min = min_length > strlen;
|
|
300
301
|
if (is_null == 0 && !value && value != 0) {
|
|
301
|
-
// callback(`${this.$t("1.9.47")}`);
|
|
302
302
|
callback(`请输入${min_length || 0}-${max_length}个字符`);
|
|
303
303
|
return;
|
|
304
304
|
}
|
|
@@ -355,7 +355,7 @@ const validateRules = {
|
|
|
355
355
|
let unit = html_type === "UPPICTURE" ? "张" : "个";
|
|
356
356
|
if (html_type === "UPPICTURE") {
|
|
357
357
|
curval = curval.split(",").filter(Boolean);
|
|
358
|
-
} else if (
|
|
358
|
+
} else if (vexutils.isJSON(value || "")) {
|
|
359
359
|
curval = JSON.parse(curval);
|
|
360
360
|
}
|
|
361
361
|
let len = curval?.length || 0;
|
|
@@ -387,7 +387,7 @@ const validateRules = {
|
|
|
387
387
|
if (is_null == 0 && !curval) {
|
|
388
388
|
callback(`请选${name}`);
|
|
389
389
|
}
|
|
390
|
-
if (
|
|
390
|
+
if (vexutils.isJSON(value || "")) {
|
|
391
391
|
curval = JSON.parse(curval);
|
|
392
392
|
}
|
|
393
393
|
if (is_null != 0 && !Array.isArray(curval)) {
|