From 0d6da8730635d03bc4e4ee9d26ff13f14d6d9ed4 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Fri, 10 Nov 2023 17:09:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataBoard/overview/components/jdjs.vue | 127 ++++++++++++++---- 1 file changed, 104 insertions(+), 23 deletions(-) diff --git a/src/views/dataBoard/overview/components/jdjs.vue b/src/views/dataBoard/overview/components/jdjs.vue index addf782d0..b8d015601 100644 --- a/src/views/dataBoard/overview/components/jdjs.vue +++ b/src/views/dataBoard/overview/components/jdjs.vue @@ -20,20 +20,9 @@ /> - - - - + + +
12345热线投诉人数
-
12
+
{{event12345Num}}
满意度调查不满意人数
-
12
+
{{provinceSatisfactionNum}}
社区自评不满意人数
-
12
+
{{selfInspectNum}}
@@ -82,20 +71,51 @@ export default { report: "", overview: "", loading: false, - rffxDate:'' + rffxDate:'', + event12345Num:"", + provinceSatisfactionNum:"", + selfInspectNum:"", + + typeConditionList: [ + { + label: "本月", + value: 1, + }, + { + label: "上月", + value: 2, + }, + { + label: "近三月", + value: 3, + }, + { + label: "近半年", + value: 4, + }, + { + label: "近一年", + value: 5, + }, + ], + typeCondition:5, + + endTime:"", + startTime:"", }; }, watch: { currentLevelData(val) { if (val.orgId) { this.getReport(val); - // this.getData(); + // this.getChartData(); } }, }, mounted() { this.getReport(this.currentLevelData); - this.getData(); + this.getChartData(); + this.getData() }, components: { titleSmall, @@ -123,7 +143,7 @@ export default { this.report = data; }); }, - getData() { + getChartData() { this.loading = true this.$http.get('/actual/base/resiCategory/intelligentPredictioncategoryCountList').then(({data: {data}}) => { @@ -312,13 +332,74 @@ export default { window.addEventListener("resize", () => this.myChart.resize()); this.loading = false }, - changeDate() {}, + getData() { + this.loading = true; + let {startTime,endTime } = this + let params = { + level: this.$store.state.chooseArea.chooseName.level, + orgId: this.$store.state.chooseArea.chooseName.orgId, + startTime, + endTime, + }; + this.$http + .get( + "/governance/satisfactionOverview/satisfactionFollowGroup?" + + this.$paramsFormat(params) + ) + .then(({ data: { data } }) => { + this.event12345Num = data.event12345Num; + this.provinceSatisfactionNum = data.provinceSatisfactionNum; + this.selfInspectNum = data.selfInspectNum; + this.loading = false; + }); + }, + timeChange() { + let startTime = "", + endTime = ""; + if (this.typeCondition === 1) { + startTime = this.$moment().startOf("month").format("YYYY-MM-DD"); + } + if (this.typeCondition === 2) { + startTime = this.$moment().subtract(1, "months").startOf("month").format("YYYY-MM-DD"); + } + if (this.typeCondition === 3) { + startTime = this.$moment().subtract(2, "months").startOf("month").format("YYYY-MM-DD"); + } + if (this.typeCondition === 4) { + startTime = this.$moment().subtract(5, "months").startOf("month").format("YYYY-MM-DD"); + } + if (this.typeCondition === 5) { + startTime = this.$moment().subtract(11, "months").startOf("month").format("YYYY-MM-DD"); + } + + if (this.typeCondition === 2) { + endTime = this.$moment().subtract(1, "months").endOf("month").format("YYYY-MM-DD"); + } else { + endTime = this.$moment().endOf("month").format("YYYY-MM-DD"); + } + this.startTime = startTime; + this.endTime = endTime; + this.getData(); + }, }, };