cnhis-design-vue 3.1.34-beta.9 → 3.1.35-beta.1
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/components/big-table/index.d.ts +1 -41
- package/es/components/big-table/src/BigTable.vue.d.ts +1 -41
- package/es/components/big-table/src/BigTable.vue2.js +22 -561
- package/es/components/big-table/src/components/edit-form/edit-select.js +26 -18
- package/es/components/big-table/src/components/edit-form/useCommon.d.ts +1 -1
- package/es/components/big-table/src/hooks/useEvent.js +20 -2
- package/es/components/big-table/src/hooks/useFormat.js +1 -1
- package/es/components/big-table/style/index.css +1 -1
- package/es/components/fabric-chart/src/hooks/useCenter.js +132 -58
- package/es/components/fabric-chart/src/hooks/useLeft.js +8 -5
- package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +2 -1
- package/es/components/fabric-chart/src/utils/utils.d.ts +8 -6
- package/es/components/fabric-chart/src/utils/utils.js +10 -13
- package/es/components/form-config/index.d.ts +26 -8
- package/es/components/form-config/src/FormConfig.vue.d.ts +26 -8
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
- package/es/components/form-config/src/components/FormConfigDragDisplay.vue.js +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +14 -4
- package/es/components/form-config/src/hooks/useConfigurationField.js +7 -1
- package/es/components/form-config/src/types/index.d.ts +1 -0
- package/es/components/form-render/index.d.ts +4 -4
- package/es/components/form-render/src/FormRender.vue.d.ts +4 -4
- package/es/components/form-render/src/FormRender.vue.js +15 -5
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
- package/es/components/form-render/src/components/renderer/formItem.d.ts +2 -0
- package/es/components/form-render/src/components/renderer/formItem.js +22 -5
- package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate.js +8 -8
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.d.ts +15 -0
- package/es/components/form-render/src/components/renderer/lineBar/FormCollapse.vue.js +11 -2
- package/es/components/form-render/src/components/renderer/lineBar/index.d.ts +15 -0
- package/es/components/form-render/src/components/tooltipMessage.vue.d.ts +13 -0
- package/es/components/form-render/src/components/tooltipMessage.vue.js +37 -0
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +3 -2
- package/es/components/form-render/src/types/fieldItem.d.ts +8 -0
- package/es/components/form-render/src/utils/dom.d.ts +8 -2
- package/es/components/form-render/src/utils/dom.js +13 -6
- package/es/components/form-render/style/index.css +1 -1
- package/es/components/iho-table/src/IhoTable.vue.js +7 -3
- package/es/components/iho-table/src/constants/index.d.ts +4 -0
- package/es/components/iho-table/src/constants/index.js +6 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin/index.js +11 -9
- package/es/components/iho-table/src/plugins/keyboardEventPlugin/index.js +1 -3
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +33 -5
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +2 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +19 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js +5 -9
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/virtualTreePlugin/index.js +23 -23
- package/es/components/iho-table/src/types/index.d.ts +2 -0
- package/es/components/iho-table/src/utils/index.d.ts +3 -1
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/keyboard/index.d.ts +5 -4
- package/es/components/keyboard/src/Keyboard.vue.d.ts +5 -4
- package/es/components/keyboard/src/components/NumberPanel.vue.d.ts +1 -0
- package/es/components/keyboard/src/components/NumberPanel.vue.js +3 -2
- package/es/components/keyboard/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +6 -4
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -4
- package/package.json +2 -2
|
@@ -12,14 +12,14 @@ import { useNestTable } from './hooks/useNestTable.js';
|
|
|
12
12
|
import { useEvent } from './hooks/useEvent.js';
|
|
13
13
|
import { useAnnotation } from './hooks/useAnnotation.js';
|
|
14
14
|
import { useSeparateRow, useSeparateMap } from './hooks/useSeparateRow.js';
|
|
15
|
-
import { SettingsSharp, CaretDown, CaretForward, CopyOutline, SyncOutline } from '@vicons/ionicons5';
|
|
15
|
+
import { SettingsSharp, CreateOutline, CaretDown, CaretForward, CopyOutline, SyncOutline } from '@vicons/ionicons5';
|
|
16
16
|
import NoData from './components/NoData.vue.js';
|
|
17
17
|
import script from '../../../shared/components/SvgIcon/SvgIcon.vue.js';
|
|
18
18
|
import { useMessage, NIcon, NTooltip, NCheckbox, NCheckboxGroup, NGrid, NGi, NButton, NPopconfirm, NProgress, NDropdown, NSwitch, NPopover, NTabs, NTabPane } from 'naive-ui';
|
|
19
19
|
import Grid from '../../grid/index.js';
|
|
20
20
|
import XEUtils from 'xe-utils';
|
|
21
21
|
import 'moment';
|
|
22
|
-
import { handleTableHeight, setTableConfig, handleGroupColums, treeToList, checkMethod, setTreeGroupTitle, isFilterItem, handleName, generateEditRender, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap, handleTableImageSize
|
|
22
|
+
import { handleTableHeight, setTableConfig, handleGroupColums, treeToList, checkMethod, setTreeGroupTitle, isFilterItem, handleName, generateEditRender, handlerInitSearchItem, getEvaluate, getMapVal, getCandidateComponents, getageShowType, isLink, showFilter, reScrollFilterWrap, hideFilterWrap, mergeConObjFn, setDefaultFormData, handleImgArr, handleImgSrc, modalDetailImage, handleQrCodeContent, getInlineEditBtn, isCopy, setVisibleCheckAllWrap, handleTableImageSize } from './utils.js';
|
|
23
23
|
import InputButtonScript from './components/input-button.vue.js';
|
|
24
24
|
import Separate from './components/separate.vue.js';
|
|
25
25
|
import xb_big from '../../../shared/assets/img/xb_big.png.js';
|
|
@@ -101,10 +101,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
updateAnchor,
|
|
102
102
|
anchorEvent
|
|
103
103
|
} = useAnchor(props, state, emit, xGrid);
|
|
104
|
-
|
|
105
|
-
keyDown,
|
|
106
|
-
scroll
|
|
107
|
-
} = useEvent(props, state, emit, xGrid, anchorEvent);
|
|
104
|
+
useEvent(props, state, emit, xGrid, anchorEvent);
|
|
108
105
|
const currentCheckedKeys = computed(() => {
|
|
109
106
|
var _a;
|
|
110
107
|
return ((_a = state.checkedRows) == null ? void 0 : _a.map((row) => row[props.primaryKey])) || [];
|
|
@@ -115,7 +112,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
112
|
let isCheckedTotal = currentCheckedKeys.value.length === props.pageVO.total;
|
|
116
113
|
return isMaxChecked || !isCurrentPageAllCheck || isCheckedTotal;
|
|
117
114
|
});
|
|
118
|
-
|
|
115
|
+
computed(() => {
|
|
119
116
|
const checkedKeys = currentCheckedKeys.value || [];
|
|
120
117
|
return checkedKeys.length == 1 ? checkedKeys[0] : "";
|
|
121
118
|
});
|
|
@@ -136,7 +133,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
136
133
|
sysImageSize: props.sysImageSize || {}
|
|
137
134
|
};
|
|
138
135
|
});
|
|
139
|
-
|
|
136
|
+
computed(() => {
|
|
140
137
|
let result = getAttr("tree-config");
|
|
141
138
|
let {
|
|
142
139
|
isTransform
|
|
@@ -168,7 +165,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
168
165
|
}
|
|
169
166
|
return result;
|
|
170
167
|
});
|
|
171
|
-
|
|
168
|
+
computed(() => {
|
|
172
169
|
return {
|
|
173
170
|
editMethod({
|
|
174
171
|
row,
|
|
@@ -254,10 +251,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
254
251
|
var _a, _b;
|
|
255
252
|
return (_b = (_a = props.columnConfig) == null ? void 0 : _a.fieldList) == null ? void 0 : _b.find((field) => field.columnName === columnName);
|
|
256
253
|
}, xGrid);
|
|
257
|
-
const onResizableChange = (payload) => {
|
|
258
|
-
onColumnResize(payload);
|
|
259
|
-
emit("resizableChange", payload);
|
|
260
|
-
};
|
|
261
254
|
async function loadData(data) {
|
|
262
255
|
state.isShowEmpty = !(data == null ? void 0 : data.length);
|
|
263
256
|
let formatList = data;
|
|
@@ -336,7 +329,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
336
329
|
editConfig = {},
|
|
337
330
|
rowConfig = {},
|
|
338
331
|
showSeq = true,
|
|
339
|
-
seqWidth = 34
|
|
332
|
+
seqWidth = 34,
|
|
333
|
+
checkboxConfig = {}
|
|
340
334
|
} = map;
|
|
341
335
|
if (isEdit) {
|
|
342
336
|
Object.assign(state.editConfig, editConfig);
|
|
@@ -406,7 +400,8 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
406
400
|
resizable: false,
|
|
407
401
|
width: checkMinWidth,
|
|
408
402
|
slots: selectType === "checkbox" && !((_b = getAttr("checkbox-config")) == null ? void 0 : _b.checkMethod) ? checkboxSlot : null,
|
|
409
|
-
showOverflow: true
|
|
403
|
+
showOverflow: true,
|
|
404
|
+
...checkboxConfig
|
|
410
405
|
}];
|
|
411
406
|
const seqObj = columns.find((v) => v.type == "seq");
|
|
412
407
|
if ((_c = props == null ? void 0 : props.columnConfig) == null ? void 0 : _c.seqSlotFn) {
|
|
@@ -969,14 +964,20 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
969
964
|
if (isFunction(item.headerSlotFn))
|
|
970
965
|
return () => item.headerSlotFn(item);
|
|
971
966
|
if (type === "format")
|
|
972
|
-
return [createVNode(
|
|
967
|
+
return [item.isEdit ? createVNode(NIcon, {
|
|
968
|
+
"component": CreateOutline,
|
|
969
|
+
"class": "is-edit"
|
|
970
|
+
}, null) : null, createVNode("span", {
|
|
973
971
|
"class": "header-title-span"
|
|
974
972
|
}, [name]), renderAnnotation(item)];
|
|
975
973
|
return () => {
|
|
976
|
-
return [item.treeNode && state.isTree == 1 ? createVNode(NIcon, {
|
|
974
|
+
return [item.treeNode && state.isTree == 1 && !props.columnConfig.noExpandIcon ? createVNode(NIcon, {
|
|
977
975
|
"component": state.isExpand && state.total < 1001 ? CaretDown : CaretForward,
|
|
978
976
|
"onClick": (e) => triggerExpand(e, state.isExpand)
|
|
979
|
-
}, null) :
|
|
977
|
+
}, null) : null, item.isEdit ? createVNode(NIcon, {
|
|
978
|
+
"component": CreateOutline,
|
|
979
|
+
"class": "is-edit"
|
|
980
|
+
}, null) : null, createVNode("span", {
|
|
980
981
|
"class": "header-title-span"
|
|
981
982
|
}, [name]), renderAnnotation(item)];
|
|
982
983
|
};
|
|
@@ -1009,54 +1010,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1009
1010
|
state.hasRefresh = false;
|
|
1010
1011
|
emit("refreshTable");
|
|
1011
1012
|
};
|
|
1012
|
-
const getRowClassName = (params) => {
|
|
1013
|
-
const {
|
|
1014
|
-
rowClassName = null
|
|
1015
|
-
} = props.columnConfig;
|
|
1016
|
-
if (rowClassName) {
|
|
1017
|
-
return XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName;
|
|
1018
|
-
}
|
|
1019
|
-
const selectStyle = () => {
|
|
1020
|
-
const {
|
|
1021
|
-
row,
|
|
1022
|
-
$rowIndex,
|
|
1023
|
-
rowIndex
|
|
1024
|
-
} = params;
|
|
1025
|
-
const k = singleCheckedKey.value;
|
|
1026
|
-
return k && k === row[props.primaryKey] ? "single--checked" : "";
|
|
1027
|
-
};
|
|
1028
|
-
return state.selectType === "checkbox" ? selectStyle() : null;
|
|
1029
|
-
};
|
|
1030
|
-
const footerMethod = (payload) => {
|
|
1031
|
-
const {
|
|
1032
|
-
columns,
|
|
1033
|
-
data
|
|
1034
|
-
} = payload;
|
|
1035
|
-
if (isFunction(attr.footerMethod))
|
|
1036
|
-
return attr.spanMethod(footerMethod);
|
|
1037
|
-
if (isFunction(attr["footer-method"]))
|
|
1038
|
-
return attr["footer-method"](payload);
|
|
1039
|
-
if (!props.groupCountFields || !props.groupCountFields.length) {
|
|
1040
|
-
return [columns.map((column, index) => {
|
|
1041
|
-
if (index === 0) {
|
|
1042
|
-
return null;
|
|
1043
|
-
}
|
|
1044
|
-
return null;
|
|
1045
|
-
})];
|
|
1046
|
-
}
|
|
1047
|
-
let groupText = getFooterGroup(columns, data, props);
|
|
1048
|
-
let groupColumns = columns.map((column, index) => {
|
|
1049
|
-
if (index === 0) {
|
|
1050
|
-
return null;
|
|
1051
|
-
} else if (index === 1) {
|
|
1052
|
-
return groupText;
|
|
1053
|
-
}
|
|
1054
|
-
return null;
|
|
1055
|
-
});
|
|
1056
|
-
emit("setGroupText", groupText);
|
|
1057
|
-
state.groupText = groupText;
|
|
1058
|
-
return [groupColumns];
|
|
1059
|
-
};
|
|
1060
1013
|
const loadChildrenMethod = ({
|
|
1061
1014
|
row
|
|
1062
1015
|
}) => {
|
|
@@ -1145,433 +1098,11 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1145
1098
|
};
|
|
1146
1099
|
});
|
|
1147
1100
|
};
|
|
1148
|
-
const colspanMethod = (payload) => {
|
|
1149
|
-
var _a;
|
|
1150
|
-
const defaultSpan = {
|
|
1151
|
-
rowspan: 1,
|
|
1152
|
-
colspan: 1
|
|
1153
|
-
};
|
|
1154
|
-
const {
|
|
1155
|
-
row,
|
|
1156
|
-
column
|
|
1157
|
-
} = payload;
|
|
1158
|
-
if (isFunction(attr.spanMethod))
|
|
1159
|
-
return attr.spanMethod(payload);
|
|
1160
|
-
if (isFunction(attr["span-method"]))
|
|
1161
|
-
return attr["span-method"](payload);
|
|
1162
|
-
if (state.isTree != 3) {
|
|
1163
|
-
return defaultSpan;
|
|
1164
|
-
}
|
|
1165
|
-
const xTree = xGrid.value;
|
|
1166
|
-
if (!xTree)
|
|
1167
|
-
return defaultSpan;
|
|
1168
|
-
const {
|
|
1169
|
-
tableColumn = []
|
|
1170
|
-
} = (xTree == null ? void 0 : xTree.getTableColumn()) || {};
|
|
1171
|
-
const fristKeyIndex = tableColumn.findIndex((column2) => !!column2.property);
|
|
1172
|
-
const fixedRightColsSpan = tableColumn.filter((column2) => column2.fixed === "right").length;
|
|
1173
|
-
const colspan = tableColumn.length - fristKeyIndex - fixedRightColsSpan;
|
|
1174
|
-
const isOldVxeTree = row.childrenList && row.childrenList.length;
|
|
1175
|
-
const isTransformVxeTree = ((_a = props.tableParams) == null ? void 0 : _a.isTransform) && !row.qianduan_parent_id;
|
|
1176
|
-
if (isOldVxeTree || isTransformVxeTree) {
|
|
1177
|
-
if (column.treeNode) {
|
|
1178
|
-
return {
|
|
1179
|
-
rowspan: 1,
|
|
1180
|
-
colspan
|
|
1181
|
-
};
|
|
1182
|
-
} else if (!column.property || column.fixed === "right") {
|
|
1183
|
-
return defaultSpan;
|
|
1184
|
-
} else {
|
|
1185
|
-
return {
|
|
1186
|
-
rowspan: 0,
|
|
1187
|
-
colspan: 0
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
|
-
}
|
|
1191
|
-
};
|
|
1192
|
-
const footerRowspanMethod = (obj) => {
|
|
1193
|
-
if (!props.groupCountFields || !props.groupCountFields.length)
|
|
1194
|
-
return {
|
|
1195
|
-
rowspan: 1,
|
|
1196
|
-
colspan: 1
|
|
1197
|
-
};
|
|
1198
|
-
let {
|
|
1199
|
-
$rowIndex,
|
|
1200
|
-
_columnIndex
|
|
1201
|
-
} = obj;
|
|
1202
|
-
let len = state.columnLen || 99;
|
|
1203
|
-
let {
|
|
1204
|
-
isBatchSelect
|
|
1205
|
-
} = props.columnConfig;
|
|
1206
|
-
if ($rowIndex === 0) {
|
|
1207
|
-
if (isBatchSelect == 1) {
|
|
1208
|
-
if (_columnIndex === 0) {
|
|
1209
|
-
return {
|
|
1210
|
-
rowspan: 1,
|
|
1211
|
-
colspan: 2
|
|
1212
|
-
};
|
|
1213
|
-
} else if (_columnIndex === 1) {
|
|
1214
|
-
return {
|
|
1215
|
-
rowspan: 1,
|
|
1216
|
-
colspan: 0
|
|
1217
|
-
};
|
|
1218
|
-
} else if (_columnIndex === 2) {
|
|
1219
|
-
return {
|
|
1220
|
-
rowspan: 1,
|
|
1221
|
-
colspan: len
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
|
-
return {
|
|
1225
|
-
rowspan: 1,
|
|
1226
|
-
colspan: 0
|
|
1227
|
-
};
|
|
1228
|
-
}
|
|
1229
|
-
if (_columnIndex === 0) {
|
|
1230
|
-
return {
|
|
1231
|
-
rowspan: 1,
|
|
1232
|
-
colspan: 1
|
|
1233
|
-
};
|
|
1234
|
-
} else if (_columnIndex === 1) {
|
|
1235
|
-
return {
|
|
1236
|
-
rowspan: 1,
|
|
1237
|
-
colspan: len
|
|
1238
|
-
};
|
|
1239
|
-
}
|
|
1240
|
-
return {
|
|
1241
|
-
rowspan: 1,
|
|
1242
|
-
colspan: 0
|
|
1243
|
-
};
|
|
1244
|
-
}
|
|
1245
|
-
};
|
|
1246
|
-
const rowdblclick = ({
|
|
1247
|
-
row,
|
|
1248
|
-
column
|
|
1249
|
-
}) => {
|
|
1250
|
-
if (isScanMultiTable.value || !!props.isInlineOperating)
|
|
1251
|
-
return false;
|
|
1252
|
-
if (XEUtils.has(row, GROUP_TITLE_KEY))
|
|
1253
|
-
return false;
|
|
1254
|
-
emit("setNestTableClick", props.isNestTable);
|
|
1255
|
-
emit("rowdblclick", row, column, true, true);
|
|
1256
|
-
};
|
|
1257
|
-
const pubCheckChange = (rows = []) => {
|
|
1258
|
-
state.treeTableLength = rows.filter((item) => {
|
|
1259
|
-
let isGroupRow = XEUtils.has(item, GROUP_TITLE_KEY);
|
|
1260
|
-
return !isGroupRow;
|
|
1261
|
-
}).length;
|
|
1262
|
-
state.visibleTreeCheck = rows.length > 1;
|
|
1263
|
-
emit("selectionChange", rows);
|
|
1264
|
-
};
|
|
1265
|
-
const updateAddCheckedRows = (rows, isTree = false) => {
|
|
1266
|
-
let obj = {
|
|
1267
|
-
isUpdate: true,
|
|
1268
|
-
updateRows: rows,
|
|
1269
|
-
isTree
|
|
1270
|
-
};
|
|
1271
|
-
if (isTree) {
|
|
1272
|
-
Object.assign(obj, {
|
|
1273
|
-
isTree,
|
|
1274
|
-
isCheckedChange: true,
|
|
1275
|
-
checkedRows: state.checkedRows
|
|
1276
|
-
});
|
|
1277
|
-
}
|
|
1278
|
-
emit("selectionChangeLocal", obj);
|
|
1279
|
-
};
|
|
1280
|
-
const removeCheckedRows = (rows, isCheckedChange) => {
|
|
1281
|
-
removeCheckedDisabledRows(state);
|
|
1282
|
-
let checkedRows = state.checkedRows;
|
|
1283
|
-
let needRemoveIndexs = [];
|
|
1284
|
-
for (let i = 0; i < rows.length; i++) {
|
|
1285
|
-
let row = rows[i];
|
|
1286
|
-
let removeIndex = currentCheckedKeys.value.findIndex((item) => {
|
|
1287
|
-
return item === row[props.primaryKey];
|
|
1288
|
-
});
|
|
1289
|
-
removeIndex >= 0 && needRemoveIndexs.push(removeIndex);
|
|
1290
|
-
}
|
|
1291
|
-
needRemoveIndexs.sort((a, b) => b - a);
|
|
1292
|
-
emit("selectionChangeLocal", {
|
|
1293
|
-
isAdd: false,
|
|
1294
|
-
isCheckedChange,
|
|
1295
|
-
needRemoveIndexs,
|
|
1296
|
-
newCheckedRows: [],
|
|
1297
|
-
checkedRows
|
|
1298
|
-
});
|
|
1299
|
-
};
|
|
1300
|
-
const setCheckedMehod = (setChecked, row) => {
|
|
1301
|
-
if (setChecked) {
|
|
1302
|
-
updateAddCheckedRows(row);
|
|
1303
|
-
return;
|
|
1304
|
-
}
|
|
1305
|
-
if (props.pageVO.pageIndex != state.lastPageIndex) {
|
|
1306
|
-
updateAddCheckedRows(row);
|
|
1307
|
-
return;
|
|
1308
|
-
}
|
|
1309
|
-
if (currentCheckedKeys.value.includes(row[props.primaryKey])) {
|
|
1310
|
-
removeCheckedRows([row]);
|
|
1311
|
-
return;
|
|
1312
|
-
}
|
|
1313
|
-
updateAddCheckedRows(row);
|
|
1314
|
-
};
|
|
1315
|
-
const handlerClickRow = (data) => {
|
|
1316
|
-
var _a, _b, _c;
|
|
1317
|
-
let {
|
|
1318
|
-
row,
|
|
1319
|
-
$event = {},
|
|
1320
|
-
$rowIndex,
|
|
1321
|
-
triggerCheckbox
|
|
1322
|
-
} = data;
|
|
1323
|
-
if (((_a = getAttr("checkbox-config")) == null ? void 0 : _a.noTriggerCellClick) && triggerCheckbox) {
|
|
1324
|
-
return false;
|
|
1325
|
-
}
|
|
1326
|
-
if (((_b = getAttr("checkbox-config")) == null ? void 0 : _b.trigger) === "default") {
|
|
1327
|
-
emit("handlerClickRow", row, $rowIndex);
|
|
1328
|
-
return false;
|
|
1329
|
-
}
|
|
1330
|
-
if (isScanMultiTable.value || props.isInlineOperating)
|
|
1331
|
-
return false;
|
|
1332
|
-
if (XEUtils.has(data == null ? void 0 : data.row, GROUP_TITLE_KEY))
|
|
1333
|
-
return false;
|
|
1334
|
-
if (state.isTriggerSelectionChange && state.isTree == 0)
|
|
1335
|
-
return false;
|
|
1336
|
-
let table = xGrid.value;
|
|
1337
|
-
isAboutNestTable.value && emit("resetNestLastClickTable", table);
|
|
1338
|
-
let {
|
|
1339
|
-
className,
|
|
1340
|
-
tagName
|
|
1341
|
-
} = $event.target || {};
|
|
1342
|
-
if (tagName == "INPUT" || tagName == "svg" || tagName == "path")
|
|
1343
|
-
return;
|
|
1344
|
-
if (className && XEUtils.isString(className)) {
|
|
1345
|
-
if (className.includes("n-input") || className.includes("n-base-selection-label"))
|
|
1346
|
-
return;
|
|
1347
|
-
if (className.includes("vxe-table--expand-btn"))
|
|
1348
|
-
return;
|
|
1349
|
-
}
|
|
1350
|
-
isAboutNestTable.value && emit("setNestLastClickTable", table, props.isNestTable, row[handleRowId.value], row);
|
|
1351
|
-
emit("setNestTableClick", false);
|
|
1352
|
-
if (props.isNestTable) {
|
|
1353
|
-
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1354
|
-
nestHandleClickRow(table, data);
|
|
1355
|
-
return;
|
|
1356
|
-
}
|
|
1357
|
-
const batchSelect = (_c = getAttr("checkbox-config")) == null ? void 0 : _c.batchSelect;
|
|
1358
|
-
let forbiddenBatchSelect = !checkMethod(data);
|
|
1359
|
-
if (state.selectType == "checkbox" && !batchSelect && (forbiddenBatchSelect || data.row.$__SEPARATE)) {
|
|
1360
|
-
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1361
|
-
const checked2 = getRowClassName({
|
|
1362
|
-
row
|
|
1363
|
-
}) == "single--checked";
|
|
1364
|
-
const value = !checked2 ? [] : [row];
|
|
1365
|
-
state.checkedRows = value;
|
|
1366
|
-
pubCheckChange(value);
|
|
1367
|
-
emit("handlerClickRow", row, $rowIndex);
|
|
1368
|
-
emit("checkboxChange", {
|
|
1369
|
-
checked: checked2,
|
|
1370
|
-
row,
|
|
1371
|
-
index: $rowIndex,
|
|
1372
|
-
records: [row]
|
|
1373
|
-
});
|
|
1374
|
-
return;
|
|
1375
|
-
}
|
|
1376
|
-
state.visibleCheckAllWrap = false;
|
|
1377
|
-
state.visibleCheckAllWrapMore = false;
|
|
1378
|
-
let checked = false;
|
|
1379
|
-
if (state.selectType == "radio") {
|
|
1380
|
-
checked = table.isCheckedByRadioRow(row);
|
|
1381
|
-
} else {
|
|
1382
|
-
checked = table.isCheckedByCheckboxRow(row);
|
|
1383
|
-
}
|
|
1384
|
-
if (state.isradioChange) {
|
|
1385
|
-
checked = false;
|
|
1386
|
-
state.isradioChange = false;
|
|
1387
|
-
}
|
|
1388
|
-
let checkedRow = table.getCheckboxRecords();
|
|
1389
|
-
let rowLen = state.checkedRows.filter((item) => !XEUtils.has(item, GROUP_TITLE_KEY)).length;
|
|
1390
|
-
let newRow = [];
|
|
1391
|
-
if (state.isTree != 0) {
|
|
1392
|
-
let {
|
|
1393
|
-
className: className2
|
|
1394
|
-
} = $event.target || {};
|
|
1395
|
-
if (className2 && className2.includes("vxe-tree--node-btn"))
|
|
1396
|
-
return;
|
|
1397
|
-
if (state.selectType === "checkbox") {
|
|
1398
|
-
let rowVal = {};
|
|
1399
|
-
if (!state.isTriggerSelectionChange) {
|
|
1400
|
-
table.setAllCheckboxRow(false);
|
|
1401
|
-
state.checkedRows = [row];
|
|
1402
|
-
pubCheckChange([row]);
|
|
1403
|
-
rowVal = row;
|
|
1404
|
-
} else {
|
|
1405
|
-
if (checkedRow.length > 1)
|
|
1406
|
-
return false;
|
|
1407
|
-
rowVal = checked || checkedRow.length === 1 && !checked ? checkedRow[0] : {};
|
|
1408
|
-
state.checkedRows = [rowVal];
|
|
1409
|
-
}
|
|
1410
|
-
updateAddCheckedRows(rowVal, true);
|
|
1411
|
-
emit("handlerClickRow", rowVal);
|
|
1412
|
-
return;
|
|
1413
|
-
}
|
|
1414
|
-
let newTheUniqueKeyArr = [];
|
|
1415
|
-
flattenRow(row, newRow, newTheUniqueKeyArr, handleRowId.value);
|
|
1416
|
-
let res = intersectRow(checkedRow, newTheUniqueKeyArr, handleRowId.value);
|
|
1417
|
-
if (!res) {
|
|
1418
|
-
rowLen = 1;
|
|
1419
|
-
} else {
|
|
1420
|
-
rowLen = checkedRow.filter((item) => !XEUtils.has(item, GROUP_TITLE_KEY)).length;
|
|
1421
|
-
}
|
|
1422
|
-
}
|
|
1423
|
-
!batchSelect && table.setAllCheckboxRow(false);
|
|
1424
|
-
let setChecked = checked;
|
|
1425
|
-
if (rowLen > 1) {
|
|
1426
|
-
state.selectType != "radio" && table.setCheckboxRow([row], true);
|
|
1427
|
-
state.isTree != 0 && state.selectType != "radio" && pubCheckChange(newRow);
|
|
1428
|
-
state.selectType != "radio" && emit("handlerClickRow", row, $rowIndex);
|
|
1429
|
-
} else {
|
|
1430
|
-
setChecked = !setChecked;
|
|
1431
|
-
if (!setChecked) {
|
|
1432
|
-
state.selectType == "radio" && table.clearRadioRow();
|
|
1433
|
-
state.isTree != 0 && state.selectType != "radio" && pubCheckChange([]);
|
|
1434
|
-
} else {
|
|
1435
|
-
state.selectType == "radio" && table.setRadioRow(row);
|
|
1436
|
-
state.isTree != 0 && state.selectType != "radio" && pubCheckChange(newRow);
|
|
1437
|
-
}
|
|
1438
|
-
state.selectType != "radio" && table.setCheckboxRow([row], setChecked);
|
|
1439
|
-
}
|
|
1440
|
-
if (state.isTree != 0) {
|
|
1441
|
-
emit("checkboxChange", {
|
|
1442
|
-
checked: setChecked,
|
|
1443
|
-
row,
|
|
1444
|
-
index: $rowIndex,
|
|
1445
|
-
records: checkedRow
|
|
1446
|
-
});
|
|
1447
|
-
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1448
|
-
return;
|
|
1449
|
-
}
|
|
1450
|
-
setCheckedMehod(setChecked, row);
|
|
1451
|
-
if (setChecked || rowLen > 1 || !rowLen) {
|
|
1452
|
-
state.checkedRows = [row];
|
|
1453
|
-
}
|
|
1454
|
-
if (!setChecked && rowLen === 1) {
|
|
1455
|
-
state.checkedRows = [];
|
|
1456
|
-
}
|
|
1457
|
-
setCurrentCheckedLength();
|
|
1458
|
-
state.lastPageIndex = props.pageVO.pageIndex;
|
|
1459
|
-
emit("checkboxChange", {
|
|
1460
|
-
checked: setChecked,
|
|
1461
|
-
row,
|
|
1462
|
-
index: $rowIndex,
|
|
1463
|
-
records: table.getCheckboxRecords()
|
|
1464
|
-
});
|
|
1465
|
-
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1466
|
-
};
|
|
1467
|
-
const addCheckedRows = (rows) => {
|
|
1468
|
-
removeCheckedDisabledRows(state);
|
|
1469
|
-
let checkedRows = state.checkedRows;
|
|
1470
|
-
let newCheckedRows = rows.filter((row) => {
|
|
1471
|
-
return !currentCheckedKeys.value.includes(row[props.primaryKey]);
|
|
1472
|
-
});
|
|
1473
|
-
checkedRows.push(...newCheckedRows);
|
|
1474
|
-
emit("selectionChangeLocal", {
|
|
1475
|
-
isAdd: true,
|
|
1476
|
-
isCheckedChange: true,
|
|
1477
|
-
newCheckedRows,
|
|
1478
|
-
checkedRows
|
|
1479
|
-
});
|
|
1480
|
-
};
|
|
1481
|
-
const treeTableSelectionChange = (records) => {
|
|
1482
|
-
if (state.isTree == 0) {
|
|
1483
|
-
emit("selectionChange", records);
|
|
1484
|
-
return false;
|
|
1485
|
-
}
|
|
1486
|
-
pubCheckChange(records);
|
|
1487
|
-
return true;
|
|
1488
|
-
};
|
|
1489
|
-
const selectionChange = ({
|
|
1490
|
-
checked,
|
|
1491
|
-
row,
|
|
1492
|
-
records,
|
|
1493
|
-
$rowIndex
|
|
1494
|
-
}) => {
|
|
1495
|
-
let table = xGrid.value;
|
|
1496
|
-
table.clearCurrentRow();
|
|
1497
|
-
state.isTriggerSelectionChange = true;
|
|
1498
|
-
setTimeout(() => {
|
|
1499
|
-
state.isTriggerSelectionChange = false;
|
|
1500
|
-
}, 0);
|
|
1501
|
-
emit("checkboxChange", {
|
|
1502
|
-
checked,
|
|
1503
|
-
row,
|
|
1504
|
-
index: $rowIndex,
|
|
1505
|
-
records
|
|
1506
|
-
});
|
|
1507
|
-
if (treeTableSelectionChange(records))
|
|
1508
|
-
return;
|
|
1509
|
-
if (checked) {
|
|
1510
|
-
addCheckedRows([row]);
|
|
1511
|
-
} else {
|
|
1512
|
-
removeCheckedRows([row], true);
|
|
1513
|
-
}
|
|
1514
|
-
setCurrentCheckedLength();
|
|
1515
|
-
};
|
|
1516
|
-
const selectionChangeAll = ({
|
|
1517
|
-
checked,
|
|
1518
|
-
records
|
|
1519
|
-
}) => {
|
|
1520
|
-
if (treeTableSelectionChange(records))
|
|
1521
|
-
return;
|
|
1522
|
-
if (checked) {
|
|
1523
|
-
addCheckedRows(records);
|
|
1524
|
-
} else {
|
|
1525
|
-
removeCheckedRows(props.data);
|
|
1526
|
-
}
|
|
1527
|
-
setCurrentCheckedLength();
|
|
1528
|
-
};
|
|
1529
|
-
const radioOnChange = (rowData = {}) => {
|
|
1530
|
-
let {
|
|
1531
|
-
row
|
|
1532
|
-
} = rowData;
|
|
1533
|
-
emit("selectionChange", [{
|
|
1534
|
-
...row
|
|
1535
|
-
}]);
|
|
1536
|
-
};
|
|
1537
|
-
const sortChange = ({
|
|
1538
|
-
property,
|
|
1539
|
-
order
|
|
1540
|
-
}) => {
|
|
1541
|
-
if (props.isInlineOperating)
|
|
1542
|
-
return false;
|
|
1543
|
-
Object.values(state.filterFields).forEach((item) => item.filterSort = null);
|
|
1544
|
-
emit("sortChange", {
|
|
1545
|
-
prop: property,
|
|
1546
|
-
order
|
|
1547
|
-
});
|
|
1548
|
-
};
|
|
1549
1101
|
const showDrawer = () => {
|
|
1550
1102
|
const theads = xGrid.value.$el.childNodes[0].childNodes[1].childNodes[0].getElementsByClassName("mycolumn");
|
|
1551
1103
|
emit("setNestTableClickSetting", props.isNestTable);
|
|
1552
1104
|
emit("showDrawer", theads);
|
|
1553
1105
|
};
|
|
1554
|
-
const handleCellMouseenter = ({
|
|
1555
|
-
column,
|
|
1556
|
-
$event
|
|
1557
|
-
}) => {
|
|
1558
|
-
if (column.showOverflow === "title") {
|
|
1559
|
-
const target = $event == null ? void 0 : $event.currentTarget;
|
|
1560
|
-
const cls = target == null ? void 0 : target.className;
|
|
1561
|
-
const bodyCls = " vxe-body--column ";
|
|
1562
|
-
if (cls && ` ${cls} `.includes(bodyCls) && target && target.hasAttribute("title")) {
|
|
1563
|
-
const cellElem = target.querySelector(".vxe-cell");
|
|
1564
|
-
if (cellElem && cellElem.hasAttribute("title")) {
|
|
1565
|
-
cellElem.removeAttribute("title");
|
|
1566
|
-
}
|
|
1567
|
-
if (props.isInlineOperating) {
|
|
1568
|
-
if (target && target.hasAttribute("title")) {
|
|
1569
|
-
target.removeAttribute("title");
|
|
1570
|
-
}
|
|
1571
|
-
}
|
|
1572
|
-
}
|
|
1573
|
-
}
|
|
1574
|
-
};
|
|
1575
1106
|
const getFooterTooltipTitle = (column) => {
|
|
1576
1107
|
let t = "";
|
|
1577
1108
|
if (XEUtils.has(props.sumData, column.property)) {
|
|
@@ -2268,7 +1799,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2268
1799
|
}
|
|
2269
1800
|
});
|
|
2270
1801
|
});
|
|
2271
|
-
const handleMenuClickEvent = (payload) => emit("menuClick", payload);
|
|
2272
1802
|
expose({
|
|
2273
1803
|
formatData,
|
|
2274
1804
|
xGrid,
|
|
@@ -2277,7 +1807,6 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2277
1807
|
handleFilterClearAll
|
|
2278
1808
|
});
|
|
2279
1809
|
return (_ctx, _cache) => {
|
|
2280
|
-
var _a;
|
|
2281
1810
|
return openBlock(), createElementBlock(Fragment, null, [state.anchorList.length ? (openBlock(), createBlock(unref(NTabs), {
|
|
2282
1811
|
key: 0,
|
|
2283
1812
|
type: "line",
|
|
@@ -2316,77 +1845,9 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2316
1845
|
"show-footer-overflow": "title",
|
|
2317
1846
|
"keep-source": "",
|
|
2318
1847
|
"auto-resize": "",
|
|
2319
|
-
height: props.height ? "auto" : void 0
|
|
2320
|
-
"cell-style": state.cellStyle
|
|
1848
|
+
height: props.height ? "auto" : void 0
|
|
2321
1849
|
}, _ctx.$attrs, {
|
|
2322
|
-
"
|
|
2323
|
-
selected: ((_a = _ctx.columnConfig.keyboardConfig) == null ? void 0 : _a.isEdit) ? true : false
|
|
2324
|
-
},
|
|
2325
|
-
"tree-config": unref(treeConfig),
|
|
2326
|
-
"row-class-name": getRowClassName,
|
|
2327
|
-
"row-config": {
|
|
2328
|
-
...state.rowConfig,
|
|
2329
|
-
...unref(getAttr)("row-config")
|
|
2330
|
-
},
|
|
2331
|
-
"show-footer": _ctx.showFooter && !props.isInlineOperating,
|
|
2332
|
-
"footer-method": footerMethod,
|
|
2333
|
-
"sort-config": {
|
|
2334
|
-
trigger: "cell",
|
|
2335
|
-
remote: true,
|
|
2336
|
-
...unref(getAttr)("sort-config")
|
|
2337
|
-
},
|
|
2338
|
-
"span-method": colspanMethod,
|
|
2339
|
-
"footer-span-method": footerRowspanMethod,
|
|
2340
|
-
"tooltip-config": {
|
|
2341
|
-
enterable: false,
|
|
2342
|
-
...unref(getAttr)("tooltip-config")
|
|
2343
|
-
},
|
|
2344
|
-
"checkbox-config": {
|
|
2345
|
-
checkField: "checked",
|
|
2346
|
-
labelField: "checked",
|
|
2347
|
-
checkMethod: unref(checkMethod),
|
|
2348
|
-
visibleMethod: unref(visibleMethod),
|
|
2349
|
-
trigger: "cell",
|
|
2350
|
-
reserve: true,
|
|
2351
|
-
highlight: true,
|
|
2352
|
-
...unref(getAttr)("checkbox-config")
|
|
2353
|
-
},
|
|
2354
|
-
"radio-config": {
|
|
2355
|
-
checkField: "checked",
|
|
2356
|
-
trigger: "cell",
|
|
2357
|
-
reserve: true,
|
|
2358
|
-
highlight: true,
|
|
2359
|
-
...unref(getAttr)("radio-config")
|
|
2360
|
-
},
|
|
2361
|
-
"scroll-y": {
|
|
2362
|
-
gt: 50,
|
|
2363
|
-
...unref(getAttr)("scroll-y")
|
|
2364
|
-
},
|
|
2365
|
-
"row-style": unref(getRowStyle),
|
|
2366
|
-
"edit-config": state.editConfig,
|
|
2367
|
-
"expand-config": {
|
|
2368
|
-
lazy: true,
|
|
2369
|
-
accordion: _ctx.columnConfig && _ctx.columnConfig.accordion,
|
|
2370
|
-
loadMethod: unref(loadExpandMethod),
|
|
2371
|
-
toggleMethod: unref(toggleExpandMethod),
|
|
2372
|
-
iconOpen: "iconfont icon-a-xitongtubiaozhediejian",
|
|
2373
|
-
iconClose: "iconfont icon-a-xitongtubiaotianjia",
|
|
2374
|
-
...unref(getAttr)("expand-config")
|
|
2375
|
-
},
|
|
2376
|
-
"keyboard-config": unref(keyboardConfig),
|
|
2377
|
-
"edit-rules": _ctx.columnConfig.editRules || {},
|
|
2378
|
-
"menu-config": _ctx.menuConfig,
|
|
2379
|
-
onCellDblclick: rowdblclick,
|
|
2380
|
-
onCellClick: handlerClickRow,
|
|
2381
|
-
onCheckboxChange: selectionChange,
|
|
2382
|
-
onCheckboxAll: selectionChangeAll,
|
|
2383
|
-
onRadioChange: radioOnChange,
|
|
2384
|
-
onSortChange: sortChange,
|
|
2385
|
-
onScroll: unref(scroll),
|
|
2386
|
-
onCellMouseenter: handleCellMouseenter,
|
|
2387
|
-
onKeydown: unref(keyDown),
|
|
2388
|
-
onMenuClick: handleMenuClickEvent,
|
|
2389
|
-
onResizableChange
|
|
1850
|
+
"edit-config": state.editConfig
|
|
2390
1851
|
}), {
|
|
2391
1852
|
empty: withCtx(() => [state.isShowEmpty ? renderSlot(_ctx.$slots, "empty", {
|
|
2392
1853
|
key: 0
|
|
@@ -2425,7 +1886,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
2425
1886
|
}
|
|
2426
1887
|
})]),
|
|
2427
1888
|
_: 3
|
|
2428
|
-
}, 16, ["height", "
|
|
1889
|
+
}, 16, ["height", "edit-config"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
|
|
2429
1890
|
class: "refresh",
|
|
2430
1891
|
onClick: hanldeClickRefresh
|
|
2431
1892
|
}, [createVNode(unref(NIcon), {
|