|
@@ -677,17 +677,28 @@ const idDelAll = (delIdArray, callback) => {
|
|
|
*/
|
|
|
const btnDel = (res) => {
|
|
|
|
|
|
- console.log(
|
|
|
- "删除选中分页的某个数据", res
|
|
|
- );
|
|
|
+ // console.log(
|
|
|
+ // "删除选中分页的某个数据", res
|
|
|
+ // );
|
|
|
|
|
|
- ElMessage({
|
|
|
- type: 'success',
|
|
|
- message: '删除成功',
|
|
|
- });
|
|
|
+ let delIdArray = [
|
|
|
+ { "id" : res.id }
|
|
|
+ ];
|
|
|
|
|
|
- // 重新查找分页数据
|
|
|
- pageUpdateEvent();
|
|
|
+ idDelAll(
|
|
|
+ delIdArray,
|
|
|
+ function() {
|
|
|
+
|
|
|
+ ElMessage({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功',
|
|
|
+ });
|
|
|
+
|
|
|
+ // 重新查找分页数据
|
|
|
+ pageUpdateEvent();
|
|
|
+
|
|
|
+ }
|
|
|
+ );
|
|
|
|
|
|
}
|
|
|
|
|
@@ -967,7 +978,7 @@ onMounted(function() {
|
|
|
<el-table-column label="操作">
|
|
|
<template #default="scope">
|
|
|
<el-button link type="primary" @click="btnDetail(scope.row)">编辑</el-button>
|
|
|
- <el-popconfirm :title="`你确定删除${scope.row.name}吗?`" @confirm="btnDel(scope.row)">
|
|
|
+ <el-popconfirm :title="`你确定删除${scope.row.userName}吗?`" @confirm="btnDel(scope.row)">
|
|
|
<template #reference>
|
|
|
<el-button link type="danger" style="margin-left: 3rem">移除</el-button>
|
|
|
</template>
|