Commit 2c31b0b9 by gao_yingdong

阵地

parent 7770027d
...@@ -90,8 +90,8 @@ export default { ...@@ -90,8 +90,8 @@ export default {
djsjStart: "", djsjStart: "",
djsjEnd: "", djsjEnd: "",
}, },
zs: 3, zs: '',
zsGm: 2, zsGm: '',
tableData: [], tableData: [],
type: "map", type: "map",
// ], // ],
...@@ -339,6 +339,11 @@ export default { ...@@ -339,6 +339,11 @@ export default {
}); });
} }
}); });
let sum = 0;
arr.forEach((item) => {
sum += item.count;
});
this.zs = sum;
this.pieEchartsDate.forEach((item) => { this.pieEchartsDate.forEach((item) => {
this.zs += item.value; this.zs += item.value;
}); });
...@@ -489,17 +494,22 @@ export default { ...@@ -489,17 +494,22 @@ export default {
}).then((res) => { }).then((res) => {
console.log(res.data.result); console.log(res.data.result);
arr = res.data.result; arr = res.data.result;
this.pieEchartsDate = []; this.pieEchartsDateGm = [];
arr.map((i) => { arr.map((i) => {
if (i.count != 0) { if (i.count != 0) {
this.pieEchartsDate.push({ this.pieEchartsDateGm.push({
name: i.hyhfdmStr, name: i.sfzdgzryStr,
value: i.count, value: i.count,
}); });
} }
}); });
console.log(this.pieEchartsDate); let sum = 0;
this.startMyEcharts(this.pieEchartsDate); arr.forEach((item) => {
sum += item.count;
});
this.zsGm = sum;
console.log(this.pieEchartsDateGm);
this.startMyEchartsGm(this.pieEchartsDateGm);
}); });
}, },
}, },
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
djsjStart: "", djsjStart: "",
djsjEnd: "", djsjEnd: "",
}, },
zs: 3, zs: 0,
zsGm: 2, zsGm: 2,
tableData: [], tableData: [],
type: "map", type: "map",
...@@ -214,7 +214,7 @@ export default { ...@@ -214,7 +214,7 @@ export default {
let str5 = "\xa0"; let str5 = "\xa0";
let str4 = " "; let str4 = " ";
for (let i = 0; i < 7 - params.length; i++) { for (let i = 0; i < 7 - params.length; i++) {
str5 += "\xa0\xa0\xa0\xa0"; str5 += "\xa0\xa0\xa0";
// str4 += "\xa0\xa0\xa0"; // str4 += "\xa0\xa0\xa0";
if (i == 7 - params.length - 1) { if (i == 7 - params.length - 1) {
str5 += "\xa0"; str5 += "\xa0";
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
} }
if (params.length == 7) { if (params.length == 7) {
str5 = "\xa0"; str5 = "\xa0";
// str4 = "\xa0"; str4 = "\xa0";
} }
num = data.find((i) => params == i.name); num = data.find((i) => params == i.name);
return `${params}${str5}${((num.value / total) * 100).toFixed( return `${params}${str5}${((num.value / total) * 100).toFixed(
...@@ -302,6 +302,11 @@ export default { ...@@ -302,6 +302,11 @@ export default {
}) })
} }
}) })
let sum = 0
arr.forEach( item => {
sum += item.count
})
this.zs = sum
console.log(this.pieEchartsDate); console.log(this.pieEchartsDate);
this.startMyEcharts(this.pieEchartsDate); this.startMyEcharts(this.pieEchartsDate);
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment