|
@@ -22,7 +22,7 @@
|
|
<el-table-column label="C3-7天内" prop="3" />
|
|
<el-table-column label="C3-7天内" prop="3" />
|
|
<el-table-column label="D14天内" prop="4" />
|
|
<el-table-column label="D14天内" prop="4" />
|
|
<el-table-column label="E30天内" prop="5" />
|
|
<el-table-column label="E30天内" prop="5" />
|
|
- <el-table-column label="F超30天" prop="5" />
|
|
|
|
|
|
+ <el-table-column label="F超30天" prop="6" />
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
|
|
<el-table-column label="总计">
|
|
<el-table-column label="总计">
|
|
@@ -150,12 +150,13 @@ export default {
|
|
const list = []
|
|
const list = []
|
|
Object.keys(res.data).forEach(key => {
|
|
Object.keys(res.data).forEach(key => {
|
|
const { name , result = {}} = res.data[key]
|
|
const { name , result = {}} = res.data[key]
|
|
|
|
+ console.log(result)
|
|
if(result.length === 0){
|
|
if(result.length === 0){
|
|
list.push({name, 0: '--', 1:0, 2:0, 3:0, 4:0, 5:0, 6:0 })
|
|
list.push({name, 0: '--', 1:0, 2:0, 3:0, 4:0, 5:0, 6:0 })
|
|
}else{
|
|
}else{
|
|
Object.keys(result).forEach(key => {
|
|
Object.keys(result).forEach(key => {
|
|
- list.push({ name, ...result[key] })
|
|
|
|
- })
|
|
|
|
|
|
+ list.push({ name, ...result[key] })
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -164,10 +165,12 @@ export default {
|
|
...list.reduce((prev,current) => {
|
|
...list.reduce((prev,current) => {
|
|
const {name,...rest} = current;
|
|
const {name,...rest} = current;
|
|
const keys = Object.keys(rest)
|
|
const keys = Object.keys(rest)
|
|
- return keys.reduce((pObj,key) => ({
|
|
|
|
- ...pObj,
|
|
|
|
- [key]:addition(current[key] || 0,prev[key] || 0)
|
|
|
|
- }),{})
|
|
|
|
|
|
+ return keys.reduce((pObj,key) => {
|
|
|
|
+ return {
|
|
|
|
+ ...pObj,
|
|
|
|
+ [key]:addition(current[key] || 0,prev[key] || 0)
|
|
|
|
+ }
|
|
|
|
+ },{})
|
|
}, {})
|
|
}, {})
|
|
}
|
|
}
|
|
|
|
|
|
@@ -177,6 +180,8 @@ export default {
|
|
list.push(totalItem)
|
|
list.push(totalItem)
|
|
|
|
|
|
this.tableData = list
|
|
this.tableData = list
|
|
|
|
+
|
|
|
|
+ console.log(list)
|
|
} else {
|
|
} else {
|
|
this.tableData = [];
|
|
this.tableData = [];
|
|
}
|
|
}
|