Compare commits

..

No commits in common. "34c0f24488667bd418ec5a2a6b345732ad893f87" and "bb892c0a9af188c15a0b16b49b50fdad28fe469e" have entirely different histories.

View File

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