From e35e43b2b8b88c990520651a7ed970a1db8d0cd3 Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Fri, 15 Sep 2023 09:42:30 +0800 Subject: [PATCH 01/10] bug --- .../satisfaction/communitySelfInsp/index.vue | 22 +++++++++++-------- .../satisfactionProvince/formList.vue | 2 +- .../satisfactionProvince/index.vue | 6 +++-- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue index ced74c97b..d8861edcb 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/index.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue @@ -230,9 +230,7 @@ export default { this.agencyId = this.user.agencyId; await this.getDicts(); await this.getTableData(); - this.$nextTick(() => { - this.initEcharts(); - }) + await this.initEcharts(); }, created() { let date = new Date() @@ -318,14 +316,19 @@ export default { // 获取列表 async getTableData() { + + try{ const url = "/governance/satisfaction/communitySelfInsp/stats/synthesis"; const { formData } = this; - const { data, code, msg } = await requestGet(url, { ...formData }); - this.tableLoading = false; - if (code === 0) { + const { data, msg } = await requestGet(url, { ...formData }); this.total = data.total || 0; this.score = [] - this.tableData = data.categoryDatas; + this.option.series[0].data = [] + this.option.series[1].data = [] + this.option.series[2].data = [] + this.option.xAxis.data = [] + this.tableData = data.categoryDatas || []; + this.satisfactionCategory = [] this.formData.inspRecordId = data.inspRecordId; this.synthesisScore = data.synthesisScore; this.personQty = data.personQty @@ -340,8 +343,9 @@ export default { this.score.push({ score: item.score, satisfactionCategoryName: item.satisfactionCategoryName, imgUrl: require(`../../../../assets/img/satisfaction/${item.satisfactionCategory}.png`) }); } }); - } else { - this.$message.error(msg); + this.myChart.setOption(this.option); + }catch(error){ + console.log(error); } }, diff --git a/src/views/modules/satisfaction/satisfactionProvince/formList.vue b/src/views/modules/satisfaction/satisfactionProvince/formList.vue index 1e1e641f6..fdc5adb80 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/formList.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/formList.vue @@ -62,7 +62,7 @@ export default { periodStart: '', scopeId: '', }, - pageNo: 1, + pageNo: 0, pageSize: 20, total: 0, tableData: [], diff --git a/src/views/modules/satisfaction/satisfactionProvince/index.vue b/src/views/modules/satisfaction/satisfactionProvince/index.vue index 952b377ab..bb1daa398 100644 --- a/src/views/modules/satisfaction/satisfactionProvince/index.vue +++ b/src/views/modules/satisfaction/satisfactionProvince/index.vue @@ -256,6 +256,8 @@ export default { `/governance/provinceEvaluationRecord/staticPeopleNum`, { ...this.formData } ); + this.option.series[0].data = [] + this.option.xAxis.data = [] this.tableData = data this.tableData.forEach(item => { if (allowedCategories.includes(item.scopeId)) { @@ -263,10 +265,10 @@ export default { this.option.xAxis.data.push(item.scopeName) } }); + this.myChart.setOption(this.option) } catch (error) { console.log(error); } - }, async handleExportModule() { let url = "/governance/provinceEvaluationRecord/provinceStatis/downloadImportTemplate"; @@ -336,7 +338,7 @@ export default { const formData = new FormData(); //FormData对象,添加参数只能通过append('key', value)的形式添加 formData.append("file", file.file); //添加文件对象 await this.$http - .post("/governance/satisfaction/provinceEvaluationRecord/StaticPeopleNum/2023-09", formData) + .post(`/governance/provinceEvaluationRecord/importDataByExcel`, formData) .then((res) => { console.log("res-up", res); if (res.data.code == 0 && res.data.msg == "success") { From d1863f75adfdae24e6ea8bb6e2118ea96461756f Mon Sep 17 00:00:00 2001 From: duanliangtao Date: Mon, 18 Sep 2023 17:21:47 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E6=99=BA=E8=83=BD=E6=90=9C=E7=B4=A2=E8=A7=84=E5=88=99=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E5=9B=9E=E6=98=BE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/shequ/chaxun.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/views/modules/shequ/chaxun.vue b/src/views/modules/shequ/chaxun.vue index 91991aa3d..418839b52 100644 --- a/src/views/modules/shequ/chaxun.vue +++ b/src/views/modules/shequ/chaxun.vue @@ -539,9 +539,9 @@ export default { this.searchFangwu.total = 0; this.getSearchFangwu(); } - if (this.smatrFlag && this.childrenRulesData.length === 0) { - this.getRulesList(); - } + // if (this.smatrFlag && this.childrenRulesData.length === 0) { + // this.getRulesList(); + // } this.searchStatus = "ing"; }, async getRulesList() { @@ -629,6 +629,7 @@ export default { } else { this.$message.error(msg); } + this.getRulesList(); }, async getSearchFangwu() { @@ -676,6 +677,7 @@ export default { : []; } else { } + this.getRulesList(); }, handelClickTab(type) { console.log(type); From 21f37a64c84db607330b1a4c824c369634a19b0c Mon Sep 17 00:00:00 2001 From: mk <2403457699@qq.com> Date: Mon, 18 Sep 2023 17:24:33 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E7=9C=81=E6=BB=A1=E6=84=8F=E5=BA=A6?= =?UTF-8?q?=E7=A4=BE=E5=8C=BA=E8=87=AA=E6=9F=A5=E6=97=A5=E6=9C=9F=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E5=8E=BB=E9=99=A4=E4=BF=9D=E7=95=99=E6=9C=88=E4=BB=BD?= =?UTF-8?q?/bug#569=E4=BA=8B=E4=BB=B6=E6=8C=87=E6=B4=BEbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../satisfaction/communitySelfInsp/index.vue | 2 +- .../satisfaction/satisfactionProvince/index.vue | 2 +- .../event/cpts/process-form-designate.vue | 14 ++++++++++---- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/views/modules/satisfaction/communitySelfInsp/index.vue b/src/views/modules/satisfaction/communitySelfInsp/index.vue index ced74c97b..5aefedc55 100644 --- a/src/views/modules/satisfaction/communitySelfInsp/index.vue +++ b/src/views/modules/satisfaction/communitySelfInsp/index.vue @@ -5,7 +5,7 @@ -
78
+
{{ unSolvedNum ? unSolvedNum : 0 }}
@@ -18,7 +18,7 @@ 需求未满足
人数
-
128
+
{{ unFinishNum ? unFinishNum : 0 }}
@@ -28,14 +28,47 @@ 应享未享
服务人数
-
527
+
{{ noServiceNum ? noServiceNum : 0 }}
@@ -51,8 +84,9 @@ export default { text-align: center; flex: 1; border: 1px solid rgba(28, 67, 111, 0.22); - background: linear-gradient(0deg, rgba(31, 121, 255, 0.22) 0%, rgba(31,121,255,0) 100%); + background: linear-gradient(0deg, rgba(31, 121, 255, 0.22) 0%, rgba(31, 121, 255, 0) 100%); padding: 26px 0 31px; + .icon { width: 86px; height: 86px; diff --git a/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue b/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue index 526e08dd2..99b09ecd4 100644 --- a/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue +++ b/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue @@ -10,7 +10,7 @@ 12345热线
投诉人数 -
7
+
{{event12345Num?event12345Num:0}}
@@ -23,7 +23,7 @@ 省满意度调查
不满意人数 -
7
+
{{provinceSatisfactionNum?provinceSatisfactionNum:0}}
@@ -36,7 +36,7 @@ 社区满意度自评
不满意人数 -
7
+
{{selfInspectNum?selfInspectNum:0}}
@@ -46,28 +46,28 @@ 本月回访
次数 -
112
+
{{followMonthNum?followMonthNum:0}}
本月回访消除
风险人员数
-
112
+
{{followMonthNotRiskyNum?followMonthNotRiskyNum:0}}
累计回访
次数
-
112
+
{{followSumNum?followSumNum:0}}
累计回访消除
风险人员数
-
112
+
{{followNotRiskyNum?followNotRiskyNum:0}}
@@ -76,7 +76,48 @@ diff --git a/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue b/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue index b7c81fb1f..9cb614f1d 100644 --- a/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue +++ b/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue @@ -28,25 +28,82 @@ export default { }], } }, + watch: { + "$store.state.chooseArea.chooseName"(val) { + if (val.orgId) { + this.getData(); + } + } + }, mounted() { - this.initCharts() + if (this.$store.state.chooseArea.chooseName.orgId) { + this.getData(); + } }, methods: { - trendTypeChange(data) { - + trendTypeChange(val) { + if (val !== this.trendType) { + this.trendType = val + this.getData() + } }, - initCharts() { + getData() { + let params = { + level: this.$store.state.chooseArea.chooseName.level, + orgId: this.$store.state.chooseArea.chooseName.orgId, + } + let url = '/governance/satisfactionOverview/notSatisfactionTrend' + if (this.trendType === 2) { + url = '/governance/satisfactionOverview/selfInspectMonthTrend' + } + params = this.$paramsFormat(params) + this.$http.get(url + '?' + params).then(({data: {data}}) => { + this.initCharts(data) + }) + }, + initCharts({monthTimes, series}) { let div = document.getElementById('selfTrendChart'); this.myChart = echarts.init(div); - let xData = ['2022-10', '2022-11', '2022-12', '2023-01', '2023-02', '2023-03', '2023-04', '2023-05', '2023-06', '2023-07', '2023-08', '2023-09']; - let tq1 = [12, 20, 30, 60, 49, 18, 90, 48, 39, 30, 27, 40, 48, 39, 27, 49]; - let tq2 = [10, 50, 50, 27, 49, 58, 80, 80, 19, 60, 30, 30, 49, 18, 90, 20]; - let tq3 = [300, 90, 48, 39, 30, 27, 49, 18, 90, 39, 27, 49, 30, 100, 49, 100]; - const max = Math.max(...tq1, ...tq2, ...tq3) + let xData = monthTimes; + let color = ['#F95619', '#F9E066', '#25F0F6'] + let seriesArray = series.map((item, index) => { + return { + name: item.name, + type: 'line', + showAllSymbol: true, + symbol: 'circle', + symbolSize: 6, + lineStyle: { + normal: { + color: color[index], + }, + }, + label: { + show: false, + position: 'top', + textStyle: { + color: color[index], + }, + }, + itemStyle: { + color: color[index], + borderColor: color[index], + borderWidth: 2, + }, + data: item.data, + } + }) + console.log(seriesArray) + let num = [] + series.forEach(item => { + num.push(...item.data) + }) + const max = Math.max(...num) let barArray = new Array(xData.length).fill((parseInt(max / 100) + 1) * 100) var option = { + title: { show: false, text: '', @@ -58,10 +115,28 @@ export default { fontSize: 18, }, }, - + tooltip: { + trigger: 'axis', + backgroundColor: 'rgba(13,33,71,0.5)', + borderColor: 'rgba(143,174,252,0.6)', + padding: 8, + textStyle: { + color: '#fff', + }, + formatter: function (params) { + console.log(params) + var res = '

' + params[0].name + '

' + for (var i = 0; i < params.length; i++) { + if (params[i].seriesName != "") { + res += '

' + params[i].seriesName + ':' + params[i].data + '

' + } + } + return res; + }, + }, legend: { // icon: 'circle', - data: ['12345投诉事件数', '省调查不满意数', '社区自查不满意数'], + data: series.map(item => item.name), itemGap: 20, itemWidth: 16, itemHeight: 6, @@ -142,84 +217,9 @@ export default { ], series: [ + ...seriesArray, { - name: '12345投诉事件数', - type: 'line', - showAllSymbol: true, - symbol: 'circle', - symbolSize: 6, - lineStyle: { - normal: { - color: '#F95619', - }, - }, - label: { - show: false, - position: 'top', - textStyle: { - color: '#F95619', - }, - }, - itemStyle: { - color: '#F95619', - borderColor: '#F95619', - borderWidth: 2, - }, - data: tq1, - }, - { - name: '省调查不满意数', - type: 'line', - showAllSymbol: true, - symbol: 'circle', - symbolSize: 6, - lineStyle: { - normal: { - color: '#F9E066', - }, - }, - label: { - show: false, - position: 'top', - textStyle: { - color: '#F9E066', - }, - }, - itemStyle: { - color: '#F9E066', - borderColor: '#F9E066', - borderWidth: 2, - }, - data: tq2, //data.values - }, - { - name: '社区自查不满意数', - type: 'line', - yIndex: 0, - showAllSymbol: true, - symbol: 'circle', - symbolSize: 6, - lineStyle: { - normal: { - color: '#25F0F6', - }, - }, - label: { - show: false, - position: 'top', - textStyle: { - color: '#25F0F6', - }, - }, - itemStyle: { - color: '#25F0F6', - borderColor: '#25F0F6', - borderWidth: 2, - }, - data: tq3, //data.values - }, - { - // name: '占位背景', + name: '', type: 'bar', itemStyle: { normal: { @@ -235,7 +235,7 @@ export default { }, ], }; - this.myChart.setOption(option); + this.myChart.setOption(option, true); window.addEventListener("resize", () => this.myChart.resize()); }, } diff --git a/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue b/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue index 145a5f068..57d90f0d6 100644 --- a/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue +++ b/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue @@ -1,15 +1,19 @@ @@ -51,8 +84,9 @@ export default { text-align: center; flex: 1; border: 1px solid rgba(28, 67, 111, 0.22); - background: linear-gradient(0deg, rgba(31, 121, 255, 0.22) 0%, rgba(31,121,255,0) 100%); + background: linear-gradient(0deg, rgba(31, 121, 255, 0.22) 0%, rgba(31, 121, 255, 0) 100%); padding: 26px 0 31px; + .icon { width: 86px; height: 86px; diff --git a/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue b/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue index 526e08dd2..99b09ecd4 100644 --- a/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue +++ b/src/views/dataBoard/satisfactionEval/modules/RiskStatistics/index.vue @@ -10,7 +10,7 @@ 12345热线
投诉人数 -
7
+
{{event12345Num?event12345Num:0}}
@@ -23,7 +23,7 @@ 省满意度调查
不满意人数 -
7
+
{{provinceSatisfactionNum?provinceSatisfactionNum:0}}
@@ -36,7 +36,7 @@ 社区满意度自评
不满意人数 -
7
+
{{selfInspectNum?selfInspectNum:0}}
@@ -46,28 +46,28 @@ 本月回访
次数 -
112
+
{{followMonthNum?followMonthNum:0}}
本月回访消除
风险人员数
-
112
+
{{followMonthNotRiskyNum?followMonthNotRiskyNum:0}}
累计回访
次数
-
112
+
{{followSumNum?followSumNum:0}}
累计回访消除
风险人员数
-
112
+
{{followNotRiskyNum?followNotRiskyNum:0}}
@@ -76,7 +76,48 @@ diff --git a/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue b/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue index b7c81fb1f..9cb614f1d 100644 --- a/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue +++ b/src/views/dataBoard/satisfactionEval/modules/SelfTrend/index.vue @@ -28,25 +28,82 @@ export default { }], } }, + watch: { + "$store.state.chooseArea.chooseName"(val) { + if (val.orgId) { + this.getData(); + } + } + }, mounted() { - this.initCharts() + if (this.$store.state.chooseArea.chooseName.orgId) { + this.getData(); + } }, methods: { - trendTypeChange(data) { - + trendTypeChange(val) { + if (val !== this.trendType) { + this.trendType = val + this.getData() + } }, - initCharts() { + getData() { + let params = { + level: this.$store.state.chooseArea.chooseName.level, + orgId: this.$store.state.chooseArea.chooseName.orgId, + } + let url = '/governance/satisfactionOverview/notSatisfactionTrend' + if (this.trendType === 2) { + url = '/governance/satisfactionOverview/selfInspectMonthTrend' + } + params = this.$paramsFormat(params) + this.$http.get(url + '?' + params).then(({data: {data}}) => { + this.initCharts(data) + }) + }, + initCharts({monthTimes, series}) { let div = document.getElementById('selfTrendChart'); this.myChart = echarts.init(div); - let xData = ['2022-10', '2022-11', '2022-12', '2023-01', '2023-02', '2023-03', '2023-04', '2023-05', '2023-06', '2023-07', '2023-08', '2023-09']; - let tq1 = [12, 20, 30, 60, 49, 18, 90, 48, 39, 30, 27, 40, 48, 39, 27, 49]; - let tq2 = [10, 50, 50, 27, 49, 58, 80, 80, 19, 60, 30, 30, 49, 18, 90, 20]; - let tq3 = [300, 90, 48, 39, 30, 27, 49, 18, 90, 39, 27, 49, 30, 100, 49, 100]; - const max = Math.max(...tq1, ...tq2, ...tq3) + let xData = monthTimes; + let color = ['#F95619', '#F9E066', '#25F0F6'] + let seriesArray = series.map((item, index) => { + return { + name: item.name, + type: 'line', + showAllSymbol: true, + symbol: 'circle', + symbolSize: 6, + lineStyle: { + normal: { + color: color[index], + }, + }, + label: { + show: false, + position: 'top', + textStyle: { + color: color[index], + }, + }, + itemStyle: { + color: color[index], + borderColor: color[index], + borderWidth: 2, + }, + data: item.data, + } + }) + console.log(seriesArray) + let num = [] + series.forEach(item => { + num.push(...item.data) + }) + const max = Math.max(...num) let barArray = new Array(xData.length).fill((parseInt(max / 100) + 1) * 100) var option = { + title: { show: false, text: '', @@ -58,10 +115,28 @@ export default { fontSize: 18, }, }, - + tooltip: { + trigger: 'axis', + backgroundColor: 'rgba(13,33,71,0.5)', + borderColor: 'rgba(143,174,252,0.6)', + padding: 8, + textStyle: { + color: '#fff', + }, + formatter: function (params) { + console.log(params) + var res = '

' + params[0].name + '

' + for (var i = 0; i < params.length; i++) { + if (params[i].seriesName != "") { + res += '

' + params[i].seriesName + ':' + params[i].data + '

' + } + } + return res; + }, + }, legend: { // icon: 'circle', - data: ['12345投诉事件数', '省调查不满意数', '社区自查不满意数'], + data: series.map(item => item.name), itemGap: 20, itemWidth: 16, itemHeight: 6, @@ -142,84 +217,9 @@ export default { ], series: [ + ...seriesArray, { - name: '12345投诉事件数', - type: 'line', - showAllSymbol: true, - symbol: 'circle', - symbolSize: 6, - lineStyle: { - normal: { - color: '#F95619', - }, - }, - label: { - show: false, - position: 'top', - textStyle: { - color: '#F95619', - }, - }, - itemStyle: { - color: '#F95619', - borderColor: '#F95619', - borderWidth: 2, - }, - data: tq1, - }, - { - name: '省调查不满意数', - type: 'line', - showAllSymbol: true, - symbol: 'circle', - symbolSize: 6, - lineStyle: { - normal: { - color: '#F9E066', - }, - }, - label: { - show: false, - position: 'top', - textStyle: { - color: '#F9E066', - }, - }, - itemStyle: { - color: '#F9E066', - borderColor: '#F9E066', - borderWidth: 2, - }, - data: tq2, //data.values - }, - { - name: '社区自查不满意数', - type: 'line', - yIndex: 0, - showAllSymbol: true, - symbol: 'circle', - symbolSize: 6, - lineStyle: { - normal: { - color: '#25F0F6', - }, - }, - label: { - show: false, - position: 'top', - textStyle: { - color: '#25F0F6', - }, - }, - itemStyle: { - color: '#25F0F6', - borderColor: '#25F0F6', - borderWidth: 2, - }, - data: tq3, //data.values - }, - { - // name: '占位背景', + name: '', type: 'bar', itemStyle: { normal: { @@ -235,7 +235,7 @@ export default { }, ], }; - this.myChart.setOption(option); + this.myChart.setOption(option, true); window.addEventListener("resize", () => this.myChart.resize()); }, } diff --git a/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue b/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue index 145a5f068..57d90f0d6 100644 --- a/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue +++ b/src/views/dataBoard/satisfactionEval/modules/TypesOfDissatisfaction/index.vue @@ -1,15 +1,19 @@