From f5f34da7f6c44ccb2bca4854dd9412565ce7dbc2 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 22 Aug 2022 16:51:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A3=E5=8F=91=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppPropagandaStatistics.vue | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/src/apps/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/apps/AppPropagandaStatistics/AppPropagandaStatistics.vue index 06d2a96e..9d5f69f2 100644 --- a/src/apps/AppPropagandaStatistics/AppPropagandaStatistics.vue +++ b/src/apps/AppPropagandaStatistics/AppPropagandaStatistics.vue @@ -550,26 +550,13 @@ export default { .then((res) => { if (res.code ===0) { if(res.data && res.data.length) { - let xData = res.data.map(e=> e.deptName) - let yData = res.data.map(e=> e.taskCount) + this.colData = res.data + let xData = [], yData = [] + res.data.forEach((item) => { + xData.push(item.deptName) + yData.push(item.taskCount) + }) this.getColumnarEcharts(xData, yData) - // this.colData = res.data - // let items = [], xData = [], yData = [] - // res.data.forEach((item) => { - // const i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId} - // items.push(i) - // yData.push(item.taskCount) - // }) - - // this.initOpenData({canvas:true}) - // setTimeout(() => { - // this.transCanvas(items).then((data) => { - // data.items.map((a) => { - // xData.push(a.data) - // }) - // this.getColumnarEcharts(xData, yData) - // }) - // }, 2000) } } });