From 49bd2c4b798bd57ec09c5d731e2bc78345c6fb25 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 14 九月 2023 10:42:10 +0800
Subject: [PATCH] update

---
 src/components/view/equipmentmaintain.vue |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/components/view/equipmentmaintain.vue b/src/components/view/equipmentmaintain.vue
index 91e466e..528295c 100644
--- a/src/components/view/equipmentmaintain.vue
+++ b/src/components/view/equipmentmaintain.vue
@@ -245,7 +245,6 @@
                 placeholder="璇疯緭鍏ユ悳绱㈠唴瀹�" 
                 size="small" clearable ></el-input>
                     <el-tree :data="list" ref="tree" 
-                    style="height: 500px;overflow-y: auto;"
                     :props="{children: 'children',label: 'name'}" highlight-current node-key="name" default-expand-all
                          
                         @node-click="handleNodeClick"
@@ -264,7 +263,7 @@
                 <el-table
                     :data="tableData"
                     style="width: 100%;margin-bottom: 20px;height: 600px;overflow: auto;"
-                    row-key="name"
+                    row-key="rowId"
                     border
                     @select="selectTr"
                     @selection-change="handleSelectionChange"
@@ -550,12 +549,21 @@
 			}).then(res => {
 				this.tableData = res.data;
                 console.log(this.tableData);
-
+                this.formatData(res.data)
 			})
 			},
             modify(){
                 this.modifyevent = true
             },
+            formatData(data){
+                let arr = data;
+                for(var i=0;i<arr.length;i++){
+                        arr[i].rowId = Math.random();
+                        if(arr[i].children != undefined){
+                        this.formatData(arr[i].children);
+                        }
+                    }
+                },
             //delQueById
             delQueById() {
 				this.$axios.post(this.$api.url.delQueById,{
@@ -707,6 +715,7 @@
 		height: calc(100% - 20px);
 		border-right: 3px solid rgb(245, 247, 251);
 		padding: 16px;
+		overflow-y: auto;
 	}
 
 	.thing .left .custom-tree-node span {

--
Gitblit v1.9.3