cnhis-design-vue 3.1.16-beta.2 → 3.1.16-beta.5
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 +652 -430
- package/es/packages/big-table/src/BigTable.vue.d.ts +676 -450
- package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +103 -111
- package/es/packages/big-table/src/bigTableProps.d.ts +4 -0
- package/es/packages/big-table/src/bigTableProps.js +2 -1
- package/es/packages/big-table/src/bigTableState.d.ts +2 -0
- package/es/packages/big-table/src/bigTableState.js +3 -1
- package/es/packages/big-table/src/hooks/index.d.ts +9 -0
- package/es/packages/big-table/src/hooks/index.js +9 -0
- package/es/packages/big-table/src/hooks/useAnchor.d.ts +7 -0
- package/es/packages/big-table/src/hooks/useAnchor.js +41 -0
- package/es/packages/big-table/src/hooks/useEvent.d.ts +1 -1
- package/es/packages/big-table/src/hooks/useEvent.js +3 -2
- package/es/packages/big-table/style/index.css +1 -2
- package/es/packages/button-print/index.d.ts +2 -2
- package/es/packages/button-print/src/ButtonPrint.vue.d.ts +2 -2
- package/es/packages/button-print/src/components/IdentityVerification.vue.d.ts +2 -2
- package/es/packages/drag-layout/index.d.ts +2 -2
- package/es/packages/drag-layout/src/DragLayout.vue.d.ts +2 -2
- package/es/packages/fabric-chart/src/FabricChart.js +2 -1
- package/es/packages/field-set/index.d.ts +1 -1
- package/es/packages/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/packages/form-config/index.d.ts +11 -11
- package/es/packages/form-config/src/FormConfig.vue.d.ts +11 -11
- package/es/packages/form-config/src/components/FormConfigCreator.vue.d.ts +3 -3
- package/es/packages/form-config/src/components/FormConfigEdit.vue.d.ts +5 -5
- package/es/packages/form-config/src/hooks/useSortable.d.ts +0 -1
- package/es/packages/form-render/index.d.ts +3 -3
- package/es/packages/form-render/src/FormRender.js +6 -3
- package/es/packages/form-render/src/FormRender.vue.d.ts +3 -3
- package/es/packages/form-render/src/components/renderer/linebar.js +1 -4
- package/es/packages/form-render/src/components/renderer/select.js +16 -10
- 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 +7 -6
- package/es/packages/form-render/src/hooks/useTypeNormalize.js +1 -1
- package/es/packages/index.css +1 -2
- package/es/packages/scale-view/src/hooks/use-component.d.ts +7 -7
- package/es/packages/select-label/index.d.ts +10 -10
- package/es/packages/select-label/src/LabelFormContent.vue.d.ts +3 -3
- package/es/packages/select-label/src/SelectLabel.vue.d.ts +7 -7
- package/es/packages/shortcut-setter/index.d.ts +3 -3
- package/es/packages/shortcut-setter/src/ShortcutSetter.vue.d.ts +3 -3
- package/es/packages/time-line/index.d.ts +2 -2
- package/es/packages/time-line/src/TimeLine.vue.d.ts +2 -2
- package/global.d.ts +8 -8
- package/package.json +1 -1
|
@@ -1,21 +1,13 @@
|
|
|
1
|
-
import { defineComponent, ref, reactive, useAttrs, computed, onMounted, onUnmounted, onActivated, createVNode, h, resolveComponent, Teleport, createTextVNode, nextTick, watch, openBlock, createElementBlock, Fragment, createCommentVNode, createElementVNode, normalizeClass, normalizeStyle,
|
|
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
|
-
import { useAnnotation } from '../../../packages/big-table/src/hooks/useAnnotation';
|
|
4
|
-
import { useSeparateRow } from '../../../packages/big-table/src/hooks/useSeparateRow';
|
|
5
3
|
import bigTableState from './bigTableState.js';
|
|
6
4
|
import bigTableProps from './bigTableProps.js';
|
|
7
5
|
import bigTableEmits from './bigTableEmits.js';
|
|
8
|
-
import { useFormat } from './hooks/useFormat.js';
|
|
9
|
-
import { useTableParse } from './hooks/useTableParse.js';
|
|
10
|
-
import { useBatchEditing } from './hooks/useBatchEditing.js';
|
|
11
|
-
import { useNestTable } from './hooks/useNestTable.js';
|
|
12
|
-
import { useEdit, comps } from './hooks/useEdit.js';
|
|
13
|
-
import { useEvent } from './hooks/useEvent.js';
|
|
14
6
|
import { SettingsSharp, CaretDown, CaretForward, CopyOutline, SyncOutline } from '@vicons/ionicons5';
|
|
15
7
|
import NoData from './components/NoData.js';
|
|
16
8
|
import TextOverTooltip from '../../../src/components/TextOverTooltip';
|
|
17
9
|
import SvgIcon from '../../../src/components/SvgIcon';
|
|
18
|
-
import { useMessage, NIcon, NTooltip, NCheckbox, NCheckboxGroup, NGrid, NGi, NSpace, NButton, NPopconfirm, NProgress, NDropdown, NSwitch, NPopover } from 'naive-ui';
|
|
10
|
+
import { useMessage, NIcon, NTooltip, NCheckbox, NCheckboxGroup, NGrid, NGi, NSpace, NButton, NPopconfirm, NProgress, NDropdown, NSwitch, NPopover, NTabs, NTabPane } from 'naive-ui';
|
|
19
11
|
import CGrid from '../../../packages/grid';
|
|
20
12
|
import vexutils from '../../../src/utils/vexutils';
|
|
21
13
|
import { handleTableHeight, setTableConfig, handleGroupColums, treeToList, checkMethod, setTreeGroupTitle, handleName, generateEditRender, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap, handleTableImageSize, visibleMethod, getRowStyle, getFooterGroup, flattenRow, intersectRow, removeCheckedDisabledRows } from './utils.js';
|
|
@@ -23,18 +15,24 @@ import InputButtonScript from './components/input-button.js';
|
|
|
23
15
|
import Separate from './components/separate.js';
|
|
24
16
|
import xb_big from '../../../src/assets/img/xb_big';
|
|
25
17
|
import qr from '../../../src/assets/img/qr';
|
|
18
|
+
import { useBatchEditing } from './hooks/useBatchEditing.js';
|
|
19
|
+
import { useNestTable } from './hooks/useNestTable.js';
|
|
20
|
+
import { useAnchor } from './hooks/useAnchor.js';
|
|
21
|
+
import { useEvent } from './hooks/useEvent.js';
|
|
22
|
+
import { useSeparateRow } from './hooks/useSeparateRow.js';
|
|
23
|
+
import { useFormat } from './hooks/useFormat.js';
|
|
24
|
+
import { useTableParse } from './hooks/useTableParse.js';
|
|
25
|
+
import { useEdit, comps } from './hooks/useEdit.js';
|
|
26
|
+
import { useAnnotation } from './hooks/useAnnotation.js';
|
|
26
27
|
|
|
27
28
|
const _hoisted_1 = {
|
|
28
29
|
key: 0,
|
|
29
30
|
class: "check-wrap"
|
|
30
31
|
};
|
|
31
32
|
const _hoisted_2 = /* @__PURE__ */ createElementVNode("span", null, "\u7CFB\u7EDF\u68C0\u6D4B\u5230\u6709\u6570\u636E\u66F4\u65B0,", -1);
|
|
32
|
-
const _hoisted_3 =
|
|
33
|
-
class: "disabled-checked-tips"
|
|
34
|
-
}, null, -1);
|
|
33
|
+
const _hoisted_3 = ["innerHTML"];
|
|
35
34
|
const _hoisted_4 = ["innerHTML"];
|
|
36
|
-
const _hoisted_5 =
|
|
37
|
-
const _hoisted_6 = {
|
|
35
|
+
const _hoisted_5 = {
|
|
38
36
|
class: "refresh-row"
|
|
39
37
|
};
|
|
40
38
|
function _isSlot(s) {
|
|
@@ -99,10 +97,15 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
99
97
|
loadExpandMethod,
|
|
100
98
|
nestHandleClickRow
|
|
101
99
|
} = useNestTable(props, state, emit);
|
|
100
|
+
const {
|
|
101
|
+
initAnchor,
|
|
102
|
+
updateAnchor,
|
|
103
|
+
anchorEvent
|
|
104
|
+
} = useAnchor(props, state, emit, xGrid);
|
|
102
105
|
const {
|
|
103
106
|
keyDown,
|
|
104
107
|
scroll
|
|
105
|
-
} = useEvent(props, state, emit, xGrid);
|
|
108
|
+
} = useEvent(props, state, emit, xGrid, anchorEvent);
|
|
106
109
|
const attr = useAttrs();
|
|
107
110
|
const currentCheckedKeys = computed(() => {
|
|
108
111
|
var _a;
|
|
@@ -123,7 +126,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
123
126
|
let {
|
|
124
127
|
noSetting
|
|
125
128
|
} = getOtherConfigInit() || {};
|
|
126
|
-
return noSetting || ((_a = props.showSettings) == null ? void 0 : _a.hideSettingBtn)
|
|
129
|
+
return noSetting || ((_a = props.showSettings) == null ? void 0 : _a.hideSettingBtn);
|
|
127
130
|
});
|
|
128
131
|
const isScanMultiTable = computed(() => {
|
|
129
132
|
var _a;
|
|
@@ -240,6 +243,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
240
243
|
let columns = formatColumns(config);
|
|
241
244
|
columns = handleGroupColums(columns, props);
|
|
242
245
|
xGrid.value && xGrid.value.reloadColumn(columns);
|
|
246
|
+
initAnchor();
|
|
243
247
|
setGroupTreeExpand();
|
|
244
248
|
resetTableInlineEditStatus();
|
|
245
249
|
};
|
|
@@ -333,7 +337,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
333
337
|
state.currentPageSelectedLength = currentPageSelectedRows.length;
|
|
334
338
|
};
|
|
335
339
|
const formatColumns = (map) => {
|
|
336
|
-
var _a, _b;
|
|
340
|
+
var _a, _b, _c;
|
|
337
341
|
let {
|
|
338
342
|
selectType
|
|
339
343
|
} = getOtherConfigInit() || {};
|
|
@@ -414,24 +418,24 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
414
418
|
visible: checkVisible,
|
|
415
419
|
resizable: false,
|
|
416
420
|
width: checkMinWidth,
|
|
417
|
-
slots: selectType === "checkbox" ? checkboxSlot : null,
|
|
421
|
+
slots: selectType === "checkbox" && !((_b = attr.checkboxConfig) == null ? void 0 : _b.checkMethod) ? checkboxSlot : null,
|
|
418
422
|
showOverflow: true
|
|
419
423
|
}];
|
|
420
424
|
const seqObj = columns.find((v) => v.type == "seq");
|
|
421
|
-
if ((
|
|
425
|
+
if ((_c = props == null ? void 0 : props.columnConfig) == null ? void 0 : _c.seqSlotFn) {
|
|
422
426
|
seqObj.slots.default = (params) => {
|
|
423
427
|
var _a2;
|
|
424
428
|
return (_a2 = props.columnConfig) == null ? void 0 : _a2.seqSlotFn(params);
|
|
425
429
|
};
|
|
426
430
|
}
|
|
427
431
|
const currentColumns = fieldList.map((item, index) => {
|
|
428
|
-
var _a2, _b2,
|
|
432
|
+
var _a2, _b2, _c2, _d, _e, _f, _g;
|
|
429
433
|
let filterField = false;
|
|
430
434
|
let filterItems = [];
|
|
431
435
|
try {
|
|
432
436
|
const fieldSetting = JSON.parse(item.fieldSetting);
|
|
433
437
|
filterField = ((_a2 = fieldSetting == null ? void 0 : fieldSetting.mapping) == null ? void 0 : _a2.type) === "manual" && item.isMerge != 1;
|
|
434
|
-
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]);
|
|
435
439
|
} catch (e) {
|
|
436
440
|
}
|
|
437
441
|
let notParticipatingSort = ((_d = item == null ? void 0 : item.fieldSetting) == null ? void 0 : _d.notParticipatingSort) || "";
|
|
@@ -458,31 +462,13 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
458
462
|
treeNode,
|
|
459
463
|
type,
|
|
460
464
|
slots: {
|
|
461
|
-
edit: (params) =>
|
|
462
|
-
if (isEdit && item.isEdit && item.columnName !== "operatorColumn") {
|
|
463
|
-
return formatterEdit(params, item);
|
|
464
|
-
} else {
|
|
465
|
-
return createVNode("span", null, [params.row[item.columnName]]);
|
|
466
|
-
}
|
|
467
|
-
},
|
|
465
|
+
edit: (params) => formatterEdit(params, item),
|
|
468
466
|
default: (params) => {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
return formatter(params, item);
|
|
472
|
-
} else if (item.formType === "separate") {
|
|
473
|
-
const SeparateComponent = Separate;
|
|
474
|
-
return createVNode(SeparateComponent, {
|
|
475
|
-
"row": params.row,
|
|
476
|
-
"col": item
|
|
477
|
-
}, null);
|
|
478
|
-
} else if (isEdit && item.isEdit && ((_a3 = item.checkEditStatus) == null ? void 0 : _a3.call(item, params))) {
|
|
479
|
-
return formatterEdit(params, item);
|
|
480
|
-
} else {
|
|
481
|
-
return createVNode("span", null, [getDefaultValue(params, item)]);
|
|
482
|
-
}
|
|
467
|
+
const _isEdit = isEdit && item.isEdit;
|
|
468
|
+
return formatter(params, item, _isEdit);
|
|
483
469
|
}
|
|
484
470
|
},
|
|
485
|
-
editRender: isEdit ? {} : generateEditRender(item)
|
|
471
|
+
editRender: isEdit && item.isEdit ? {} : generateEditRender(item)
|
|
486
472
|
});
|
|
487
473
|
if (filterField && !props.isNestTable && !isScanMultiTable2) {
|
|
488
474
|
state.filterFields[item.columnName] = Object.assign({}, vexutils.clone({
|
|
@@ -587,15 +573,28 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
587
573
|
}
|
|
588
574
|
});
|
|
589
575
|
};
|
|
590
|
-
const formatter = (params, col) => {
|
|
591
|
-
var _a, _b;
|
|
576
|
+
const formatter = (params, col, _isEdit) => {
|
|
577
|
+
var _a, _b, _c;
|
|
592
578
|
let {
|
|
593
579
|
row,
|
|
594
580
|
column,
|
|
595
581
|
$rowIndex
|
|
596
582
|
} = params;
|
|
597
|
-
let
|
|
598
|
-
|
|
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
|
+
}
|
|
599
598
|
let formUnionItem = showEditForm(row, column, $rowIndex);
|
|
600
599
|
if (formUnionItem) {
|
|
601
600
|
let dynamicProps = initBatchDynamicProps(formUnionItem, row, column);
|
|
@@ -611,66 +610,66 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
611
610
|
return row[GROUP_TITLE_KEY];
|
|
612
611
|
}
|
|
613
612
|
if (attrType == "PICTURE" || attrType == "HEADPORTRAIT") {
|
|
614
|
-
return getPicture(row,
|
|
613
|
+
return getPicture(row, col, attrType);
|
|
615
614
|
}
|
|
616
615
|
if (attrType == "COLOR") {
|
|
617
|
-
return getColor(row,
|
|
616
|
+
return getColor(row, col);
|
|
618
617
|
}
|
|
619
618
|
if (attrType == "EVALUATE") {
|
|
620
|
-
return getEvaluate(row,
|
|
619
|
+
return getEvaluate(row, col);
|
|
621
620
|
}
|
|
622
621
|
if (attrType == "MAP") {
|
|
623
|
-
return getMapVal(row,
|
|
622
|
+
return getMapVal(row, col);
|
|
624
623
|
}
|
|
625
624
|
if (attrType == "DATE" || attrType == "TASKDATE") {
|
|
626
|
-
return getDate(row,
|
|
625
|
+
return getDate(row, col);
|
|
627
626
|
}
|
|
628
627
|
if (attrType == "PERCENTAGE") {
|
|
629
|
-
return getPercentage(row,
|
|
628
|
+
return getPercentage(row, col);
|
|
630
629
|
}
|
|
631
630
|
if (attrType == "VIDEO") {
|
|
632
|
-
return getvideoList(row,
|
|
631
|
+
return getvideoList(row, col);
|
|
633
632
|
}
|
|
634
633
|
if (attrType == "CANDIDATE_COMPONENTS") {
|
|
635
|
-
return getCandidateComponents(row,
|
|
634
|
+
return getCandidateComponents(row, col);
|
|
636
635
|
}
|
|
637
636
|
if (attrType == "AGE") {
|
|
638
|
-
return getageShowType(row,
|
|
637
|
+
return getageShowType(row, col);
|
|
639
638
|
}
|
|
640
639
|
if (attrType === "COUNTDOWN") {
|
|
641
640
|
return createVNode(NTooltip, null, {
|
|
642
641
|
trigger() {
|
|
643
642
|
return createVNode("span", {
|
|
644
|
-
"innerHTML": row[
|
|
643
|
+
"innerHTML": row[col.columnName + "_countdown"] || ""
|
|
645
644
|
}, null);
|
|
646
645
|
},
|
|
647
646
|
default() {
|
|
648
|
-
return row[
|
|
647
|
+
return row[col.columnName + "_countdownTip"];
|
|
649
648
|
}
|
|
650
649
|
});
|
|
651
650
|
}
|
|
652
651
|
if (attrType === "DURATION") {
|
|
653
|
-
const value = row[
|
|
654
|
-
const duration = (
|
|
652
|
+
const value = row[col.columnName];
|
|
653
|
+
const duration = (_b = col == null ? void 0 : col.fieldSetting) == null ? void 0 : _b.duration;
|
|
655
654
|
return parseDurationValue(value, duration);
|
|
656
655
|
}
|
|
657
656
|
if (attrType === "COMBINATION") {
|
|
658
|
-
const value = row[
|
|
659
|
-
const params2 =
|
|
657
|
+
const value = row[col.columnName];
|
|
658
|
+
const params2 = col.fieldSetting || {};
|
|
660
659
|
const data = parseCombinationValue(value, params2);
|
|
661
660
|
return data ? [createVNode("span", {
|
|
662
661
|
"title": data
|
|
663
662
|
}, [data])] : "";
|
|
664
663
|
}
|
|
665
664
|
if (attrType === "PASSWORD") {
|
|
666
|
-
const value = row[
|
|
665
|
+
const value = row[col.columnName];
|
|
667
666
|
return [createVNode(resolveComponent("password-com"), {
|
|
668
667
|
"value": value,
|
|
669
668
|
"styleSetting": props.styleSetting
|
|
670
669
|
}, null)];
|
|
671
670
|
}
|
|
672
671
|
if (attrType === "QR_CODE") {
|
|
673
|
-
return getOrCode(row,
|
|
672
|
+
return getOrCode(row, col);
|
|
674
673
|
}
|
|
675
674
|
if (column.property === "operatorColumn") {
|
|
676
675
|
if ((col == null ? void 0 : col.formType) === "custom" && col.slotFn && !row.initRow) {
|
|
@@ -686,21 +685,21 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
686
685
|
const foldBtnList = getFoldBtnList(row, $rowIndex);
|
|
687
686
|
return [createVNode("span", null, [tileBtnList, foldBtnList, inlineBtnList])];
|
|
688
687
|
}
|
|
689
|
-
if (isLink(props,
|
|
690
|
-
if (
|
|
688
|
+
if (isLink(props, col, row) && !isScanMultiTable.value) {
|
|
689
|
+
if (col.btnLinkSwitch) {
|
|
691
690
|
let disabled = false;
|
|
692
|
-
let curBtn = (
|
|
691
|
+
let curBtn = (_c = row.btnList) == null ? void 0 : _c.find((v) => v.name == col.columnName);
|
|
693
692
|
if (curBtn && "authorizedMark" in curBtn) {
|
|
694
693
|
if (!curBtn.authorizedMark) {
|
|
695
694
|
disabled = true;
|
|
696
695
|
}
|
|
697
696
|
}
|
|
698
|
-
return getBtnLinkSwitch(row,
|
|
697
|
+
return getBtnLinkSwitch(row, col, disabled, $rowIndex);
|
|
699
698
|
} else {
|
|
700
|
-
return getField(row,
|
|
699
|
+
return getField(row, col, $rowIndex, true);
|
|
701
700
|
}
|
|
702
701
|
} else {
|
|
703
|
-
return getField(row,
|
|
702
|
+
return getField(row, col, $rowIndex, false);
|
|
704
703
|
}
|
|
705
704
|
};
|
|
706
705
|
const formatterHeader = (item) => {
|
|
@@ -1149,9 +1148,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1149
1148
|
var _a;
|
|
1150
1149
|
const {
|
|
1151
1150
|
row,
|
|
1152
|
-
column
|
|
1153
|
-
_rowIndex,
|
|
1154
|
-
_columnIndex
|
|
1151
|
+
column
|
|
1155
1152
|
} = payload;
|
|
1156
1153
|
if (isFunction(attr.spanMethod))
|
|
1157
1154
|
return attr.spanMethod(payload);
|
|
@@ -1199,8 +1196,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1199
1196
|
};
|
|
1200
1197
|
let {
|
|
1201
1198
|
$rowIndex,
|
|
1202
|
-
_columnIndex
|
|
1203
|
-
column
|
|
1199
|
+
_columnIndex
|
|
1204
1200
|
} = obj;
|
|
1205
1201
|
let len = state.columnLen || 99;
|
|
1206
1202
|
let {
|
|
@@ -1364,7 +1360,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1364
1360
|
emit("checkboxChange", {
|
|
1365
1361
|
checked: checked2,
|
|
1366
1362
|
row,
|
|
1367
|
-
index: $rowIndex
|
|
1363
|
+
index: $rowIndex,
|
|
1364
|
+
records: [row]
|
|
1368
1365
|
});
|
|
1369
1366
|
return;
|
|
1370
1367
|
}
|
|
@@ -1437,7 +1434,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1437
1434
|
emit("checkboxChange", {
|
|
1438
1435
|
checked: setChecked,
|
|
1439
1436
|
row,
|
|
1440
|
-
index: $rowIndex
|
|
1437
|
+
index: $rowIndex,
|
|
1438
|
+
records: checkedRow
|
|
1441
1439
|
});
|
|
1442
1440
|
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1443
1441
|
return;
|
|
@@ -1454,7 +1452,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1454
1452
|
emit("checkboxChange", {
|
|
1455
1453
|
checked: setChecked,
|
|
1456
1454
|
row,
|
|
1457
|
-
index: $rowIndex
|
|
1455
|
+
index: $rowIndex,
|
|
1456
|
+
records: checkedRow
|
|
1458
1457
|
});
|
|
1459
1458
|
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1460
1459
|
};
|
|
@@ -1474,6 +1473,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1474
1473
|
};
|
|
1475
1474
|
const treeTableSelectionChange = (records) => {
|
|
1476
1475
|
if (state.isTree == 0) {
|
|
1476
|
+
emit("selectionChange", records);
|
|
1477
1477
|
return false;
|
|
1478
1478
|
}
|
|
1479
1479
|
pubCheckChange(records);
|
|
@@ -1494,7 +1494,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1494
1494
|
emit("checkboxChange", {
|
|
1495
1495
|
checked,
|
|
1496
1496
|
row,
|
|
1497
|
-
index: $rowIndex
|
|
1497
|
+
index: $rowIndex,
|
|
1498
|
+
records
|
|
1498
1499
|
});
|
|
1499
1500
|
if (treeTableSelectionChange(records))
|
|
1500
1501
|
return;
|
|
@@ -1520,9 +1521,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1520
1521
|
};
|
|
1521
1522
|
const radioOnChange = (rowData = {}) => {
|
|
1522
1523
|
let {
|
|
1523
|
-
|
|
1524
|
-
row,
|
|
1525
|
-
$rowIndex
|
|
1524
|
+
row
|
|
1526
1525
|
} = rowData;
|
|
1527
1526
|
emit("selectionChange", [{
|
|
1528
1527
|
...row
|
|
@@ -2271,14 +2270,23 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2271
2270
|
loadData
|
|
2272
2271
|
});
|
|
2273
2272
|
return (_ctx, _cache) => {
|
|
2274
|
-
return openBlock(), createElementBlock(Fragment, null, [
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2273
|
+
return openBlock(), createElementBlock(Fragment, null, [state.anchorList.length ? (openBlock(), createBlock(unref(NTabs), {
|
|
2274
|
+
key: 0,
|
|
2275
|
+
type: "line",
|
|
2276
|
+
animated: "",
|
|
2277
|
+
"pane-style": "padding: 0",
|
|
2278
|
+
value: state.anchorValue,
|
|
2279
|
+
"onUpdate:value": [_cache[0] || (_cache[0] = ($event) => state.anchorValue = $event), unref(updateAnchor)]
|
|
2280
|
+
}, {
|
|
2281
|
+
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(props.anchor, (item) => {
|
|
2282
|
+
return openBlock(), createBlock(unref(NTabPane), {
|
|
2283
|
+
name: item.field,
|
|
2284
|
+
tab: item.title,
|
|
2285
|
+
key: item.field
|
|
2286
|
+
}, null, 8, ["name", "tab"]);
|
|
2287
|
+
}), 128))]),
|
|
2288
|
+
_: 1
|
|
2289
|
+
}, 8, ["value", "onUpdate:value"])) : createCommentVNode("v-if", true), createElementVNode("div", {
|
|
2282
2290
|
class: normalizeClass(["big-table custom-big-table", {
|
|
2283
2291
|
mt: state.hasRefresh,
|
|
2284
2292
|
"expand-padding": !props.isNestTable
|
|
@@ -2291,7 +2299,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2291
2299
|
}, [_hoisted_2, createElementVNode("span", {
|
|
2292
2300
|
class: "check-wrap-btn",
|
|
2293
2301
|
onClick: refreshTable
|
|
2294
|
-
}, "\u70B9\u51FB\u67E5\u770B")])])) : createCommentVNode("v-if", true),
|
|
2302
|
+
}, "\u70B9\u51FB\u67E5\u770B")])])) : createCommentVNode("v-if", true), createVNode(unref(CGrid), mergeProps({
|
|
2295
2303
|
ref_key: "xGrid",
|
|
2296
2304
|
ref: xGrid,
|
|
2297
2305
|
border: "",
|
|
@@ -2373,28 +2381,12 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2373
2381
|
"no-data-tip": props.emptyItems.noDataTip,
|
|
2374
2382
|
"show-img": !props.isNestTable
|
|
2375
2383
|
}, null, 8, ["no-data-img", "no-data-tip", "show-img"])]) : createCommentVNode("v-if", true)]),
|
|
2376
|
-
tooltip_checkbox: withCtx(({
|
|
2377
|
-
row,
|
|
2378
|
-
checked
|
|
2379
|
-
}) => [row.forbiddenBatchSelect ? (openBlock(), createBlock(unref(NTooltip), {
|
|
2380
|
-
key: 0,
|
|
2381
|
-
trigger: "hover",
|
|
2382
|
-
placement: "right"
|
|
2383
|
-
}, {
|
|
2384
|
-
trigger: withCtx(() => [_hoisted_3]),
|
|
2385
|
-
default: withCtx(() => [createTextVNode(" " + toDisplayString(row.forbiddenBatchSelectReason), 1)]),
|
|
2386
|
-
_: 2
|
|
2387
|
-
}, 1024)) : (openBlock(), createBlock(unref(NCheckbox), {
|
|
2388
|
-
key: 1,
|
|
2389
|
-
class: "tooltip-checkbox-item",
|
|
2390
|
-
checked
|
|
2391
|
-
}, null, 8, ["checked"]))]),
|
|
2392
2384
|
tooltip_footer: withCtx(({
|
|
2393
2385
|
column
|
|
2394
2386
|
}) => [createCommentVNode(" \u5206\u7EC4\u7EDF\u8BA1 "), _ctx.groupCountFields && _ctx.groupCountFields.length ? (openBlock(), createElementBlock("span", {
|
|
2395
2387
|
key: 0,
|
|
2396
2388
|
innerHTML: state.groupText
|
|
2397
|
-
}, null, 8,
|
|
2389
|
+
}, null, 8, _hoisted_3)) : (openBlock(), createElementBlock(Fragment, {
|
|
2398
2390
|
key: 1
|
|
2399
2391
|
}, [createCommentVNode(" \u4E00\u822C\u7EDF\u8BA1 "), createVNode(unref(NTooltip), {
|
|
2400
2392
|
trigger: "hover"
|
|
@@ -2402,7 +2394,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2402
2394
|
trigger: withCtx(() => [createTextVNode(toDisplayString(getFooterTitle(column)), 1)]),
|
|
2403
2395
|
default: withCtx(() => [createElementVNode("div", {
|
|
2404
2396
|
innerHTML: getFooterTooltipTitle(column)
|
|
2405
|
-
}, null, 8,
|
|
2397
|
+
}, null, 8, _hoisted_4)]),
|
|
2406
2398
|
_: 2
|
|
2407
2399
|
}, 1024)], 2112))]),
|
|
2408
2400
|
nest_table_content: withCtx(({
|
|
@@ -2425,7 +2417,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2425
2417
|
}, [createVNode(unref(NIcon), {
|
|
2426
2418
|
size: "14",
|
|
2427
2419
|
component: unref(SyncOutline)
|
|
2428
|
-
}, 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);
|
|
2429
2421
|
};
|
|
2430
2422
|
}
|
|
2431
2423
|
});
|
|
@@ -199,5 +199,9 @@ declare const bigTableProps: {
|
|
|
199
199
|
};
|
|
200
200
|
resetInlineBatchEdit: FunctionConstructor;
|
|
201
201
|
resetBatchEditRowStatus: FunctionConstructor;
|
|
202
|
+
anchor: {
|
|
203
|
+
type: ArrayConstructor;
|
|
204
|
+
default: () => never[];
|
|
205
|
+
};
|
|
202
206
|
};
|
|
203
207
|
export default bigTableProps;
|
|
@@ -112,7 +112,8 @@ const bigTableProps = {
|
|
|
112
112
|
batchError: Boolean,
|
|
113
113
|
batchFormData: { type: Object, default: () => ({}) },
|
|
114
114
|
resetInlineBatchEdit: Function,
|
|
115
|
-
resetBatchEditRowStatus: Function
|
|
115
|
+
resetBatchEditRowStatus: Function,
|
|
116
|
+
anchor: { type: Array, default: () => [] }
|
|
116
117
|
};
|
|
117
118
|
|
|
118
119
|
export { bigTableProps as default };
|
|
@@ -54,7 +54,9 @@ const bigTableState = {
|
|
|
54
54
|
return !row.$__SEPARATE;
|
|
55
55
|
}
|
|
56
56
|
},
|
|
57
|
-
rowConfig: { height: 32, isHover: true, isCurrent: true }
|
|
57
|
+
rowConfig: { height: 32, isHover: true, isCurrent: true },
|
|
58
|
+
anchorValue: "",
|
|
59
|
+
anchorList: []
|
|
58
60
|
};
|
|
59
61
|
|
|
60
62
|
export { bigTableState as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './useAnchor';
|
|
2
|
+
export * from './useEdit';
|
|
3
|
+
export * from './useFormat';
|
|
4
|
+
export * from './useTableParse';
|
|
5
|
+
export * from './useBatchEditing';
|
|
6
|
+
export * from './useNestTable';
|
|
7
|
+
export * from './useEvent';
|
|
8
|
+
export * from './useAnnotation';
|
|
9
|
+
export * from './useSeparateRow';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { useAnchor } from './useAnchor.js';
|
|
2
|
+
export { comps, useEdit } from './useEdit.js';
|
|
3
|
+
export { useFormat } from './useFormat.js';
|
|
4
|
+
export { useTableParse } from './useTableParse.js';
|
|
5
|
+
export { useBatchEditing } from './useBatchEditing.js';
|
|
6
|
+
export { useNestTable } from './useNestTable.js';
|
|
7
|
+
export { useEvent } from './useEvent.js';
|
|
8
|
+
export { useAnnotation } from './useAnnotation.js';
|
|
9
|
+
export { SeparateHandle, useSeparateMap, useSeparateRow } from './useSeparateRow.js';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useThrottleFn } from '@vueuse/core';
|
|
2
|
+
|
|
3
|
+
const useAnchor = (props, state, emit, xGrid) => {
|
|
4
|
+
function initAnchor() {
|
|
5
|
+
var _a;
|
|
6
|
+
if ((_a = props.anchor) == null ? void 0 : _a.length) {
|
|
7
|
+
const columns = xGrid.value.getColumns();
|
|
8
|
+
let left = 0;
|
|
9
|
+
columns.forEach((column) => {
|
|
10
|
+
const { field, minWidth, width } = column;
|
|
11
|
+
const colWidth = +(minWidth || width);
|
|
12
|
+
left += colWidth;
|
|
13
|
+
const anchorObj = props.anchor.find((v) => v.field === field);
|
|
14
|
+
anchorObj && state.anchorList.push({
|
|
15
|
+
...anchorObj,
|
|
16
|
+
left: left - colWidth
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
state.anchorValue = state.anchorList[0].field;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function updateAnchor(field) {
|
|
23
|
+
xGrid.value.scrollToColumn(field);
|
|
24
|
+
}
|
|
25
|
+
function setAnchorValue({ scrollLeft }) {
|
|
26
|
+
if (state.anchorList.length) {
|
|
27
|
+
const anchorObj = state.anchorList.find((v) => scrollLeft < v.left);
|
|
28
|
+
if (anchorObj) {
|
|
29
|
+
state.anchorValue = anchorObj.field;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
const anchorEvent = useThrottleFn(setAnchorValue, 800);
|
|
34
|
+
return {
|
|
35
|
+
initAnchor,
|
|
36
|
+
updateAnchor,
|
|
37
|
+
anchorEvent
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export { useAnchor };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import vexutils from '../../../../src/utils/vexutils';
|
|
2
2
|
import { hideFilterWrap } from '../utils.js';
|
|
3
3
|
|
|
4
|
-
const useEvent = (props, state, emit, xGrid) => {
|
|
4
|
+
const useEvent = (props, state, emit, xGrid, anchorEvent) => {
|
|
5
5
|
function keyDown({ $event }) {
|
|
6
6
|
var _a, _b;
|
|
7
7
|
let activeRow = null;
|
|
@@ -29,7 +29,7 @@ const useEvent = (props, state, emit, xGrid) => {
|
|
|
29
29
|
if ($event.key === "ArrowDown" && index < ((_b = props.data) == null ? void 0 : _b.length) - 1) {
|
|
30
30
|
activeIndex = index + 1;
|
|
31
31
|
}
|
|
32
|
-
|
|
32
|
+
const row = xGridRef.getData(activeIndex);
|
|
33
33
|
xGridRef.setCurrentRow(row);
|
|
34
34
|
xGridRef.scrollToRow(row);
|
|
35
35
|
emitKeyBoard();
|
|
@@ -60,6 +60,7 @@ const useEvent = (props, state, emit, xGrid) => {
|
|
|
60
60
|
hideFilterWrap(state, props);
|
|
61
61
|
}
|
|
62
62
|
scrollEvent(params);
|
|
63
|
+
anchorEvent(params);
|
|
63
64
|
};
|
|
64
65
|
return {
|
|
65
66
|
keyDown,
|
|
@@ -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;
|
|
@@ -4016,7 +4016,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4016
4016
|
type: BooleanConstructor;
|
|
4017
4017
|
default: boolean;
|
|
4018
4018
|
};
|
|
4019
|
-
preset: import("vue").PropType<"dialog" | "
|
|
4019
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
4020
4020
|
to: import("vue").PropType<string | HTMLElement>;
|
|
4021
4021
|
displayDirective: {
|
|
4022
4022
|
type: import("vue").PropType<"show" | "if">;
|
|
@@ -4978,7 +4978,7 @@ declare const ButtonPrint: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
4978
4978
|
type: BooleanConstructor;
|
|
4979
4979
|
default: boolean;
|
|
4980
4980
|
};
|
|
4981
|
-
preset: import("vue").PropType<"dialog" | "
|
|
4981
|
+
preset: import("vue").PropType<"dialog" | "card" | "confirm">;
|
|
4982
4982
|
to: import("vue").PropType<string | HTMLElement>;
|
|
4983
4983
|
displayDirective: {
|
|
4984
4984
|
type: import("vue").PropType<"show" | "if">;
|