From 9c550e05a7ed8446123f3dcc57da8ecad0c0fdc2 Mon Sep 17 00:00:00 2001
From: Fixiaobai <fixiaobai@163.com>
Date: 星期四, 14 九月 2023 10:52:05 +0800
Subject: [PATCH] modified: src/components/view/technical.vue
---
src/components/view/equipmentmaintain.vue | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/components/view/equipmentmaintain.vue b/src/components/view/equipmentmaintain.vue
index 30759c4..528295c 100644
--- a/src/components/view/equipmentmaintain.vue
+++ b/src/components/view/equipmentmaintain.vue
@@ -263,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"
@@ -549,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,{
--
Gitblit v1.9.3