From 4cef35cb8984478e4ba3cde5fc4bddffac492c2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=98=E7=AB=8B=E6=A0=87?= <2658037827@qq.com> Date: Mon, 25 Sep 2023 18:34:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E6=8E=A5=E6=95=B0=E6=8D=AE=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/Head/index.wxml | 12 +- components/Head/index.wxss | 4 + components/Tabs/index.js | 2 +- .../modules/CrowdPortrait/CrowdPortrait.js | 47 ++- .../modules/CrowdPortrait/CrowdPortrait.wxml | 34 +- .../EventPrediction/EventPrediction.js | 22 +- .../EventPrediction/EventPrediction.wxml | 12 +- .../HotlineComplaints/HotlineComplaints.js | 189 +++++++---- .../modules/SmyddcSqmydzc/SmyddcSqmydzc.js | 305 +++++++++++------- pages/statistics/modules/Trend/Trend.js | 278 +++++++--------- pages/statistics/statistics.wxml | 8 +- .../pages/crowdPortrait/crowdPortrait.js | 44 ++- .../pages/crowdPortrait/crowdPortrait.wxml | 9 +- .../pages/dissatisfied/detial/detail.js | 21 +- .../pages/dissatisfied/detial/detail.wxml | 24 +- .../pages/dissatisfied/list/list.js | 138 +++++++- .../pages/dissatisfied/list/list.wxml | 117 +++---- .../pages/dissatisfied/list/list.wxss | 16 +- subpages/statistics/pages/qzbmy/qzbmy.js | 67 +++- subpages/statistics/pages/qzbmy/qzbmy.wxml | 58 ++-- .../residentPortrait/residentPortrait.js | 117 +++---- .../residentPortrait/residentPortrait.wxml | 65 ++-- .../residentPortrait/residentPortrait.wxss | 3 +- subpages/statistics/pages/sjwjj/sjwjj.js | 38 ++- subpages/statistics/pages/sjwjj/sjwjj.wxml | 16 +- subpages/statistics/pages/xqwmz/xqwmz.js | 40 ++- subpages/statistics/pages/xqwmz/xqwmz.wxml | 17 +- subpages/statistics/pages/yxwxfw/yxwxfw.js | 94 +++--- subpages/statistics/pages/yxwxfw/yxwxfw.wxml | 15 +- utils/config.js | 3 +- utils/statisticsApi.js | 122 +++++++ 31 files changed, 1231 insertions(+), 706 deletions(-) create mode 100644 utils/statisticsApi.js diff --git a/components/Head/index.wxml b/components/Head/index.wxml index 132e168..bd86e16 100644 --- a/components/Head/index.wxml +++ b/components/Head/index.wxml @@ -2,7 +2,7 @@ - + @@ -12,12 +12,10 @@ - + + + {{agencyName}} + \ No newline at end of file diff --git a/components/Head/index.wxss b/components/Head/index.wxss index 1d403ca..4187f9d 100644 --- a/components/Head/index.wxss +++ b/components/Head/index.wxss @@ -57,3 +57,7 @@ left: 0; z-index: -1; } +.index-nav { + display: flex; + align-items: center; +} \ No newline at end of file diff --git a/components/Tabs/index.js b/components/Tabs/index.js index e1ad35e..e1fd995 100644 --- a/components/Tabs/index.js +++ b/components/Tabs/index.js @@ -13,7 +13,7 @@ Component({ this.setData({ cur: index }) - this.triggerEvent("tabChange",{index}) + this.triggerEvent("tabChange",index) } } }); diff --git a/pages/statistics/modules/CrowdPortrait/CrowdPortrait.js b/pages/statistics/modules/CrowdPortrait/CrowdPortrait.js index f619996..cb52c3f 100644 --- a/pages/statistics/modules/CrowdPortrait/CrowdPortrait.js +++ b/pages/statistics/modules/CrowdPortrait/CrowdPortrait.js @@ -1,24 +1,59 @@ +import {satisfactionCrowdPortrait} from "../../../../utils/statisticsApi"; + Component({ properties: {}, data: { tabList: [{ label: "按省及社区满意度\n调查结果", - value: 1 + value: 'provinceAndSelf' }, { label: '按12345热线\n投诉结果', - value: 2 + value: '12345' }], - tabValue: '' + tabValue: 'provinceAndSelf', + gender: '', + marriageName: '', + ageClassification: '', + cultureLevel: '', + gridName: '', + monthIncomeLevel: '', + residentTagName: '', + matchPeopleNum: '', + searchParams: '', + }, + lifetimes: { + ready() { + this.getData() + } }, methods: { - tabChange(index) { + tabChange({detail}) { this.setData({ - tabValue: this.tabList[index].value + tabValue: this.data.tabList[detail].value }) + this.getData() }, gotopage() { wx.navigateTo({ - url: '/subpages/statistics/pages/crowdPortrait/crowdPortrait' + url: '/subpages/statistics/pages/crowdPortrait/crowdPortrait?data='+this.data.searchParams + }) + }, + getData() { + let params = { + queryType: this.data.tabValue + } + satisfactionCrowdPortrait(params).then(({data}) => { + this.setData({ + gender: data.gender, + marriageName: data.marriageName, + ageClassification: data.ageClassification, + cultureLevel: data.cultureLevel, + gridName: data.gridName, + monthIncomeLevel: data.monthIncomeLevel, + residentTagName: data.residentTagName, + matchPeopleNum: data.matchPeopleNum, + searchParams: JSON.stringify({...data, ...params}) + }) }) } } diff --git a/pages/statistics/modules/CrowdPortrait/CrowdPortrait.wxml b/pages/statistics/modules/CrowdPortrait/CrowdPortrait.wxml index 584f714..0699adc 100644 --- a/pages/statistics/modules/CrowdPortrait/CrowdPortrait.wxml +++ b/pages/statistics/modules/CrowdPortrait/CrowdPortrait.wxml @@ -3,42 +3,42 @@ 不满意人员画像 - + - - 第一网格 + + {{gridName}} - - 30-40岁 + + {{ageClassification}} - - 流动人员 + + {{residentTagName}} - - 月收入5000以下 + + {{monthIncomeLevel}} - - 专科 + + {{cultureLevel}} - - 已婚 + + {{marriageName}} - - + + {{ gender === '1' ? '男' : gender === '2' ? '女' : gender === '0' ? '未知' : '' }} - 按画像匹配到同类:570人 + 按画像匹配到同类:{{ matchPeopleNum ? matchPeopleNum : 0 }}人 diff --git a/pages/statistics/modules/EventPrediction/EventPrediction.js b/pages/statistics/modules/EventPrediction/EventPrediction.js index 0646804..2fbae1b 100644 --- a/pages/statistics/modules/EventPrediction/EventPrediction.js +++ b/pages/statistics/modules/EventPrediction/EventPrediction.js @@ -1,10 +1,30 @@ +import {potentialSatisfactionGroup} from "../../../../utils/statisticsApi"; + Component({ properties: {}, - data: {}, + data: { + unSolvedNum: 0, + unFinishNum: 0, + noServiceNum: 0, + }, + lifetimes: { + ready() { + this.getData() + } + }, methods: { gotopage({currentTarget: {dataset}}) { const {url} = dataset; wx.navigateTo({url}) + }, + getData() { + potentialSatisfactionGroup().then(({data}) => { + this.setData({ + unSolvedNum: data.unSolvedNum, + unFinishNum: data.unFinishNum, + noServiceNum: data.noServiceNum, + }) + }) } } }); diff --git a/pages/statistics/modules/EventPrediction/EventPrediction.wxml b/pages/statistics/modules/EventPrediction/EventPrediction.wxml index 42b65b2..b625f30 100644 --- a/pages/statistics/modules/EventPrediction/EventPrediction.wxml +++ b/pages/statistics/modules/EventPrediction/EventPrediction.wxml @@ -1,23 +1,23 @@ - + 事件未解决 的人数 - 76 + {{unSolvedNum}} - + 需求未满足 的人数 - 24 + {{unFinishNum}} - + 应享未享服务 的人数 - 13 + {{noServiceNum}} \ No newline at end of file diff --git a/pages/statistics/modules/HotlineComplaints/HotlineComplaints.js b/pages/statistics/modules/HotlineComplaints/HotlineComplaints.js index 7f6353e..7ae1958 100644 --- a/pages/statistics/modules/HotlineComplaints/HotlineComplaints.js +++ b/pages/statistics/modules/HotlineComplaints/HotlineComplaints.js @@ -1,77 +1,41 @@ import * as echarts from '../../../../ec-canvas/echarts'; +import {event12345Group} from "../../../../utils/statisticsApi"; + +var chart; + function initChart(canvas, width, height, dpr) { - const chart = echarts.init(canvas, null, { + chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr // 像素比 }); canvas.setChart(chart); - let data = [ - {value: 120, name: '市容环境'}, - {value: 150, name: '停车管理'}, - {value: 210, name: '物业服务'}, - {value: 177, name: '城市低保'}, - {value: 194, name: '违章建房'}, - ]; - let color = ["#4F94FF","#A182FB","#27D1A7","#FCBF06","#FF7108"] - var option = { - color, - tooltip: { - show: true, - textStyle: { - color: '#fff', - fontSize: 14 - }, - backgroundColor: "#04229a", - // extraCssText: "box-shadow: 2px 2px 4px 0px rgba(0,0,0,0.3);", - formatter(params) { - // console.log(params) - if (params.name === '') { - return ''; - } - return `${params.name} : ${params.percent}%`; - }, - }, - series: [ - { - name: '', - type: 'pie', - radius: ['40%', '70%'], - center: ['50%', '50%'], // 修改为居中 - avoidLabelOverlap: true, - label: { - color: '#333333', - alignTo: 'labelLine', - formatter: '{num|{c}}\n{name|{b}}', - minMargin: 5, - edgeDistance: 10, - lineHeight: 15, - rich: { - num: { - fontSize: 17, - color: '#333333' - }, - zb: { - fontSize: 14, - color: '#333333' - } - } - }, - labelLine: { - length: 15, - length2: 0, - maxSurfaceAngle: 80 - }, - data: data - } - ] - }; - chart.setOption(option); + return chart; } + +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + return [year, month, day].map(formatNumber).join('-') +} +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} Component({ - properties: {}, + properties: { + typeCondition: { + type: Number, + value: 0, + observer(val) { + console.log(val, 11) + this.getData() + } + } + }, data: { ec: { onInit: initChart @@ -79,17 +43,114 @@ Component({ tabList: [{ label: "问题突出类别", value: 1 - },{ + }, { label: '行业领域分析', value: 2 }], tabValue: '' }, + lifetimes: { + ready() { + this.getData() + } + }, methods: { tabChange(index) { this.setData({ tabValue: this.tabList[index].value }) + this.getData() + }, + getData() { + let params = { + startTime: '', + endTime: '' + } + let now = new Date(); + if (this.data.typeCondition === 0) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth(), 1)) + } + if (this.data.typeCondition === 1) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 1)); + } + if (this.data.typeCondition === 2) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 2)); + } + if (this.data.typeCondition === 3) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 5)); + } + if (this.data.typeCondition === 4) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 11)); + } + + if (this.data.typeCondition === 1) { + params.endTime = formatTime(new Date(now.getFullYear(), now.getMonth(), 0, 23, 59, 59)) + } else { + params.endTime = formatTime(new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59)) + } + event12345Group(params).then(({data}) => { + data = data.map(item => { + return { + name: item.name, + value: item.blueNum + } + }); + let color = ["#4F94FF", "#A182FB", "#27D1A7", "#FCBF06", "#FF7108"] + + var option = { + color, + tooltip: { + show: true, + textStyle: { + color: '#fff', + fontSize: 14 + }, + backgroundColor: "#04229a", + formatter(params) { + // console.log(params) + if (params.name === '') { + return ''; + } + return `${params.name} : ${params.percent}%`; + }, + }, + series: [ + { + name: '', + type: 'pie', + radius: ['40%', '70%'], + center: ['50%', '50%'], // 修改为居中 + avoidLabelOverlap: true, + label: { + color: '#333333', + alignTo: 'labelLine', + formatter: '{num|{c}}\n{name|{b}}', + minMargin: 5, + edgeDistance: 10, + lineHeight: 15, + rich: { + num: { + fontSize: 17, + color: '#333333' + }, + zb: { + fontSize: 14, + color: '#333333' + } + } + }, + labelLine: { + length: 15, + length2: 0, + maxSurfaceAngle: 80 + }, + data: data + } + ] + }; + chart.setOption(option); + }) + } } }); diff --git a/pages/statistics/modules/SmyddcSqmydzc/SmyddcSqmydzc.js b/pages/statistics/modules/SmyddcSqmydzc/SmyddcSqmydzc.js index 7715b7c..cf52354 100644 --- a/pages/statistics/modules/SmyddcSqmydzc/SmyddcSqmydzc.js +++ b/pages/statistics/modules/SmyddcSqmydzc/SmyddcSqmydzc.js @@ -1,141 +1,202 @@ import * as echarts from '../../../../ec-canvas/echarts'; +import {satisfactionGroup} from "../../../../utils/statisticsApi"; + +var chart; function initChart(canvas, width, height, dpr) { - const chart = echarts.init(canvas, null, { + chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr // 像素比 }); canvas.setChart(chart); - var dataname = ['老有所养', '社会治安', '生态环境', '体育设施', '社会救助', '文化设施', '基础教育', '病有所医'] - var datamax = [20, 20, 20, 20, 20, 20, 20, 20] - var datavaule = [10, 16, 18, 15, 12, 18, 18, 18] - var datavaule2 = [12, 17, 20, 16, 13, 19, 19, 19] - var indicator = [] - for (var i = 0; i < dataname.length; i++) { - indicator.push({ - name: dataname[i], - max: datamax[i], - }) - } - var option = { - tooltip: { - show: false, - trigger: "item", - }, - legend: { - show: true, - textStyle: { - color: '#999999', - rich: { - name: { - fontSize: 14, - lineHeight: 19, - padding: [20, 0, 0, 0] - }, - } - }, - itemWidth: 6, - itemHeight: 6, - y: 'bottom', - x: 'center', - formatter: name => { - return `{name|${name}}` - }, - data: ['省满意度调查\n各项不满意人数', '社区满意度自查\n各项不满意人数'], - }, - radar: { - center: ["50%", "40%"], - radius: "50%", - startAngle: 90, - splitNumber: 5, - splitArea: { - areaStyle: { - color: 'transparent' - } - }, - axisLabel: { - show: false, - }, - axisLine: { - show: true, - lineStyle: { - color: "rgba(226,226,226,0.28)" - } - }, - splitLine: { - show: true, - lineStyle: { - color: "rgba(226,226,226,0.61)" - } - }, - name: { - textStyle: { - color: '#333333', - fontSize: 14, - borderRadius: 3, - } - }, - indicator: indicator - }, - - series: [{ - name: "省满意度调查\n各项不满意人数", - type: "radar", - symbol: "circle", - symbolSize: 0, - areaStyle: { - normal: { - color: 'rgba(58,128,231,0.36)', - } - }, - itemStyle: { - color: '#3A80E7', - borderColor: '#3AB7FF', - borderWidth: 1, - }, - lineStyle: { - normal: { - color: "#3AB7FF", - width: 2 - } - }, - data: [datavaule] - }, { - name: "社区满意度自查\n各项不满意人数", - type: "radar", - symbol: "circle", - symbolSize: 0, - areaStyle: { - normal: { - color: 'rgba(170, 216, 255, 0)', - } - }, - itemStyle: { - color: '#EB8E16', - borderColor: '#EF9700', - borderWidth: 1, - }, - lineStyle: { - normal: { - color: "#EF9700", - width: 2 - } - }, - data: [datavaule2] - }] - }; - chart.setOption(option); return chart; } - +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + return [year, month, day].map(formatNumber).join('-') +} +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} Component({ - properties: {}, + properties: { + typeCondition: { + type: Number, + value: 0, + observer (val) { + console.log(val,11) + this.getData() + } + } + }, data: { ec: { onInit: initChart } }, + lifetimes: { + ready() { + this.getData() + } + }, methods: { + getData() { + let params = { + startTime: '', + endTime: '' + } + let now = new Date(); + if (this.data.typeCondition === 0) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth(), 1)) + } + if (this.data.typeCondition === 1) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 1)); + } + if (this.data.typeCondition === 2) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 2)); + } + if (this.data.typeCondition === 3) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 5)); + } + if (this.data.typeCondition === 4) { + params.startTime = formatTime(new Date(now.getFullYear(), now.getMonth() - 11)); + } + + if (this.data.typeCondition === 1) { + params.endTime = formatTime(new Date(now.getFullYear(), now.getMonth(), 0, 23, 59, 59)) + } else { + params.endTime = formatTime(new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59)) + } + console.log(params) + + satisfactionGroup(params).then(({data}) => { + var dataname = data.map(item => item.name) + var datavaule = data.map(item => item.blueNum ? item.blueNum : 0) + var datavaule2 = data.map(item => item.yellowNum ? item.yellowNum : 0) + var indicator = [] + let max = Math.max(...datavaule, ...datavaule2) + console.log(max) + var datamax = new Array(datavaule.length).fill(max) + for (var i = 0; i < dataname.length; i++) { + indicator.push({ + name: dataname[i], + max: datamax[i], + }) + } + let legendName = ['省满意度调查各项\n不满意人数', '社区满意度自查各项\n不满意人数'] + let series = [{ + name: "省满意度调查各项\n不满意人数", + type: "radar", + symbol: "circle", + symbolSize: 0, + areaStyle: { + normal: { + color: 'rgba(58,128,231,0.36)', + } + }, + itemStyle: { + color: '#3A80E7', + borderColor: '#3AB7FF', + borderWidth: 1, + }, + lineStyle: { + normal: { + color: "#3AB7FF", + width: 2 + } + }, + data: [datavaule] + }, { + name: "社区满意度自查各项\n不满意人数", + type: "radar", + symbol: "circle", + symbolSize: 0, + areaStyle: { + normal: { + color: 'rgba(170, 216, 255, 0)', + } + }, + itemStyle: { + color: '#EB8E16', + borderColor: '#EF9700', + borderWidth: 1, + }, + lineStyle: { + normal: { + color: "#EF9700", + width: 2 + } + }, + data: [datavaule2] + }] + var option = { + tooltip: { + show: false, + trigger: "item", + }, + legend: { + show: true, + textStyle: { + color: '#999999', + rich: { + name: { + fontSize: 14, + lineHeight: 19, + padding: [20, 0, 0, 0] + }, + } + }, + itemWidth: 6, + itemHeight: 6, + y: 'bottom', + x: 'center', + formatter: name => { + return `{name|${name}}` + }, + data: legendName, + }, + radar: { + center: ["50%", "40%"], + radius: "50%", + startAngle: 90, + splitNumber: 5, + splitArea: { + areaStyle: { + color: 'transparent' + } + }, + axisLabel: { + show: false, + }, + axisLine: { + show: true, + lineStyle: { + color: "rgba(226,226,226,0.28)" + } + }, + splitLine: { + show: true, + lineStyle: { + color: "rgba(226,226,226,0.61)" + } + }, + name: { + textStyle: { + color: '#333333', + fontSize: 14, + borderRadius: 3, + } + }, + indicator: indicator + }, + series + }; + chart.setOption(option,true); + }) + } } }); diff --git a/pages/statistics/modules/Trend/Trend.js b/pages/statistics/modules/Trend/Trend.js index 8ac27a9..d43ca5f 100644 --- a/pages/statistics/modules/Trend/Trend.js +++ b/pages/statistics/modules/Trend/Trend.js @@ -1,166 +1,16 @@ import * as echarts from '../../../../ec-canvas/echarts'; +import {notSatisfactionTrend} from "../../../../utils/statisticsApi"; + +var chart = null; function initChart(canvas, width, height, dpr) { - const chart = echarts.init(canvas, null, { + chart = echarts.init(canvas, null, { width: width, height: height, devicePixelRatio: dpr // 像素比 }); canvas.setChart(chart); - let xData = ['10月', '11月', '12月', '1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月']; - 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]; - - var option = { - title: { - show: false, - text: '', - x: 'center', - top: '15px', - textStyle: { - color: '#333333', - fontWeight: 500, - fontSize: 18, - }, - }, - - legend: { - // icon: 'circle', - data: ['12345投诉事件数', '省调查不满意数', '社区自查不满意数'], - itemGap: 12, - itemWidth: 12, - itemHeight: 5, - x: 'left', - top: '0%', - textStyle: { - color: '#999999', - fontSize: 10, - // padding:[0, 10, 0, 10], - } - }, - grid: { - top: '18%', - left: '2%', - right: '4%', - bottom: '8%', - containLabel: true - }, - xAxis: [ - { - type: 'category', - axisTick: { - show: false, - }, - splitLine: { - show: false, - }, - axisLine: { - lineStyle: { - color: '#323c41' - } - }, - axisLabel: { - interval: 0, - align: 'center', - textStyle: { - fontSize: 11, - color: '#C1C1C1' - } - }, - boundaryGap: true, - data: xData, - }, - ], - yAxis: [ - { - type: 'value', - splitLine: { - show: false - }, - axisLabel: { - show: true, - color: '#999999', - textStyle: { - fontSize: 11 - } - }, - axisTick: { - show: false - } - } - - ], - series: [ - { - name: '12345投诉事件数', - type: 'line', - showAllSymbol: true, - symbol: 'circle', - symbolSize: 0, - lineStyle: { - normal: { - color: '#3A80E7', - }, - }, - label: { - show: false, - }, - itemStyle: { - show: false, - color: '#FFF', - borderColor: '#3A80E7', - borderWidth: 1, - }, - data: tq1, - }, - { - name: '省调查不满意数', - type: 'line', - showAllSymbol: true, - symbol: 'circle', - symbolSize: 0, - lineStyle: { - normal: { - color: '#EB8E16', - }, - }, - label: { - show: false, - }, - itemStyle: { - color: '#fff', - borderColor: '#EB8E16', - borderWidth: 1, - }, - data: tq2, //data.values - }, - { - name: '社区自查不满意数', - type: 'line', - yIndex: 0, - showAllSymbol: true, - symbol: 'circle', - symbolSize: 0, - lineStyle: { - normal: { - color: '#10B2A5', - }, - }, - label: { - show: false, - }, - itemStyle: { - color: '#fff', - borderColor: '#10B2A5', - borderWidth: 1, - }, - data: tq3, //data.values - } - ], - }; - chart.setOption(option); return chart; } @@ -171,6 +21,126 @@ Component({ onInit: initChart } }, + lifetimes: { + ready() { + this.getData() + } + }, methods: { + getData() { + notSatisfactionTrend().then(({data}) => { + let xData = data.monthTimes.map(item => (item.split('-')[1] - 0) + '月'); + let series = [] + let color = ['#3A80E7', '#EB8E16', '#10B2A5',] + data.series.forEach((item,index) => { + series.push({ + name:item.name, + type: 'line', + showAllSymbol: true, + symbol: 'circle', + symbolSize: 0, + lineStyle: { + normal: { + color: color[index], + }, + }, + label: { + show: false, + }, + itemStyle: { + show: false, + color: '#FFF', + borderColor: color[index], + borderWidth: 1, + }, + data: item.data, + },) + }) + var option = { + title: { + show: false, + text: '', + x: 'center', + top: '15px', + textStyle: { + color: '#333333', + fontWeight: 500, + fontSize: 18, + }, + }, + + legend: { + // icon: 'circle', + data: data.series.map(item => item.name), + itemGap: 12, + itemWidth: 12, + itemHeight: 5, + x: 'left', + top: '0%', + textStyle: { + color: '#999999', + fontSize: 10, + // padding:[0, 10, 0, 10], + } + }, + grid: { + top: '18%', + left: '2%', + right: '4%', + bottom: '8%', + containLabel: true + }, + xAxis: [ + { + type: 'category', + axisTick: { + show: false, + }, + splitLine: { + show: false, + }, + axisLine: { + lineStyle: { + color: '#323c41' + } + }, + axisLabel: { + interval: 0, + align: 'center', + textStyle: { + fontSize: 11, + color: '#C1C1C1' + } + }, + boundaryGap: true, + data: xData, + }, + ], + + yAxis: [ + { + type: 'value', + splitLine: { + show: false + }, + axisLabel: { + show: true, + color: '#999999', + textStyle: { + fontSize: 11 + } + }, + axisTick: { + show: false + } + } + + ], + series, + }; + chart.setOption(option); + + }) + } } }); diff --git a/pages/statistics/statistics.wxml b/pages/statistics/statistics.wxml index 474d941..9bb23f1 100644 --- a/pages/statistics/statistics.wxml +++ b/pages/statistics/statistics.wxml @@ -29,14 +29,14 @@ 省满意度调查&社区满意度自查 - + 12345热线投诉 - + @@ -44,9 +44,9 @@ 潜在不满意人员及事项预测 - + diff --git a/subpages/statistics/pages/crowdPortrait/crowdPortrait.js b/subpages/statistics/pages/crowdPortrait/crowdPortrait.js index bd34f9b..17dec2b 100644 --- a/subpages/statistics/pages/crowdPortrait/crowdPortrait.js +++ b/subpages/statistics/pages/crowdPortrait/crowdPortrait.js @@ -1,13 +1,49 @@ +import {satisfactionCrowdList} from "../../../../utils/statisticsApi"; + Page({ data: { - + list: [], + total: 0, + params: {}, + pageNo: 1, + pageSize: 10 }, onLoad(options) { - + let params = {} + let data = JSON.parse(decodeURIComponent(options.data)) + for (let key in data) { + if (data[key]) { + params[key] = data[key] + } + } + this.setData({ + params + }) + this.getList() }, - gotopage() { + gotopage(e) { wx.navigateTo({ - url: "/subpages/statistics/pages/residentPortrait/residentPortrait" + url: "/subpages/statistics/pages/residentPortrait/residentPortrait?id="+e.currentTarget.dataset.id }) + }, + getList() { + satisfactionCrowdList({ + ...this.data.params, + pageNo: this.data.pageNo, + pageSize: this.data.pageSize + }).then(({data}) => { + this.setData({ + list: this.data.list.concat(data.list), + total: data.total + }) + }) + }, + onReachBottom() { + if (this.data.list.length < this.data.total) { + this.setData({ + pageNo: this.data.pageNo+1 + }) + this.getList() + } } }) \ No newline at end of file diff --git a/subpages/statistics/pages/crowdPortrait/crowdPortrait.wxml b/subpages/statistics/pages/crowdPortrait/crowdPortrait.wxml index 222d763..f1a1149 100644 --- a/subpages/statistics/pages/crowdPortrait/crowdPortrait.wxml +++ b/subpages/statistics/pages/crowdPortrait/crowdPortrait.wxml @@ -4,15 +4,16 @@ - “基础教育” 潜在不满意人员: 378 人 + + 潜在不满意人员: {{total}} - + - 刘萍 13362021000 + {{item.restName}} {{item.mobile}} - 地址:阳光城小区3号楼2单元202户 + 地址:{{item.houseAddress}} diff --git a/subpages/statistics/pages/dissatisfied/detial/detail.js b/subpages/statistics/pages/dissatisfied/detial/detail.js index f57a1f6..cfa291b 100644 --- a/subpages/statistics/pages/dissatisfied/detial/detail.js +++ b/subpages/statistics/pages/dissatisfied/detial/detail.js @@ -1,8 +1,25 @@ +import {getUnsatisfiedMattersDetailInfo} from "../../../../../utils/statisticsApi"; + Page({ data: { - + detail: {}, + unsatisfiedHisCount: {}, + followUpRecordDetails: {}, + id: {} }, onLoad(options) { - + this.setData({ + id: JSON.parse(decodeURIComponent(options.id)) + }) + this.getData() + }, + getData() { + getUnsatisfiedMattersDetailInfo(this.data.id).then(({data}) =>{ + this.setData({ + detail: data.unsatisfiedMattersModel, + unsatisfiedHisCount: data.unsatisfiedHisCount, + followUpRecordDetails: data.followUpRecordDetails + }) + }) } }) \ No newline at end of file diff --git a/subpages/statistics/pages/dissatisfied/detial/detail.wxml b/subpages/statistics/pages/dissatisfied/detial/detail.wxml index 14fdcb9..9ca8f8d 100644 --- a/subpages/statistics/pages/dissatisfied/detial/detail.wxml +++ b/subpages/statistics/pages/dissatisfied/detial/detail.wxml @@ -2,15 +2,15 @@ @@ -21,19 +21,19 @@ 12345投诉 - 76 + {{unsatisfiedHisCount.satisfaction_12345}} 省满意度调查 - 24 + {{unsatisfiedHisCount.satisfaction_province}} 社区满意度自查 - 13 + {{unsatisfiedHisCount.satisfaction_community}} @@ -41,13 +41,13 @@ 回访记录 - + - 电话回访 - 杨平(网格长) + {{item.followUpWay}} + {{item.followUpUser}}({{item.roleName}}) - 2023-08-23 + {{item.followUpDate}} diff --git a/subpages/statistics/pages/dissatisfied/list/list.js b/subpages/statistics/pages/dissatisfied/list/list.js index c52c0d2..a98710b 100644 --- a/subpages/statistics/pages/dissatisfied/list/list.js +++ b/subpages/statistics/pages/dissatisfied/list/list.js @@ -1,18 +1,148 @@ +import { + getUnsatisfiedCategory, + getUnsatisfiedMattersList, + satisfactionMonthGroupForResident +} from "../../../../../utils/statisticsApi"; + +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + return [year, month].map(formatNumber).join('-') +} +const formatTime2 = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + return [year, month,day].map(formatNumber).join('-') +} +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} + Page({ data: { - month:'', + month: '', typeIndex: -1, - typeList: [] + typeList: [], + satisfactionSourceIndex: -1, + satisfactionSourceOptions: [{ + value: 'satisfaction_12345', + label: '12345投诉', + color: '#FFB73C', + }, { + value: 'satisfaction_province', + label: '省满意度调查', + color: '#64C1FF' + }, { + value: 'satisfaction_community', + label: '社区满意度自查', + color: '#08EBAE' + }], + satisfactionCategory: -1, + satisfactionCategoryOptions: [], + list: {}, + total: 0, + pageNo: 1, + pageSize: 20, }, onLoad(options) { + this.setData({ + month: formatTime(new Date()) + }) + this.getList() + }, + nextMonth() { + console.log('next'); + if (this.data.list[this.data.month].data.length < this.data.list[this.data.month].total) { + this.setData({ + pageNo: this.data.pageNo + 1 + }) + this.getList() + return + } + let now = new Date(this.data.month) + this.setData({ + pageNo: 1, + month: formatTime(new Date(now.getFullYear(), now.getMonth() - 1)) + }) + this.getList() }, - onConfirm() { + prevMonth() { + console.log('prev'); + /* let now = new Date(this.data.month) + let now2 = new Date() + if (now.getMonth() < now2) { + this.setData({ + month: formatTime(new Date(now.getFullYear(), now.getMonth() + 1)) + }) + this.getList() + }*/ + }, + sourceChange(e) { + console.log(e) + this.getSatisfactionCategoryOptions() + }, + getSatisfactionCategoryOptions() { + this.setData({ + satisfactionCategory: -1, + satisfactionCategoryOptions: [] + }) + getUnsatisfiedCategory({ + satisfactionSource: this.data.satisfactionSourceOptions[this.data.satisfactionSourceIndex].value + }).then(({data}) => { + this.setData({ + satisfactionCategoryOptions: data.map(item => { + return { + label: item.categoryName, + value: item.categoryCode + } + }) + }) + }) + }, + onConfirm() { + this.setData({ + list: {}, + }) + this.getList(); + }, + getList() { + let params = { + pageNo: this.data.pageNo, + pageSize: this.data.pageSize, + month: this.data.month, + satisfactionSource: this.data.satisfactionSourceIndex >= 0 ? this.data.satisfactionSourceOptions[this.data.satisfactionSourceIndex].value : '', + satisfactionCategory: this.data.satisfactionCategory >= 0 ? this.data.satisfactionCategoryOptions[this.data.satisfactionCategory].value : '', + } + let list = this.data.list + getUnsatisfiedMattersList(params).then(({data}) => { + list[params.month] = { + data: this.data.list[params.month]?this.data.list[params.month].data.concat(data.list):data.list, + total: data.total, + month: params.month.split('-')[1], + } + this.setData({ + list + }) + this.getCount(params); + }) + }, + getCount({month}) { + let now = new Date(month); + var startTime = formatTime2(new Date(now.getFullYear(), now.getMonth(), 1)); + var endTime = formatTime2(new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59)); + satisfactionMonthGroupForResident({ + startTime,endTime + }).then(({data}) => { + this.setData(JSON.parse(`{"list.${month}.sumNumber": "${data.sumNumber}","list.${month}.sumPeople": "${data.sumPeople}"}`)) + }) }, gotopage(e) { wx.navigateTo({ - url: '/subpages/statistics/pages/dissatisfied/detial/detail?id='+e.currentTarget.dataset.id + url: '/subpages/statistics/pages/dissatisfied/detial/detail?id=' + JSON.stringify(e.currentTarget.dataset.id) }) } }) \ No newline at end of file diff --git a/subpages/statistics/pages/dissatisfied/list/list.wxml b/subpages/statistics/pages/dissatisfied/list/list.wxml index d2c53cd..decb0ec 100644 --- a/subpages/statistics/pages/dissatisfied/list/list.wxml +++ b/subpages/statistics/pages/dissatisfied/list/list.wxml @@ -12,110 +12,65 @@ - {{ typeIndex >= 0 ? typeList[typeIndex].label : '按类型' }} + {{ satisfactionSourceIndex >= 0 ? satisfactionSourceOptions[satisfactionSourceIndex].label : '按来源' + }} - 筛选 - - - - - - 8 - - - 不满意事项: 132项 - 不满意人数: 110人 - - - - - - - 2023-08-12 15:30:20 - 违章建筑 - - - 村前的老宅有个饭店,想要扩建二层,周边村民都 不同意,该居民想自行加高,对此不满,要求停止 - 建设,希望责任部门尽快落实该信息· - - - - - - 2023-08-12 15:30:20 - 违章建筑 - - - 村前的老宅有个饭店,想要扩建二层,周边村民都 不同意,该居民想自行加高,对此不满,要求停止 - 建设,希望责任部门尽快落实该信息· - - + + + {{ satisfactionCategory >= 0 ? satisfactionCategoryOptions[satisfactionCategory].label : '按类型' + }} + + + + 筛选 - + + + + - 7 + {{item.month - 0}} - 不满意事项: 132项 - 不满意人数: 110人 + 不满意事项: {{item.sumNumber}}项 + 不满意人数: {{item.sumPeople}}人 - + - 2023-08-12 15:30:20 - 违章建筑 + {{item.createdTime}} + {{item2.satisfactionCategoryName}} - 村前的老宅有个饭店,想要扩建二层,周边村民都 不同意,该居民想自行加高,对此不满,要求停止 - 建设,希望责任部门尽快落实该信息· - - - - - - 2023-08-12 15:30:20 - 违章建筑 - - - 村前的老宅有个饭店,想要扩建二层,周边村民都 不同意,该居民想自行加高,对此不满,要求停止 - 建设,希望责任部门尽快落实该信息· + {{item2.reason}} - + diff --git a/subpages/statistics/pages/dissatisfied/list/list.wxss b/subpages/statistics/pages/dissatisfied/list/list.wxss index d32af5b..91aa258 100644 --- a/subpages/statistics/pages/dissatisfied/list/list.wxss +++ b/subpages/statistics/pages/dissatisfied/list/list.wxss @@ -10,7 +10,8 @@ page { } .picker { - width: 241rpx; + width: 200rpx; + margin-right: 10rpx; height: 56rpx; background: rgba(58, 128, 231, 0.16); border: 1px solid #3A80E7; @@ -22,8 +23,9 @@ page { display: flex; align-items: center; justify-content: space-between; - padding: 0 30rpx; + padding: 0 20rpx; box-sizing: border-box; + white-space: nowrap; } .picker-type image, @@ -32,13 +34,20 @@ page { height: 24rpx; } +.picker-type text { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + width: calc(100% - 24rpx); +} .picker-type { display: flex; align-items: center; justify-content: space-between; padding: 0 30rpx; + margin-right: 10rpx; box-sizing: border-box; - width: 301rpx; + width: 180rpx; height: 56rpx; background: rgba(193, 193, 193, 0.16); border: 1px solid #DBDBDB; @@ -48,6 +57,7 @@ page { color: #C1C1C1; line-height: 56rpx; text-align: center; + } .btn { diff --git a/subpages/statistics/pages/qzbmy/qzbmy.js b/subpages/statistics/pages/qzbmy/qzbmy.js index 2ccbc49..c7dbb6d 100644 --- a/subpages/statistics/pages/qzbmy/qzbmy.js +++ b/subpages/statistics/pages/qzbmy/qzbmy.js @@ -1,22 +1,67 @@ -// subpages/statistics/pages/qzbmy/qzbmy.js -Page({ +import {getPotentialDissatisfiedCountDetail, maporg} from "../../../../utils/statisticsApi"; - /** - * 页面的初始数据 - */ +Page({ data: { - org: [], - orgIndex: -1, + orgList: [], + orgIndex: 0, + pageNo: 1, + pageSize: 10, + list: [], + total: 0, + mobile: "", + name: "" }, - /** - * 生命周期函数--监听页面加载 - */ onLoad(options) { + this.getOrg() + }, + getOrg() { + maporg().then(async ({data}) => { + let parent = {value: data.id, label: data.name} + this.setData({ + orgList: [ + parent, ...data.children.map(item => { + return { + value: item.id, + label: item.name + } + }) + ] + }) + this.getList() + }) }, - gotopage({currentTarget:{dataset}}) { + + gotopage({currentTarget: {dataset}}) { const {url} = dataset; wx.navigateTo({url}) + }, + setVal(e) { + this.setData({ + [e.currentTarget.dataset.key]: e.detail.value + }) + }, + getList() { + getPotentialDissatisfiedCountDetail({ + pageNo: this.data.pageNo, + pageSize: this.data.pageSize, + agencyId: this.data.orgList[this.data.orgIndex].value, + name: this.data.name, + mobile: this.data.mobile, + }).then(({data}) => { + this.setData({ + list: this.data.list.concat(data.list), + total: data.total + }) + }); + }, + onReachBottom() { + if (this.data.list.length < this.data.total) { + this.setData({ + pageNo: this.data.pageNo + 1 + }) + this.getList() + } } }) \ No newline at end of file diff --git a/subpages/statistics/pages/qzbmy/qzbmy.wxml b/subpages/statistics/pages/qzbmy/qzbmy.wxml index 58156ef..e9c6b4e 100644 --- a/subpages/statistics/pages/qzbmy/qzbmy.wxml +++ b/subpages/statistics/pages/qzbmy/qzbmy.wxml @@ -1,43 +1,49 @@ - + - {{ orgIndex>0 ? orgList[orgIndex].label : '按组织' }} + {{ orgIndex >= 0 ? orgList[orgIndex].label : '按组织' }} - - + + 筛选 - - - - - - - 事件未解决数 - - 76 + + + - - - 需求未满足数 + + + + 事件未解决数 + + {{item.eventCount}} - 24 - - - - 应享未享服务数 + + + 需求未满足数 + + {{item.demandCount}} + + + + 应享未享服务数 + + {{item.serviceCount}} - 13 - \ No newline at end of file diff --git a/subpages/statistics/pages/residentPortrait/residentPortrait.js b/subpages/statistics/pages/residentPortrait/residentPortrait.js index bea0b59..4494d16 100644 --- a/subpages/statistics/pages/residentPortrait/residentPortrait.js +++ b/subpages/statistics/pages/residentPortrait/residentPortrait.js @@ -1,66 +1,71 @@ -// subpages/statistics/pages/residentPortrait/residentPortrait.js -Page({ +import { + getFamilyRelationshipList, getPersonalFeature, + getPersonalFile, potentialSatisfactionForResident, queryResidentFollowRecord +} from "../../../../utils/statisticsApi"; - /** - * 页面的初始数据 - */ +Page({ data: { - + id: 0, + userInfo: {}, + relationship: {}, + unSolvedNum: 0, + unFinishNum: 0, + noServiceNum: 0, + event12345Num: 0, + provinceSatisfactionNum: 0, + selfInspectNum: 0, + logList: [], + tags: {} }, - /** - * 生命周期函数--监听页面加载 - */ onLoad(options) { - - }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - + this.setData({ + id: options.id + }) + this.getUser() + this.getNum() + this.getlog() }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - + getUser() { + getPersonalFile({resid: this.data.id}).then(({data}) => { + this.setData({ + userInfo: data + }) + }) + getFamilyRelationshipList({resid: this.data.id, type: 0}).then(({data}) => { + this.setData({ + relationship: data + }) + }) + getPersonalFeature({resid: this.data.id}).then(({data}) => { + this.setData({ + tags: data + }) + }) }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - + getNum() { + let params = { + resiId: this.data.id, + }; + potentialSatisfactionForResident(params).then(({data}) => { + this.setData({ + unSolvedNum: data.unSolvedNum, + unFinishNum: data.unFinishNum, + noServiceNum: data.noServiceNum, + event12345Num: data.event12345Num, + provinceSatisfactionNum: data.provinceSatisfactionNum, + selfInspectNum: data.selfInspectNum + }) + }); }, - - /** - * 页面上拉触底事件的处理函数 - */ - onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - + getlog() { + let params = { + resiId: this.data.id, + }; + queryResidentFollowRecord(params).then(({data}) => { + this.setData({ + logList: data + }) + }) } }) \ No newline at end of file diff --git a/subpages/statistics/pages/residentPortrait/residentPortrait.wxml b/subpages/statistics/pages/residentPortrait/residentPortrait.wxml index 0a844e2..2dd995f 100644 --- a/subpages/statistics/pages/residentPortrait/residentPortrait.wxml +++ b/subpages/statistics/pages/residentPortrait/residentPortrait.wxml @@ -3,10 +3,10 @@ 居民基本信息 @@ -15,11 +15,11 @@ 性别 年龄 - - 王军 - 本人 - - 18 + + {{item.name}} + {{item.houseHolderRel ? item.houseHolderRel : ''}} + {{item.gender == 2?'男':item.gender == 1?'女':item.gender === '0'?'未知':''}} + {{item.age}} @@ -32,27 +32,28 @@ + - - 35岁 + + {{tags.age}}岁 - - 失业 人员 + + {{tags.category1}} - - 流动 人员 + + {{tags.category2}} - - 月收入5000以下 + + {{tags.monthIncomeLevel}} - - 专科 + + {{tags.cultureLevel}} - - 已婚 + + {{tags.marriage}} - - + + {{tags.gender == 2?'男':tags.gender == 1?'女':tags.gender === '0'?'未知':''}} @@ -64,53 +65,53 @@ 12345投诉 - 76 + {{event12345Num}} 省满意度调查 - 24 + {{provinceSatisfactionNum}} 社区满意度自查 - 13 + {{selfInspectNum}} 事件未解决 的次数 - 3 + {{unSolvedNum}} 需求未满足 的次数 - 0 + {{unFinishNum}} 应享未享服务 的次数 - 0 + {{noServiceNum}} 回访记录 - + - 电话回访 - 杨平(网格长) + {{item.followUpWay}} + {{item.followPersonName}}({{item.roleNames}}) - 2023-08-23 + {{item.followTime}} diff --git a/subpages/statistics/pages/residentPortrait/residentPortrait.wxss b/subpages/statistics/pages/residentPortrait/residentPortrait.wxss index 3208309..6a716b8 100644 --- a/subpages/statistics/pages/residentPortrait/residentPortrait.wxss +++ b/subpages/statistics/pages/residentPortrait/residentPortrait.wxss @@ -186,6 +186,7 @@ page { .num-list .num-item { flex: 0 0 33.333333%; position: relative; + margin-bottom: 20rpx; } .num-list .num-item:after { @@ -212,7 +213,7 @@ page { font-size: 28rpx; font-weight: 500; color: #999999; - margin-bottom: 30rpx; + margin-bottom: 10rpx; } .num-list .num-item .num { diff --git a/subpages/statistics/pages/sjwjj/sjwjj.js b/subpages/statistics/pages/sjwjj/sjwjj.js index 93022e6..ee5b722 100644 --- a/subpages/statistics/pages/sjwjj/sjwjj.js +++ b/subpages/statistics/pages/sjwjj/sjwjj.js @@ -1,8 +1,44 @@ +import {getEventUnSolvedByUserId} from "../../../../utils/statisticsApi"; + Page({ data: { - + pageNo: 1, + pageSize: 10, + list: [], + total: 0, + id: 0, + name: '', + mobile: '', + agencyName: '', }, onLoad(options) { + this.setData({ + id: options.id, + name: options.name, + mobile: options.mobile, + agencyName: options.agencyName, + }) + this.getList() + }, + getList() { + getEventUnSolvedByUserId({ + pageNo: this.data.pageNo, + pageSize: this.data.pageSize, + reportUserId: this.data.id + }).then(({data}) => { + this.setData({ + list: this.data.list.concat(data.list), + total: data.total + }) + }); }, + onReachBottom() { + if (this.data.list.length < this.data.total) { + this.setData({ + pageNo: this.data.pageNo + 1 + }) + this.getList() + } + } }) \ No newline at end of file diff --git a/subpages/statistics/pages/sjwjj/sjwjj.wxml b/subpages/statistics/pages/sjwjj/sjwjj.wxml index 1af7f33..9d06cb5 100644 --- a/subpages/statistics/pages/sjwjj/sjwjj.wxml +++ b/subpages/statistics/pages/sjwjj/sjwjj.wxml @@ -1,20 +1,20 @@ - + - 城市管理-生态环境 - 2023-08-12 15:30 + {{item.categoryName}} + {{item.happenTime}} - 有几颗高大的树木因为雷雨天气被折断,影响小区居民出行。 + {{item.eventContent}} - 2023-08-12 18:20 - 已指派 [XXX社区第一网格] 办理 + {{item.latestProcessingTime}} + {{item.latestProcessingStatus}} diff --git a/subpages/statistics/pages/xqwmz/xqwmz.js b/subpages/statistics/pages/xqwmz/xqwmz.js index 4704f18..63e3dc7 100644 --- a/subpages/statistics/pages/xqwmz/xqwmz.js +++ b/subpages/statistics/pages/xqwmz/xqwmz.js @@ -1,10 +1,44 @@ -Page({ +import {getUserDemandUnSolvedByUserId} from "../../../../utils/statisticsApi"; +Page({ data: { - + pageNo: 1, + pageSize: 10, + list: [], + total: 0, + id: 0, + name: '', + mobile: '', + agencyName: '', }, - onLoad(options) { + this.setData({ + id: options.id, + name: options.name, + mobile: options.mobile, + agencyName: options.agencyName, + }) + this.getList() + }, + getList() { + getUserDemandUnSolvedByUserId({ + pageNo: this.data.pageNo, + pageSize: this.data.pageSize, + reportUserId: this.data.id + }).then(({data}) => { + this.setData({ + list: this.data.list.concat(data.list), + total: data.total + }) + }); }, + onReachBottom() { + if (this.data.list.length < this.data.total) { + this.setData({ + pageNo: this.data.pageNo + 1 + }) + this.getList() + } + } }) \ No newline at end of file diff --git a/subpages/statistics/pages/xqwmz/xqwmz.wxml b/subpages/statistics/pages/xqwmz/xqwmz.wxml index 8b35437..c1080d8 100644 --- a/subpages/statistics/pages/xqwmz/xqwmz.wxml +++ b/subpages/statistics/pages/xqwmz/xqwmz.wxml @@ -1,21 +1,20 @@ - + - 社区养老 - 2023-08-12 15:30 + {{item.categoryName}} + {{item.reportTime}} - 社区很多高龄老人已经行动不便,常年没办法下楼 - 梯,希望社区能提供上门体检业务。 + {{item.content}} - 2023-08-12 18:20 - 已指派 [XXX社区第一网格] 办理 + {{item.latestProcessingTime}} + {{item.latestProcessingStatus}} diff --git a/subpages/statistics/pages/yxwxfw/yxwxfw.js b/subpages/statistics/pages/yxwxfw/yxwxfw.js index ed3e63b..07cd93d 100644 --- a/subpages/statistics/pages/yxwxfw/yxwxfw.js +++ b/subpages/statistics/pages/yxwxfw/yxwxfw.js @@ -1,66 +1,44 @@ -// subpages/statistics/pages/yxwxfw/yxwxfw.js -Page({ +import {getServiceNotEnjoyedByUserId} from "../../../../utils/statisticsApi"; - /** - * 页面的初始数据 - */ +Page({ data: { - + pageNo: 1, + pageSize: 10, + list: [], + total: 0, + id: 0, + name: '', + mobile: '', + agencyName: '', }, - - /** - * 生命周期函数--监听页面加载 - */ onLoad(options) { - + this.setData({ + id: options.id, + name: options.name, + mobile: options.mobile, + agencyName: options.agencyName, + }) + this.getList() + }, + + getList() { + getServiceNotEnjoyedByUserId({ + pageNo: this.data.pageNo, + pageSize: this.data.pageSize, + reportUserId: this.data.id + }).then(({data}) => { + this.setData({ + list: this.data.list.concat(data.list), + total: data.total + }) + }); }, - - /** - * 生命周期函数--监听页面初次渲染完成 - */ - onReady() { - - }, - - /** - * 生命周期函数--监听页面显示 - */ - onShow() { - - }, - - /** - * 生命周期函数--监听页面隐藏 - */ - onHide() { - - }, - - /** - * 生命周期函数--监听页面卸载 - */ - onUnload() { - - }, - - /** - * 页面相关事件处理函数--监听用户下拉动作 - */ - onPullDownRefresh() { - - }, - - /** - * 页面上拉触底事件的处理函数 - */ onReachBottom() { - - }, - - /** - * 用户点击右上角分享 - */ - onShareAppMessage() { - + if (this.data.list.length < this.data.total) { + this.setData({ + pageNo: this.data.pageNo + 1 + }) + this.getList() + } } }) \ No newline at end of file diff --git a/subpages/statistics/pages/yxwxfw/yxwxfw.wxml b/subpages/statistics/pages/yxwxfw/yxwxfw.wxml index f65595d..509cfdb 100644 --- a/subpages/statistics/pages/yxwxfw/yxwxfw.wxml +++ b/subpages/statistics/pages/yxwxfw/yxwxfw.wxml @@ -1,21 +1,20 @@ - + - 社区养老 - 2023-08-12 15:30 + {{item.serviceCategoryName}} + {{item.serviceTimeStart}} - 社区很多高龄老人已经行动不便,常年没办法下楼 - 梯,希望社区能提供上门体检业务。 + {{item.remark}} 是否已完成服务: - + {{item.serviceStatus}} diff --git a/utils/config.js b/utils/config.js index f262e68..3f03bfa 100644 --- a/utils/config.js +++ b/utils/config.js @@ -7,7 +7,8 @@ module.exports = { function BASEURL() { // return 'https://epdc-shibei.elinkservice.cn/epdc-api/api/' // 正式环境 - return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 + // return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 + return 'http://localhost:8080/api/' // 演示环境 // return 'http://192.168.1.144/api/' //测试环境 } diff --git a/utils/statisticsApi.js b/utils/statisticsApi.js new file mode 100644 index 0000000..205c5ef --- /dev/null +++ b/utils/statisticsApi.js @@ -0,0 +1,122 @@ +var request = require('./request.js') +const paramsFormat = function (params) { + let strArray = [] + for(let key in params) { + if(params[key] || params[key] == 0 || params[key] == '0') { + strArray.push(key+'='+params[key]) + } + } + return strArray.join('&') +} +// 不满意事项类型分析 +export function satisfactionGroup(params) { + return request.get(`governance/satisfactionOverview/satisfactionGroup`, params) +} + +// 按12345热线投诉结果 +export function event12345Group(params) { + return request.get('governance/satisfactionOverview/event12345Group', params) +} + +// 不满意事项月份走势图 +export function notSatisfactionTrend(params) { + return request.get('governance/satisfactionOverview/notSatisfactionTrend', params) +} + +// 社区自查走势图 +export function selfInspectMonthTrend(params) { + return request.get('governance/satisfactionOverview/selfInspectMonthTrend', params) +} + +// 12345政务热线事件办理情况 +export function do12345MonthGroup(params) { + return request.get('governance/satisfactionOverview/do12345MonthGroup', params) +} + +// 不满意风险人员统计及回访情况 +export function satisfactionFollowGroup(params) { + return request.get('governance/satisfactionOverview/satisfactionFollowGroup', params) +} + +// 下级不满意事项 +export function childSatisfactionGroup(params) { + return request.get('governance/satisfactionOverview/childSatisfactionGroup', params) +} + +// 潜在不满意人数统计 +export function potentialSatisfactionGroup(params) { + return request.get('governance/satisfactionOverview/potentialSatisfactionGroup', params) +} + +// 不满意人员画像 +export function satisfactionCrowdPortrait(params) { + return request.get('governance/satisfactionOverview/satisfactionCrowdPortrait', params) +} +// 不满意人员画像列表 +export function satisfactionCrowdList(params) { + return request.get('governance/satisfactionOverview/satisfactionCrowdList', params) +} +// 家庭关系 +export function getFamilyRelationshipList(params) { + console.log(params,'params') + return request.post('actual/base/peopleRoomOverview/getFamilyRelationshipList?'+paramsFormat(params), params) +} +// 个人档案 +export function getPersonalFile(params) { + return request.post('actual/base/peopleRoomOverview/getPersonalFile?'+paramsFormat(params), params) +} + +// 社区服务 +export function getUnsatisfiedMattersList(params) { + return request.get('governance/satisfactionDetailList/getUnsatisfiedMattersList', params) +} +// 获取类型 +export function getUnsatisfiedCategory(params) { + return request.get('governance/satisfactionDetailList/getUnsatisfiedCategory', params) +} +// 获取类型 +export function getUnsatisfiedMattersDetailInfo(params) { + return request.post('governance/satisfactionDetailList/getUnsatisfiedMattersDetailInfo', params) +} +// 潜在不满意人数汇总 +export function getPotentialDissatisfiedCountDetail(params) { + return request.get('governance/satisfactionDetailList/getPotentialDissatisfiedCountDetail', params) +} +// 满意度评价-事件未解决数详情 +export function getEventUnSolvedByUserId(params) { + return request.get('governance/satisfactionDetailList/getEventUnSolvedByUserId', params) +} +// 满意度评价-应享未享服务数详情 +export function getServiceNotEnjoyedByUserId(params) { + return request.get('governance/satisfactionDetailList/getServiceNotEnjoyedByUserId', params) +} +// 满意度评价-需求未满足数详情 +export function getUserDemandUnSolvedByUserId(params) { + return request.get('governance/satisfactionDetailList/getUserDemandUnSolvedByUserId', params) +} + + +// 获取组织 +export function maporg(params) { + return request.post('gov/org/agency/maporg', params) +} + +// 居民的历史及潜在不满意事项 +export function potentialSatisfactionForResident(params) { + return request.get('governance/satisfactionOverview/potentialSatisfactionForResident', params) +} +// 居民被回访记录 +export function queryResidentFollowRecord(params) { + return request.get('governance/satisfactionOverview/queryResidentFollowRecord', params) +} + +// 不满意时间汇总--工作端 +export function satisfactionMonthGroupForResident(params) { + return request.get('governance/satisfactionOverview/satisfactionMonthGroupForResident', params) +} + +// 居民特征 +export function getPersonalFeature(params) { + return request.post('actual/base/peopleRoomOverview/getPersonalFeature?'+paramsFormat(params), params) +} +