ソースを参照

设备管理缺陷修改

xujie 1 年間 前
コミット
69b06fe298
2 ファイル変更24 行追加19 行削除
  1. 9 9
      src/views/iot/deviceInfo/detailDialog.vue
  2. 15 10
      src/views/iot/deviceInfo/index.vue

+ 9 - 9
src/views/iot/deviceInfo/detailDialog.vue

@@ -47,15 +47,15 @@
               align="center"
             >
             </el-table-column>
-            <el-table-column
-              align="center"
-              prop="netStatus"
-              label="网络状态"
-            >
-              <template slot-scope="scope">
-                {{ getNetStatusDesc(scope.row.netStatus)}}
-              </template>
-            </el-table-column>
+<!--            <el-table-column-->
+<!--              align="center"-->
+<!--              prop="netStatus"-->
+<!--              label="网络状态"-->
+<!--            >-->
+<!--              <template slot-scope="scope">-->
+<!--                {{ getNetStatusDesc(scope.row.netStatus)}}-->
+<!--              </template>-->
+<!--            </el-table-column>-->
           </el-table>
         </div>
         <div class="extend_mod" v-if="formData.deviceType === '4'" style="max-height: 500px;">

+ 15 - 10
src/views/iot/deviceInfo/index.vue

@@ -93,7 +93,7 @@
             v-if="activeName != 'fsu'"
           >
             <template slot-scope="scope">
-              {{ getNetStatusDesc(scope.row.netStatus)}}
+              {{ getNetStatusDesc(scope.row)}}
             </template>
           </el-table-column>
           <el-table-column
@@ -238,15 +238,20 @@ export default {
   },
 
   methods: {
-    getNetStatusDesc(val){
-      if (val === '0'){
-        return "未知";
-      }else if(val === '1'){
-        return "在线";
-      }else if(val === '2'){
-        return "离线";
-      }else if(val === '3'){
-        return "异常";
+    getNetStatusDesc(row){
+      if (row.deviceType === '2' || row.deviceType === '3'){
+        return "-";
+      }else {
+        let val = row.netStatus;
+        if (val === '0'){
+          return "未知";
+        }else if(val === '1'){
+          return "在线";
+        }else if(val === '2'){
+          return "离线";
+        }else if(val === '3'){
+          return "异常";
+        }
       }
     },
     onOrgSelect(node) {