From 14e02654e0545ee69456d64aef2f35c7c219d708 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Fri, 07 May 2021 11:26:49 +0800
Subject: [PATCH] 地图模式设备状态修改

---
 src/views/clientManagement/clientManagement.vue |   35 +++++++++++++++++++++++------------
 1 files changed, 23 insertions(+), 12 deletions(-)

diff --git a/src/views/clientManagement/clientManagement.vue b/src/views/clientManagement/clientManagement.vue
index 27d5927..bc94ea0 100644
--- a/src/views/clientManagement/clientManagement.vue
+++ b/src/views/clientManagement/clientManagement.vue
@@ -730,17 +730,13 @@
               this.form.street = address.substring(address.indexOf("区")+1,address.length);
             }
             //写入新的省市区
-            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;
-            //调用接口获取省市区编号
+            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,
@@ -865,6 +861,9 @@
         });
       },
       rowUpdate(row, index, done, loading) {
+        if(Array.isArray(row.deptId)){
+            row.deptId = row.deptId.join(",");
+        }
         update(row).then(() => {
           // this.initFlag = false;
           this.onLoad(this.page);
@@ -1001,7 +1000,19 @@
             } else if (data.records[i].heartbeat == "") {
               data.records[i].dxzt = 0;
             } else {
-              data.records[i].dxzt = data.records[i].dtype;
+              if(data.records[i].dtype==1){
+                  data.records[i].dxzt = data.records[i].dtype;
+              }
+              if(data.records[i].dtype==2){
+                  data.records[i].dxzt = 2;
+              }
+              if(data.records[i].dtype==3){
+                  data.records[i].dxzt = 3;
+              }
+              if(data.records[i].dtype=="" || data.records[i].dtype==0){
+                  data.records[i].dxzt = 1;
+              }
+             
             }
           }
 

--
Gitblit v1.9.3