多选重试对接完成

This commit is contained in:
xiayuping666
2024-05-31 09:43:37 +08:00
parent 8357146548
commit 9d82c89c66
3 changed files with 60 additions and 14 deletions
@@ -1,5 +1,6 @@
<template>
<el-table
@selection-change="handleSelectionChange"
ref="table"
border
:header-cell-style="{
@@ -10,8 +11,10 @@
height="650"
size="mini"
:row-key="getRowKeys"
>
<el-table-column
:selectable="selectable"
type="selection"
width="55">
</el-table-column>
@@ -26,7 +29,7 @@
></el-table-column>
<el-table-column align="left" prop="zip" label="操作" width="160">
<template slot-scope="scope">
<el-button
<!-- <el-button
@click="handleEdit(scope.row)"
class="el-icon-edit"
type="text"
@@ -43,11 +46,11 @@
size="small"
>删除</el-button
>
</el-popconfirm>
</el-popconfirm> -->
<el-button
v-if="scope.row.success == '失败'"
@click="afreshClick(scope.row)"
@click="afreshClick(multipleSelection)"
style="margin-left: 10px;"
class="el-icon-refresh-left"
type="text"
@@ -82,12 +85,24 @@ export default {
type: Function,
default: () => {},
},
afreshAllFunc: {
type: Function,
default: () => {},
},
},
name: "CommonTables",
data() {
return {};
return {
multipleSelection: []
};
},
methods: {
handleSelectionChange(val) {
this.multipleSelection = val.map(item =>{
return item.id
})
this.afreshAllFunc(this.multipleSelection)
},
// 删除事件
handleDelete(row) {
this.deleteFunc(row);
@@ -104,11 +119,11 @@ export default {
return row.id
},
selectable(row, index) {
if (row.success == 0 || row.status == 1) {
return true;
} else {
return false;
}
if (row.success == '失败' ) {
return true;
} else {
return false;
}
},
},
computed: {