pull/194/head
sunmeng 2024-11-25 11:37:48 +08:00
parent ed9645e60c
commit b6a2e0e17a
1 changed files with 3 additions and 7 deletions

View File

@ -45,7 +45,7 @@
<el-table-column min-width='180' prop="time" label="时间"></el-table-column>
<el-table-column min-width='150' :label="item" v-for="item, index in tableList" :key="index">
<template slot-scope="scope">
<div>{{ scope.row['data' + index] }}</div>
<div>{{ scope.row[item] }}</div>
</template>
</el-table-column>
@ -327,22 +327,18 @@ export default {
this.tableData = []
this.total = res.data.data.totalCount
res.data.data.data[0].equipment.forEach((el, index) => {
this.tableList.push(el.environmentDataId + '(' + el.formula
+ ')')
this.tableList.push(el.environmentDataId + '(' + el.formula+ ')')
})
res.data.data.data.forEach((el, index) => {
const processedData = {
time: el.updateTime
};
el.equipment.forEach((item, index) => {
processedData[`data${index}`] = item.environmentData;
processedData[item.environmentDataId + '(' + item.formula+ ')'] = item.environmentData;
});
this.tableData.push(processedData)
})
}
})
},