From f509eaf95b434c639333abe49f793b5527e65296 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=98=E7=AB=8B=E6=A0=87?= <2658037827@qq.com> Date: Tue, 2 Jan 2024 14:14:05 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=89=93=E5=8D=A1=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=20=E6=96=B0=E5=A2=9E=E5=B1=85=E6=B0=91=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project.private.config.json | 109 +++++++- .../searchResult/pages/checkLog/checkLog.js | 85 ++++++ .../searchResult/pages/checkLog/checkLog.json | 7 + .../searchResult/pages/checkLog/checkLog.wxml | 24 ++ .../searchResult/pages/checkLog/checkLog.wxss | 107 +++++++ .../searchResult/pages/punchCard/punchCard.js | 22 +- .../pages/punchCard/punchCard.wxml | 9 +- .../pages/punchCard/punchCard.wxss | 9 +- .../statistics/pages/demand/detail/detail.js | 6 +- .../pages/demand/detail/detail.wxml | 2 +- subpages/statistics/pages/demand/list/list.js | 6 +- .../pages/dissatisfied/list/list.js | 260 +++++++++--------- .../statistics/pages/event/detail/detail.js | 5 + .../statistics/pages/event/detail/detail.wxml | 2 +- subpages/statistics/pages/event/list/list.js | 12 +- .../residentPortrait/residentPortrait.wxml | 2 +- subpages/statistics/pages/sjwjj/sjwjj.wxml | 10 +- subpages/statistics/pages/xqwmz/xqwmz.wxml | 10 +- subpages/statistics/pages/yxwxfw/yxwxfw.wxml | 8 +- 19 files changed, 542 insertions(+), 153 deletions(-) create mode 100644 subpages/searchResult/pages/checkLog/checkLog.js create mode 100644 subpages/searchResult/pages/checkLog/checkLog.json create mode 100644 subpages/searchResult/pages/checkLog/checkLog.wxml create mode 100644 subpages/searchResult/pages/checkLog/checkLog.wxss diff --git a/project.private.config.json b/project.private.config.json index 1420c69..a1e1d7f 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -2,12 +2,117 @@ "description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", "projectname": "epmet-work-minniprogram", "setting": { - "compileHotReLoad": false, + "compileHotReLoad": true, "urlCheck": false }, "condition": { "miniprogram": { "list": [ + { + "name": "subpages/statistics/pages/residentPortrait2/residentPortrait", + "pathName": "subpages/statistics/pages/residentPortrait2/residentPortrait", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/addResi/pages/addResi/addResi", + "pathName": "subpages/addResi/pages/addResi/addResi", + "query": "type=edit&resiId=1704759123301355521", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/addResi/pages/addResi/addResi", + "pathName": "subpages/addResi/pages/addResi/addResi", + "query": "type=edit&resiId=1704759138283409410", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/searchResult/pages/punchCard/punchCard", + "pathName": "subpages/searchResult/pages/punchCard/punchCard", + "query": "resiId=1704759138283409410", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/addResi/pages/addResi/addResi", + "pathName": "subpages/addResi/pages/addResi/addResi", + "query": "type=edit&resiId=1736923526105554946", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/addResi/pages/addResi/addResi", + "pathName": "subpages/addResi/pages/addResi/addResi", + "query": "type=edit&resiId=1704759138283409410", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/statistics/pages/demand/detail/detail", + "pathName": "subpages/statistics/pages/demand/detail/detail", + "query": "id=1726875931996110850&type=2", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/statistics/pages/demand/detail/detail", + "pathName": "subpages/statistics/pages/demand/detail/detail", + "query": "id=1726875931996110850&type=2", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/statistics/pages/demand/detail/detail", + "pathName": "subpages/statistics/pages/demand/detail/detail", + "query": "id=1730039765330636802&type=1", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/statistics/pages/demand/detail/detail", + "pathName": "subpages/statistics/pages/demand/detail/detail", + "query": "id=1730039765330636802&type=1", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/statistics/pages/event/detail/detail", + "pathName": "subpages/statistics/pages/event/detail/detail", + "query": "id=1717777356023885826", + "launchMode": "default", + "scene": null + }, + { + "name": "subpages/statistics/pages/problem/problem", + "pathName": "subpages/statistics/pages/problem/problem", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "subpages/statistics/pages/event/detail/detail", + "query": "id=%7B%22name%22%3A%22%E5%BC%A0%E4%B8%89%22%2C%22mobile%22%3A%22173****7327%22%2C%22satisfactionSource%22%3A%22satisfaction_community%22%2C%22createdTime%22%3A%222023-12-12%2016%3A05%22%2C%22satisfactionCategoryName%22%3A%22%E7%AC%AC%E4%B8%80%E7%BD%91%E6%A0%BC%22%2C%22reason%22%3A%22%E6%9D%91%E5%89%8D%E7%9A%84%E8%80%81%E5%AE%85%E6%9C%89%E4%B8%AA%E9%A5%AD%E5%BA%97%EF%BC%8C%E6%83%B3%E8%A6%81%E6%89%A9%E5%BB%BA%E4%BA%8C%E5%B1%82%EF%BC%8C%E5%91%A8%E8%BE%B9%E6%9D%91%E6%B0%91%E9%83%BD%E4%B8%8D%E5%90%8C%E6%84%8F%EF%BC%8C%E8%AF%A5%E5%B1%85%E6%B0%91%E6%83%B3%E8%87%AA%E8%A1%8C%E5%8A%A0%E9%AB%98%EF%BC%8C%E5%AF%B9%E6%AD%A4%E4%B8%8D%E6%BB%A1%EF%BC%8C%E8%A6%81%E6%B1%82%E5%81%9C%E6%AD%A2%E5%BB%BA%E8%AE%BE%EF%BC%8C%E5%B8%8C%E6%9C%9B%E8%B4%A3%E4%BB%BB%E9%83%A8%E9%97%A8%E5%B0%BD%E5%BF%AB%E8%90%BD%E5%AE%9E%E8%AF%A5%E4%BF%A1%E6%81%AF%C2%B7%C2%B7%C2%B7%22%7D", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "subpages/statistics/pages/event/list/list", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "", + "pathName": "pages/statistics/statistics", + "query": "", + "launchMode": "default", + "scene": null + }, { "name": "", "pathName": "pages/webView/webView", @@ -158,5 +263,5 @@ ] } }, - "libVersion": "3.1.0" + "libVersion": "3.1.5" } \ No newline at end of file diff --git a/subpages/searchResult/pages/checkLog/checkLog.js b/subpages/searchResult/pages/checkLog/checkLog.js new file mode 100644 index 0000000..b74cbb1 --- /dev/null +++ b/subpages/searchResult/pages/checkLog/checkLog.js @@ -0,0 +1,85 @@ +const app = getApp() +import { getCheckLogList } from "../../../../utils/api" +Page({ + + /** + * 页面的初始数据 + */ + data: { + statusHeight: '', + navigationHeight: '', + tableData: [], + lowerThreshold: '10', + loadMoreVisible: false, + nodata: false, + loadMoreType: 'more', + resiId: '', + pageSize: 10, + pageNo: 1 + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + this.setData({ + statusHeight: app.globalData.deviceInfo.statusHeight, + navigationHeight: app.globalData.deviceInfo.navigationHeight, + resiId: options.resiId + }) + this.getTable() + }, + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + onScrollToLower(e) { + if (this.data.loadMoreType === 'more') { + this.setData({ + loadMoreVisible: true, + }) + this.data.pageNo += 1 + this.getTable() + } + }, + getTable() { + this.setData({ + loadMoreVisible: true, + nodata: false, + loadMoreType: "more", + }) + let parm = { + resiId: this.data.resiId, + pageSize: this.data.pageSize, + pageNo: this.data.pageNo + } + getCheckLogList(parm).then(res => { + console.log(res, 'rrr') + if (res.data) { + this.setData({ + loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none', + tableData: this.data.tableData.concat(res.data.list), + }) + if (this.data.tableData.length == 0) { + this.setData({ + loadMoreVisible: false, + loadMoreType: '', + nodata: true + }) + } + } else { + this.setData({ + loadMoreType: '', + nodata: true + }) + } + }).catch(err => { + console.log(err); + }) + }, + back() { + wx.navigateBack() + }, +}) \ No newline at end of file diff --git a/subpages/searchResult/pages/checkLog/checkLog.json b/subpages/searchResult/pages/checkLog/checkLog.json new file mode 100644 index 0000000..483dc8e --- /dev/null +++ b/subpages/searchResult/pages/checkLog/checkLog.json @@ -0,0 +1,7 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "load-more": "../../../../components/loadMore/loadMore", + "no-data": "../../../../components/noData/nodata" + } +} \ No newline at end of file diff --git a/subpages/searchResult/pages/checkLog/checkLog.wxml b/subpages/searchResult/pages/checkLog/checkLog.wxml new file mode 100644 index 0000000..a0d58d3 --- /dev/null +++ b/subpages/searchResult/pages/checkLog/checkLog.wxml @@ -0,0 +1,24 @@ + + + + + 打卡记录 + + + + + + + + + 打卡人:{{item.name}} + 打卡时间:{{item.clockInTime}} + 打卡地址: {{item.clockInAddress}} + + + + + + + + \ No newline at end of file diff --git a/subpages/searchResult/pages/checkLog/checkLog.wxss b/subpages/searchResult/pages/checkLog/checkLog.wxss new file mode 100644 index 0000000..80dc79e --- /dev/null +++ b/subpages/searchResult/pages/checkLog/checkLog.wxss @@ -0,0 +1,107 @@ +/* subpages/searchResult/pages/searchResult/searchResult.wxss */ +page { + width: 100%; + min-height: 100vh; + overflow: hidden; + background-color: #f7f7f7; +} +.header { +width: 100%; + height: 532rpx; + background: linear-gradient(180deg, #7DB5FF 0%, #E8F2FF 66%, #F7F7F7 100%); +} + +.header .header-bg { +width: 100%; +height: 100%; +/* position: absolute; + z-index: 10; + left: 0; + top: 0; */ +position: absolute; +height: 100%; +z-index: -999; +} + +.header .navigation { +width: 100%; +display: flex; +align-items: center; +justify-content: center; +font-size: 32rpx; +position: relative; +z-index: 1; +} +.back { +width: 30rpx; +height: 30rpx; +margin-left: 20rpx; +position: absolute; +margin-top: 20rpx; +border-radius: 0rpx; +z-index: 2; +} + + +.content{ + height: auto; + width: 100%; + overflow: hidden; + position: relative; + top: -350rpx; + padding: 0 20rpx; + box-sizing: border-box; +} +.content .scroll { + height: calc(100vh - 150rpx); + overflow-y: scroll; +} +.content .scroll .card{ + background-color: #fff; + border-radius: 20rpx; + padding: 0 30rpx; + box-sizing: border-box; +} +.content .card .list_card{ + display: flex; + justify-content: space-around; + padding: 30rpx 0; + align-items: center; + color: #333333; + border-top: 1px solid #EAEAEA; +} +.content .card .list_card .left{ + flex: 1; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + font-size: 28rpx; + font-family: PingFang SC; + font-weight: 500; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.content .card .list_card .left .address{ + /* font-size: 28rpx; */ + font-family: PingFang SC; + font-weight: 500; + color: #999999; +} + +.flex-sb { + display: flex; + justify-content: space-between; +} +.time { + color: #999; + margin: 10rpx 0; + /* font-size: 28rpx; */ +} + +.name { + font-size: 32rpx; + /* font-size: 28rpx; */ +} \ No newline at end of file diff --git a/subpages/searchResult/pages/punchCard/punchCard.js b/subpages/searchResult/pages/punchCard/punchCard.js index 98dcc2d..8ce1f15 100644 --- a/subpages/searchResult/pages/punchCard/punchCard.js +++ b/subpages/searchResult/pages/punchCard/punchCard.js @@ -23,7 +23,9 @@ Page({ address:'', longitude:'', latitude:'', - agencyLevel: '' + agencyLevel: '', + recentTime: '', + lastLog: {} }, /** @@ -47,6 +49,7 @@ Page({ this.setData({ agencyLevel: app.globalData.user.level }) + this.getLastLogs() }, updateTime() { let date = new Date(); @@ -76,7 +79,7 @@ Page({ }, handlePunch(){ this.setData({ - punchFlag:!this.data.punchFlag, + // punchFlag:!this.data.punchFlag, animationClass:'animate' }) setTimeout(() => { @@ -96,7 +99,8 @@ Page({ } api.clockRecords(obj).then(res=>{ wx.showToast({ - title: this.data.punchFlag?'打卡成功':'更新成功', + // title: this.data.punchFlag?'打卡成功':'更新成功', + title: '打卡成功', icon:'none' }) }).catch(err=>{ @@ -200,5 +204,17 @@ Page({ */ onShareAppMessage() { + }, + gotopage(e) { + wx.navigateTo({ + url: e.currentTarget.dataset.url, + }) + }, + getLastLogs() { + api.getLastLog({resiId:this.data.resiId}).then(res => { + this.setData({ + lastLog: res.data + }) + }) } }) \ No newline at end of file diff --git a/subpages/searchResult/pages/punchCard/punchCard.wxml b/subpages/searchResult/pages/punchCard/punchCard.wxml index f1a51f3..1f7d177 100644 --- a/subpages/searchResult/pages/punchCard/punchCard.wxml +++ b/subpages/searchResult/pages/punchCard/punchCard.wxml @@ -30,12 +30,17 @@ - 走访打卡 + + 走访打卡 + 打卡记录 + - {{!punchFlag ? '打卡' : '更新打卡'}} + + 打卡 {{currentTime}} 当前位置:{{addressContent}} + 最近打卡时间:{{lastLog.clockInTime}} diff --git a/subpages/searchResult/pages/punchCard/punchCard.wxss b/subpages/searchResult/pages/punchCard/punchCard.wxss index 2117003..0955e97 100644 --- a/subpages/searchResult/pages/punchCard/punchCard.wxss +++ b/subpages/searchResult/pages/punchCard/punchCard.wxss @@ -101,4 +101,11 @@ page { border: 2rpx solid #13C8BD; } - \ No newline at end of file + .flex-sb { + display: flex; + justify-content: space-between; + } + .view { + color: #999; + font-size: 24rpx; + } \ No newline at end of file diff --git a/subpages/statistics/pages/demand/detail/detail.js b/subpages/statistics/pages/demand/detail/detail.js index 6e38332..99f40f1 100644 --- a/subpages/statistics/pages/demand/detail/detail.js +++ b/subpages/statistics/pages/demand/detail/detail.js @@ -79,5 +79,9 @@ Page({ }) } }, - + callphone() { + wx.makePhoneCall({ + phoneNumber: this.data.detail.reportUserMobile, + }) + } }) \ No newline at end of file diff --git a/subpages/statistics/pages/demand/detail/detail.wxml b/subpages/statistics/pages/demand/detail/detail.wxml index 7e6cde6..99a47bd 100644 --- a/subpages/statistics/pages/demand/detail/detail.wxml +++ b/subpages/statistics/pages/demand/detail/detail.wxml @@ -3,7 +3,7 @@ {{detail.reportUserName || detail.title}} {{detail.reportUserMobile}} - + {{detail.gridName || detail.categoryName}} diff --git a/subpages/statistics/pages/demand/list/list.js b/subpages/statistics/pages/demand/list/list.js index fcbd679..ebaa47c 100644 --- a/subpages/statistics/pages/demand/list/list.js +++ b/subpages/statistics/pages/demand/list/list.js @@ -12,8 +12,12 @@ Page({ value: '2', label: '共性需求', }], - statusIndex: -1, + statusIndex: 0, statusOptions: [ + { + label: '按状态', + value: '' + }, { label: '待响应', value: '1' diff --git a/subpages/statistics/pages/dissatisfied/list/list.js b/subpages/statistics/pages/dissatisfied/list/list.js index a98710b..4bc1f1d 100644 --- a/subpages/statistics/pages/dissatisfied/list/list.js +++ b/subpages/statistics/pages/dissatisfied/list/list.js @@ -1,76 +1,82 @@ import { - getUnsatisfiedCategory, - getUnsatisfiedMattersList, - satisfactionMonthGroupForResident + 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 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 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 + n = n.toString() + return n[1] ? n : '0' + n } Page({ - data: { - month: '', - typeIndex: -1, - 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 - } + data: { + month: '', + typeIndex: -1, + typeList: [], + satisfactionSourceIndex: 0, + satisfactionSourceOptions: [{ + value: '', + label: '按来源', + }, { + value: 'satisfaction_12345', + label: '12345投诉', + color: '#FFB73C', + }, { + value: 'satisfaction_province', + label: '省满意度调查', + color: '#64C1FF' + }, { + value: 'satisfaction_community', + label: '社区满意度自查', + color: '#08EBAE' + }], + satisfactionCategory: 0, + satisfactionCategoryOptions: [{ + value: '', + label: '按类型' + }], + 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() - }, - prevMonth() { - console.log('prev'); + let now = new Date(this.data.month) + this.setData({ + pageNo: 1, + month: formatTime(new Date(now.getFullYear(), now.getMonth() - 1)) + }) + this.getList() + }, + prevMonth() { + console.log('prev'); /* let now = new Date(this.data.month) let now2 = new Date() @@ -80,69 +86,75 @@ Page({ }) 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], + }, + 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: [ + { + value: '', + label: '按类型' + }, + ...data.map(item => { + return { + label: item.categoryName, + value: item.categoryCode } - 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=' + JSON.stringify(e.currentTarget.dataset.id) - }) + }) + ] + }) + }) + }, + 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=' + JSON.stringify(e.currentTarget.dataset.id) + }) + } }) \ No newline at end of file diff --git a/subpages/statistics/pages/event/detail/detail.js b/subpages/statistics/pages/event/detail/detail.js index dbb6540..a8b89aa 100644 --- a/subpages/statistics/pages/event/detail/detail.js +++ b/subpages/statistics/pages/event/detail/detail.js @@ -79,4 +79,9 @@ Page({ isShowOrder: false }) }, + callphone() { + wx.makePhoneCall({ + phoneNumber: this.data.detail.mobile, + }) + } }) \ No newline at end of file diff --git a/subpages/statistics/pages/event/detail/detail.wxml b/subpages/statistics/pages/event/detail/detail.wxml index c361c31..bfe7da5 100644 --- a/subpages/statistics/pages/event/detail/detail.wxml +++ b/subpages/statistics/pages/event/detail/detail.wxml @@ -3,7 +3,7 @@