From f5192a5e45e6bc85b8205fcc0f3cba6b975f2955 Mon Sep 17 00:00:00 2001 From: huxiaolei <286388969@qq.com> Date: Sat, 12 Oct 2024 16:44:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E7=8E=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/custom-tab-bar/index.js | 4 +- images/statistics/down.png | Bin 0 -> 418 bytes .../modules/HotlineRates/HotlineRates.js | 127 ++++++++++++++++++ .../modules/HotlineRates/HotlineRates.json | 6 + .../modules/HotlineRates/HotlineRates.wxml | 84 ++++++++++++ .../modules/HotlineRates/HotlineRates.wxss | 120 +++++++++++++++++ pages/statistics/statistics.js | 6 + pages/statistics/statistics.json | 3 +- pages/statistics/statistics.wxml | 28 ++++ utils/statisticsApi.js | 6 + 10 files changed, 381 insertions(+), 3 deletions(-) create mode 100644 images/statistics/down.png create mode 100644 pages/statistics/modules/HotlineRates/HotlineRates.js create mode 100644 pages/statistics/modules/HotlineRates/HotlineRates.json create mode 100644 pages/statistics/modules/HotlineRates/HotlineRates.wxml create mode 100644 pages/statistics/modules/HotlineRates/HotlineRates.wxss diff --git a/components/custom-tab-bar/index.js b/components/custom-tab-bar/index.js index 221e813..215f5ac 100644 --- a/components/custom-tab-bar/index.js +++ b/components/custom-tab-bar/index.js @@ -64,13 +64,13 @@ Component({ getOwnedRolesOfStaffId(res.data.id).then(res2 => { app.globalData.user = res.data this.setData({ - "list[3].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 + "list[3].show": res2.data.filter(item => item.roleKey === 'secretary' || item.roleKey === 'administrator' || item.roleKey === 'street_secretary').length > 0 }) }) }) } else { this.setData({ - "list[3].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'admin').length > 0 + "list[3].show": app.globalData.roleList.filter(item => item.roleKey === 'secretary' || item.roleKey === 'administrator' || item.roleKey === 'street_secretary').length > 0 }) } console.log(app.globalData.roleList, 'userss') diff --git a/images/statistics/down.png b/images/statistics/down.png new file mode 100644 index 0000000000000000000000000000000000000000..34d3e7af7db6376d1bfa332c51de2c5eabcd78f8 GIT binary patch literal 418 zcmV;T0bTxyP)Px$TuDShRA@u(m(6VgQ4EBiqci|C0G*_Yh#TS_kf;DsK@K!PZV4%ZQb+?44WKpJ z8zND5{KihSlJ~l{-+VLH{z&QhB|X<)65ziR%mgw4(t%td(m=XB6QC_52V?@IfpmK& zKwC%-$OK3O>2^~B)9vX&rJ2>7+Ng}7K9$#xSAec0yv4h&(6wVfB@rP$4B&ebemj4=TJ9@!dqDdcj(!@Wdw*RQ4p1Y? z(vtudw<2mYfe2SEGcy5;TM@OHK!mH7nVEpat%%x8Ai`D4%-$z(0V%(7F$S1fCIA2c M07*qoM6N<$f@AKi8UO$Q literal 0 HcmV?d00001 diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.js b/pages/statistics/modules/HotlineRates/HotlineRates.js new file mode 100644 index 0000000..627eb6f --- /dev/null +++ b/pages/statistics/modules/HotlineRates/HotlineRates.js @@ -0,0 +1,127 @@ +import {event12345Rates} from "../../../../utils/statisticsApi"; +import {formatTime} from "../../../../utils/util"; +const formatDay2 = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDay() + return [year, month, day].map(formatNumber).join('-') + } + const formatDay = date => { + const year = date.getFullYear() + const month = date.getMonth() + const day = date.getDay() + return [year, month, day].map(formatNumber).join('-') + } + const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n + } +Component({ + properties: { + curVal: { + type: String, + value: '1', + observer: function () { + this.getList(); + } + } + }, + data: { + list: [], + day: '', + day2: '', + showitem: 3, + }, + ready() { + this.setData({ + day: formatDay(new Date()), + }) + this.setData({ + day2: formatDay2(new Date()) + }) + + this.getList() + }, + methods: { + onChange(e) { + this.setData({ + day: e.detail.value + }) + }, + onChange2(e) { + this.setData({ + day2: e.detail.value + }) + }, + onSearch(){ + if(this.data.day>this.data.day2){ + wx.showToast({ + title: '起止日期错误', + icon: 'error', + duration: 2000 + }) + return false + } + this.getList() + }, + showall(){ + if(this.data.showitem==99999){ + this.setData({ + showitem: 3 + }) + }else{ + this.setData({ + showitem: 99999 + }) + } + }, + getList() { + if (this.data.curVal == '1') { + this.getEventList(false) + } else { + this.getEventList(false) + } + }, + getEventList(deptFlag) { + + + event12345Rates({ + startDate: this.data.day.toString() + ' ' + '00:00:00', + endDate: this.data.day2.toString() + ' ' + '23:59:59', + usableFlag: true, + deptFlag: deptFlag, + }).then(res => { + console.log('++++++++++++',res.data) + // res.data.list.forEach(item => { + // item.reportTime = this.formatTime(item.reportTime) + // }) + this.setData({ + list: res.data + }) + }) + }, + formatTime(date) { + if (date) { + let _date = new Date(date) + let M = _date.getMonth() - 0 + 1 > 10 ? _date.getMonth() - 0 + 1 : '0' + (_date.getMonth() - 0 + 1) + let D = _date.getDate() > 10 ? _date.getDate() : '0' + _date.getDate() + return M + '-' +D + } + return '' + + }, + + gotopage(e) { + if (this.data.stayVal === '1') { + wx.navigateTo({ + url: '/subpages/statistics/pages/event/detail/detail?id=' + e.currentTarget.dataset.id+'&is12345=2', + }) + } else { + wx.navigateTo({ + url: '/subpages/statistics/pages/demand/detail/detail?id=' + e.currentTarget.dataset.id+'&type=1', + }) + } + + } + } +}); diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.json b/pages/statistics/modules/HotlineRates/HotlineRates.json new file mode 100644 index 0000000..875a20d --- /dev/null +++ b/pages/statistics/modules/HotlineRates/HotlineRates.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "no-data": "../../../../components/noData/nodata" + } +} \ No newline at end of file diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.wxml b/pages/statistics/modules/HotlineRates/HotlineRates.wxml new file mode 100644 index 0000000..a0a3a0d --- /dev/null +++ b/pages/statistics/modules/HotlineRates/HotlineRates.wxml @@ -0,0 +1,84 @@ + + + + + {{ day }} + + + + + + + {{ day2 }} + + + + + + + 查询 + + + + + + + {{idx+1}} + {{item.assignOrgLeader || item.assignOrgName}} + {{item.assignOrgName}} + + + + 收件数 + {{item.total}} + + + 未回复 + 0 + + + 不满意 + {{item.notSatisfiedTotal}} + + + 未解决 + {{item.unresolveTotal}} + + + + + 按时办理率 + {{item.replyRate}}% + + + 响应率 + {{item.responseRate}}% + + + 满意度 + {{item.satisfiedRate}}% + + + 解决率 + {{item.resolveRate}}% + + + + {{showitem==99999?"收起":"展开"}} + + + + \ No newline at end of file diff --git a/pages/statistics/modules/HotlineRates/HotlineRates.wxss b/pages/statistics/modules/HotlineRates/HotlineRates.wxss new file mode 100644 index 0000000..e7dc874 --- /dev/null +++ b/pages/statistics/modules/HotlineRates/HotlineRates.wxss @@ -0,0 +1,120 @@ +.container { + padding: 0rpx 24rpx; +} +.hotline-rate { + display: flex; + flex-wrap: wrap; + border-bottom: 2px solid #FFFFFF; + padding: 0rpx 0; +} +.name{ + display: flex; +} +.ranking{ + font-size:16px; + margin-right: 10px; + font-weight:bold; +} +.leader-name{ + font-size:16px; + font-weight:bold; + margin-bottom: 10px; +} +.num{ + width:100%; + display: flex; + height:56px; +} +.child{ + flex:1; + height:56px; + text-align:center; +} +.lab{ + font-size:12px; + height:20px; + color:#999999; + line-height:20px; +} +.val{ + height:36px; + line-height:36px; + font-size:18px; +} +.screen { + display: flex; + justify-content: space-between; + background: #fff; + padding: 0rpx 0rpx 40rpx 0rpx ; +} + +.picker { + width: 236rpx; + margin-right: 10rpx; + height: 56rpx; + background: rgba(58, 128, 231, 0.16); + border: 1px solid #3A80E7; + border-radius: 28rpx; + font-size: 30rpx; + font-weight: 500; + color: #3A80E7; + line-height: 56rpx; + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 20rpx; + box-sizing: border-box; + white-space: nowrap; +} + +.picker-type image, +.picker image { + width: 28rpx; + height: 28rpx; +} + +.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: 180rpx; + height: 56rpx; + background: rgba(193, 193, 193, 0.16); + border: 1px solid #DBDBDB; + border-radius: 28rpx; + font-size: 30rpx; + font-weight: 500; + color: #C1C1C1; + line-height: 56rpx; + text-align: center; + +} + +.btn { + width: 120rpx; + height: 56rpx; + line-height: 56rpx; + background: #3A80E7; + border-radius: 28rpx; + font-size: 28rpx; + font-weight: 500; + color: #FFFFFF; + text-align: center; +} +.showall{ + text-align: center; + background:#f7f7f7; + margin:10px 0 10px 0; + height:40px; + line-height:40px; + color:blue; +} \ No newline at end of file diff --git a/pages/statistics/statistics.js b/pages/statistics/statistics.js index b56f6cd..2ea561f 100644 --- a/pages/statistics/statistics.js +++ b/pages/statistics/statistics.js @@ -19,6 +19,7 @@ Page({ }], monthIndex: 0, stayVal: '1', + curVal: '1', tabValue: '' }, onLoad(options) { @@ -45,6 +46,11 @@ Page({ stayVal: index }) }, + setCur({currentTarget: {dataset: {index}}}) { + this.setData({ + curVal: index + }) + }, tabChange({detail}) { this.setData({ tabValue: detail diff --git a/pages/statistics/statistics.json b/pages/statistics/statistics.json index eb92d71..dda9c82 100644 --- a/pages/statistics/statistics.json +++ b/pages/statistics/statistics.json @@ -10,6 +10,7 @@ "RequirementAnalysis": "./modules/RequirementAnalysis/RequirementAnalysis", "EventPrediction": "./modules/EventPrediction/EventPrediction", "CrowdPortrait": "./modules/CrowdPortrait/CrowdPortrait", - "custom-tab-bar":"../../components/custom-tab-bar" + "custom-tab-bar":"../../components/custom-tab-bar", + "HotlineRates": "./modules/HotlineRates/HotlineRates" } } \ No newline at end of file diff --git a/pages/statistics/statistics.wxml b/pages/statistics/statistics.wxml index e86f997..4fa8d74 100644 --- a/pages/statistics/statistics.wxml +++ b/pages/statistics/statistics.wxml @@ -31,6 +31,34 @@ + + + + + 分管领导“四率” + + + + 承办部门“四率” + + + + + + + + + + + 集中突出问题 diff --git a/utils/statisticsApi.js b/utils/statisticsApi.js index 33c749c..fcb222c 100644 --- a/utils/statisticsApi.js +++ b/utils/statisticsApi.js @@ -8,6 +8,12 @@ const paramsFormat = function (params) { } return strArray.join('&') } + +// 不满意事项类型分析 +export function event12345Rates(params) { + return request.post(`governance/icEvent/EventCategoryAnalysis`, params) +} + // 不满意事项类型分析 export function satisfactionGroup(params) { return request.get(`governance/satisfactionOverview/satisfactionGroup`, params)