cnhis-design-vue 2.1.152 → 2.1.153
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/CHANGELOG.md +7 -0
- package/es/age/index.js +2 -2
- package/es/big-table/index.js +105 -90
- package/es/big-table/style.css +1 -1
- package/es/button/index.js +4 -4
- package/es/captcha/index.js +3 -3
- package/es/card-reader-sdk/index.js +1 -1
- package/es/checkbox/index.js +1 -1
- package/es/color-picker/index.js +1 -1
- package/es/drag-layout/index.js +3 -3
- package/es/editor/index.js +1 -1
- package/es/ellipsis/index.js +1 -1
- package/es/fabric-chart/index.js +9 -9
- package/es/form-table/index.js +20 -20
- package/es/full-calendar/index.js +4 -4
- package/es/index/index.js +324 -288
- package/es/index/style.css +1 -1
- package/es/input/index.js +1 -1
- package/es/map/index.js +1 -1
- package/es/multi-chat/index.js +25 -25
- package/es/multi-chat-client/index.js +19 -19
- package/es/multi-chat-history/index.js +4 -4
- package/es/multi-chat-record/index.js +4 -4
- package/es/multi-chat-setting/index.js +20 -20
- package/es/multi-chat-sip/index.js +1 -1
- package/es/radio/index.js +1 -1
- package/es/scale-container/index.js +1 -1
- package/es/scale-view/index.js +27 -27
- package/es/select/index.js +4 -4
- package/es/select-label/index.js +3 -3
- package/es/select-person/index.js +2 -2
- package/es/select-tag/index.js +4 -4
- package/es/shortcut-setter/index.js +2 -2
- package/es/slider-tree/index.js +1 -1
- package/es/table-filter/index.js +92 -71
- package/es/table-filter/style.css +1 -1
- package/es/tag/index.js +1 -1
- package/es/verification-code/index.js +2 -2
- package/lib/cui.common.js +406 -370
- package/lib/cui.umd.js +406 -370
- package/lib/cui.umd.min.js +13 -13
- package/package.json +1 -1
- package/packages/big-table/src/BigTable.vue +38 -34
- package/packages/table-filter/src/base-search-com/BaseSearch.vue +18 -3
package/package.json
CHANGED
|
@@ -241,6 +241,7 @@ export default create({
|
|
|
241
241
|
/* 树状已选 */
|
|
242
242
|
visibleTreeCheck: false,
|
|
243
243
|
treeTableLength: 0,
|
|
244
|
+
treeTableData: [],
|
|
244
245
|
checkWidth: {
|
|
245
246
|
'table-simple': '30',
|
|
246
247
|
'table-classics': '24'
|
|
@@ -404,6 +405,9 @@ export default create({
|
|
|
404
405
|
if(this.isTree == 1) return false;
|
|
405
406
|
// 是否配置编辑表单
|
|
406
407
|
return !!(this.listFormUnionSetting?.formId || false)
|
|
408
|
+
},
|
|
409
|
+
isTreeTable() {
|
|
410
|
+
return this.isTree != 0;
|
|
407
411
|
}
|
|
408
412
|
},
|
|
409
413
|
watch: {
|
|
@@ -496,17 +500,6 @@ export default create({
|
|
|
496
500
|
});
|
|
497
501
|
}
|
|
498
502
|
}
|
|
499
|
-
// isEditAllRow:{
|
|
500
|
-
// handler(val){
|
|
501
|
-
// // 全部行编辑需要隐藏“操作”列
|
|
502
|
-
// this.customerInit();
|
|
503
|
-
// // 有已选的数据,清空。
|
|
504
|
-
// let len = this?.checkedRows?.length || 0;
|
|
505
|
-
// if(len > 0){
|
|
506
|
-
// this.removeCheckedRows(this.checkedRows)
|
|
507
|
-
// }
|
|
508
|
-
// }
|
|
509
|
-
// }
|
|
510
503
|
},
|
|
511
504
|
methods: {
|
|
512
505
|
customerInit() {
|
|
@@ -1318,7 +1311,7 @@ export default create({
|
|
|
1318
1311
|
});
|
|
1319
1312
|
},
|
|
1320
1313
|
resetOperationRowStatus() {
|
|
1321
|
-
if (this.
|
|
1314
|
+
if (this.isTreeTable) return false;
|
|
1322
1315
|
|
|
1323
1316
|
const vxeTable = this.$refs.xGrid;
|
|
1324
1317
|
let { row, rowIndex } = this.getInlineOpreateRow();
|
|
@@ -1335,7 +1328,7 @@ export default create({
|
|
|
1335
1328
|
});
|
|
1336
1329
|
},
|
|
1337
1330
|
async removeInsert() {
|
|
1338
|
-
if (this.
|
|
1331
|
+
if (this.isTreeTable) return false;
|
|
1339
1332
|
|
|
1340
1333
|
const vxeTable = this.$refs.xGrid;
|
|
1341
1334
|
// let { row } = this.getInlineOpreateRow();
|
|
@@ -1353,7 +1346,7 @@ export default create({
|
|
|
1353
1346
|
this.resetBatchOperationRowStatus();
|
|
1354
1347
|
},
|
|
1355
1348
|
resetStoreInlineOperationStatus() {
|
|
1356
|
-
if (this.
|
|
1349
|
+
if (this.isTreeTable) return false;
|
|
1357
1350
|
this.isSaveForm = false;
|
|
1358
1351
|
},
|
|
1359
1352
|
removeInlineAddRow() {
|
|
@@ -1472,7 +1465,7 @@ export default create({
|
|
|
1472
1465
|
// 有子列表fixed会遮盖 所以主表不设置fixed,子表可设置
|
|
1473
1466
|
let fixed = this.isAboutNestTable && !this.isNestTable ? '' : item.isFixed ? (item.isFixed == 1 ? 'left' : 'right') : '';
|
|
1474
1467
|
let sortable = this.isTableEdit ? false : this.isNestTable ? false : !filterField && item.isSort == 1 && notParticipatingSort != 1 && item.isMerge != 1;
|
|
1475
|
-
let treeNode = this.isNestTable ? false : this.
|
|
1468
|
+
let treeNode = this.isNestTable ? false : this.isTreeTable ? index === 0 : false;
|
|
1476
1469
|
let type = index === 0 && this.showNestTable ? 'expand' : '';
|
|
1477
1470
|
|
|
1478
1471
|
// 扫码打开的table只展示
|
|
@@ -2182,7 +2175,7 @@ export default create({
|
|
|
2182
2175
|
let checkedRow = table.getCheckboxRecords();
|
|
2183
2176
|
let rowLen = this.checkedRows.filter(item => !vexutils.has(item, GROUP_TITLE_KEY)).length;
|
|
2184
2177
|
let newRow = [];
|
|
2185
|
-
if (this.
|
|
2178
|
+
if (this.isTreeTable) {
|
|
2186
2179
|
// 点击树形表格的按钮 不需要触发选中行
|
|
2187
2180
|
let { className, parentElement } = $event.target || {};
|
|
2188
2181
|
if (className && className.includes('vxe-tree--node-btn')) return;
|
|
@@ -2190,13 +2183,6 @@ export default create({
|
|
|
2190
2183
|
if(parentElement?.className && parentElement.className.includes('vxe-tree-cell')) {
|
|
2191
2184
|
this.toggleCellTreeExpand(data, table)
|
|
2192
2185
|
}
|
|
2193
|
-
// // 树表格 无法选中有子集的行
|
|
2194
|
-
// if (row.hasChildren) {
|
|
2195
|
-
// table.setAllCheckboxRow(false);
|
|
2196
|
-
// this.$set(this, 'checkedRows', [row]);
|
|
2197
|
-
// this.updateAddCheckedRows(row, true);
|
|
2198
|
-
// return;
|
|
2199
|
-
// }
|
|
2200
2186
|
// 树表格,点击行无需选中复选框
|
|
2201
2187
|
if (this.selectType === 'checkbox') {
|
|
2202
2188
|
let rowVal = {};
|
|
@@ -2210,7 +2196,10 @@ export default create({
|
|
|
2210
2196
|
this.pubCheckChange([row]);
|
|
2211
2197
|
rowVal = row;
|
|
2212
2198
|
} else {
|
|
2213
|
-
if (checkedRow.length > 1)
|
|
2199
|
+
if (checkedRow.length > 1) {
|
|
2200
|
+
this.$set(this, 'checkedRows', []);
|
|
2201
|
+
return false;
|
|
2202
|
+
}
|
|
2214
2203
|
rowVal = checked || (checkedRow.length === 1 && !checked) ? checkedRow[0] : {};
|
|
2215
2204
|
this.$set(this, 'checkedRows', [rowVal]);
|
|
2216
2205
|
}
|
|
@@ -2238,17 +2227,17 @@ export default create({
|
|
|
2238
2227
|
let setChecked = checked;
|
|
2239
2228
|
if (rowLen > 1) {
|
|
2240
2229
|
this.selectType != 'radio' && table.setCheckboxRow([row], true);
|
|
2241
|
-
this.
|
|
2230
|
+
this.isTreeTable && this.selectType != 'radio' && this.pubCheckChange(newRow);
|
|
2242
2231
|
this.selectType != 'radio' && this.$emit('handlerClickRow', row, rowIndex, { source, column, trigger });
|
|
2243
2232
|
} else {
|
|
2244
2233
|
setChecked = !setChecked;
|
|
2245
2234
|
if (!setChecked) {
|
|
2246
2235
|
!this.aboutPositionBtm && table.clearCurrentRow();
|
|
2247
2236
|
this.selectType == 'radio' && table.clearRadioRow();
|
|
2248
|
-
this.
|
|
2237
|
+
this.isTreeTable && this.selectType != 'radio' && this.pubCheckChange([]);
|
|
2249
2238
|
} else {
|
|
2250
2239
|
this.selectType == 'radio' && table.setRadioRow(row);
|
|
2251
|
-
this.
|
|
2240
|
+
this.isTreeTable && this.selectType != 'radio' && this.pubCheckChange(newRow);
|
|
2252
2241
|
}
|
|
2253
2242
|
// 相关项位于底部,再次点击已选中数据不取消勾选
|
|
2254
2243
|
let isBtmCheck = this.aboutPositionBtm && !setChecked;
|
|
@@ -2256,7 +2245,7 @@ export default create({
|
|
|
2256
2245
|
table.setCheckboxRow([row], setChecked);
|
|
2257
2246
|
}
|
|
2258
2247
|
}
|
|
2259
|
-
if (this.
|
|
2248
|
+
if (this.isTreeTable) {
|
|
2260
2249
|
setChecked && this.$emit('handlerClickRow', row, rowIndex, { source, column, trigger });
|
|
2261
2250
|
this.setTableCurrentRow(table, row);
|
|
2262
2251
|
return;
|
|
@@ -2431,7 +2420,7 @@ export default create({
|
|
|
2431
2420
|
return false;
|
|
2432
2421
|
}
|
|
2433
2422
|
|
|
2434
|
-
this.pubCheckChange(records);
|
|
2423
|
+
this.pubCheckChange(records, {setTreeData: true});
|
|
2435
2424
|
return true;
|
|
2436
2425
|
},
|
|
2437
2426
|
setTableCurrentRow(table, row, isSet) {
|
|
@@ -2506,16 +2495,29 @@ export default create({
|
|
|
2506
2495
|
this.setCurrentCheckedLength();
|
|
2507
2496
|
},
|
|
2508
2497
|
pubCheckChange(rows = [], config = {}) {
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2498
|
+
// 树表格, 选中与单击行有出入, 用新变量保存一下
|
|
2499
|
+
const {setTreeData, ...others} = config
|
|
2500
|
+
if (this.isTreeTable) {
|
|
2501
|
+
if (setTreeData) {
|
|
2502
|
+
let filterTreeTable = rows.filter(item => {
|
|
2503
|
+
let isGroupRow = vexutils.has(item, GROUP_TITLE_KEY);
|
|
2504
|
+
return !isGroupRow;
|
|
2505
|
+
})
|
|
2506
|
+
this.treeTableLength = filterTreeTable.length;
|
|
2507
|
+
this.treeTableData = filterTreeTable;
|
|
2508
|
+
} else {
|
|
2509
|
+
this.treeTableLength = 0;
|
|
2510
|
+
this.treeTableData = [];
|
|
2511
|
+
}
|
|
2512
|
+
this.$emit("setTreeSelectRow", this.treeTableData)
|
|
2513
|
+
}
|
|
2513
2514
|
this.visibleTreeCheck = rows.length > 1;
|
|
2514
|
-
this.$emit('selectionChange', rows,
|
|
2515
|
+
this.$emit('selectionChange', rows, others);
|
|
2515
2516
|
},
|
|
2516
2517
|
setCurrentPageRowChecked() {
|
|
2517
2518
|
let table = this.$refs.xGrid;
|
|
2518
2519
|
if (!table) return;
|
|
2520
|
+
if(!this.currentCheckedKeys?.length) return;
|
|
2519
2521
|
|
|
2520
2522
|
let currentPageTableData = table.getTableData()?.tableData;
|
|
2521
2523
|
let currentPageSelectedRows = currentPageTableData.filter(row => {
|
|
@@ -2852,6 +2854,8 @@ export default create({
|
|
|
2852
2854
|
this.$refs.xGrid.clearRadioRow();
|
|
2853
2855
|
this.visibleTreeCheck = false;
|
|
2854
2856
|
this.treeTableLength = 0;
|
|
2857
|
+
this.treeTableData = [];
|
|
2858
|
+
this.$emit("setTreeSelectRow", this.treeTableData)
|
|
2855
2859
|
},
|
|
2856
2860
|
|
|
2857
2861
|
handlerScroll(params) {
|
|
@@ -612,6 +612,7 @@ export default create({
|
|
|
612
612
|
default: () => ({
|
|
613
613
|
getIsTile: '',
|
|
614
614
|
selectRowObj: [],
|
|
615
|
+
selectTreeRowsObj: [],
|
|
615
616
|
isInlineOperating: false,
|
|
616
617
|
printNumberCache: {}
|
|
617
618
|
})
|
|
@@ -719,6 +720,9 @@ export default create({
|
|
|
719
720
|
showDownCurSelectData() {
|
|
720
721
|
return this.selectRowObj.filter(item => !(GROUP_TITLE_KEY in (item || {})))?.length;
|
|
721
722
|
},
|
|
723
|
+
showDownCurSelectTreeData() {
|
|
724
|
+
return this.selectTreeRowsObj.filter(item => !(GROUP_TITLE_KEY in (item || {})))?.length;
|
|
725
|
+
},
|
|
722
726
|
showRowFoldBtnList() {
|
|
723
727
|
return function(list, key) {
|
|
724
728
|
if (key === 'rowFoldBtnList' && !this.isShowSetting('buttonAdaption')) return false;
|
|
@@ -816,6 +820,9 @@ export default create({
|
|
|
816
820
|
selectRowObj() {
|
|
817
821
|
return this?.gettersConfig?.selectRowObj || [];
|
|
818
822
|
},
|
|
823
|
+
selectTreeRowsObj() {
|
|
824
|
+
return this?.gettersConfig?.selectTreeRowsObj || [];
|
|
825
|
+
},
|
|
819
826
|
isInlineOperating() {
|
|
820
827
|
return this?.gettersConfig?.isInlineOperating || false;
|
|
821
828
|
},
|
|
@@ -1444,11 +1451,19 @@ export default create({
|
|
|
1444
1451
|
return;
|
|
1445
1452
|
}
|
|
1446
1453
|
|
|
1454
|
+
let isLowcodeTree = this.isLowCode && this.$attrs.isTree != 0
|
|
1455
|
+
let curSelectLen = isLowcodeTree ? this.showDownCurSelectTreeData : this.showDownCurSelectData;
|
|
1456
|
+
|
|
1447
1457
|
// 默认情况下 只展示新增&下载
|
|
1448
1458
|
if (!this.showDownCurSelectData) {
|
|
1449
1459
|
btn.isVisible = isAddBtn ? true : false;
|
|
1450
1460
|
if (!isImportGuage) return;
|
|
1451
1461
|
}
|
|
1462
|
+
// 低代码树表格批量按钮特别处理一下, 单击行不选中, 所以需要特别处理批量按钮
|
|
1463
|
+
if(isLowcodeTree && !isImportGuage && isBatchBtn && !curSelectLen) {
|
|
1464
|
+
btn.isVisible = false;
|
|
1465
|
+
return;
|
|
1466
|
+
}
|
|
1452
1467
|
|
|
1453
1468
|
// btn.settingObj.guage_type == "importGuage";
|
|
1454
1469
|
// 全选状态下,只有入口类型的批量按钮展示(因当前版本仅支持入口类型的全选批量操作
|
|
@@ -1462,20 +1477,20 @@ export default create({
|
|
|
1462
1477
|
if (isBatchBtn && relationBtnId) {
|
|
1463
1478
|
btn.canHandleUniline = true;
|
|
1464
1479
|
}
|
|
1465
|
-
|
|
1480
|
+
|
|
1466
1481
|
// 批量按钮关联的对应按钮
|
|
1467
1482
|
if (this.showDownCurSelectData > 1 && isLineBtn) {
|
|
1468
1483
|
btn.isVisible = false;
|
|
1469
1484
|
} else {
|
|
1470
1485
|
if (isBatchBtn && btn.chooseTwoData == 1) {
|
|
1471
|
-
btn.isVisible = !this.batchRelationBtnIds.includes(btn.id) &&
|
|
1486
|
+
btn.isVisible = !this.batchRelationBtnIds.includes(btn.id) && curSelectLen > 1;
|
|
1472
1487
|
} else {
|
|
1473
1488
|
btn.isVisible = !this.batchRelationBtnIds.includes(btn.id);
|
|
1474
1489
|
}
|
|
1475
1490
|
}
|
|
1476
1491
|
|
|
1477
1492
|
// 未绑定了行级按钮的批量按钮,默认隐藏, 勾选展示
|
|
1478
|
-
if (isBatchBtn && !relationBtnId &&
|
|
1493
|
+
if (isBatchBtn && !relationBtnId && curSelectLen > 1) {
|
|
1479
1494
|
btn.isVisible = isMultiSelect;
|
|
1480
1495
|
}
|
|
1481
1496
|
// 量表导入按钮
|