refactor(table): 更新表格组件的单元格合并配置和事件处理
- 将所有表格的单元格合并方法从数组格式 [rowspan, colspan] 改为对象格式 { rowspan, colspan }
- 为 vxe-table 组件添加 checkbox-config 配置以支持复选框保留选择功能
- 移除复选框的 :reserve-selection 属性并改用 checkbox-config 配置
- 全局注册 VxeTableCompat 组件来归一化 cell-click 和 current-change 事件参数
- 更新技术执行和技术审批页面的表格组件配置和操作逻辑
- 优化
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<template>
|
||||
<template>
|
||||
<div
|
||||
v-loading="readCardLoading"
|
||||
style="display: flex; justify-content: space-between"
|
||||
@@ -865,7 +865,7 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
// 操作列索引为10(从0开始计数)
|
||||
// 如果当前行的paymentId为空,则不合并
|
||||
if (!row.paymentId) {
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
// 查找相同paymentId的连续行
|
||||
@@ -879,14 +879,14 @@ function objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
return [spanCount, 1];
|
||||
return { rowspan: spanCount, colspan: 1 };
|
||||
} else {
|
||||
// 这不是具有相同paymentId的第一行,返回0表示不显示
|
||||
return [0, 0];
|
||||
return { rowspan: 0, colspan: 0 };
|
||||
}
|
||||
}
|
||||
// 其他列不合并
|
||||
return [1, 1];
|
||||
return { rowspan: 1, colspan: 1 };
|
||||
}
|
||||
|
||||
function printCharge(row) {
|
||||
|
||||
Reference in New Issue
Block a user