人生啊人生 3 月之前
父節點
當前提交
889131f3a8
共有 1 個文件被更改,包括 21 次插入10 次删除
  1. 21 10
      user_web/src/view/admin/ManageUser.vue

+ 21 - 10
user_web/src/view/admin/ManageUser.vue

@@ -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>