From b25e538fd73803b4023b0fef8b404f66b36178e4 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 23 Nov 2021 09:51:13 +0800
Subject: [PATCH] +

---
 src/views/securityGuard/securityGuard.vue |   58 ++++++++++++++++------------------------------------------
 1 files changed, 16 insertions(+), 42 deletions(-)

diff --git a/src/views/securityGuard/securityGuard.vue b/src/views/securityGuard/securityGuard.vue
index af1e1bc..7cd5182 100644
--- a/src/views/securityGuard/securityGuard.vue
+++ b/src/views/securityGuard/securityGuard.vue
@@ -509,6 +509,7 @@
       }
     };
     return {
+      nowCell: "", //空为手动,2为身份证设备读取
       // 表格数据
       defaults: {},
       // 身份证设备数据
@@ -680,6 +681,7 @@
         //dialogType: 'drawer',
         dialogClickModal: false,
         column: securityFormPageColumn,
+        ...this.$store.state.control.clearOtherBut,
         group: [
           {
             label: "基础信息",
@@ -1757,6 +1759,8 @@
       }
       const userMap = {
         user: {
+          //是否是身份证自动识别进入
+          cell: this.nowCell,
           //指纹↓
           fingerprint: zhiwen.imgBMP, //图
           myPicture: zhiwen.featuredata, //特征
@@ -1828,6 +1832,8 @@
       }
       // console.log(row);
       // return;
+      //是否是身份证自动识别进入
+      row["cell"] = this.nowCell;
       update(row).then(
         () => {
           this.initFlag = false;
@@ -2051,7 +2057,9 @@
           console.log("ok!");
         }
       } catch (e) {
-        that.haveSEL = false;
+        // that.haveSEL = false;
+        that.haveSEL = true;
+        // console.log(e, 123);
         return;
       }
       let result = CertCtl.readCert();
@@ -2086,7 +2094,10 @@
       this.intTime = setInterval(function () {
         if (!that.haveCardid) {
           //定时读卡
+          console.log(that.haveCardid);
           let result = CertCtl.readCert();
+          // console.log(result);
+          console.log("通过读取");
           if (result == "") {
             console.log("未启动读卡插件!");
             that.closeSFZ();
@@ -2109,53 +2120,15 @@
               that.form.sex = data.certType;
               //禁止编辑
               that.openClosegroup(true);
-              //赋值数据
-              // that.obj = {
-              //   name: data.partyName,
-              //   national: data.nation,
-              //   certAddress: data.certAddress,
-              //   sex:
-              //     data.certType == 0
-              //       ? "未知"
-              //       : data.certType == 1
-              //       ? "男"
-              //       : data.certType == 2
-              //       ? "女"
-              //       : data.certType == 9
-              //       ? "未说明"
-              //       : "未能识别",
-              //   imgs: "data:image/bmp;base64," + data.identityPic,
-              //   yxqend:
-              //     data.expDate.slice(0, 4) +
-              //     "-" +
-              //     data.expDate.slice(4, 6) +
-              //     "-" +
-              //     data.expDate.slice(6, 8),
-              //   yxqstart:
-              //     data.effDate.slice(0, 4) +
-              //     "-" +
-              //     data.effDate.slice(4, 6) +
-              //     "-" +
-              //     data.effDate.slice(6, 8),
-              //   birthday:
-              //     data.bornDay.slice(0, 4) +
-              //     "-" +
-              //     data.bornDay.slice(4, 6) +
-              //     "-" +
-              //     data.bornDay.slice(6, 8),
-              //   id: data.certNumber,
-              //   qfjg: data.certOrg,
-              // };
-              // that.$store.commit("setCardInfor", that.obj);
-              // that.$store.commit("setCardidState", true);
+              that.nowCell = "2";
             } else if (resultObj.resultFlag == "-1") {
               if (resultObj.errorMsg == "端口打开失败") {
                 console.log("读卡器未连接");
                 that.closeSFZ();
               } else {
-                // console.log(resultObj.errorMsg);
+                console.log(resultObj.errorMsg);
                 //无卡片提醒
-                that.closeSFZ();
+                // that.closeSFZ();
               }
             } else if (resultObj.resultFlag == "-2") {
               console.log(resultObj.errorMsg);
@@ -2204,6 +2177,7 @@
         //可以编辑
       }
       this.openClosegroup(false);
+      this.nowCell = "";
     },
     beforeOpen(done, type) {
       var that = this;

--
Gitblit v1.9.3