Browse Source

增加访客人员根据是否有工号判断照片更新逻辑

fan 3 weeks ago
parent
commit
57719399c9
1 changed files with 18 additions and 8 deletions
  1. 18 8
      src/views/recognize/index.vue

+ 18 - 8
src/views/recognize/index.vue

@@ -1161,10 +1161,14 @@ export default {
               this.processStep.num++;
               this.processStep.num++;
             }
             }
             if (this.personType === 1) {
             if (this.personType === 1) {
-              this.infomation["photoPath"] =
-                this.infomation["photoPath"] !== ""
-                  ? this.infomation["photoPath"]
-                  : data;
+              if (this.infomation.workNo === null) {
+                this.infomation["photoPath"] = data;
+              } else {
+                this.infomation["photoPath"] =
+                  this.infomation["photoPath"] !== ""
+                    ? this.infomation["photoPath"]
+                    : data;
+              }
             } else {
             } else {
               this.infomation["photoPath"] = data;
               this.infomation["photoPath"] = data;
             }
             }
@@ -1178,10 +1182,14 @@ export default {
               this.processStep.num++;
               this.processStep.num++;
             }
             }
             if (this.personType === 1) {
             if (this.personType === 1) {
-              this.person["photoPath"] =
-                this.person["photoPath"] !== ""
-                  ? this.person["photoPath"]
-                  : data;
+              if (this.person.workNo === null) {
+                this.person["photoPath"] = data;
+              } else {
+                this.person["photoPath"] =
+                  this.person["photoPath"] !== ""
+                    ? this.person["photoPath"]
+                    : data;
+              }
             } else {
             } else {
               this.person["photoPath"] = data;
               this.person["photoPath"] = data;
             }
             }
@@ -1210,6 +1218,7 @@ export default {
             this.infomation["idNumber"] = data.idNumber;
             this.infomation["idNumber"] = data.idNumber;
             this.infomation["telephone"] = data.telephone;
             this.infomation["telephone"] = data.telephone;
             this.infomation["cardNo"] = data.cardNo;
             this.infomation["cardNo"] = data.cardNo;
+            this.infomation["workNo"] = data.workNo;
             this.infomation["photoPath"] = data.photoPath;
             this.infomation["photoPath"] = data.photoPath;
             if (data.department) {
             if (data.department) {
               this.infomation["department"] = data.department;
               this.infomation["department"] = data.department;
@@ -1240,6 +1249,7 @@ export default {
             this.person["idNumber"] = data.idNumber;
             this.person["idNumber"] = data.idNumber;
             this.person["telephone"] = data.telephone;
             this.person["telephone"] = data.telephone;
             this.person["cardNo"] = data.cardNo;
             this.person["cardNo"] = data.cardNo;
+            this.person["workNo"] = data.workNo;
             this.person["photoPath"] = data.photoPath;
             this.person["photoPath"] = data.photoPath;
             if (data.department) {
             if (data.department) {
               this.infomation["department"] = data.department;
               this.infomation["department"] = data.department;