From fa72be7e5e5d2b58a079e2896e5a2208fa6b8e13 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 06 Aug 2021 11:38:56 +0800
Subject: [PATCH] 报名考试去重,同一场考试,审核通过的,已报考的人员不能再报名

---
 src/views/securityUnit/index.vue |   29 ++++++++++++++++++-----------
 1 files changed, 18 insertions(+), 11 deletions(-)

diff --git a/src/views/securityUnit/index.vue b/src/views/securityUnit/index.vue
index 5caeb70..23fb637 100644
--- a/src/views/securityUnit/index.vue
+++ b/src/views/securityUnit/index.vue
@@ -212,12 +212,13 @@
       query: {},
       data: [],
       option: {
+        index: true,
         addBtn: false,
         // card: true,
         tip: false,
         searchSize: "mini",
         searchMenuSpan: 6,
-        height: 623,
+        height: 693,
         menuWidth: 160,
         align: "center",
         selection: true,
@@ -229,7 +230,7 @@
     ids() {
       let ids = [];
       this.selectionList.forEach((ele) => {
-        ids.push(ele.id);
+        ids.push(ele.creditcode);
       });
       return ids.join(",");
     },
@@ -331,7 +332,7 @@
       })
         .then(() => {
           console.log(row);
-          return remove(row.creditcode);
+          return remove(row.creditcode, row.departmentid);
         })
         .then(() => {
           this.onLoad(this.page);
@@ -349,13 +350,14 @@
         this.$message.warning("请选择至少一条数据");
         return;
       }
-      this.$confirm("确定将选择数据删除?", {
+      this.$confirm("确定批量将选择数据删除?", {
         confirmButtonText: "确定",
         cancelButtonText: "取消",
         type: "warning",
       })
         .then(() => {
-          return remove(this.ids);
+          console.log(this.ids);
+          // return remove(this.ids);
         })
         .then(() => {
           this.onLoad(this.page);
@@ -420,7 +422,7 @@
           }
         }
       }
-      // console.log(d);
+      console.log(d);
       for (var k in d) {
         if (d[k] == "" || d[k] == undefined) {
           console.log(k);
@@ -428,6 +430,7 @@
           return;
         }
       }
+      console.log(d, 0);
       this.data0 = d;
       this.forms = 1;
     },
@@ -453,6 +456,7 @@
           return;
         }
       }
+      console.log(d, 1);
       this.data1 = d;
       this.forms = 2;
     },
@@ -468,13 +472,13 @@
           }
         }
       }
+      console.log(d);
       d["cardid"] = d["cardid2"];
       delete d["cardid2"];
       d["cell"] = d["cell2"];
       delete d["cell2"];
-      d["shareholdingratio"] = d["shareholdingratio2"];
-      delete d["shareholdingratio2"];
-      // console.log(d);
+      // d["shareholdingratio"] = d["shareholdingratio2"];
+      // delete d["shareholdingratio2"];
       for (var k in d) {
         if (d[k] == "" || d[k] == undefined) {
           console.log(k);
@@ -482,6 +486,7 @@
           return;
         }
       }
+      console.log(d, 2);
       this.data2 = d;
 
       // this.data0.departmentid = this.data0.useid;
@@ -500,8 +505,10 @@
       adddata2(this.data2).then((res) => {
         console.log(res, 2);
       });
-      this.onLoad(this.page, this.query);
-      console.log(this.data0, this.data1, this.data2);
+      var time = setTimeout(() => {
+        this.onLoad(this.page, this.query);
+        console.log(this.data0, this.data1, this.data2, "已刷新");
+      }, 500);
       this.tipover();
     },
     tip1up1() {

--
Gitblit v1.9.3