commit
34c0f24488
|
@ -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)
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue