From aedad51e0775acd4e46f18ca8aaf27fc9ae221cf Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 13 Jul 2021 22:32:35 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises

---
 src/views/trainingRegistration/index.vue |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index 3206f12..35387c0 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/src/views/trainingRegistration/index.vue
@@ -25,6 +25,15 @@
           >删 除
         </el-button>
       </template>
+      <template slot-scope="{ type, size, row }" slot="menu">
+        <el-button
+          icon="el-icon-refresh-right"
+          @click="revoke(row)"
+          :size="size"
+          :type="type"
+          >撤销报名</el-button
+        >
+      </template>
     </avue-crud>
   </div>
 </template>
@@ -56,10 +65,11 @@
         searchSize: "mini",
         searchMenuSpan: 6,
         height: 627,
-        menuWidth: 160,
+        menuWidth: 290,
         align: "center",
         selection: true,
         column: column,
+        delBtn: false
       },
     };
   },
@@ -116,7 +126,8 @@
       this.onLoad(this.page);
     },
     rowUpdate(row, index, done, loading) {
-      console.log(row);
+      // console.log(row);
+
       update(row).then(
         () => {
           this.onLoad(this.page);
@@ -132,6 +143,24 @@
         }
       );
     },
+    revoke(row) {
+      // console.log(row);
+      row.cancel = 2;
+      update(row).then(
+        () => {
+          this.onLoad(this.page);
+          this.$message({
+            type: "success",
+            message: "成功撤销报名!",
+          });
+          done();
+        },
+        (error) => {
+          window.console.log(error);
+          loading();
+        }
+      );
+    },
     rowDel(row) {
       this.$confirm("确定将选择数据删除?", {
         confirmButtonText: "确定",

--
Gitblit v1.9.3