cnhis-design-vue 3.1.16-beta.3 → 3.1.16-beta.6
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/packages/big-table/index.d.ts +1 -429
- package/es/packages/big-table/src/BigTable.vue.d.ts +24 -449
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +70 -101
- package/es/packages/big-table/style/index.css +1 -2
- package/es/packages/fabric-chart/src/FabricChart.js +2 -1
- package/es/packages/fabric-chart/src/hooks/useLeft.js +8 -4
- package/es/packages/form-config/index.d.ts +2 -6
- package/es/packages/form-config/src/FormConfig.vue.d.ts +2 -6
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +1 -3
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +1 -3
- package/es/packages/form-render/index.d.ts +1 -3
- package/es/packages/form-render/src/FormRender.js +6 -3
- package/es/packages/form-render/src/FormRender.vue.d.ts +1 -3
- package/es/packages/form-render/src/components/renderer/cascader.js +2 -2
- package/es/packages/form-render/src/components/renderer/date.d.ts +20 -4
- package/es/packages/form-render/src/components/renderer/date.js +36 -20
- package/es/packages/form-render/src/components/renderer/linebar.js +1 -4
- package/es/packages/form-render/src/components/renderer/select.js +19 -13
- package/es/packages/form-render/src/components/renderer/slider.d.ts +8 -344
- package/es/packages/form-render/src/components/renderer/slider.js +23 -1
- package/es/packages/form-render/src/hooks/useAnchor.js +7 -4
- package/es/packages/form-render/src/hooks/useChangeContext.d.ts +4 -2
- package/es/packages/form-render/src/hooks/useChangeContext.js +4 -7
- package/es/packages/form-render/src/hooks/useFieldListAdaptor.js +4 -4
- package/es/packages/form-render/src/hooks/useFormValidator.js +13 -3
- package/es/packages/form-render/src/hooks/useInitialData.d.ts +1 -1
- package/es/packages/form-render/src/hooks/useInitialData.js +9 -4
- package/es/packages/form-render/src/utils/business.js +15 -2
- package/es/packages/form-render/src/utils/index.d.ts +1 -1
- package/es/packages/form-render/src/utils/index.js +5 -2
- package/es/packages/form-render/src/utils/schema.d.ts +1 -0
- package/es/packages/form-render/src/utils/schema.js +12 -1
- package/es/packages/index.css +1 -2
- package/es/packages/shortcut-setter/index.d.ts +1 -3
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -3
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, nextTick, watch, openBlock, createElementBlock, Fragment,
|
|
1
|
+
import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createBlock, unref, withCtx, renderList, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle, mergeProps, renderSlot, toDisplayString, withDirectives, vShow, isVNode } from 'vue';
|
|
2
2
|
import { isArray, isFunction } from 'lodash-es';
|
|
3
3
|
import bigTableState from './bigTableState.js';
|
|
4
4
|
import bigTableProps from './bigTableProps.js';
|
|
@@ -30,12 +30,9 @@ const _hoisted_1 = {
|
|
|
30
30
|
class: "check-wrap"
|
|
31
31
|
};
|
|
32
32
|
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", null, "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u6709\u6570\u636E\u66F4\u65B0,", -1);
|
|
33
|
-
const _hoisted_3 =
|
|
34
|
-
class: "disabled-checked-tips"
|
|
35
|
-
}, null, -1);
|
|
33
|
+
const _hoisted_3 = ["innerHTML"];
|
|
36
34
|
const _hoisted_4 = ["innerHTML"];
|
|
37
|
-
const _hoisted_5 =
|
|
38
|
-
const _hoisted_6 = {
|
|
35
|
+
const _hoisted_5 = {
|
|
39
36
|
class: "refresh-row"
|
|
40
37
|
};
|
|
41
38
|
function _isSlot(s) {
|
|
@@ -129,7 +126,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
129
126
|
let {
|
|
130
127
|
noSetting
|
|
131
128
|
} = getOtherConfigInit() || {};
|
|
132
|
-
return noSetting || ((_a = props.showSettings) == null ? void 0 : _a.hideSettingBtn)
|
|
129
|
+
return noSetting || ((_a = props.showSettings) == null ? void 0 : _a.hideSettingBtn);
|
|
133
130
|
});
|
|
134
131
|
const isScanMultiTable = computed(() => {
|
|
135
132
|
var _a;
|
|
@@ -340,7 +337,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
340
337
|
state.currentPageSelectedLength = currentPageSelectedRows.length;
|
|
341
338
|
};
|
|
342
339
|
const formatColumns = (map) => {
|
|
343
|
-
var _a, _b;
|
|
340
|
+
var _a, _b, _c;
|
|
344
341
|
let {
|
|
345
342
|
selectType
|
|
346
343
|
} = getOtherConfigInit() || {};
|
|
@@ -421,24 +418,24 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
421
418
|
visible: checkVisible,
|
|
422
419
|
resizable: false,
|
|
423
420
|
width: checkMinWidth,
|
|
424
|
-
slots: selectType === "checkbox" ? checkboxSlot : null,
|
|
421
|
+
slots: selectType === "checkbox" && !((_b = attr.checkboxConfig) == null ? void 0 : _b.checkMethod) ? checkboxSlot : null,
|
|
425
422
|
showOverflow: true
|
|
426
423
|
}];
|
|
427
424
|
const seqObj = columns.find((v) => v.type == "seq");
|
|
428
|
-
if ((
|
|
425
|
+
if ((_c = props == null ? void 0 : props.columnConfig) == null ? void 0 : _c.seqSlotFn) {
|
|
429
426
|
seqObj.slots.default = (params) => {
|
|
430
427
|
var _a2;
|
|
431
428
|
return (_a2 = props.columnConfig) == null ? void 0 : _a2.seqSlotFn(params);
|
|
432
429
|
};
|
|
433
430
|
}
|
|
434
431
|
const currentColumns = fieldList.map((item, index) => {
|
|
435
|
-
var _a2, _b2,
|
|
432
|
+
var _a2, _b2, _c2, _d, _e, _f, _g;
|
|
436
433
|
let filterField = false;
|
|
437
434
|
let filterItems = [];
|
|
438
435
|
try {
|
|
439
436
|
const fieldSetting = JSON.parse(item.fieldSetting);
|
|
440
437
|
filterField = ((_a2 = fieldSetting == null ? void 0 : fieldSetting.mapping) == null ? void 0 : _a2.type) === "manual" && item.isMerge != 1;
|
|
441
|
-
filterItems = (
|
|
438
|
+
filterItems = (_c2 = (_b2 = fieldSetting == null ? void 0 : fieldSetting.mapping) == null ? void 0 : _b2.mappingFiled) == null ? void 0 : _c2.map((item2) => item2.value[0]);
|
|
442
439
|
} catch (e) {
|
|
443
440
|
}
|
|
444
441
|
let notParticipatingSort = ((_d = item == null ? void 0 : item.fieldSetting) == null ? void 0 : _d.notParticipatingSort) || "";
|
|
@@ -465,31 +462,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
465
462
|
treeNode,
|
|
466
463
|
type,
|
|
467
464
|
slots: {
|
|
468
|
-
edit: (params) =>
|
|
469
|
-
if (isEdit && item.isEdit && item.columnName !== "operatorColumn") {
|
|
470
|
-
return formatterEdit(params, item);
|
|
471
|
-
} else {
|
|
472
|
-
return createVNode("span", null, [params.row[item.columnName]]);
|
|
473
|
-
}
|
|
474
|
-
},
|
|
465
|
+
edit: (params) => formatterEdit(params, item),
|
|
475
466
|
default: (params) => {
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
return formatter(params, item);
|
|
479
|
-
} else if (item.formType === "separate") {
|
|
480
|
-
const SeparateComponent = Separate;
|
|
481
|
-
return createVNode(SeparateComponent, {
|
|
482
|
-
"row": params.row,
|
|
483
|
-
"col": item
|
|
484
|
-
}, null);
|
|
485
|
-
} else if (isEdit && item.isEdit && ((_a3 = item.checkEditStatus) == null ? void 0 : _a3.call(item, params))) {
|
|
486
|
-
return formatterEdit(params, item);
|
|
487
|
-
} else {
|
|
488
|
-
return createVNode("span", null, [getDefaultValue(params, item)]);
|
|
489
|
-
}
|
|
467
|
+
const _isEdit = isEdit && item.isEdit;
|
|
468
|
+
return formatter(params, item, _isEdit);
|
|
490
469
|
}
|
|
491
470
|
},
|
|
492
|
-
editRender: isEdit ? {} : generateEditRender(item)
|
|
471
|
+
editRender: isEdit && item.isEdit ? {} : generateEditRender(item)
|
|
493
472
|
});
|
|
494
473
|
if (filterField && !props.isNestTable && !isScanMultiTable2) {
|
|
495
474
|
state.filterFields[item.columnName] = Object.assign({}, vexutils.clone({
|
|
@@ -594,15 +573,28 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
594
573
|
}
|
|
595
574
|
});
|
|
596
575
|
};
|
|
597
|
-
const formatter = (params, col) => {
|
|
598
|
-
var _a, _b;
|
|
576
|
+
const formatter = (params, col, _isEdit) => {
|
|
577
|
+
var _a, _b, _c;
|
|
599
578
|
let {
|
|
600
579
|
row,
|
|
601
580
|
column,
|
|
602
581
|
$rowIndex
|
|
603
582
|
} = params;
|
|
604
|
-
let
|
|
605
|
-
|
|
583
|
+
let attrType = (col == null ? void 0 : col.attrType) || "";
|
|
584
|
+
if (col.formType === "separate") {
|
|
585
|
+
const SeparateComponent = Separate;
|
|
586
|
+
return createVNode(SeparateComponent, {
|
|
587
|
+
"row": params.row,
|
|
588
|
+
"col": col
|
|
589
|
+
}, null);
|
|
590
|
+
}
|
|
591
|
+
if (_isEdit) {
|
|
592
|
+
if ((_a = col.checkEditStatus) == null ? void 0 : _a.call(col, params)) {
|
|
593
|
+
return formatterEdit(params, col);
|
|
594
|
+
} else {
|
|
595
|
+
return createVNode("span", null, [getDefaultValue(params, col)]);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
606
598
|
let formUnionItem = showEditForm(row, column, $rowIndex);
|
|
607
599
|
if (formUnionItem) {
|
|
608
600
|
let dynamicProps = initBatchDynamicProps(formUnionItem, row, column);
|
|
@@ -618,66 +610,66 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
618
610
|
return row[GROUP_TITLE_KEY];
|
|
619
611
|
}
|
|
620
612
|
if (attrType == "PICTURE" || attrType == "HEADPORTRAIT") {
|
|
621
|
-
return getPicture(row,
|
|
613
|
+
return getPicture(row, col, attrType);
|
|
622
614
|
}
|
|
623
615
|
if (attrType == "COLOR") {
|
|
624
|
-
return getColor(row,
|
|
616
|
+
return getColor(row, col);
|
|
625
617
|
}
|
|
626
618
|
if (attrType == "EVALUATE") {
|
|
627
|
-
return getEvaluate(row,
|
|
619
|
+
return getEvaluate(row, col);
|
|
628
620
|
}
|
|
629
621
|
if (attrType == "MAP") {
|
|
630
|
-
return getMapVal(row,
|
|
622
|
+
return getMapVal(row, col);
|
|
631
623
|
}
|
|
632
624
|
if (attrType == "DATE" || attrType == "TASKDATE") {
|
|
633
|
-
return getDate(row,
|
|
625
|
+
return getDate(row, col);
|
|
634
626
|
}
|
|
635
627
|
if (attrType == "PERCENTAGE") {
|
|
636
|
-
return getPercentage(row,
|
|
628
|
+
return getPercentage(row, col);
|
|
637
629
|
}
|
|
638
630
|
if (attrType == "VIDEO") {
|
|
639
|
-
return getvideoList(row,
|
|
631
|
+
return getvideoList(row, col);
|
|
640
632
|
}
|
|
641
633
|
if (attrType == "CANDIDATE_COMPONENTS") {
|
|
642
|
-
return getCandidateComponents(row,
|
|
634
|
+
return getCandidateComponents(row, col);
|
|
643
635
|
}
|
|
644
636
|
if (attrType == "AGE") {
|
|
645
|
-
return getageShowType(row,
|
|
637
|
+
return getageShowType(row, col);
|
|
646
638
|
}
|
|
647
639
|
if (attrType === "COUNTDOWN") {
|
|
648
640
|
return createVNode(NTooltip, null, {
|
|
649
641
|
trigger() {
|
|
650
642
|
return createVNode("span", {
|
|
651
|
-
"innerHTML": row[
|
|
643
|
+
"innerHTML": row[col.columnName + "_countdown"] || ""
|
|
652
644
|
}, null);
|
|
653
645
|
},
|
|
654
646
|
default() {
|
|
655
|
-
return row[
|
|
647
|
+
return row[col.columnName + "_countdownTip"];
|
|
656
648
|
}
|
|
657
649
|
});
|
|
658
650
|
}
|
|
659
651
|
if (attrType === "DURATION") {
|
|
660
|
-
const value = row[
|
|
661
|
-
const duration = (
|
|
652
|
+
const value = row[col.columnName];
|
|
653
|
+
const duration = (_b = col == null ? void 0 : col.fieldSetting) == null ? void 0 : _b.duration;
|
|
662
654
|
return parseDurationValue(value, duration);
|
|
663
655
|
}
|
|
664
656
|
if (attrType === "COMBINATION") {
|
|
665
|
-
const value = row[
|
|
666
|
-
const params2 =
|
|
657
|
+
const value = row[col.columnName];
|
|
658
|
+
const params2 = col.fieldSetting || {};
|
|
667
659
|
const data = parseCombinationValue(value, params2);
|
|
668
660
|
return data ? [createVNode("span", {
|
|
669
661
|
"title": data
|
|
670
662
|
}, [data])] : "";
|
|
671
663
|
}
|
|
672
664
|
if (attrType === "PASSWORD") {
|
|
673
|
-
const value = row[
|
|
665
|
+
const value = row[col.columnName];
|
|
674
666
|
return [createVNode(resolveComponent("password-com"), {
|
|
675
667
|
"value": value,
|
|
676
668
|
"styleSetting": props.styleSetting
|
|
677
669
|
}, null)];
|
|
678
670
|
}
|
|
679
671
|
if (attrType === "QR_CODE") {
|
|
680
|
-
return getOrCode(row,
|
|
672
|
+
return getOrCode(row, col);
|
|
681
673
|
}
|
|
682
674
|
if (column.property === "operatorColumn") {
|
|
683
675
|
if ((col == null ? void 0 : col.formType) === "custom" && col.slotFn && !row.initRow) {
|
|
@@ -693,21 +685,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
693
685
|
const foldBtnList = getFoldBtnList(row, $rowIndex);
|
|
694
686
|
return [createVNode("span", null, [tileBtnList, foldBtnList, inlineBtnList])];
|
|
695
687
|
}
|
|
696
|
-
if (isLink(props,
|
|
697
|
-
if (
|
|
688
|
+
if (isLink(props, col, row) && !isScanMultiTable.value) {
|
|
689
|
+
if (col.btnLinkSwitch) {
|
|
698
690
|
let disabled = false;
|
|
699
|
-
let curBtn = (
|
|
691
|
+
let curBtn = (_c = row.btnList) == null ? void 0 : _c.find((v) => v.name == col.columnName);
|
|
700
692
|
if (curBtn && "authorizedMark" in curBtn) {
|
|
701
693
|
if (!curBtn.authorizedMark) {
|
|
702
694
|
disabled = true;
|
|
703
695
|
}
|
|
704
696
|
}
|
|
705
|
-
return getBtnLinkSwitch(row,
|
|
697
|
+
return getBtnLinkSwitch(row, col, disabled, $rowIndex);
|
|
706
698
|
} else {
|
|
707
|
-
return getField(row,
|
|
699
|
+
return getField(row, col, $rowIndex, true);
|
|
708
700
|
}
|
|
709
701
|
} else {
|
|
710
|
-
return getField(row,
|
|
702
|
+
return getField(row, col, $rowIndex, false);
|
|
711
703
|
}
|
|
712
704
|
};
|
|
713
705
|
const formatterHeader = (item) => {
|
|
@@ -1156,9 +1148,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1156
1148
|
var _a;
|
|
1157
1149
|
const {
|
|
1158
1150
|
row,
|
|
1159
|
-
column
|
|
1160
|
-
_rowIndex,
|
|
1161
|
-
_columnIndex
|
|
1151
|
+
column
|
|
1162
1152
|
} = payload;
|
|
1163
1153
|
if (isFunction(attr.spanMethod))
|
|
1164
1154
|
return attr.spanMethod(payload);
|
|
@@ -1206,8 +1196,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1206
1196
|
};
|
|
1207
1197
|
let {
|
|
1208
1198
|
$rowIndex,
|
|
1209
|
-
_columnIndex
|
|
1210
|
-
column
|
|
1199
|
+
_columnIndex
|
|
1211
1200
|
} = obj;
|
|
1212
1201
|
let len = state.columnLen || 99;
|
|
1213
1202
|
let {
|
|
@@ -1371,7 +1360,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1371
1360
|
emit("checkboxChange", {
|
|
1372
1361
|
checked: checked2,
|
|
1373
1362
|
row,
|
|
1374
|
-
index: $rowIndex
|
|
1363
|
+
index: $rowIndex,
|
|
1364
|
+
records: [row]
|
|
1375
1365
|
});
|
|
1376
1366
|
return;
|
|
1377
1367
|
}
|
|
@@ -1444,7 +1434,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1444
1434
|
emit("checkboxChange", {
|
|
1445
1435
|
checked: setChecked,
|
|
1446
1436
|
row,
|
|
1447
|
-
index: $rowIndex
|
|
1437
|
+
index: $rowIndex,
|
|
1438
|
+
records: checkedRow
|
|
1448
1439
|
});
|
|
1449
1440
|
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1450
1441
|
return;
|
|
@@ -1461,7 +1452,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1461
1452
|
emit("checkboxChange", {
|
|
1462
1453
|
checked: setChecked,
|
|
1463
1454
|
row,
|
|
1464
|
-
index: $rowIndex
|
|
1455
|
+
index: $rowIndex,
|
|
1456
|
+
records: checkedRow
|
|
1465
1457
|
});
|
|
1466
1458
|
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1467
1459
|
};
|
|
@@ -1481,6 +1473,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1481
1473
|
};
|
|
1482
1474
|
const treeTableSelectionChange = (records) => {
|
|
1483
1475
|
if (state.isTree == 0) {
|
|
1476
|
+
emit("selectionChange", records);
|
|
1484
1477
|
return false;
|
|
1485
1478
|
}
|
|
1486
1479
|
pubCheckChange(records);
|
|
@@ -1501,7 +1494,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1501
1494
|
emit("checkboxChange", {
|
|
1502
1495
|
checked,
|
|
1503
1496
|
row,
|
|
1504
|
-
index: $rowIndex
|
|
1497
|
+
index: $rowIndex,
|
|
1498
|
+
records
|
|
1505
1499
|
});
|
|
1506
1500
|
if (treeTableSelectionChange(records))
|
|
1507
1501
|
return;
|
|
@@ -1527,9 +1521,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1527
1521
|
};
|
|
1528
1522
|
const radioOnChange = (rowData = {}) => {
|
|
1529
1523
|
let {
|
|
1530
|
-
|
|
1531
|
-
row,
|
|
1532
|
-
$rowIndex
|
|
1524
|
+
row
|
|
1533
1525
|
} = rowData;
|
|
1534
1526
|
emit("selectionChange", [{
|
|
1535
1527
|
...row
|
|
@@ -2278,14 +2270,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2278
2270
|
loadData
|
|
2279
2271
|
});
|
|
2280
2272
|
return (_ctx, _cache) => {
|
|
2281
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
2282
|
-
class="big-table custom-big-table"
|
|
2283
|
-
:class="{
|
|
2284
|
-
mt: state.visibleCheckAllWrap || state.visibleTreeCheck || state.hasRefresh,
|
|
2285
|
-
'expand-padding': !props.isNestTable
|
|
2286
|
-
}"
|
|
2287
|
-
:style="{ height: state.tableHeight }"
|
|
2288
|
-
> `), state.anchorList.length ? (openBlock(), createBlock(unref(NTabs), {
|
|
2273
|
+
return openBlock(), createElementBlock(Fragment, null, [state.anchorList.length ? (openBlock(), createBlock(unref(NTabs), {
|
|
2289
2274
|
key: 0,
|
|
2290
2275
|
type: "line",
|
|
2291
2276
|
animated: "",
|
|
@@ -2314,7 +2299,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2314
2299
|
}, [_hoisted_2, createElementVNode("span", {
|
|
2315
2300
|
class: "check-wrap-btn",
|
|
2316
2301
|
onClick: refreshTable
|
|
2317
|
-
}, "\u70B9\u51FB\u67E5\u770B")])])) : createCommentVNode("v-if", true),
|
|
2302
|
+
}, "\u70B9\u51FB\u67E5\u770B")])])) : createCommentVNode("v-if", true), createVNode(unref(CGrid), mergeProps({
|
|
2318
2303
|
ref_key: "xGrid",
|
|
2319
2304
|
ref: xGrid,
|
|
2320
2305
|
border: "",
|
|
@@ -2396,28 +2381,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2396
2381
|
"no-data-tip": props.emptyItems.noDataTip,
|
|
2397
2382
|
"show-img": !props.isNestTable
|
|
2398
2383
|
}, null, 8, ["no-data-img", "no-data-tip", "show-img"])]) : createCommentVNode("v-if", true)]),
|
|
2399
|
-
tooltip_checkbox: withCtx(({
|
|
2400
|
-
row,
|
|
2401
|
-
checked
|
|
2402
|
-
}) => [row.forbiddenBatchSelect ? (openBlock(), createBlock(unref(NTooltip), {
|
|
2403
|
-
key: 0,
|
|
2404
|
-
trigger: "hover",
|
|
2405
|
-
placement: "right"
|
|
2406
|
-
}, {
|
|
2407
|
-
trigger: withCtx(() => [_hoisted_3]),
|
|
2408
|
-
default: withCtx(() => [createTextVNode(" " + toDisplayString(row.forbiddenBatchSelectReason), 1)]),
|
|
2409
|
-
_: 2
|
|
2410
|
-
}, 1024)) : (openBlock(), createBlock(unref(NCheckbox), {
|
|
2411
|
-
key: 1,
|
|
2412
|
-
class: "tooltip-checkbox-item",
|
|
2413
|
-
checked
|
|
2414
|
-
}, null, 8, ["checked"]))]),
|
|
2415
2384
|
tooltip_footer: withCtx(({
|
|
2416
2385
|
column
|
|
2417
2386
|
}) => [createCommentVNode(" \u5206\u7EC4\u7EDF\u8BA1 "), _ctx.groupCountFields && _ctx.groupCountFields.length ? (openBlock(), createElementBlock("span", {
|
|
2418
2387
|
key: 0,
|
|
2419
2388
|
innerHTML: state.groupText
|
|
2420
|
-
}, null, 8,
|
|
2389
|
+
}, null, 8, _hoisted_3)) : (openBlock(), createElementBlock(Fragment, {
|
|
2421
2390
|
key: 1
|
|
2422
2391
|
}, [createCommentVNode(" \u4E00\u822C\u7EDF\u8BA1 "), createVNode(unref(NTooltip), {
|
|
2423
2392
|
trigger: "hover"
|
|
@@ -2425,7 +2394,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2425
2394
|
trigger: withCtx(() => [createTextVNode(toDisplayString(getFooterTitle(column)), 1)]),
|
|
2426
2395
|
default: withCtx(() => [createElementVNode("div", {
|
|
2427
2396
|
innerHTML: getFooterTooltipTitle(column)
|
|
2428
|
-
}, null, 8,
|
|
2397
|
+
}, null, 8, _hoisted_4)]),
|
|
2429
2398
|
_: 2
|
|
2430
2399
|
}, 1024)], 2112))]),
|
|
2431
2400
|
nest_table_content: withCtx(({
|
|
@@ -2448,7 +2417,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2448
2417
|
}, [createVNode(unref(NIcon), {
|
|
2449
2418
|
size: "14",
|
|
2450
2419
|
component: unref(SyncOutline)
|
|
2451
|
-
}, null, 8, ["component"]), createElementVNode("p",
|
|
2420
|
+
}, null, 8, ["component"]), createElementVNode("p", _hoisted_5, toDisplayString(_ctx.refreshRow) + "\u6761\u66F4\u65B0", 1)], 512), [[vShow, props.refreshRow > 0 && !props.isNestTable]])], 6)], 64);
|
|
2452
2421
|
};
|
|
2453
2422
|
}
|
|
2454
2423
|
});
|
|
@@ -282,7 +282,7 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
282
282
|
height: 30px;
|
|
283
283
|
line-height: 30px;
|
|
284
284
|
}
|
|
285
|
-
.custom-big-table .vxe-table .vxe-cell--checkbox
|
|
285
|
+
.custom-big-table .vxe-table .vxe-cell--checkbox .vxe-checkbox--label {
|
|
286
286
|
display: none;
|
|
287
287
|
}
|
|
288
288
|
.custom-big-table .filter-box {
|
|
@@ -307,7 +307,6 @@ body > .vxe-table--tooltip-wrapper {
|
|
|
307
307
|
}
|
|
308
308
|
.custom-big-table .disabled-checked-tips {
|
|
309
309
|
position: absolute;
|
|
310
|
-
left: 6px;
|
|
311
310
|
top: 50%;
|
|
312
311
|
bottom: 0;
|
|
313
312
|
right: 0;
|
|
@@ -115,7 +115,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
115
|
const times = top.xScalevalue.times;
|
|
116
116
|
let left = originX.value - xCellWidth.value;
|
|
117
117
|
function getDate(date) {
|
|
118
|
-
|
|
118
|
+
const [year = "2022", month = "01", day = "01"] = String(date).match(/\d+/g) || [];
|
|
119
|
+
return `20${year}`.slice(-4) + "-" + `00${month}`.slice(-2) + "-" + `00${day}`.slice(-2);
|
|
119
120
|
}
|
|
120
121
|
const timeList = dateList.map((item) => {
|
|
121
122
|
return times.map((v) => {
|
|
@@ -65,12 +65,14 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
65
65
|
const list = [];
|
|
66
66
|
if (item.showScale || item.showNumber) {
|
|
67
67
|
const { lineXMain, textLeft } = getScaleInfo(item.position, iconsWidth, originX - iconsWidth);
|
|
68
|
+
const listLen = item.list.length;
|
|
68
69
|
item.list.forEach((v, i) => {
|
|
69
70
|
let top = painOriginY.endY - i * yCellHeight * item.spaceGridNumber;
|
|
70
71
|
if (i === 0) {
|
|
71
72
|
top = endY - 5;
|
|
72
73
|
}
|
|
73
|
-
|
|
74
|
+
const isMaxMinNumber = i === 0 || i === listLen - 1;
|
|
75
|
+
if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
|
|
74
76
|
list.push(drawScaleNumber(v, item, textLeft, top));
|
|
75
77
|
}
|
|
76
78
|
if (item.showScale && i !== 0) {
|
|
@@ -117,20 +119,22 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
|
|
|
117
119
|
const spaceScale = spaceGridNumber * yCellHeight / 5;
|
|
118
120
|
const position = item.position || "center";
|
|
119
121
|
const { lineXMain, lineXSub, textLeft } = getScaleInfo(item.position, rectLeft, rectWidth);
|
|
122
|
+
const listLen = item.list.length;
|
|
120
123
|
item.list.forEach((v, i) => {
|
|
121
124
|
const top = vitalSignsOriginY.endY - i * yCellHeight * spaceGridNumber;
|
|
122
|
-
|
|
125
|
+
const isMaxMinNumber = i === 0 || i === listLen - 1;
|
|
126
|
+
if (item.showNumber && (isMaxMinNumber ? item.showMaxMinNumber : true)) {
|
|
123
127
|
const text = drawScaleNumber(v, item, textLeft, i === 0 ? top - 5 : top);
|
|
124
128
|
list.push(text);
|
|
125
129
|
}
|
|
126
|
-
if (item.showScale && i !==
|
|
130
|
+
if (item.showScale && i !== listLen - 1) {
|
|
127
131
|
for (let j = 0; j < 5; j++) {
|
|
128
132
|
if (j > 0 || !item.showNumber || position !== "center") {
|
|
129
133
|
const x1 = j == 0 ? lineXMain[0] : lineXSub[0];
|
|
130
134
|
const x2 = j == 0 ? lineXMain[1] : lineXSub[1];
|
|
131
135
|
const y = top - j * spaceScale;
|
|
132
136
|
createLine([x1, y, x2, y]);
|
|
133
|
-
if (i ==
|
|
137
|
+
if (i == listLen - 2 && j == 4) {
|
|
134
138
|
createLine([lineXMain[0], y - spaceScale, lineXMain[1], y - spaceScale]);
|
|
135
139
|
}
|
|
136
140
|
}
|
|
@@ -7239,9 +7239,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
7239
7239
|
}>>;
|
|
7240
7240
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
7241
7241
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
7242
|
-
formModel: import("@formily/core").Form<
|
|
7243
|
-
[x: string]: any;
|
|
7244
|
-
}>;
|
|
7242
|
+
formModel: import("@formily/core").Form<any>;
|
|
7245
7243
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
7246
7244
|
businessCollector: import("..").BusinessCollector;
|
|
7247
7245
|
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
@@ -12317,9 +12315,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
12317
12315
|
}>>;
|
|
12318
12316
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
12319
12317
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
12320
|
-
formModel: import("@formily/core").Form<
|
|
12321
|
-
[x: string]: any;
|
|
12322
|
-
}>;
|
|
12318
|
+
formModel: import("@formily/core").Form<any>;
|
|
12323
12319
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
12324
12320
|
businessCollector: import("..").BusinessCollector;
|
|
12325
12321
|
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
@@ -7241,9 +7241,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
7241
7241
|
}>>;
|
|
7242
7242
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
7243
7243
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
7244
|
-
formModel: import("@formily/core").Form<
|
|
7245
|
-
[x: string]: any;
|
|
7246
|
-
}>;
|
|
7244
|
+
formModel: import("@formily/core").Form<any>;
|
|
7247
7245
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
7248
7246
|
businessCollector: import("../../../../es/packages/form-render").BusinessCollector;
|
|
7249
7247
|
formItemDepsCollector: import("../../../../es/packages/form-render").FormItemDepsCollector;
|
|
@@ -12319,9 +12317,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12319
12317
|
}>>;
|
|
12320
12318
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
12321
12319
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
12322
|
-
formModel: import("@formily/core").Form<
|
|
12323
|
-
[x: string]: any;
|
|
12324
|
-
}>;
|
|
12320
|
+
formModel: import("@formily/core").Form<any>;
|
|
12325
12321
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
12326
12322
|
businessCollector: import("../../../../es/packages/form-render").BusinessCollector;
|
|
12327
12323
|
formItemDepsCollector: import("../../../../es/packages/form-render").FormItemDepsCollector;
|
|
@@ -3571,9 +3571,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3571
3571
|
}>>;
|
|
3572
3572
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
3573
3573
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
3574
|
-
formModel: import("@formily/core").Form<
|
|
3575
|
-
[x: string]: any;
|
|
3576
|
-
}>;
|
|
3574
|
+
formModel: import("@formily/core").Form<any>;
|
|
3577
3575
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
3578
3576
|
businessCollector: import("../../../../../es/packages/form-render").BusinessCollector;
|
|
3579
3577
|
formItemDepsCollector: import("../../../../../es/packages/form-render").FormItemDepsCollector;
|
|
@@ -3817,9 +3817,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
3817
3817
|
}>>;
|
|
3818
3818
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
3819
3819
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
3820
|
-
formModel: import("@formily/core").Form<
|
|
3821
|
-
[x: string]: any;
|
|
3822
|
-
}>;
|
|
3820
|
+
formModel: import("@formily/core").Form<any>;
|
|
3823
3821
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
3824
3822
|
businessCollector: import("../../../../../es/packages/form-render").BusinessCollector;
|
|
3825
3823
|
formItemDepsCollector: import("../../../../../es/packages/form-render").FormItemDepsCollector;
|
|
@@ -230,9 +230,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
230
230
|
}>>;
|
|
231
231
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
232
232
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
233
|
-
formModel: import("@formily/core").Form<
|
|
234
|
-
[x: string]: any;
|
|
235
|
-
}>;
|
|
233
|
+
formModel: import("@formily/core").Form<any>;
|
|
236
234
|
SchemaField: import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
237
235
|
businessCollector: import("./src/hooks").BusinessCollector;
|
|
238
236
|
formItemDepsCollector: import("./src/hooks").FormItemDepsCollector;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createElementBlock, createVNode, isRef, Fragment, renderList, createCommentVNode, createElementVNode, normalizeStyle, renderSlot, toDisplayString, nextTick } from 'vue';
|
|
2
2
|
import { createForm, onFieldValueChange, isField } from '@formily/core';
|
|
3
3
|
import { FormProvider, FormConsumer } from '@formily/vue';
|
|
4
|
-
import {
|
|
4
|
+
import { isObject } from '@vue/shared';
|
|
5
|
+
import { cloneDeep, isArray } from 'lodash-es';
|
|
5
6
|
import { NForm, NTabs, NTabPane, NConfigProvider } from 'naive-ui';
|
|
6
7
|
import { FormItemLineBarDepKeyPrepend } from '../../../packages/form-render/src/constants';
|
|
7
8
|
import { useFormRenderLifeCycle } from '../../../packages/form-render/src/hooks/useFormRenderLifeCycle';
|
|
@@ -50,14 +51,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
51
|
const formModel = createForm({
|
|
51
52
|
initialValues: useInitialData().assignInitialData(props.initialData, props.fieldList),
|
|
52
53
|
effects() {
|
|
53
|
-
onFieldValueChange("*", (field) => {
|
|
54
|
+
onFieldValueChange("*", async (field) => {
|
|
54
55
|
const fieldKey = field.props.name.toString();
|
|
55
56
|
emit("formChange", {
|
|
56
57
|
fieldInstance: field,
|
|
57
58
|
fieldKey,
|
|
58
59
|
fieldName: field.title,
|
|
59
60
|
value: field.value,
|
|
60
|
-
context: changeContextCollector.getContext(fieldKey)
|
|
61
|
+
context: await changeContextCollector.getContext(fieldKey)
|
|
61
62
|
});
|
|
62
63
|
businessCollector.trigger(fieldKey);
|
|
63
64
|
formItemDepsCollector.trigger(fieldKey);
|
|
@@ -101,6 +102,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
102
|
return Promise.reject(Array.isArray(err) ? err.reduce(errInfoNormalize, []) : err);
|
|
102
103
|
});
|
|
103
104
|
function errInfoNormalize(result, error) {
|
|
105
|
+
if (!isObject(error))
|
|
106
|
+
return result;
|
|
104
107
|
let hasChildMessage = false;
|
|
105
108
|
if (isArray(error.messages)) {
|
|
106
109
|
error.messages.forEach((message) => {
|
|
@@ -230,9 +230,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
230
230
|
}>>;
|
|
231
231
|
emit: (event: "formChange", ...args: any[]) => void;
|
|
232
232
|
nuiThemeOverrides: import("naive-ui").GlobalThemeOverrides;
|
|
233
|
-
formModel: import("@formily/core").Form<
|
|
234
|
-
[x: string]: any;
|
|
235
|
-
}>;
|
|
233
|
+
formModel: import("@formily/core").Form<any>;
|
|
236
234
|
SchemaField: Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions>;
|
|
237
235
|
businessCollector: import("./hooks").BusinessCollector;
|
|
238
236
|
formItemDepsCollector: import("./hooks").FormItemDepsCollector;
|
|
@@ -46,7 +46,7 @@ const script = defineComponent({
|
|
|
46
46
|
var _a, _b;
|
|
47
47
|
return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
|
|
48
48
|
});
|
|
49
|
-
const
|
|
49
|
+
const valueRef = computed(() => {
|
|
50
50
|
try {
|
|
51
51
|
const parsed = Array.isArray(props.value) ? props.value : JSON.parse(props.value || "");
|
|
52
52
|
if (!Array.isArray(parsed) || !parsed.length)
|
|
@@ -158,7 +158,7 @@ const script = defineComponent({
|
|
|
158
158
|
"checkStrategy": "child",
|
|
159
159
|
"show": !!show.value,
|
|
160
160
|
"onUpdate:show": updateShow,
|
|
161
|
-
"value":
|
|
161
|
+
"value": valueRef.value,
|
|
162
162
|
"onUpdate:value": updateValue,
|
|
163
163
|
"labelField": labelKey.value,
|
|
164
164
|
"valueField": valueKey.value,
|