Pārlūkot izejas kodu

每次登记已绑定部门信息保持

fan 3 nedēļas atpakaļ
vecāks
revīzija
b23e75805b
1 mainītis faili ar 34 papildinājumiem un 9 dzēšanām
  1. 34 9
      src/views/recognize/index.vue

+ 34 - 9
src/views/recognize/index.vue

@@ -944,7 +944,7 @@ export default {
           field007: person.count, //总计人数
           field008: this.names, //同行人员姓名
           field009: person.dangerousEnable ? "有" : "无", //危险品检查
-          field010: person.cause ? "是" : "否", //施工作业
+          field010: person.workerEnable ? "是" : "否", //施工作业
           field011: this.areas, //进站区域
           pageId: "842348058862690304", //入场登记
         };
@@ -1091,8 +1091,7 @@ export default {
         telephone: "",
         label: "",
         photoPath: "",
-        department:
-          this.personType === 1 ? "821025772184543232" : "821025720783347712",
+        department: this.infomation.department,
         position:
           this.personType === 1 ? "821073061166981120" : "821073092108361728",
         type:
@@ -1184,9 +1183,22 @@ export default {
             this.infomation["telephone"] = data.telephone;
             this.infomation["cardNo"] = data.cardNo;
             this.infomation["photoPath"] = data.photoPath;
-            this.infomation["department"] = this.personType === 1 ? "821025772184543232" : "821025720783347712";
-            this.infomation["position"] = this.personType === 1 ? "821073061166981120" : "821073092108361728";
-            this.infomation["type"] = this.personType === 1 ? "546093319541760000" : "403245878963347456";
+            if (data.department) {
+              this.infomation["department"] = data.department;
+            } else {
+              this.infomation["department"] =
+                this.personType === 1
+                  ? "821025772184543232"
+                  : "821025720783347712";
+            }
+            this.infomation["position"] =
+              this.personType === 1
+                ? "821073061166981120"
+                : "821073092108361728";
+            this.infomation["type"] =
+              this.personType === 1
+                ? "546093319541760000"
+                : "403245878963347456";
             this.infomation["accessControlIds"] = data.accessControlIds;
             break;
           case 9:
@@ -1201,9 +1213,22 @@ export default {
             this.person["telephone"] = data.telephone;
             this.person["cardNo"] = data.cardNo;
             this.person["photoPath"] = data.photoPath;
-            this.person["department"] = this.personType === 1 ? "821025772184543232" : "821025720783347712";
-            this.person["position"] = this.personType === 1 ? "821073061166981120" : "821073092108361728";
-            this.person["type"] = this.personType === 1 ? "546093319541760000" : "403245878963347456";
+            if (data.department) {
+              this.infomation["department"] = data.department;
+            } else {
+              this.infomation["department"] =
+                this.personType === 1
+                  ? "821025772184543232"
+                  : "821025720783347712";
+            }
+            this.person["position"] =
+              this.personType === 1
+                ? "821073061166981120"
+                : "821073092108361728";
+            this.person["type"] =
+              this.personType === 1
+                ? "546093319541760000"
+                : "403245878963347456";
             this.person["accessControlIds"] = data.typeBelong;
             if (!this.checkIn(data.id)) {
               this.infomation.persons.push(this.person);