cnhis-design-vue 3.1.35-beta.1 → 3.1.35-beta.3
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/README.md +123 -123
- package/es/components/big-table/index.d.ts +5 -0
- package/es/components/big-table/src/BigTable.vue.d.ts +5 -0
- package/es/components/big-table/src/BigTable.vue2.js +555 -8
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/fabric-chart/src/utils/index.d.ts +6823 -0
- package/es/components/form-config/src/components/FormConfigCreator.vue.js +1 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +7 -1
- package/es/components/form-render/src/components/renderer/combination.js +6 -2
- package/es/components/form-render/src/components/renderer/jsonCombination/index.js +7 -3
- package/es/shared/assets/img/failure.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/icon-asc.js +1 -1
- package/es/shared/assets/img/icon-desc.js +1 -1
- package/es/shared/assets/img/no-permission.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/video_hover.js +1 -1
- package/es/shared/assets/img/video_play_hover.js +1 -1
- package/es/shared/assets/img/xb_big.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
|
@@ -19,7 +19,7 @@ import { useMessage, NIcon, NTooltip, NCheckbox, NCheckboxGroup, NGrid, NGi, NBu
|
|
|
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 } from './utils.js';
|
|
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, visibleMethod, getRowStyle, getFooterGroup, flattenRow, intersectRow, removeCheckedDisabledRows } 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,7 +101,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
updateAnchor,
|
|
102
102
|
anchorEvent
|
|
103
103
|
} = useAnchor(props, state, emit, xGrid);
|
|
104
|
-
|
|
104
|
+
const {
|
|
105
|
+
keyDown,
|
|
106
|
+
scroll
|
|
107
|
+
} = useEvent(props, state, emit, xGrid, anchorEvent);
|
|
105
108
|
const currentCheckedKeys = computed(() => {
|
|
106
109
|
var _a;
|
|
107
110
|
return ((_a = state.checkedRows) == null ? void 0 : _a.map((row) => row[props.primaryKey])) || [];
|
|
@@ -112,7 +115,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
112
115
|
let isCheckedTotal = currentCheckedKeys.value.length === props.pageVO.total;
|
|
113
116
|
return isMaxChecked || !isCurrentPageAllCheck || isCheckedTotal;
|
|
114
117
|
});
|
|
115
|
-
computed(() => {
|
|
118
|
+
const singleCheckedKey = computed(() => {
|
|
116
119
|
const checkedKeys = currentCheckedKeys.value || [];
|
|
117
120
|
return checkedKeys.length == 1 ? checkedKeys[0] : "";
|
|
118
121
|
});
|
|
@@ -133,7 +136,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
133
136
|
sysImageSize: props.sysImageSize || {}
|
|
134
137
|
};
|
|
135
138
|
});
|
|
136
|
-
computed(() => {
|
|
139
|
+
const treeConfig = computed(() => {
|
|
137
140
|
let result = getAttr("tree-config");
|
|
138
141
|
let {
|
|
139
142
|
isTransform
|
|
@@ -165,7 +168,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
165
168
|
}
|
|
166
169
|
return result;
|
|
167
170
|
});
|
|
168
|
-
computed(() => {
|
|
171
|
+
const keyboardConfig = computed(() => {
|
|
169
172
|
return {
|
|
170
173
|
editMethod({
|
|
171
174
|
row,
|
|
@@ -251,6 +254,10 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
251
254
|
var _a, _b;
|
|
252
255
|
return (_b = (_a = props.columnConfig) == null ? void 0 : _a.fieldList) == null ? void 0 : _b.find((field) => field.columnName === columnName);
|
|
253
256
|
}, xGrid);
|
|
257
|
+
const onResizableChange = (payload) => {
|
|
258
|
+
onColumnResize(payload);
|
|
259
|
+
emit("resizableChange", payload);
|
|
260
|
+
};
|
|
254
261
|
async function loadData(data) {
|
|
255
262
|
state.isShowEmpty = !(data == null ? void 0 : data.length);
|
|
256
263
|
let formatList = data;
|
|
@@ -1010,6 +1017,54 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1010
1017
|
state.hasRefresh = false;
|
|
1011
1018
|
emit("refreshTable");
|
|
1012
1019
|
};
|
|
1020
|
+
const getRowClassName = (params) => {
|
|
1021
|
+
const {
|
|
1022
|
+
rowClassName = null
|
|
1023
|
+
} = props.columnConfig;
|
|
1024
|
+
if (rowClassName) {
|
|
1025
|
+
return XEUtils.isFunction(rowClassName) ? rowClassName(params) : rowClassName;
|
|
1026
|
+
}
|
|
1027
|
+
const selectStyle = () => {
|
|
1028
|
+
const {
|
|
1029
|
+
row,
|
|
1030
|
+
$rowIndex,
|
|
1031
|
+
rowIndex
|
|
1032
|
+
} = params;
|
|
1033
|
+
const k = singleCheckedKey.value;
|
|
1034
|
+
return k && k === row[props.primaryKey] ? "single--checked" : "";
|
|
1035
|
+
};
|
|
1036
|
+
return state.selectType === "checkbox" ? selectStyle() : null;
|
|
1037
|
+
};
|
|
1038
|
+
const footerMethod = (payload) => {
|
|
1039
|
+
const {
|
|
1040
|
+
columns,
|
|
1041
|
+
data
|
|
1042
|
+
} = payload;
|
|
1043
|
+
if (isFunction(attr.footerMethod))
|
|
1044
|
+
return attr.spanMethod(footerMethod);
|
|
1045
|
+
if (isFunction(attr["footer-method"]))
|
|
1046
|
+
return attr["footer-method"](payload);
|
|
1047
|
+
if (!props.groupCountFields || !props.groupCountFields.length) {
|
|
1048
|
+
return [columns.map((column, index) => {
|
|
1049
|
+
if (index === 0) {
|
|
1050
|
+
return null;
|
|
1051
|
+
}
|
|
1052
|
+
return null;
|
|
1053
|
+
})];
|
|
1054
|
+
}
|
|
1055
|
+
let groupText = getFooterGroup(columns, data, props);
|
|
1056
|
+
let groupColumns = columns.map((column, index) => {
|
|
1057
|
+
if (index === 0) {
|
|
1058
|
+
return null;
|
|
1059
|
+
} else if (index === 1) {
|
|
1060
|
+
return groupText;
|
|
1061
|
+
}
|
|
1062
|
+
return null;
|
|
1063
|
+
});
|
|
1064
|
+
emit("setGroupText", groupText);
|
|
1065
|
+
state.groupText = groupText;
|
|
1066
|
+
return [groupColumns];
|
|
1067
|
+
};
|
|
1013
1068
|
const loadChildrenMethod = ({
|
|
1014
1069
|
row
|
|
1015
1070
|
}) => {
|
|
@@ -1098,11 +1153,433 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1098
1153
|
};
|
|
1099
1154
|
});
|
|
1100
1155
|
};
|
|
1156
|
+
const colspanMethod = (payload) => {
|
|
1157
|
+
var _a;
|
|
1158
|
+
const defaultSpan = {
|
|
1159
|
+
rowspan: 1,
|
|
1160
|
+
colspan: 1
|
|
1161
|
+
};
|
|
1162
|
+
const {
|
|
1163
|
+
row,
|
|
1164
|
+
column
|
|
1165
|
+
} = payload;
|
|
1166
|
+
if (isFunction(attr.spanMethod))
|
|
1167
|
+
return attr.spanMethod(payload);
|
|
1168
|
+
if (isFunction(attr["span-method"]))
|
|
1169
|
+
return attr["span-method"](payload);
|
|
1170
|
+
if (state.isTree != 3) {
|
|
1171
|
+
return defaultSpan;
|
|
1172
|
+
}
|
|
1173
|
+
const xTree = xGrid.value;
|
|
1174
|
+
if (!xTree)
|
|
1175
|
+
return defaultSpan;
|
|
1176
|
+
const {
|
|
1177
|
+
tableColumn = []
|
|
1178
|
+
} = (xTree == null ? void 0 : xTree.getTableColumn()) || {};
|
|
1179
|
+
const fristKeyIndex = tableColumn.findIndex((column2) => !!column2.property);
|
|
1180
|
+
const fixedRightColsSpan = tableColumn.filter((column2) => column2.fixed === "right").length;
|
|
1181
|
+
const colspan = tableColumn.length - fristKeyIndex - fixedRightColsSpan;
|
|
1182
|
+
const isOldVxeTree = row.childrenList && row.childrenList.length;
|
|
1183
|
+
const isTransformVxeTree = ((_a = props.tableParams) == null ? void 0 : _a.isTransform) && !row.qianduan_parent_id;
|
|
1184
|
+
if (isOldVxeTree || isTransformVxeTree) {
|
|
1185
|
+
if (column.treeNode) {
|
|
1186
|
+
return {
|
|
1187
|
+
rowspan: 1,
|
|
1188
|
+
colspan
|
|
1189
|
+
};
|
|
1190
|
+
} else if (!column.property || column.fixed === "right") {
|
|
1191
|
+
return defaultSpan;
|
|
1192
|
+
} else {
|
|
1193
|
+
return {
|
|
1194
|
+
rowspan: 0,
|
|
1195
|
+
colspan: 0
|
|
1196
|
+
};
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
};
|
|
1200
|
+
const footerRowspanMethod = (obj) => {
|
|
1201
|
+
if (!props.groupCountFields || !props.groupCountFields.length)
|
|
1202
|
+
return {
|
|
1203
|
+
rowspan: 1,
|
|
1204
|
+
colspan: 1
|
|
1205
|
+
};
|
|
1206
|
+
let {
|
|
1207
|
+
$rowIndex,
|
|
1208
|
+
_columnIndex
|
|
1209
|
+
} = obj;
|
|
1210
|
+
let len = state.columnLen || 99;
|
|
1211
|
+
let {
|
|
1212
|
+
isBatchSelect
|
|
1213
|
+
} = props.columnConfig;
|
|
1214
|
+
if ($rowIndex === 0) {
|
|
1215
|
+
if (isBatchSelect == 1) {
|
|
1216
|
+
if (_columnIndex === 0) {
|
|
1217
|
+
return {
|
|
1218
|
+
rowspan: 1,
|
|
1219
|
+
colspan: 2
|
|
1220
|
+
};
|
|
1221
|
+
} else if (_columnIndex === 1) {
|
|
1222
|
+
return {
|
|
1223
|
+
rowspan: 1,
|
|
1224
|
+
colspan: 0
|
|
1225
|
+
};
|
|
1226
|
+
} else if (_columnIndex === 2) {
|
|
1227
|
+
return {
|
|
1228
|
+
rowspan: 1,
|
|
1229
|
+
colspan: len
|
|
1230
|
+
};
|
|
1231
|
+
}
|
|
1232
|
+
return {
|
|
1233
|
+
rowspan: 1,
|
|
1234
|
+
colspan: 0
|
|
1235
|
+
};
|
|
1236
|
+
}
|
|
1237
|
+
if (_columnIndex === 0) {
|
|
1238
|
+
return {
|
|
1239
|
+
rowspan: 1,
|
|
1240
|
+
colspan: 1
|
|
1241
|
+
};
|
|
1242
|
+
} else if (_columnIndex === 1) {
|
|
1243
|
+
return {
|
|
1244
|
+
rowspan: 1,
|
|
1245
|
+
colspan: len
|
|
1246
|
+
};
|
|
1247
|
+
}
|
|
1248
|
+
return {
|
|
1249
|
+
rowspan: 1,
|
|
1250
|
+
colspan: 0
|
|
1251
|
+
};
|
|
1252
|
+
}
|
|
1253
|
+
};
|
|
1254
|
+
const rowdblclick = ({
|
|
1255
|
+
row,
|
|
1256
|
+
column
|
|
1257
|
+
}) => {
|
|
1258
|
+
if (isScanMultiTable.value || !!props.isInlineOperating)
|
|
1259
|
+
return false;
|
|
1260
|
+
if (XEUtils.has(row, GROUP_TITLE_KEY))
|
|
1261
|
+
return false;
|
|
1262
|
+
emit("setNestTableClick", props.isNestTable);
|
|
1263
|
+
emit("rowdblclick", row, column, true, true);
|
|
1264
|
+
};
|
|
1265
|
+
const pubCheckChange = (rows = []) => {
|
|
1266
|
+
state.treeTableLength = rows.filter((item) => {
|
|
1267
|
+
let isGroupRow = XEUtils.has(item, GROUP_TITLE_KEY);
|
|
1268
|
+
return !isGroupRow;
|
|
1269
|
+
}).length;
|
|
1270
|
+
state.visibleTreeCheck = rows.length > 1;
|
|
1271
|
+
emit("selectionChange", rows);
|
|
1272
|
+
};
|
|
1273
|
+
const updateAddCheckedRows = (rows, isTree = false) => {
|
|
1274
|
+
let obj = {
|
|
1275
|
+
isUpdate: true,
|
|
1276
|
+
updateRows: rows,
|
|
1277
|
+
isTree
|
|
1278
|
+
};
|
|
1279
|
+
if (isTree) {
|
|
1280
|
+
Object.assign(obj, {
|
|
1281
|
+
isTree,
|
|
1282
|
+
isCheckedChange: true,
|
|
1283
|
+
checkedRows: state.checkedRows
|
|
1284
|
+
});
|
|
1285
|
+
}
|
|
1286
|
+
emit("selectionChangeLocal", obj);
|
|
1287
|
+
};
|
|
1288
|
+
const removeCheckedRows = (rows, isCheckedChange) => {
|
|
1289
|
+
removeCheckedDisabledRows(state);
|
|
1290
|
+
let checkedRows = state.checkedRows;
|
|
1291
|
+
let needRemoveIndexs = [];
|
|
1292
|
+
for (let i = 0; i < rows.length; i++) {
|
|
1293
|
+
let row = rows[i];
|
|
1294
|
+
let removeIndex = currentCheckedKeys.value.findIndex((item) => {
|
|
1295
|
+
return item === row[props.primaryKey];
|
|
1296
|
+
});
|
|
1297
|
+
removeIndex >= 0 && needRemoveIndexs.push(removeIndex);
|
|
1298
|
+
}
|
|
1299
|
+
needRemoveIndexs.sort((a, b) => b - a);
|
|
1300
|
+
emit("selectionChangeLocal", {
|
|
1301
|
+
isAdd: false,
|
|
1302
|
+
isCheckedChange,
|
|
1303
|
+
needRemoveIndexs,
|
|
1304
|
+
newCheckedRows: [],
|
|
1305
|
+
checkedRows
|
|
1306
|
+
});
|
|
1307
|
+
};
|
|
1308
|
+
const setCheckedMehod = (setChecked, row) => {
|
|
1309
|
+
if (setChecked) {
|
|
1310
|
+
updateAddCheckedRows(row);
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
if (props.pageVO.pageIndex != state.lastPageIndex) {
|
|
1314
|
+
updateAddCheckedRows(row);
|
|
1315
|
+
return;
|
|
1316
|
+
}
|
|
1317
|
+
if (currentCheckedKeys.value.includes(row[props.primaryKey])) {
|
|
1318
|
+
removeCheckedRows([row]);
|
|
1319
|
+
return;
|
|
1320
|
+
}
|
|
1321
|
+
updateAddCheckedRows(row);
|
|
1322
|
+
};
|
|
1323
|
+
const handlerClickRow = (data) => {
|
|
1324
|
+
var _a, _b, _c;
|
|
1325
|
+
let {
|
|
1326
|
+
row,
|
|
1327
|
+
$event = {},
|
|
1328
|
+
$rowIndex,
|
|
1329
|
+
triggerCheckbox
|
|
1330
|
+
} = data;
|
|
1331
|
+
if (((_a = getAttr("checkbox-config")) == null ? void 0 : _a.noTriggerCellClick) && triggerCheckbox) {
|
|
1332
|
+
return false;
|
|
1333
|
+
}
|
|
1334
|
+
if (((_b = getAttr("checkbox-config")) == null ? void 0 : _b.trigger) === "default") {
|
|
1335
|
+
emit("handlerClickRow", row, $rowIndex);
|
|
1336
|
+
return false;
|
|
1337
|
+
}
|
|
1338
|
+
if (isScanMultiTable.value || props.isInlineOperating)
|
|
1339
|
+
return false;
|
|
1340
|
+
if (XEUtils.has(data == null ? void 0 : data.row, GROUP_TITLE_KEY))
|
|
1341
|
+
return false;
|
|
1342
|
+
if (state.isTriggerSelectionChange && state.isTree == 0)
|
|
1343
|
+
return false;
|
|
1344
|
+
let table = xGrid.value;
|
|
1345
|
+
isAboutNestTable.value && emit("resetNestLastClickTable", table);
|
|
1346
|
+
let {
|
|
1347
|
+
className,
|
|
1348
|
+
tagName
|
|
1349
|
+
} = $event.target || {};
|
|
1350
|
+
if (tagName == "INPUT" || tagName == "svg" || tagName == "path")
|
|
1351
|
+
return;
|
|
1352
|
+
if (className && XEUtils.isString(className)) {
|
|
1353
|
+
if (className.includes("n-input") || className.includes("n-base-selection-label"))
|
|
1354
|
+
return;
|
|
1355
|
+
if (className.includes("vxe-table--expand-btn"))
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
isAboutNestTable.value && emit("setNestLastClickTable", table, props.isNestTable, row[handleRowId.value], row);
|
|
1359
|
+
emit("setNestTableClick", false);
|
|
1360
|
+
if (props.isNestTable) {
|
|
1361
|
+
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1362
|
+
nestHandleClickRow(table, data);
|
|
1363
|
+
return;
|
|
1364
|
+
}
|
|
1365
|
+
const batchSelect = (_c = getAttr("checkbox-config")) == null ? void 0 : _c.batchSelect;
|
|
1366
|
+
let forbiddenBatchSelect = !checkMethod(data);
|
|
1367
|
+
if (state.selectType == "checkbox" && !batchSelect && (forbiddenBatchSelect || data.row.$__SEPARATE)) {
|
|
1368
|
+
table == null ? void 0 : table.setAllCheckboxRow(false);
|
|
1369
|
+
const checked2 = getRowClassName({
|
|
1370
|
+
row
|
|
1371
|
+
}) == "single--checked";
|
|
1372
|
+
const value = !checked2 ? [] : [row];
|
|
1373
|
+
state.checkedRows = value;
|
|
1374
|
+
pubCheckChange(value);
|
|
1375
|
+
emit("handlerClickRow", row, $rowIndex);
|
|
1376
|
+
emit("checkboxChange", {
|
|
1377
|
+
checked: checked2,
|
|
1378
|
+
row,
|
|
1379
|
+
index: $rowIndex,
|
|
1380
|
+
records: [row]
|
|
1381
|
+
});
|
|
1382
|
+
return;
|
|
1383
|
+
}
|
|
1384
|
+
state.visibleCheckAllWrap = false;
|
|
1385
|
+
state.visibleCheckAllWrapMore = false;
|
|
1386
|
+
let checked = false;
|
|
1387
|
+
if (state.selectType == "radio") {
|
|
1388
|
+
checked = table.isCheckedByRadioRow(row);
|
|
1389
|
+
} else {
|
|
1390
|
+
checked = table.isCheckedByCheckboxRow(row);
|
|
1391
|
+
}
|
|
1392
|
+
if (state.isradioChange) {
|
|
1393
|
+
checked = false;
|
|
1394
|
+
state.isradioChange = false;
|
|
1395
|
+
}
|
|
1396
|
+
let checkedRow = table.getCheckboxRecords();
|
|
1397
|
+
let rowLen = state.checkedRows.filter((item) => !XEUtils.has(item, GROUP_TITLE_KEY)).length;
|
|
1398
|
+
let newRow = [];
|
|
1399
|
+
if (state.isTree != 0) {
|
|
1400
|
+
let {
|
|
1401
|
+
className: className2
|
|
1402
|
+
} = $event.target || {};
|
|
1403
|
+
if (className2 && className2.includes("vxe-tree--node-btn"))
|
|
1404
|
+
return;
|
|
1405
|
+
if (state.selectType === "checkbox") {
|
|
1406
|
+
let rowVal = {};
|
|
1407
|
+
if (!state.isTriggerSelectionChange) {
|
|
1408
|
+
table.setAllCheckboxRow(false);
|
|
1409
|
+
state.checkedRows = [row];
|
|
1410
|
+
pubCheckChange([row]);
|
|
1411
|
+
rowVal = row;
|
|
1412
|
+
} else {
|
|
1413
|
+
if (checkedRow.length > 1)
|
|
1414
|
+
return false;
|
|
1415
|
+
rowVal = checked || checkedRow.length === 1 && !checked ? checkedRow[0] : {};
|
|
1416
|
+
state.checkedRows = [rowVal];
|
|
1417
|
+
}
|
|
1418
|
+
updateAddCheckedRows(rowVal, true);
|
|
1419
|
+
emit("handlerClickRow", rowVal);
|
|
1420
|
+
return;
|
|
1421
|
+
}
|
|
1422
|
+
let newTheUniqueKeyArr = [];
|
|
1423
|
+
flattenRow(row, newRow, newTheUniqueKeyArr, handleRowId.value);
|
|
1424
|
+
let res = intersectRow(checkedRow, newTheUniqueKeyArr, handleRowId.value);
|
|
1425
|
+
if (!res) {
|
|
1426
|
+
rowLen = 1;
|
|
1427
|
+
} else {
|
|
1428
|
+
rowLen = checkedRow.filter((item) => !XEUtils.has(item, GROUP_TITLE_KEY)).length;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
!batchSelect && table.setAllCheckboxRow(false);
|
|
1432
|
+
let setChecked = checked;
|
|
1433
|
+
if (rowLen > 1) {
|
|
1434
|
+
state.selectType != "radio" && table.setCheckboxRow([row], true);
|
|
1435
|
+
state.isTree != 0 && state.selectType != "radio" && pubCheckChange(newRow);
|
|
1436
|
+
state.selectType != "radio" && emit("handlerClickRow", row, $rowIndex);
|
|
1437
|
+
} else {
|
|
1438
|
+
setChecked = !setChecked;
|
|
1439
|
+
if (!setChecked) {
|
|
1440
|
+
state.selectType == "radio" && table.clearRadioRow();
|
|
1441
|
+
state.isTree != 0 && state.selectType != "radio" && pubCheckChange([]);
|
|
1442
|
+
} else {
|
|
1443
|
+
state.selectType == "radio" && table.setRadioRow(row);
|
|
1444
|
+
state.isTree != 0 && state.selectType != "radio" && pubCheckChange(newRow);
|
|
1445
|
+
}
|
|
1446
|
+
state.selectType != "radio" && table.setCheckboxRow([row], setChecked);
|
|
1447
|
+
}
|
|
1448
|
+
if (state.isTree != 0) {
|
|
1449
|
+
emit("checkboxChange", {
|
|
1450
|
+
checked: setChecked,
|
|
1451
|
+
row,
|
|
1452
|
+
index: $rowIndex,
|
|
1453
|
+
records: checkedRow
|
|
1454
|
+
});
|
|
1455
|
+
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1456
|
+
return;
|
|
1457
|
+
}
|
|
1458
|
+
setCheckedMehod(setChecked, row);
|
|
1459
|
+
if (setChecked || rowLen > 1 || !rowLen) {
|
|
1460
|
+
state.checkedRows = [row];
|
|
1461
|
+
}
|
|
1462
|
+
if (!setChecked && rowLen === 1) {
|
|
1463
|
+
state.checkedRows = [];
|
|
1464
|
+
}
|
|
1465
|
+
setCurrentCheckedLength();
|
|
1466
|
+
state.lastPageIndex = props.pageVO.pageIndex;
|
|
1467
|
+
emit("checkboxChange", {
|
|
1468
|
+
checked: setChecked,
|
|
1469
|
+
row,
|
|
1470
|
+
index: $rowIndex,
|
|
1471
|
+
records: table.getCheckboxRecords()
|
|
1472
|
+
});
|
|
1473
|
+
setChecked && emit("handlerClickRow", row, $rowIndex);
|
|
1474
|
+
};
|
|
1475
|
+
const addCheckedRows = (rows) => {
|
|
1476
|
+
removeCheckedDisabledRows(state);
|
|
1477
|
+
let checkedRows = state.checkedRows;
|
|
1478
|
+
let newCheckedRows = rows.filter((row) => {
|
|
1479
|
+
return !currentCheckedKeys.value.includes(row[props.primaryKey]);
|
|
1480
|
+
});
|
|
1481
|
+
checkedRows.push(...newCheckedRows);
|
|
1482
|
+
emit("selectionChangeLocal", {
|
|
1483
|
+
isAdd: true,
|
|
1484
|
+
isCheckedChange: true,
|
|
1485
|
+
newCheckedRows,
|
|
1486
|
+
checkedRows
|
|
1487
|
+
});
|
|
1488
|
+
};
|
|
1489
|
+
const treeTableSelectionChange = (records) => {
|
|
1490
|
+
if (state.isTree == 0) {
|
|
1491
|
+
emit("selectionChange", records);
|
|
1492
|
+
return false;
|
|
1493
|
+
}
|
|
1494
|
+
pubCheckChange(records);
|
|
1495
|
+
return true;
|
|
1496
|
+
};
|
|
1497
|
+
const selectionChange = ({
|
|
1498
|
+
checked,
|
|
1499
|
+
row,
|
|
1500
|
+
records,
|
|
1501
|
+
$rowIndex
|
|
1502
|
+
}) => {
|
|
1503
|
+
let table = xGrid.value;
|
|
1504
|
+
table.clearCurrentRow();
|
|
1505
|
+
state.isTriggerSelectionChange = true;
|
|
1506
|
+
setTimeout(() => {
|
|
1507
|
+
state.isTriggerSelectionChange = false;
|
|
1508
|
+
}, 0);
|
|
1509
|
+
emit("checkboxChange", {
|
|
1510
|
+
checked,
|
|
1511
|
+
row,
|
|
1512
|
+
index: $rowIndex,
|
|
1513
|
+
records
|
|
1514
|
+
});
|
|
1515
|
+
if (treeTableSelectionChange(records))
|
|
1516
|
+
return;
|
|
1517
|
+
if (checked) {
|
|
1518
|
+
addCheckedRows([row]);
|
|
1519
|
+
} else {
|
|
1520
|
+
removeCheckedRows([row], true);
|
|
1521
|
+
}
|
|
1522
|
+
setCurrentCheckedLength();
|
|
1523
|
+
};
|
|
1524
|
+
const selectionChangeAll = ({
|
|
1525
|
+
checked,
|
|
1526
|
+
records
|
|
1527
|
+
}) => {
|
|
1528
|
+
if (treeTableSelectionChange(records))
|
|
1529
|
+
return;
|
|
1530
|
+
if (checked) {
|
|
1531
|
+
addCheckedRows(records);
|
|
1532
|
+
} else {
|
|
1533
|
+
removeCheckedRows(props.data);
|
|
1534
|
+
}
|
|
1535
|
+
setCurrentCheckedLength();
|
|
1536
|
+
};
|
|
1537
|
+
const radioOnChange = (rowData = {}) => {
|
|
1538
|
+
let {
|
|
1539
|
+
row
|
|
1540
|
+
} = rowData;
|
|
1541
|
+
emit("selectionChange", [{
|
|
1542
|
+
...row
|
|
1543
|
+
}]);
|
|
1544
|
+
};
|
|
1545
|
+
const sortChange = ({
|
|
1546
|
+
property,
|
|
1547
|
+
order
|
|
1548
|
+
}) => {
|
|
1549
|
+
if (props.isInlineOperating)
|
|
1550
|
+
return false;
|
|
1551
|
+
Object.values(state.filterFields).forEach((item) => item.filterSort = null);
|
|
1552
|
+
emit("sortChange", {
|
|
1553
|
+
prop: property,
|
|
1554
|
+
order
|
|
1555
|
+
});
|
|
1556
|
+
};
|
|
1101
1557
|
const showDrawer = () => {
|
|
1102
1558
|
const theads = xGrid.value.$el.childNodes[0].childNodes[1].childNodes[0].getElementsByClassName("mycolumn");
|
|
1103
1559
|
emit("setNestTableClickSetting", props.isNestTable);
|
|
1104
1560
|
emit("showDrawer", theads);
|
|
1105
1561
|
};
|
|
1562
|
+
const handleCellMouseenter = ({
|
|
1563
|
+
column,
|
|
1564
|
+
$event
|
|
1565
|
+
}) => {
|
|
1566
|
+
if (column.showOverflow === "title") {
|
|
1567
|
+
const target = $event == null ? void 0 : $event.currentTarget;
|
|
1568
|
+
const cls = target == null ? void 0 : target.className;
|
|
1569
|
+
const bodyCls = " vxe-body--column ";
|
|
1570
|
+
if (cls && ` ${cls} `.includes(bodyCls) && target && target.hasAttribute("title")) {
|
|
1571
|
+
const cellElem = target.querySelector(".vxe-cell");
|
|
1572
|
+
if (cellElem && cellElem.hasAttribute("title")) {
|
|
1573
|
+
cellElem.removeAttribute("title");
|
|
1574
|
+
}
|
|
1575
|
+
if (props.isInlineOperating) {
|
|
1576
|
+
if (target && target.hasAttribute("title")) {
|
|
1577
|
+
target.removeAttribute("title");
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
};
|
|
1106
1583
|
const getFooterTooltipTitle = (column) => {
|
|
1107
1584
|
let t = "";
|
|
1108
1585
|
if (XEUtils.has(props.sumData, column.property)) {
|
|
@@ -1799,6 +2276,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1799
2276
|
}
|
|
1800
2277
|
});
|
|
1801
2278
|
});
|
|
2279
|
+
const handleMenuClickEvent = (payload) => emit("menuClick", payload);
|
|
1802
2280
|
expose({
|
|
1803
2281
|
formatData,
|
|
1804
2282
|
xGrid,
|
|
@@ -1807,6 +2285,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1807
2285
|
handleFilterClearAll
|
|
1808
2286
|
});
|
|
1809
2287
|
return (_ctx, _cache) => {
|
|
2288
|
+
var _a;
|
|
1810
2289
|
return openBlock(), createElementBlock(Fragment, null, [state.anchorList.length ? (openBlock(), createBlock(unref(NTabs), {
|
|
1811
2290
|
key: 0,
|
|
1812
2291
|
type: "line",
|
|
@@ -1845,9 +2324,77 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1845
2324
|
"show-footer-overflow": "title",
|
|
1846
2325
|
"keep-source": "",
|
|
1847
2326
|
"auto-resize": "",
|
|
1848
|
-
height: props.height ? "auto" : void 0
|
|
2327
|
+
height: props.height ? "auto" : void 0,
|
|
2328
|
+
"cell-style": state.cellStyle
|
|
1849
2329
|
}, _ctx.$attrs, {
|
|
1850
|
-
"
|
|
2330
|
+
"mouse-config": {
|
|
2331
|
+
selected: ((_a = _ctx.columnConfig.keyboardConfig) == null ? void 0 : _a.isEdit) ? true : false
|
|
2332
|
+
},
|
|
2333
|
+
"tree-config": unref(treeConfig),
|
|
2334
|
+
"row-class-name": getRowClassName,
|
|
2335
|
+
"row-config": {
|
|
2336
|
+
...state.rowConfig,
|
|
2337
|
+
...unref(getAttr)("row-config")
|
|
2338
|
+
},
|
|
2339
|
+
"show-footer": _ctx.showFooter && !props.isInlineOperating,
|
|
2340
|
+
"footer-method": footerMethod,
|
|
2341
|
+
"sort-config": {
|
|
2342
|
+
trigger: "cell",
|
|
2343
|
+
remote: true,
|
|
2344
|
+
...unref(getAttr)("sort-config")
|
|
2345
|
+
},
|
|
2346
|
+
"span-method": colspanMethod,
|
|
2347
|
+
"footer-span-method": footerRowspanMethod,
|
|
2348
|
+
"tooltip-config": {
|
|
2349
|
+
enterable: false,
|
|
2350
|
+
...unref(getAttr)("tooltip-config")
|
|
2351
|
+
},
|
|
2352
|
+
"checkbox-config": {
|
|
2353
|
+
checkField: "checked",
|
|
2354
|
+
labelField: "checked",
|
|
2355
|
+
checkMethod: unref(checkMethod),
|
|
2356
|
+
visibleMethod: unref(visibleMethod),
|
|
2357
|
+
trigger: "cell",
|
|
2358
|
+
reserve: true,
|
|
2359
|
+
highlight: true,
|
|
2360
|
+
...unref(getAttr)("checkbox-config")
|
|
2361
|
+
},
|
|
2362
|
+
"radio-config": {
|
|
2363
|
+
checkField: "checked",
|
|
2364
|
+
trigger: "cell",
|
|
2365
|
+
reserve: true,
|
|
2366
|
+
highlight: true,
|
|
2367
|
+
...unref(getAttr)("radio-config")
|
|
2368
|
+
},
|
|
2369
|
+
"scroll-y": {
|
|
2370
|
+
gt: 50,
|
|
2371
|
+
...unref(getAttr)("scroll-y")
|
|
2372
|
+
},
|
|
2373
|
+
"row-style": unref(getRowStyle),
|
|
2374
|
+
"edit-config": state.editConfig,
|
|
2375
|
+
"expand-config": {
|
|
2376
|
+
lazy: true,
|
|
2377
|
+
accordion: _ctx.columnConfig && _ctx.columnConfig.accordion,
|
|
2378
|
+
loadMethod: unref(loadExpandMethod),
|
|
2379
|
+
toggleMethod: unref(toggleExpandMethod),
|
|
2380
|
+
iconOpen: "iconfont icon-a-xitongtubiaozhediejian",
|
|
2381
|
+
iconClose: "iconfont icon-a-xitongtubiaotianjia",
|
|
2382
|
+
...unref(getAttr)("expand-config")
|
|
2383
|
+
},
|
|
2384
|
+
"keyboard-config": unref(keyboardConfig),
|
|
2385
|
+
"edit-rules": _ctx.columnConfig.editRules || {},
|
|
2386
|
+
"menu-config": _ctx.menuConfig,
|
|
2387
|
+
onCellDblclick: rowdblclick,
|
|
2388
|
+
onCellClick: handlerClickRow,
|
|
2389
|
+
onCheckboxChange: selectionChange,
|
|
2390
|
+
onCheckboxAll: selectionChangeAll,
|
|
2391
|
+
onRadioChange: radioOnChange,
|
|
2392
|
+
onSortChange: sortChange,
|
|
2393
|
+
onScroll: unref(scroll),
|
|
2394
|
+
onCellMouseenter: handleCellMouseenter,
|
|
2395
|
+
onKeydown: unref(keyDown),
|
|
2396
|
+
onMenuClick: handleMenuClickEvent,
|
|
2397
|
+
onResizableChange
|
|
1851
2398
|
}), {
|
|
1852
2399
|
empty: withCtx(() => [state.isShowEmpty ? renderSlot(_ctx.$slots, "empty", {
|
|
1853
2400
|
key: 0
|
|
@@ -1886,7 +2433,7 @@ var _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1886
2433
|
}
|
|
1887
2434
|
})]),
|
|
1888
2435
|
_: 3
|
|
1889
|
-
}, 16, ["height", "edit-config"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
|
|
2436
|
+
}, 16, ["height", "cell-style", "mouse-config", "tree-config", "row-config", "show-footer", "sort-config", "tooltip-config", "checkbox-config", "radio-config", "scroll-y", "row-style", "edit-config", "expand-config", "keyboard-config", "edit-rules", "menu-config", "onScroll", "onKeydown"]), createCommentVNode(" `${refreshRow}\u6761\u66F4\u65B0` "), withDirectives(createElementVNode("div", {
|
|
1890
2437
|
class: "refresh",
|
|
1891
2438
|
onClick: hanldeClickRefresh
|
|
1892
2439
|
}, [createVNode(unref(NIcon), {
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/Viewer';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'bpmn-js/lib/features/modeling';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
declare module 'diagram-js/lib/navigation/movecanvas';
|