|
@@ -25,7 +25,7 @@
|
|
|
<thead>
|
|
|
<tr >
|
|
|
<th rowspan="2" class="list-header" style="color:#fff">时间</th>
|
|
|
- <th colspan="2" class="list-header" style="color:#fff" v-for="(item,i) in dataInfo[0].lines" :key="i"> {{ item.name }}</th>
|
|
|
+ <th colspan="2" class="list-header" style="color:#fff" v-for="(item,i) in title" :key="i"> {{ item }}</th>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<template v-for="i in 6 ">
|
|
@@ -65,6 +65,7 @@ export default {
|
|
|
return {
|
|
|
time: '',
|
|
|
dataInfo: [],
|
|
|
+ title: [],
|
|
|
total: []
|
|
|
}
|
|
|
},
|
|
@@ -85,6 +86,7 @@ export default {
|
|
|
this.dataInfo = res.data
|
|
|
this.total = res.data.reduce((pre, list, index) => {
|
|
|
pre = list.lines.map((item, i) => {
|
|
|
+ if (index === 0) this.title.push(item.name)
|
|
|
const newItem = {
|
|
|
positive: (item.positive ? item.positive : 0) + (index === 0 ? 0 : pre[i].positive)
|
|
|
}
|
|
@@ -92,7 +94,6 @@ export default {
|
|
|
})
|
|
|
return pre
|
|
|
}, [])
|
|
|
- console.log(this.total)
|
|
|
})
|
|
|
},
|
|
|
onDateChange (value, dateString) {
|