浏览代码

房间号参数修改

seimin 2 年之前
父节点
当前提交
0c48543967
共有 1 个文件被更改,包括 15 次插入2 次删除
  1. 15 2
      src/views/newIncident.vue

+ 15 - 2
src/views/newIncident.vue

@@ -744,7 +744,17 @@ export default {
744 744
     // }
745 745
     "model.room": {
746 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 996
         that.model.contactsInformation;
987 997
       that.modelData.incident.contacts = that.model.contacts;
988 998
       that.modelData.incident.houseNumber = that.model.houseNumber;
999
+      if (that.ifRoom == 1) {
1000
+        that.modelData.incident.room = { id: that.model.room };
1001
+      }
989 1002
       that.modelData.incident.acceptUser = that.loginUser;
990 1003
       that.modelData.incident.requester = {};
991 1004
       that.modelData.incident.handlingPersonnelUser = { id: that.loginUser.id };
@@ -1392,7 +1405,7 @@ export default {
1392 1405
           let arr = [];
1393 1406
           result.data.list = result.data.list || [];
1394 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 1410
           this.fields.forEach(item => {
1398 1411
             // 初始化房间号下拉框列表