dedsudiyu 1 year ago
parent
commit
6ef1466fc3

+ 3 - 3
src/api/iotDevice/index.js

@@ -739,11 +739,11 @@ export function iotHardwareList(data) {
   })
 }
 //硬件设备-详情
-export function iotHardwareDetail(data) {
+export function iotHardwareDetail(query) {
   return request({
     url: '/iot/hardware/detail',
-    method: 'post',
-    data: data
+    method: 'get',
+    params: query
   })
 }
 //硬件设备-删除

+ 2 - 0
src/views/iotDevice/hardwareManagement/hardwareEquipment/bottomModule/hardwareDebug.vue

@@ -98,6 +98,7 @@
               }else{
                 this.$set(this.debugDataList[this.debugIndex],'featureType',2);
               }
+              this.$parent.iotHardwareDetail();
             });
           }else if(item.reqMethod == 'GET'){
             iotDebugFunctionGet(url,obj).then(response => {
@@ -107,6 +108,7 @@
               }else{
                 this.$set(this.debugDataList[this.debugIndex],'featureType',2);
               }
+              this.$parent.iotHardwareDetail();
             });
           }
         }else{

+ 8 - 2
src/views/iotDevice/hardwareManagement/hardwareEquipment/infoPage.vue

@@ -8,7 +8,7 @@
       <div class="info-max-box">
         <div class="info-left-max-box">
           <img src="@/assets/ZDimages/iotDevice/home_hardware_icon.png">
-          <p :class="newData.online?'onlineTypeA':'onlineTypeB'">{{newData.operatingState?'开启':'关闭'}}</p>
+          <p :class="newData.operatingState?'onlineTypeA':'onlineTypeB'">{{newData.operatingState?'开启':'关闭'}}</p>
         </div>
         <div class="info-right-max-box scrollbar-box">
           <div class="info-min-box">
@@ -112,7 +112,13 @@
       // 返回按钮
       backPage() {
         this.$parent.tableButton(6)
-      }
+      },
+      //获取详情
+      iotHardwareDetail(){
+        iotHardwareDetail({id:this.$parent.propsData.id}).then(response =>{
+          this.$set(this.propsData,'operatingState',response.data.operatingState);
+        })
+      },
     }
   }
 </script>