Browse Source

故障诊断模块修改

Koishi 3 years ago
parent
commit
3d38e44ec8
1 changed files with 20 additions and 7 deletions
  1. 20 7
      src/views/malfunctionDiagnose/index.vue

+ 20 - 7
src/views/malfunctionDiagnose/index.vue

@@ -95,13 +95,26 @@
       custom-class="modal"
       :close-on-click-modal="true"
     >
-      <el-tree
-        style="height: 600px; overflow-y: scroll"
-        node-key="activeId"
+      <el-table
         :data="treeData"
-        :default-expanded-keys="['0']"
-        :props="{ children: 'children', label: 'name' }"
-      ></el-tree>
+        style="width: 100%; height: 600px"
+        row-key="id"
+        border
+        default-expand-all
+        :expand-row-keys="['0']"
+        :tree-props="{ children: 'children' }"
+      >
+        <el-table-column
+          prop="name"
+          label="项目名称"
+          sortable
+        ></el-table-column>
+        <el-table-column
+          prop="judegVulue"
+          label="状态"
+          sortable
+        ></el-table-column>
+      </el-table>
     </el-dialog>
   </div>
 </template>
@@ -266,7 +279,7 @@ export default {
           values: item.judegvulue,
         },
         success(res) {
-          res.data[0].activeId = "0";
+          res.data[0].id = "0";
           that.treeData = res.data;
           that.dialogShow = true;
         },