人生啊人生 3 ماه پیش
والد
کامیت
6abebd6a7c
1فایلهای تغییر یافته به همراه46 افزوده شده و 12 حذف شده
  1. 46 12
      user_web/src/view/admin/ManageSchool.vue

+ 46 - 12
user_web/src/view/admin/ManageSchool.vue

@@ -361,9 +361,32 @@ const idDelAll = (delIdArray, callback) => {
     for (let i = 0; i < delIdArray.length; i++) {
 
         let thisDelIdArray = delIdArray[i];
-        console.log(
-            "thisDelIdArray", thisDelIdArray
-        );
+        // console.log(
+        //     "thisDelIdArray", thisDelIdArray
+        // );
+
+        let submit = {
+            // 选校全部结构返回里面的id值
+            "id" : thisDelIdArray.id,
+        };
+
+        schoolDelete(submit)
+        .then(response => {
+
+            // let data = response?.data?.data;
+            // console.log(
+            //     "schoolDeleteEvent response", response, data
+            // );
+
+            okNum += 1;
+
+            if (okNum >= delIdArray.length) {
+                callback("yes");
+            }
+            
+        }).catch(error => {
+            
+        });
 
     }
 
@@ -375,17 +398,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();
+            
+        }
+    );
     
 }