diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue
index 5fba1259..7c3d615c 100644
--- a/src/components/scTable/index.vue
+++ b/src/components/scTable/index.vue
@@ -12,7 +12,7 @@
@@ -97,6 +97,7 @@ export default {
columnSetting,
},
props: {
+ expendShow:{ type: Boolean, default: false },
tableName: { type: String, default: "" },
apiObj: { type: Object, default: () => { } },
params: { type: Object, default: () => ({}) },
@@ -134,6 +135,9 @@ export default {
this.tableData = this.data;
this.total = this.tableData.length;
},
+ expendShow(){
+ this.toggleExpandAll();
+ },
apiObj() {
this.tableParams = this.params;
this.refresh();
@@ -161,6 +165,7 @@ export default {
emptyText: "暂无数据",
toggleIndex: 0,
tableData: [],
+ expandRowKeys:[],
total: 0,
currentPage: 1,
prop: null,
@@ -522,6 +527,19 @@ export default {
sort(prop, order) {
this.$refs.scTable.sort(prop, order);
},
+ // 控制展开/收起所有行
+ toggleExpandAll() {
+ const isExpandAll = this.expandRowKeys.length === this.$refs.scTable.data.length;
+ if (isExpandAll) {
+ this.expandRowKeys = []; // 收起所有
+ } else {
+ this.expandRowKeys = this.$refs.scTable.data.map(item => item.id); // 展开所有
+ }
+ },
+ // 每次展开状态变化时更新 expandRowKeys
+ handleExpandChange(row, expandedRows) {
+ this.expandRowKeys = expandedRows.map(row => row.is); // 根据实际的唯一标识
+ }
},
};
diff --git a/src/views/wpm_bx/handover.vue b/src/views/wpm_bx/handover.vue
index ace9bdf6..b4165d9b 100644
--- a/src/views/wpm_bx/handover.vue
+++ b/src/views/wpm_bx/handover.vue
@@ -7,23 +7,21 @@
icon="el-icon-plus"
@click="table_add(10)"
v-auth="'handover.create'"
- >新增
+ >新增
返工
+ >返工
改版
+ >改版
+ {{changeText}}