Pārlūkot izejas kodu

房间号参数修改

seimin 2 gadi atpakaļ
vecāks
revīzija
0c48543967
1 mainītis faili ar 15 papildinājumiem un 2 dzēšanām
  1. 15 2
      src/views/newIncident.vue

+ 15 - 2
src/views/newIncident.vue

@@ -744,7 +744,17 @@ export default {
744
     // }
744
     // }
745
     "model.room": {
745
     "model.room": {
746
       handler(newV) {
746
       handler(newV) {
747
-        this.model.houseNumber = newV || "";
747
+        if (newV) {
748
+          this.fields.forEach(item => {
749
+            if (item.modelKey == "room") {
750
+              this.model.houseNumber = item.props.options.find(
751
+                v => v.value == newV
752
+              ).text;
753
+            }
754
+          });
755
+        } else {
756
+          this.model.houseNumber = "";
757
+        }
748
       }
758
       }
749
     }
759
     }
750
   },
760
   },
@@ -986,6 +996,9 @@ export default {
986
         that.model.contactsInformation;
996
         that.model.contactsInformation;
987
       that.modelData.incident.contacts = that.model.contacts;
997
       that.modelData.incident.contacts = that.model.contacts;
988
       that.modelData.incident.houseNumber = that.model.houseNumber;
998
       that.modelData.incident.houseNumber = that.model.houseNumber;
999
+      if (that.ifRoom == 1) {
1000
+        that.modelData.incident.room = { id: that.model.room };
1001
+      }
989
       that.modelData.incident.acceptUser = that.loginUser;
1002
       that.modelData.incident.acceptUser = that.loginUser;
990
       that.modelData.incident.requester = {};
1003
       that.modelData.incident.requester = {};
991
       that.modelData.incident.handlingPersonnelUser = { id: that.loginUser.id };
1004
       that.modelData.incident.handlingPersonnelUser = { id: that.loginUser.id };
@@ -1392,7 +1405,7 @@ export default {
1392
           let arr = [];
1405
           let arr = [];
1393
           result.data.list = result.data.list || [];
1406
           result.data.list = result.data.list || [];
1394
           result.data.list.forEach(item => {
1407
           result.data.list.forEach(item => {
1395
-            arr.push({ value: item.room, text: item.room });
1408
+            arr.push({ value: item.id, text: item.room });
1396
           });
1409
           });
1397
           this.fields.forEach(item => {
1410
           this.fields.forEach(item => {
1398
             // 初始化房间号下拉框列表
1411
             // 初始化房间号下拉框列表