浏览代码

增加房间号

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

+ 14 - 0
src/views/newIncident.vue

@@ -348,6 +348,7 @@ export default {
348
       timer: null,
348
       timer: null,
349
       incidentTitle: "", //事件主题
349
       incidentTitle: "", //事件主题
350
       referenceInfo: {}, //引用信息
350
       referenceInfo: {}, //引用信息
351
+      roomSelectData: [], //房间下拉框选项
351
       placeSelectData: [], //区域地点下拉框选项
352
       placeSelectData: [], //区域地点下拉框选项
352
       inpLocalVal: "", //故障地点输入框
353
       inpLocalVal: "", //故障地点输入框
353
       faultLocationList: [], //区域地点拼接下拉框选项
354
       faultLocationList: [], //区域地点拼接下拉框选项
@@ -783,6 +784,10 @@ export default {
783
               item.props.options = arr;
784
               item.props.options = arr;
784
             }
785
             }
785
           });
786
           });
787
+          console.log(this.fields)
788
+          if (this.$route.params.data && this.$route.params.data.room) {
789
+            this.model.room = this.$route.params.data.room.id;
790
+          }
786
         });
791
         });
787
     },
792
     },
788
     //扫资产
793
     //扫资产
@@ -1652,8 +1657,17 @@ export default {
1652
             selectedIndex: that.selectedIndex,
1657
             selectedIndex: that.selectedIndex,
1653
             onSelect: that.selectPlaceHandler
1658
             onSelect: that.selectPlaceHandler
1654
           });
1659
           });
1660
+          if (
1661
+            that.ifRoom == 1 &&
1662
+            that.$route.params.data &&
1663
+            that.$route.params.data.room
1664
+          ) {
1665
+            // 初始化房间号
1666
+            that.getRoomData(that.$route.params.data.place.id);
1667
+          }
1655
         });
1668
         });
1656
     },
1669
     },
1670
+
1657
     // 故障地点
1671
     // 故障地点
1658
     getFaultLocation(type) {
1672
     getFaultLocation(type) {
1659
       var that = this;
1673
       var that = this;