From 9d28c1fd6d86efb09c2d776336d2c07c45461b0c Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 07 Jan 2022 11:43:34 +0800
Subject: [PATCH] 主要管理人员,保安员编辑bug 修复

---
 public/img/change1.png                    |    0 
 src/views/securityUnitChild/manager.vue   |    6 +++
 public/img/change.png                     |    0 
 src/views/securityGuard/securityGuard.vue |   17 +++++++-
 public/img/Switch.png                     |    0 
 src/views/securityAnalysis/index.vue      |   45 +++++++++++++++-------
 6 files changed, 52 insertions(+), 16 deletions(-)

diff --git a/public/img/Switch.png b/public/img/Switch.png
new file mode 100644
index 0000000..0fcdc11
--- /dev/null
+++ b/public/img/Switch.png
Binary files differ
diff --git a/public/img/change.png b/public/img/change.png
new file mode 100644
index 0000000..2dcf0fb
--- /dev/null
+++ b/public/img/change.png
Binary files differ
diff --git a/public/img/change1.png b/public/img/change1.png
new file mode 100644
index 0000000..997729f
--- /dev/null
+++ b/public/img/change1.png
Binary files differ
diff --git a/src/views/securityAnalysis/index.vue b/src/views/securityAnalysis/index.vue
index 51d9507..247c447 100644
--- a/src/views/securityAnalysis/index.vue
+++ b/src/views/securityAnalysis/index.vue
@@ -261,17 +261,43 @@
         feature: {
           myTool1: {
             show: true,
-            title: "",
-            // icon: "path://M432.45,595.444c0,2.177-4.661,6.82-11.305,6.82c-6.475,0-11.306-4.567-11.306-6.82s4.852-6.812,11.306-6.812C427.841,588.632,432.452,593.191,432.45,595.444L432.45,595.444z M421.155,589.876c-3.009,0-5.448,2.495-5.448,5.572s2.439,5.572,5.448,5.572c3.01,0,5.449-2.495,5.449-5.572C426.604,592.371,424.165,589.876,421.155,589.876L421.155,589.876z M421.146,591.891c-1.916,0-3.47,1.589-3.47,3.549c0,1.959,1.554,3.548,3.47,3.548s3.469-1.589,3.469-3.548C424.614,593.479,423.062,591.891,421.146,591.891L421.146,591.891zM421.146,591.891",
-            // icon: "image://http://echarts.baidu.com/images/favicon.png",
+            title: "点击查看详情",
             icon: "image://http://223.82.109.183:2080/img/table.png",
-            // icon: "M271.68 304.64h472a32 32 0 1 0 0-64h-472a32 32 0 0 0 0 64z m0 234.88h408.64a32 32 0 0 0 0-64H271.68a32 32 0 1 0 0 64z m0 198.4h376.64a32 32 0 1 0 0-64H271.68a32 32 0 0 0 0 64z",
             onclick: function () {
               that.dialogVisible = true;
               that.sees = id;
               that.titles = titles;
             },
           },
+        },
+      };
+    },
+    gettoolboxByExamine(title, titles, id) {
+      var that = this;
+      return {
+        show: true,
+        itemSize: 25,
+        top: 20,
+        right: 20,
+        feature: {
+          myTool1: {
+            show: true,
+            title: "点击查看详情",
+            icon: "image://http://223.82.109.183:2080/img/table.png",
+            onclick: function () {
+              that.dialogVisible = true;
+              that.sees = id;
+              that.titles = titles;
+            },
+          },
+          // myTool2: {
+          //   show: true,
+          //   title: "切换",
+          //   icon: "image://http://223.82.109.183:2080/img/Switch.png",
+          //   onclick: function () {
+          //     that.titles = titles;
+          //   },
+          // },
         },
       };
     },
@@ -299,7 +325,6 @@
         });
     },
     setEC1(d) {
-      // console.log(d, 1);
       this.examine1 = [
         {
           title: "审查时间:",
@@ -326,18 +351,10 @@
           trigger: "item",
         },
         legend: {
-          // orient: "vertical",
-          // left: "left",
           x: "center",
           y: "90%",
         },
-        toolbox: this.gettoolbox("审查情况查询", "保安员审查情况明细", 1),
-        // grid: {
-        //   // left: "3%",
-        //   right: "5%",
-        //   // bottom: "3%",
-        //   // containLabel: true,
-        // },
+        toolbox: this.gettoolboxByExamine("审查情况查询", "保安员审查情况明细", 1),
         series: [
           {
             // name: "访问来源",
diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index 1397dd2..cf22a33 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -584,8 +584,14 @@
       }
 
       if (ok) {
-        //调用接口进行账户重复校验
-        checkAccount(value, callback);
+        if(this.type==1){
+          //修改不校验身份证hao
+          callback();
+        }else{
+          //调用接口进行账户重复校验
+          checkAccount(value, callback);
+        }
+        
       } else {
         callback(new Error("身份证错误"));
       }
@@ -644,6 +650,7 @@
     // let optionHeight = +this.windowHeight - (+heard[0].clientHeight + +usNum);
     return {
       sort: "",
+      type:2,
       sortName: "",
       nowCell: "", //空为手动,2为身份证设备读取
       // 表格数据
@@ -2532,6 +2539,12 @@
       var that = this;
       // console.log(type, 123);
       this.beginSFZ();
+      if (["edit"].includes(type)) {
+        this.type = 1;
+      }
+      if (["add"].includes(type)) {
+        this.type = 2;
+      }
       if (["edit", "view"].includes(type)) {
         getUser(this.form.id).then((res) => {
           this.form = res.data.data;
diff --git a/src/views/securityUnitChild/manager.vue b/src/views/securityUnitChild/manager.vue
index f98f500..5fec07c 100644
--- a/src/views/securityUnitChild/manager.vue
+++ b/src/views/securityUnitChild/manager.vue
@@ -258,6 +258,9 @@
   methods: {
     rowSave(row, done, loading) {
       row['deptId'] = this.deptid;
+      if(this.stats != "1"){
+        delete row.paper;
+      }
       adddata2(row).then(
         () => {
           this.onLoad(this.page);
@@ -275,6 +278,9 @@
     },
     rowUpdate(row, index, done, loading) {
       row['deptId'] = this.deptid;
+      if(this.stats != "1"){
+        delete row.paper;
+      }
       update2(row).then(
         () => {
           this.onLoad(this.page);

--
Gitblit v1.9.3