Commit 4b51411b authored by wangqinghua's avatar wangqinghua

update

parent bbc9228e
...@@ -23,9 +23,13 @@ export class DataReportPage { ...@@ -23,9 +23,13 @@ export class DataReportPage {
yearList = []; yearList = [];
count = { count = {
count1: 0, count1: 0,
qscount1: 0,
count2: 0, count2: 0,
qscount2: 0,
count3: 0, count3: 0,
qscount3: 0,
countTotal: 0, countTotal: 0,
qscountTotal: 0,
}; };
pieData; pieData;
...@@ -72,13 +76,27 @@ export class DataReportPage { ...@@ -72,13 +76,27 @@ export class DataReportPage {
} }
countInfo() { countInfo() {
this.count = {
count1: 0,
qscount1: 0,
count2: 0,
qscount2: 0,
count3: 0,
qscount3: 0,
countTotal: 0,
qscountTotal: 0,
};
if (this.type == 'unit') { if (this.type == 'unit') {
this.unitsInfo.forEach(e => { this.unitsInfo.forEach(e => {
this.count.count1 += e.unitCount1; this.count.count1 += e.unitCount1;
this.count.count2 += e.unitCount1; this.count.count2 += e.unitCount2;
this.count.count3 += e.unitCount1; this.count.count3 += e.unitCount3;
this.count.countTotal += e.unitTotal; this.count.countTotal += e.unitTotal;
}) })
this.count.qscount1 = this.count.count1 - this.unitsInfo[0].unitCount1;
this.count.qscount2 = this.count.count2 - this.unitsInfo[0].unitCount2;
this.count.qscount3 = this.count.count3 - this.unitsInfo[0].unitCount3;
this.count.qscountTotal = this.count.countTotal - this.unitsInfo[0].unitTotal;
} }
if (this.type == 'bzrs') { if (this.type == 'bzrs') {
this.unitsInfo.forEach(e => { this.unitsInfo.forEach(e => {
...@@ -87,6 +105,10 @@ export class DataReportPage { ...@@ -87,6 +105,10 @@ export class DataReportPage {
this.count.count3 += e.bzrs3; this.count.count3 += e.bzrs3;
this.count.countTotal += e.bzrsTotal; this.count.countTotal += e.bzrsTotal;
}) })
this.count.qscount1 = this.count.count1 - this.unitsInfo[0].bzrs1;
this.count.qscount2 = this.count.count2 - this.unitsInfo[0].bzrs2;
this.count.qscount3 = this.count.count3 - this.unitsInfo[0].bzrs3;
this.count.qscountTotal = this.count.countTotal - this.unitsInfo[0].bzrsTotal;
} }
if (this.type == 'syrs') { if (this.type == 'syrs') {
this.unitsInfo.forEach(e => { this.unitsInfo.forEach(e => {
...@@ -95,10 +117,15 @@ export class DataReportPage { ...@@ -95,10 +117,15 @@ export class DataReportPage {
this.count.count3 += e.syrs3; this.count.count3 += e.syrs3;
this.count.countTotal += e.syrsTotal; this.count.countTotal += e.syrsTotal;
}) })
this.count.qscount1 = this.count.count1 - this.unitsInfo[0].syrs1;
this.count.qscount2 = this.count.count2 - this.unitsInfo[0].syrs2;
this.count.qscount3 = this.count.count3 - this.unitsInfo[0].syrs3;
this.count.qscountTotal = this.count.countTotal - this.unitsInfo[0].syrsTotal;
} }
} }
switchEchart() { switchEchart() {
this.countInfo();
this.echartData1 = { this.echartData1 = {
grid: { grid: {
left: "5%", left: "5%",
......
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