From f3d52f329cb6e539059f05d79e7d116039fef518 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 17 十月 2024 18:17:33 +0800
Subject: [PATCH] 管理员、老师、学员优化

---
 src/views/class-management/ClassStaff.vue |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/src/views/class-management/ClassStaff.vue b/src/views/class-management/ClassStaff.vue
index c27b89a..5007373 100644
--- a/src/views/class-management/ClassStaff.vue
+++ b/src/views/class-management/ClassStaff.vue
@@ -3,7 +3,7 @@
   <div class="app-container">
     <div style="display: flex; flex-direction: row">
       <div style="padding-bottom:20px">
-        <span class="item">{{ title }}</span>
+        <span class="item">{{ this.$route.query.className }}</span>
         <el-button class="item" @click="handlerAddStudent" type="primary" size="small">鏂板瀛﹀憳</el-button>
         <el-button class="item" @click="open = true" type="primary" size="small">瀛﹀憳璋冩暣</el-button>
       </div>
@@ -14,7 +14,7 @@
                       placeholder="瀛﹀憳濮撳悕"></el-input>
           </el-form-item>
           <el-form-item>
-            <el-button type="primary" @click="page">鏌ヨ</el-button>
+            <el-button type="primary" @click="page" size="small">鏌ヨ</el-button>
           </el-form-item>
         </el-form>
       </div>
@@ -60,7 +60,13 @@
       >
         <template slot-scope="scope">
           <el-button @click="handlerEditStudent(scope.row)" type="warning" size="small">缂栬緫</el-button>
-          <el-button @click="remove(scope.row.id)" type="danger" size="small">鍒犻櫎</el-button>
+          <el-popconfirm
+            style="margin: 0 5px"
+            title="纭畾瑕佸垹闄よ鎴愬憳鍚楋紵"
+            @confirm="remove(scope.row.id)"
+          >
+            <el-button slot="reference" type="danger" size="small">鍒犻櫎</el-button>
+          </el-popconfirm>
         </template>
       </el-table-column>
     </el-table>
@@ -141,6 +147,7 @@
   editClassesUser
 } from '@/api/classesUser'
 import Pagination from '@/components/Pagination'
+import {deleteExamById} from "@/api/exam";
 
 export default {
   components: { Pagination },
@@ -246,9 +253,15 @@
       this.resetStudentForm()
     },
     remove (id) {
-      deleteClassesUserById(id).then(res => {
-        this.$message.success(res.data.message)
-        this.page()
+      this.$confirm('纭鏄惁鍒犻櫎?', '鎻愮ず', {
+        confirmButtonText: '纭畾',
+        cancelButtonText: '鍙栨秷',
+        type: 'warning'
+      }).then(() => {
+        deleteClassesUserById(id).then(res => {
+          this.$message.success(res.data.message)
+          this.page()
+        })
       })
     },
     sexFormatter (row) {

--
Gitblit v1.8.0