Browse Source

房间号参数修改

seimin 2 years ago
parent
commit
1e8a6c497d
1 changed files with 15 additions and 2 deletions
  1. 15 2
      src/views/newIncident.vue

+ 15 - 2
src/views/newIncident.vue

@@ -746,7 +746,17 @@ export default {
746 746
     // }
747 747
     "model.room": {
748 748
       handler(newV) {
749
-        this.model.houseNumber = newV || "";
749
+        if (newV) {
750
+          this.fields.forEach(item => {
751
+            if (item.modelKey == "room") {
752
+              this.model.houseNumber = item.props.options.find(
753
+                v => v.value == newV
754
+              ).text;
755
+            }
756
+          });
757
+        } else {
758
+          this.model.houseNumber = "";
759
+        }
750 760
       }
751 761
     }
752 762
   },
@@ -762,7 +772,7 @@ export default {
762 772
           let arr = [];
763 773
           result.data.list = result.data.list || [];
764 774
           result.data.list.forEach(item => {
765
-            arr.push({ value: item.room, text: item.room });
775
+            arr.push({ value: item.id, text: item.room });
766 776
           });
767 777
           this.fields.forEach(item => {
768 778
             // 初始化房间号下拉框列表
@@ -1009,6 +1019,9 @@ export default {
1009 1019
         that.model.contactsInformation;
1010 1020
       that.modelData.incident.contacts = that.model.contacts;
1011 1021
       that.modelData.incident.houseNumber = that.model.houseNumber;
1022
+      if (that.ifRoom == 1) {
1023
+        that.modelData.incident.room = { id: that.model.room };
1024
+      }
1012 1025
       that.modelData.incident.acceptUser = that.loginUser;
1013 1026
       that.modelData.incident.requester = {};
1014 1027
       that.modelData.incident.handlingPersonnelUser = { id: that.loginUser.id };