1 #194

Merged
xiaomeng merged 1 commits from pc-master into portal 2024-11-25 04:44:31 +00:00
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)
})
}
})
},