From efa261b97d0974869276513b1e900421bf4ff573 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Thu, 06 May 2021 15:16:23 +0800
Subject: [PATCH] 1.设备状态页面故障状态隐藏,故障状态合并到设备状态中    2.警情处理完成后,修改设备状态为正常,新加参数设备编号

---
 src/views/clientManagement/clientManagement.vue |   34 ++++++++++++++++++----------------
 1 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/src/views/clientManagement/clientManagement.vue b/src/views/clientManagement/clientManagement.vue
index d7f253b..c70cebb 100644
--- a/src/views/clientManagement/clientManagement.vue
+++ b/src/views/clientManagement/clientManagement.vue
@@ -69,7 +69,7 @@
 
           <template slot-scope="{ row }" slot="dxzt">
             <el-tag>{{
-              row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "在线" : "无"
+              row.dxzt == "0" ? "掉线" : row.dxzt == "1" ? "正常" :row.dxzt == "2" ? "报警":row.dxzt == "3" ? "故障":"无"
               }}
             </el-tag>
           </template>
@@ -464,7 +464,8 @@
               label: "故障状态",
               prop: "state",
               addDisplay: false,
-              editDisplay: false
+              editDisplay: false,
+              hide:true
             },
             {
               label: "故障原因",
@@ -711,11 +712,9 @@
             //判断是新增还是修改
             if(that.isEdit){
                 getclient(this.form.id).then(res => {
-                  debugger;
-                  that.province = res.data.data.province;
-                  that.city = res.data.data.city;
-                  that.district = res.data.data.district;
-
+                  // that.province = res.data.data.province;
+                  // that.city = res.data.data.city;
+                  // that.district = res.data.data.district;
                 });
               }
             
@@ -731,13 +730,17 @@
               this.form.street = address.substring(address.indexOf("区")+1,address.length);
             }
             //写入新的省市区
-            that.form.province = val.addressComponent.province;
-            if(val.addressComponent.city==""){
-                that.form.city = val.addressComponent.province;
-            }else{
-                that.form.city = val.addressComponent.city;
-            }
-            that.form.district = val.addressComponent.district;
+            that.form.province = "11";
+            that.form.city = "1101";
+            that.form.district = "110101";
+            // that.form.province = val.addressComponent.province;
+            // if(val.addressComponent.city==""){
+            //     that.form.city = val.addressComponent.province;
+            // }else{
+            //     that.form.city = val.addressComponent.city;
+            // }
+            // that.form.district = val.addressComponent.district;
+            //调用接口获取省市区编号
           }
         },
         immediate: true,
@@ -934,7 +937,6 @@
           });
       },
       beforeOpen(done, type) {
-        debugger;
         if (["edit", "view"].includes(type)) {
           getclient(this.form.id).then(res => {
             this.form = res.data.data;
@@ -999,7 +1001,7 @@
             } else if (data.records[i].heartbeat == "") {
               data.records[i].dxzt = 0;
             } else {
-              data.records[i].dxzt = 1;
+              data.records[i].dxzt = data.records[i].dtype;
             }
           }
 

--
Gitblit v1.9.3