From 2b8cf6074286ad98d1d73d9776954f29b192be47 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 25 Jul 2022 11:35:50 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=97=A5=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppPropagandaStatistics.vue | 49 +++++++++---------- .../AppPropagandaStatistics/calendarInfo.vue | 11 +++-- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue index 104b0951..3699f017 100644 --- a/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue +++ b/src/project/saas/AppPropagandaStatistics/AppPropagandaStatistics.vue @@ -562,37 +562,36 @@ export default { }) .then((res) => { if(res?.data) { - // let data = [ - // {taskCount: 4, deptId: "10"}, - // {taskCount: 6, deptId: "13"}, - // {taskCount: 24, deptId: "5"}, - // {taskCount: 14, deptId: "22"}, - // {taskCount: 12, deptId: "20"}, - // {taskCount: 11, deptId: "15"} - // ] + let data = [ + {taskCount: 4, deptId: "10"}, + {taskCount: 6, deptId: "13"}, + {taskCount: 24, deptId: "5"}, + {taskCount: 14, deptId: "22"}, + {taskCount: 12, deptId: "20"}, + {taskCount: 11, deptId: "15"} + ] let items = [], xData = [], yData = [] - res.data.map((item) => { - var i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId} - items.push(i) - xData.push(item.deptId) - yData.push(item.taskCount) - }) - // data.map((item) => { + // res.data.map((item) => { // var i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId} // items.push(i) - // xData.push(item.deptId) // yData.push(item.taskCount) // }) + data.map((item) => { + var i = {type: 'departmentName', id: item.deptId, corpid: this.user.corpId} + items.push(i) + // xData.push(item.deptId) + yData.push(item.taskCount) + }) - // this.initOpenData({canvas:true}) - // this.transCanvas(items).then((data) => { - // console.log(data,'data哈哈哈'); - // data.items.map((i) => { - // xData.push(i.data) - // }) - // this.getColumnarEcharts(xData, yData) - // }) - this.getColumnarEcharts(xData, yData) + this.initOpenData({canvas:true}) + this.transCanvas(items).then((data) => { + console.log(data,'data哈哈哈'); + data.items.map((i) => { + xData.push(i.data) + }) + this.getColumnarEcharts(xData, yData) + }) + // this.getColumnarEcharts(xData, yData) } }); }, diff --git a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue index 896d7c29..8206e146 100644 --- a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue +++ b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue @@ -43,9 +43,14 @@ export default { components: { uniCalendar }, - created() { + onLoad() { this.getNowDay() - this.getData() + // if(this.month > 9) { + // this.yyyyMM = this.year + '-' + this.month + // } else { + // this.yyyyMM = this.year + '-' + '0' + this.month + // } + this.getData() }, methods: { changeMonth(e) { @@ -65,6 +70,7 @@ export default { const date = new Date() this.year = date.getFullYear() this.month = date.getMonth() + 1 + this.day = date.getDate() }, toGroup() { uni.navigateTo({url: './groupSendResident'}) @@ -81,7 +87,6 @@ export default { let arr = Object.keys(res.data).map(key => (res.data[key])) this.list = arr[this.day - 1]?.taskList let calList = arr.filter(item=> (item.taskList && item.taskList.length > 0)) - console.log(calList); this.selected = calList.map(item=> { if(item.day>=1 && item.day<=9) { if(this.month>=1 && this.month <=9) { From f95311848951af1af794335b224d8f623004579b Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Mon, 25 Jul 2022 11:42:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../saas/AppPropagandaStatistics/calendarInfo.vue | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue index 8206e146..46f25e03 100644 --- a/src/project/saas/AppPropagandaStatistics/calendarInfo.vue +++ b/src/project/saas/AppPropagandaStatistics/calendarInfo.vue @@ -43,21 +43,16 @@ export default { components: { uniCalendar }, - onLoad() { + created() { this.getNowDay() - // if(this.month > 9) { - // this.yyyyMM = this.year + '-' + this.month - // } else { - // this.yyyyMM = this.year + '-' + '0' + this.month - // } this.getData() }, methods: { changeMonth(e) { if(e.month<=9) { - this.yyyyMM = e.year + '-' + '0' + e.month + this.yyyyMM = e.year + '0' + e.month } else if(e.month > 9) { - this.yyyyMM = e.year + '-' + e.month + this.yyyyMM = e.year + e.month } this.getData() },