From 7caddf0346d1c43290b39ad22dced7c17bcb32b0 Mon Sep 17 00:00:00 2001 From: duanliangtao <48194157+duanliangtao@users.noreply.github.com> Date: Thu, 8 Aug 2024 18:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E7=A8=8B=E5=BA=8F=E5=85=B3=E4=BA=8E?= =?UTF-8?q?=E5=8F=B0=E4=B8=9C=E9=9C=80=E6=B1=82=E7=9A=84=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 92 +- pages/work2/work2.wxml | 2 +- project.private.config.json | 14 + .../dissatisfied/demandCheck/demandCheck.js | 68 +- .../dissatisfied/demandCheck/demandCheck.wxml | 52 +- .../dissatisfied/demandCheck/demandCheck.wxss | 22 +- .../myTroubleshootDemand/pages/event/event.js | 307 +++++ .../pages/event/event.json | 8 + .../pages/event/event.wxml | 113 ++ .../pages/event/event.wxss | 1039 +++++++++++++++++ .../myTroubleshootDemand/pages/index/index.js | 91 +- .../pages/index/index.json | 4 +- .../pages/index/index.wxml | 62 +- .../pages/index/index.wxss | 5 + 14 files changed, 1790 insertions(+), 89 deletions(-) create mode 100644 subpages/myTroubleshootDemand/pages/event/event.js create mode 100644 subpages/myTroubleshootDemand/pages/event/event.json create mode 100644 subpages/myTroubleshootDemand/pages/event/event.wxml create mode 100644 subpages/myTroubleshootDemand/pages/event/event.wxss diff --git a/app.json b/app.json index 53e6835..3a37465 100644 --- a/app.json +++ b/app.json @@ -21,52 +21,48 @@ "pages/addhouse/addhouse" ] }, - - { - "root": "subpages/safetyinspection", - "name": "safetyinspection", - "pages": [ - "pages/safetyinspection/safetyinspection" - ] - }, - { - "root": "subpages/InspectionReport", - "name": "InspectionReport", - "pages": [ - "pages/InspectionReport/InspectionReport" - ] - }, { - "root": "subpages/securityCheck", - "name": "securityCheck", - "pages": [ - "pages/securityCheck" - ] - }, - - { - "root": "subpages/morenews", - "name": "morenews", - "pages": [ - "pages/morenews/morenews" - ] - }, - { - "root": "subpages/nohouse", - "name": "nohouse", - "pages": [ - "pages/nohouse/nohouse" - ] - }, - { - "root": "subpages/resnoinformation", - "name": "resnoinformation", - "pages": [ - "pages/resnoinformation/resnoinformation" - ] - }, - - + "root": "subpages/safetyinspection", + "name": "safetyinspection", + "pages": [ + "pages/safetyinspection/safetyinspection" + ] + }, + { + "root": "subpages/InspectionReport", + "name": "InspectionReport", + "pages": [ + "pages/InspectionReport/InspectionReport" + ] + }, + { + "root": "subpages/securityCheck", + "name": "securityCheck", + "pages": [ + "pages/securityCheck" + ] + }, + { + "root": "subpages/morenews", + "name": "morenews", + "pages": [ + "pages/morenews/morenews" + ] + }, + { + "root": "subpages/nohouse", + "name": "nohouse", + "pages": [ + "pages/nohouse/nohouse" + ] + }, + { + "root": "subpages/resnoinformation", + "name": "resnoinformation", + "pages": [ + "pages/resnoinformation/resnoinformation" + ] + }, { "root": "subpages/searchResult", "name": "searchResult", @@ -159,7 +155,8 @@ "root": "subpages/myTroubleshootDemand", "name": "myTroubleshootDemand", "pages": [ - "pages/index/index" + "pages/index/index", + "pages/event/event" ] } ], @@ -206,8 +203,6 @@ "iconPath": "images/home/mine.png", "selectedIconPath": "images/home/mineSelected.png" } - - ] }, "permission": { @@ -219,7 +214,6 @@ "getLocation", "chooseLocation" ], - "networkTimeout": { "request": 60000 }, diff --git a/pages/work2/work2.wxml b/pages/work2/work2.wxml index cac23cc..e399dfe 100644 --- a/pages/work2/work2.wxml +++ b/pages/work2/work2.wxml @@ -50,7 +50,7 @@ - 诉求上报记录 + 诉求办理 diff --git a/project.private.config.json b/project.private.config.json index 3489b1a..0f76042 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -286,6 +286,20 @@ "pathName": "subpages/gatherInformation/pages/gatherInformation/gatherInformation", "query": "", "scene": null + }, + { + "name": "我摸排的诉求", + "pathName": "subpages/myTroubleshootDemand/pages/index/index", + "query": "", + "launchMode": "default", + "scene": null + }, + { + "name": "事件处理", + "pathName": "subpages/myTroubleshootDemand/pages/event/event", + "query": "", + "launchMode": "default", + "scene": null } ] } diff --git a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js index a7c13b5..e1a22bf 100644 --- a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js +++ b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js @@ -34,6 +34,7 @@ Page({ minDate: '2018-01-01 00:00:00', tabVal: "0", + ruTabVal: "yes", uploadImageList: [], //图片上传的数组 streetList: [], // 街道 imageId: 1, @@ -577,14 +578,23 @@ Page({ this.showToast('发生地点不能为空') return } - if (!this.data.fmData.resiId) { + if (!this.data.fmData.resiId && (this.data.tabVal==0 || this.data.tabVal==1)) { this.showToast('联系人不能为空') return } - if (!this.data.resiMobile) { + if (!this.data.resiMobile && (this.data.tabVal==0 || this.data.tabVal==1)) { this.showToast('联系人电话不能为空') return } + + if (!this.data.fmData.responsibleName && this.data.tabVal==2 && this.data.ruTabVal=='yes') { + this.showToast('责任人不能为空') + return + } + if (!this.data.fmData.responsibleMobile && this.data.tabVal==2 && this.data.ruTabVal=='yes') { + this.showToast('责任人电话不能为空') + return + } } if (this.data.tabVal === '1') { this.data.optionsId ? this.updateMeasure() : this.submitMeasure(); @@ -602,6 +612,29 @@ Page({ this.setData({ submitDisabled: true }) + // 事件上报 + if(this.data.tabVal==0){ + this.setData({ + 'fmData.demandType': 'report' + }) + } + // 城管上报 + if(this.data.tabVal==2){ + this.setData({ + 'fmData.demandType': 'chengguan' + }) + } + + if(this.data.ruTabVal=='yes'){ + this.setData({ + 'fmData.responsibleUnit': 'yes' + }) + }else{ + his.setData({ + 'fmData.responsibleUnit': 'no' + }) + } + const parm = this.data.fmData console.log(parm, '事件'); api.addEvent(parm).then(res => { @@ -633,7 +666,11 @@ Page({ 'fmData.happenTime': "", 'fmData.content': "", //内容 'fmData.wantServiceTime': "", - 'fmData.reportType': '' + // 'fmData.reportType': '', + // 'fmData.demandType': '', + // 'fmData.responsibleUnit': '', + // 'fmData.responsibleName': '', + // 'fmData.responsibleMobile': '' }) wx.switchTab({ url: '/pages/work/work', @@ -775,6 +812,19 @@ Page({ }) console.log(this.data.fmData); }, + bindResponsibleName(e) { + this.setData({ + 'fmData.responsibleName': e.detail.value + }) + console.log(this.data.fmData); + }, + + bindResponsibleMobile(e) { + this.setData({ + 'fmData.responsibleMobile': e.detail.value + }) + console.log(this.data.fmData); + }, // 点击空白,隐藏sheet onHideSheet() { @@ -1611,6 +1661,12 @@ Page({ tabVal: e.detail.value }) }, + handleChangeResponsibleUnit(e) { + this.setData({ + ruTabVal: e.detail.value, + 'fmData.responsibleUnit': e.detail.value + }) + }, format(num) { let min = parseInt(num / 1000 / 60) let second = parseInt(num / 1000) % 60 @@ -1618,4 +1674,10 @@ Page({ second = second >= 10 ? second : '0' + second return min + ':' + second }, + + process() { + wx.navigateTo({ + url: `/subpages/myTroubleshootDemand/pages/event/event?id=${this.data.optionsId}`, + }) + }, }) \ No newline at end of file diff --git a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml index 8b1ebf6..1d42383 100644 --- a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml +++ b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml @@ -22,8 +22,9 @@ - 事件上报 - 居民需求 + 事件上报 + 居民需求 + 城管事件 @@ -64,7 +65,7 @@ - + @@ -74,12 +75,12 @@ - + 您也可以语音输入描述 - + 上传图片 @@ -120,7 +121,7 @@ - + * 发生地点 @@ -130,7 +131,7 @@ - + * {{tabVal === '1'?'需求人':'联系人'}} @@ -142,7 +143,7 @@ - + * 联系电话 @@ -154,6 +155,40 @@ + + + + * + 有无责任单位 + + + + + + + + + + + + + * + 责任人 + + + + + + + + + * + 责任人电话 + + + + + @@ -162,6 +197,7 @@ + diff --git a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss index dc3db37..44fdc70 100644 --- a/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss +++ b/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss @@ -509,6 +509,7 @@ color: #333; line-height: 60rpx; display: flex; justify-content: flex-end; +margin-left:30rpx; } .value-mobile .get-code { padding: 0 15rpx; @@ -582,6 +583,12 @@ background: rgb(175, 1, 1); margin-left: 20rpx; } +.small-radio { + /* 确保文本不换行 */ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; /* 如果文本过长,显示省略号 */ +} .tip_bg{ position: absolute; @@ -990,20 +997,27 @@ background: rgb(175, 1, 1); padding: 0 20rpx 30rpx; } .btn_blue , -.btn_yellow{ +.btn_yellow, +.btn_red{ border-radius: 55rpx; box-sizing: border-box; color: #fff; width: fit-content; - padding: 0rpx 100rpx; - font-size: 32rpx; + padding: 0rpx 80rpx; + font-size: 23rpx; font-family: PingFang SC; font-weight: bold; } + .btn_blue{ background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); } + .btn_yellow{ margin-left: 20rpx !important; - background: linear-gradient(87deg, #ff793c 0%, #fb9d5b 100%); + background: linear-gradient(87deg, #ecab8d 0%, #ecab8d 100%); +} + +.btn_red{ + background: linear-gradient(87deg, #f1560e 0%, #f1560e 100%); } \ No newline at end of file diff --git a/subpages/myTroubleshootDemand/pages/event/event.js b/subpages/myTroubleshootDemand/pages/event/event.js new file mode 100644 index 0000000..26f92b2 --- /dev/null +++ b/subpages/myTroubleshootDemand/pages/event/event.js @@ -0,0 +1,307 @@ +import {agencygridtree, getCategoryTree, icEventOldReply} from "../../../../utils/statisticsApi"; +const config = require('../../../../utils/config') +Page({ + + /** + * 页面的初始数据 + */ + data: { + tabVal: "0", + category: "", + uploadImageList: [], //图片上传的数组 + visible1: false, + visible2: false, + orgOptions: [], + casOptions: [], + catField: {text: 'categoryName', value: 'id', children: 'children'}, + orgField: {text: 'agencyName', value: 'agencyId', children: 'subAgencyList'}, + + id: '', + fileList: [], + timeLimit: [], + operationType: ["0"], + + form: { + operationType: "0", //处理方式[0:已回复 5、指派 6、完成并回复] + content: "",//转办意见 + timeLimit: "",//办结时限 + categoryId: "",//事件分类 + deptId: "", //指派部门 + deptName: "", + categoryList: [], + files: [] //附件 + }, + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + if (options.id) { + this.setData({ + id: options.id, + }) + } + console.log("eventId:"+this.data.id) + this.getCategoryList(); + this.getOrgTreeList(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + }, + + handleChangeType(e) { + this.setData({ + tabVal: e.detail.value, + "form.operationType": e.detail[0] + }) + }, + + getCategoryList() { + console.log("getCategoryList......."); + let params = {}; + getCategoryTree(params).then(res => { + let treeDataNew = this.deepTree(res.data, "children"); + console.log(treeDataNew, 'treeDataNew') + this.setData({ + casOptions: this.deleteChildren(treeDataNew, "children") + }); + }) + }, + + getOrgTreeList() { + let params = { + agencyId: this.data.agencyId, + purpose: "query" + } + agencygridtree(params).then(res => { + this.setData({ + orgOptions: this.deleteChildren(res.data.subAgencyList, 'subAgencyList') + }) + }) + }, + + //重构树,去除网格 + deepTree(arr, children) { + if (Array.isArray(arr) && arr.length > 0) { + return arr.map((item) => { + return { + ...item, + [children]: + (item[children] && + item[children].length > 0 && + this.deepTree(item[children], children)) || + null, + }; + }); + } + }, + + deleteChildren(node, key) { + node.forEach(item => { + if (key in item && !item[key]) { + delete item[key] + } else if (key in item && item[key].length) { + this.deleteChildren(item[key], key) + } + }) + return node + }, + + onOpen1() { + this.setData({visible1: true}) + }, + onClose1() { + this.setData({visible1: false}) + console.log('onClose1') + }, + + onConfirm1(e) { + console.log('onConfirm1', e.detail) + let data = e.detail + let params = data.selectedOptions[data.selectedOptions.length - 1] + this.setData({ + "form.categoryId": params.id, + "form.categoryList": {...params, children: null}, + visible1: false + }) + this.setData({category: data.selectedOptions.map(item => item.categoryName).join('/')}) + }, + + onOpen2() { + this.setData({visible2: true}) + }, + onClose2() { + this.setData({visible2: false}) + console.log('onClose2') + }, + onConfirm2(e) { + let data = e.detail + + let params = data.selectedOptions[data.selectedOptions.length - 1] + this.setData({ + "form.deptId": params.agencyId, + "form.deptName": params.agencyName, + "form.orgType": params.level, + visible2: false + }) + this.setData({orgName: data.selectedOptions.map(item => item.agencyName).join('/')}) + }, + + afterRead(event) { + const {file} = event.detail; + // 当设置 mutiple 为 true 时, file 为数组格式,否则为对象格式 + wx.uploadFile({ + url: `${config.BASEURL()}oss/file/uploadvariedfile`, + name: 'file', + header: { + 'Content-type': 'application/json;charset=UTF-8', + 'Authorization': wx.getStorageSync('token') + }, + filePath: file.url, + success: (res) => { + let data = JSON.parse(res.data) + const fileList = this.data.fileList; + fileList.push({...file, url: data.data.url}); + console.log(fileList) + this.setData({fileList}); + }, + }); + }, + + deleteFile(e) { + console.log(e) + let index = e.detail.index + let fileList = this.data.fileList + fileList.splice(index, 1) + this.setData({ + fileList + }) + }, + + openCalendar1() { + this.setData({ + showDate: true + }) + }, + onCloseDate() { + this.setData({showDate: false}); + }, + formatDate(date) { + date = new Date(date); + return `${date.getFullYear()}-${date.getMonth() + 1 > 10 ? date.getMonth() + 1 : '0' + (date.getMonth() + 1)}-${date.getDate() > 10 ? date.getDate() : '0' + date.getDate()}`; + }, + onConfirmDate(event) { + console.log(event) + const date = event.detail; + this.setData({ + showDate: false, + "form.timeLimit": `${this.formatDate(date)} 00:00:00`, + }); + }, + + // 双向绑定 内容输入框 + bindTextareaInput(e) { + this.setData({ + 'form.content': e.detail.value + }) + console.log(this.data.fmData); + }, + + submitEventReplyInfo(){ + console.log("this.data.form:"+this.data.form.content); + if (!this.data.form.categoryId) { + this.showToast('事件类型不能为空') + return + } + if (!this.data.form.content) { + this.showToast('回复意见不能为空') + return + } + + if (!this.data.form.timeLimit && (this.data.tabVal==0 || this.data.tabVal==5)) { + this.showToast('办结时限不能为空') + return + } + if (!this.data.form.deptId && this.data.tabVal==5) { + this.showToast('指派部门不能为空') + return + } + + let params = { + ...this.data.form, + files: this.data.fileList, + icEventId: this.data.id, + status: "processing", + // timeLimit: this.data.value1 && this.data.value1.length ? this.data.value1[0] : "" + } + icEventOldReply(params).then(res => { + wx.showToast({ + icon: 'success', + title: '操作成功' + }) + this.close() + }) + console.log(params) + }, + + close() { + this.triggerEvent('close') + }, + + // 代码简化,弹窗统一封装 + showToast(title) { + wx.showToast({ + title: title, + icon: 'none', + duration: 2000 + }) + }, + +}) \ No newline at end of file diff --git a/subpages/myTroubleshootDemand/pages/event/event.json b/subpages/myTroubleshootDemand/pages/event/event.json new file mode 100644 index 0000000..7f8188d --- /dev/null +++ b/subpages/myTroubleshootDemand/pages/event/event.json @@ -0,0 +1,8 @@ +{ + "usingComponents": { + "van-cascader": "@vant/weapp/cascader/index", + "van-popup": "@vant/weapp/popup/index", + "van-calendar": "@vant/weapp/calendar/index", + "van-uploader": "@vant/weapp/uploader/index" + } +} \ No newline at end of file diff --git a/subpages/myTroubleshootDemand/pages/event/event.wxml b/subpages/myTroubleshootDemand/pages/event/event.wxml new file mode 100644 index 0000000..70ea8a1 --- /dev/null +++ b/subpages/myTroubleshootDemand/pages/event/event.wxml @@ -0,0 +1,113 @@ + + + + + + + * + 处理方式 + + + + 回复 + 指派 + 完成并回复 + + + + + + * + 事件分类 + + + {{category?category:'请选择'}} + + + + + + + * + 处理部门 + + + {{orgName?orgName:'请选择'}} + + + + + + + + + + * + {{tabVal === '5'?'转办意见':'回复内容'}} + + + + + + + + + + 附件 + + + + + + + + + * + 办结时限 + + + {{form.timeLimit ? form.timeLimit : '请选择'}} + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/subpages/myTroubleshootDemand/pages/event/event.wxss b/subpages/myTroubleshootDemand/pages/event/event.wxss new file mode 100644 index 0000000..31d8f1c --- /dev/null +++ b/subpages/myTroubleshootDemand/pages/event/event.wxss @@ -0,0 +1,1039 @@ +page { + width: 100%; + height: auto; + overflow-y: auto; + background: #f7f7f7; + padding-bottom: 20rpx; + box-sizing: border-box; + } + .complete-info { + width: 100%; + height: 100%; + background: #f7f7f7; + } + + + + + .content { + width: 100%; + min-height: calc(100vh - 500rpx); + } + + .content-list { + width: 100%; + min-height: calc(100vh - 100rpx); + margin-top: 100rpx; + padding: 20rpx 20rpx 0rpx 20rpx; + box-sizing: border-box; + } + + /* 内容 */ + + .personal-info { + width: 100%; + height: 100%; + box-sizing: border-box; + padding: 0 20rpx; + overflow: hidden; + } + + .basic-info { + width: 100%; + background: #fff; + border-radius: 16rpx; + box-sizing: border-box; + padding: 0 20rpx; + margin-top: 20rpx; + } + + .border-bottom { + border-bottom: 1rpx solid #eaeaea; + } + .no-border-bottom{ + border-bottom: 1rpx solid #fff !important; + } + .note { + font-size: 22rpx; + color: #999; + line-height: 62rpx; + } + + + .add-issue { + width: 100%; + height: 100%; + background: #f7f7f7; + box-sizing: border-box; + } + + .add-issue .issue-content { + width: 100%; + height: auto; + border-radius: 16rpx; + background: #fff; + box-sizing: border-box; + /* padding: 0rpx 20rpx 45rpx; */ + } + .add-issue .issue-content textarea { + width: 100%; + height: 298rpx; + background-color: #f7f7f7; + padding:30rpx; + font-size: 34rpx; + color: #333; + line-height: 50rpx; + position: relative; + box-sizing: border-box; + + } + .add-issue .issue-content textarea .textarea-placeholder { + font-size: 32rpx; + color: #999; + line-height: 50rpx; + position: absolute; + left: 0; + top: 0; + } + /* ???????? */ + + .image-list { + width: 100%; + display: grid; + grid-template-columns: 214rpx 214rpx 214rpx; + grid-template-rows: 214rpx; + grid-gap: 17rpx; + height: 188rpx; + margin-top:60rpx ; + } + .image-list-2 { + height: 428rpx !important; + } + .image-list-3 { + height: 642rpx !important; + } + .image-list-4 { + height: 856rpx !important; + } + .image-list .image-item { + width: 100%; + height: 100%; + position: relative; + } + .image-list image { + /* width: 100%; */ + /* height: 100%; */ + width: 180rpx; + height: 180rpx; + object-fit: cover; + border-radius: 8rpx; + } + .image-list .image-item .loading { + position: absolute; + left: 25%; + top: 25%; + width: 50%; + height: 50%; + } + .image-list .image-item .close { + position: absolute; + top: -10rpx; + right: -10rpx; + width: 40rpx; + height: 40rpx; + } + .add-issue .image-box { + width: 100%; + height: auto; + border-radius: 16rpx; + background: #fff; + margin-top: 20rpx; + box-sizing: border-box; + padding: 34rpx 24rpx; + position: relative; + /* display: flex; + align-items: center; */ + } + .image-box .image-list-label { + position: absolute; + top: 35rpx; + } + .yg-zp{ + font-size: 32rpx; + font-family: Source Han Serif SC; + font-weight: 400; + color: #333; + } + .yg-zp-1{ + margin-top: 15rpx; + font-size: 25rpx; + font-family: Source Han Serif SC; + font-weight: 400; + color: #999; + } + .add-issue .image-box .add-icon { + /* margin-top: 40rpx; */ + width: 80rpx; + height: 80rpx; + margin-right: 40rpx; + } + .sheet-bg { + width: 100%; + height: 100%; + position: fixed; + top: 0; + left: 0; + z-index: 999; + background-color: rgba(0, 0, 0, 0.6); + } + + /* record start */ + .record-actionsheet { + height: 472rpx; + width: 100%; + background-color: #ffffff; + border-radius: 30rpx 30rpx 0 0; + position: fixed; + z-index: 999; + bottom: 0; + transition: all .2s linear; + } + .record-actionsheet-hide { + bottom: -480rpx; + transition: all .2s linear; + } + .record-actionsheet .top-menu { + display: flex; + align-items: center; + justify-content: space-between; + height: 80rpx; + } + .record-actionsheet .top-menu .button { + width: 120rpx; + height: 80rpx; + line-height: 80rpx; + text-align: center; + } + .record-actionsheet .top-menu .cancel { + color: #5b5b5b; + } + .record-actionsheet .top-menu .confirm { + color: #f61717; + } + .record-actionsheet .close-icon { + width: 80rpx; + height: 80rpx; + display: flex; + align-items: center; + justify-content: center; + } + .record-actionsheet .close-icon image { + width: 30rpx; + height: 30rpx; + } + .record-actionsheet .text-status { + color: #5b5b5b; + text-align: center; + } + .record-actionsheet .status-icon { + width: 100%; + height: 210rpx; + text-align: center; + margin-top: 50rpx; + } + .record-actionsheet .status-icon .icon { + width: 210rpx; + height: 210rpx; + } + .record-actionsheet .text-tip { + font-size: 26rpx; + color: #9e9e9e; + text-align: center; + } + /* record end */ + + /* audio start */ + .audio { + width: 670rpx; + height: 116rpx; + background-color: #f3f3f3; + border-radius: 10r; + display: flex; + position: relative; + margin-top: 40rpx; + } + .audio .control-button { + width: 100rpx; + height: 100%; + display: flex; + align-items: center; + justify-content: center; + } + .audio .control-button image { + width: 60rpx; + height: 60rpx; + } + .audio .control-line { + display: flex; + flex-direction: column; + justify-content: center; + } + .audio .control-line .control-slider { + width: 500rpx; + margin: 10rpx 36rpx; + } + .audio .control-line .line-time { + margin: 0 10px; + display: flex; + align-items: center; + justify-content: space-between; + } + .audio .control-line .line-time .time-text { + color: #aaaaaa; + font-size: 24rpx; + } + .audio .delete-audio { + position: absolute; + right: -20rpx; + top: -20rpx; + } + .audio .delete-audio image { + width: 60rpx; + height: 60rpx; + } + /* audio end */ + + .add-issue .issue-location { + width: 100%; + height: 210rpx; + border-radius: 16rpx; + background: #fff; + margin-top: 20rpx; + box-sizing: border-box; + padding: 34rpx 18rpx 9rpx 25rpx; + } + .add-issue .issue-location { + width: 100%; + height: 210rpx; + border-radius: 16rpx; + background: #fff; + margin-top: 20rpx; + box-sizing: border-box; + padding: 34rpx 18rpx 9rpx 25rpx; + } + .add-issue .issue-location .address { + width:70%; + height: 80rpx; + display: flex; + align-items: center; + } + .add-issue .issue-location textarea { + width:100%; + height: 88rpx; + color: #333; + font-size: 34rpx; + line-height: 46rpx; + } + .add-issue .issue-location .address-placeholder { + font-size: 32rpx; + color: #999; + } + .add-issue .issue-location .address image { + width: 26rpx; + height:26rpx; + } + .add-issue .issue-location .address view { + color: #999; + font-size: 26rpx; + margin-left: 14rpx; + } + + /* 重新定位 */ + .flexBox{ + display: flex; + width: 100%; + box-sizing: border-box; + } + .refresh{ + margin-top: 20rpx; + margin-left: 30rpx; + } + .refresh image { + width: 34rpx; + height: 34rpx; + float: left; + position: relative; + top: 5rpx; + } + + .refresh-name { + font-size: 28rpx; + font-weight: 500; + color: rgba(0, 179, 152, 1); + float: left; + margin-left: 10rpx; + } + + .tip{ + margin-top: 20rpx; + font-size: 22rpx; + font-weight: 400; + color: #BCBCBC; + } + + .wux-actionsheet__button { + font-size: 34rpx !important; + color: #333 !important; + } + + + /* picker */ + .item { + border-bottom: 1rpx solid #e7eeee; + padding: 25rpx 0; + line-height: 60rpx; + display: flex; + } + .item1{ + + padding: 25rpx 0; + line-height: 60rpx; + display: flex; + } + .field { + position: relative; + box-sizing: border-box; + width: 180rpx; + padding-left: 25rpx; + } + + .field-d { + width: 220rpx !important; + } + .value-d{ + width: 450rpx !important; + } + .field.mobile-field { + width: 250rpx !important; + } + .field .must { + position: absolute; + top: 0; + left: 0; + margin: 0 auto; + color: #F61616; + font-size: 30rpx; + } + .field .field-text { + font-size: 32rpx; + font-family: Source Han Serif SC; + font-weight: 400; + color: #333; + } + .value { + position: relative; + width: 410rpx; + display: flex; + font-size: 32rpx; + font-family: Source Han Serif SC; + font-weight: 400; + color: #333; + line-height: 60rpx; + } + .value-dl { + position: relative; + display: flex; + font-size: 32rpx; + color: #333; + line-height: 60rpx; + align-items: center; + display: flex; + justify-content: space-between; + + flex: 1; + } + .telInput{ + margin-left: 40rpx; + } + + .di-name{ + margin-right: 14rpx; + text-align: left; + width: calc(100% - 30rpx); + margin-left: 40rpx; + font-family: "PingFangSC-Regular", sans-serif; + } + .di-name1{ + margin-right: 14rpx; + text-align: left; + width: calc(100% - 30rpx); + margin-left: 40rpx; + font-family: "PingFangSC-Regular", sans-serif; + color: #999; + } + .di-but{ + width: 30rpx; + height: 34rpx; + } + .value input { + text-align: right; + font-size: 34rpx; + color: #333; + height: 100%; + width: 100%; + } .value .picker { + position: relative; + width: 100%; + padding-right: 40rpx; + text-align: right; + } + .value .picker .z-weak { + color: #999; + } + .value .picker .menu-arrow { + position: absolute; + top: 20rpx; + right: 0; + width: 16rpx; + height: 23rpx; + } + .value-mobile { + position: relative; + width: 410rpx; + display: flex; + font-size: 32rpx; + font-family: Source Han Serif SC; + font-weight: 400; + color: #333; + line-height: 60rpx; + display: flex; + justify-content: flex-end; + margin-left:30rpx; + } + .value-mobile .get-code { + padding: 0 15rpx; + height: 60rpx; + line-height: 60rpx; + background: linear-gradient(to right, #F40C0C, #FF4E4E); + color: #fff; + font-size: 24rpx; + border-radius: 6rpx; + margin: 0; + margin-left: 25rpx; + } + .value-mobile .button-hover { + background: rgb(175, 1, 1); + } + .value-mobile input { + text-align: right; + font-size: 34rpx; + color: #333; + height: 100%; + width: 55%; + } + .placeholder-style { + font-size: 28rpx; + color: #999; + } + + .is-open{ + margin-top: 20rpx; + padding: 0 20rpx; + box-sizing: border-box; + height: 30rpx; + font-size: 30rpx; + font-weight: 400; + color: #333333; + line-height: 30rpx; + } + + .submit-button { + width: 100%; + height: 84rpx; + display: flex; + align-items: center; + justify-content: center; + margin: 80rpx 0 65rpx; + } + .submit-button button { + height: 84rpx; + line-height: 84rpx; + width: 560rpx; + padding: 0; + text-align: center; + color: #fff; + font-size: 33rpx; + border-radius: 84rpx; + background: linear-gradient(to right, #82b4fd, #3e93fe); + } + /* .submit-button .hover-submit { + background: rgb(175, 1, 1); + } */ + + .radio-group { + height: 100%; + display: flex; + align-items: center; + color: #999; + font-size: 28rpx; + font-weight: 300; + } + .radio-group radio + radio { + margin-left: 20rpx; + } + + .small-radio { + /* 确保文本不换行 */ + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; /* 如果文本过长,显示省略号 */ + } + + .tip_bg{ + position: absolute; + overflow: hidden; + top: 0; + z-index: 9999; + width: 100%; + height: auto; + padding-bottom: 40rpx; + box-sizing: border-box; + /* background: rgba(0, 0, 0, 0.6); */ + background: #f7f7f7; + /* display: flex; + justify-content: center; */ + } + /* 新样式 */ + .tip-top{ + height: 433rpx; + width: 100%; + } + .tip-top image { + height: 433rpx; + width: 100%; + } + + .info-1 { + width: 100%; + /* margin-left: 20rpx; */ + height: auto; + z-index: 9999; + position: relative; + margin-top: -20rpx; + /* background: red; */ + } + + .info-2 { + height: auto; + width: calc(100% - 40rpx); + margin-left: 20rpx; + background: #FFFFFF; + border-radius: 10rpx; + margin-top: 20rpx; + padding: 40rpx; + box-sizing: border-box; + } + + .info-2 .info-2-title { + width: 100%; + height: 54rpx; + } + .info-2 .info-2-title.top{ + margin-top: 54rpx; + } + .info-2 .info-2-name{ + font-size: 33rpx; + font-weight: 800; + color: #FEFEFE; + line-height: 54rpx; + position: absolute; + margin-left: 24rpx; + } + + .info-2 .info-2-title .tou{ + width: 380rpx; + height: 54rpx; + } + + .info-2 .info-2-info{ + margin-top: 38rpx; + width: 100%; + height: auto; + font-size: 28rpx; + font-weight: 500; + color: #333333; + line-height: 50rpx; + } + .list{ + display: flex; + } + .list-name{ + width: 40rpx + } + .list-cont{ + width: calc(100% - 40rpx); + } + .end{ + /* position: absolute; */ + margin-top: 40rpx; + width: 100%; + height: 80rpx; + bottom: 20rpx; + display: flex; + align-items: center; + justify-content: center; + } + .end .end-but { + text-align: center; + border-radius: 50rpx; + width: 350rpx; + height: 80rpx; + line-height: 80rpx; + font-size: 30rpx; + color: #fff; + } + + + .end .bg1 { + background: #ffb2b5; + } + .end .bg2 { + + background: linear-gradient(to right, #f40f0f, #ff4c4c); + } + + .info-1 image{ + top: 0; + width: 100%; + height: 100%; + position: absolute; + z-index: 10; + } + + .info-1 .top-c { + padding: 44rpx 40rpx; + box-sizing: border-box; + position: inherit; + /* position: absolute; */ + z-index: 999; + font-size: 28rpx; + font-weight: 500; + color: #333333; + line-height: 50rpx; + z-index: 99; + height: 285rpx; + } + + /* end */ + .tip-info{ + position: relative; + border-radius: 10rpx; + margin-top: 150rpx; + z-index: 100; + width: 80%; + height: 950rpx; + background: #fff; + /* opacity: 1; */ + } + .tip-info .title{ + padding: 30rpx 35rpx 10rpx 35rpx; + box-sizing: border-box; + position: relative; + width: 100%; + height: auto; + text-align: center; + line-height: 45rpx; + font-size: 30rpx; + } + + .tip-info .title .close{ + position: absolute; + width: 60rpx; + height: 60rpx; + background: red; + top: 10rpx; + right: 20rpx; + } + .tip-info .tip-content{ + max-height: 650rpx; + overflow-y: auto; + width: 100%; + height: auto; + padding: 10rpx 30rpx; + box-sizing: border-box; + } + .tip-info .tip-content .h1{ + width: 100%; + height: auto; + font-size: 30rpx; + line-height: 45rpx; + font-weight: 600; + } + .tip-info .tip-content .h2{ + width: 100%; + height: auto; + font-size: 26rpx; + line-height: 45rpx; + } + + .tip-info .tip-content .h3{ + text-align: right; + width: 100%; + height: auto; + font-size: 26rpx; + line-height: 45rpx; + } + + + .sound-operate { + display: flex; + justify-content: center; + align-items: center; + margin: 40rpx 0 30rpx 0; + + } + .sound-operate-del, + .sound-operate-finish { + width: 60rpx; + height: 60rpx; + + + } + .sound-operate-del image, + .sound-operate-finish image { + display: block; + width: 100%; + height: 100%; + } + .sound-operate-btn { + margin: 0 60rpx; + + } + .sound-circel { + width: 160rpx; + height: 160rpx; + box-sizing: border-box; + background: #e9f2fe; + border-radius: 50%; + overflow: hidden; + + + } + .sound-circle-bd { + width: 124rpx; + height: 124rpx; + box-sizing: border-box; + margin: 18rpx auto; + border: 16rpx solid #5e9fff; + background-color: #5e9fff; + overflow: hidden; + border-radius: 50%; + -webkit-border-radius: 50%; + -moz-border-radius: 50%; + -ms-border-radius: 50%; + -o-border-radius: 50%; + } + .sound-circle-bg { + background: #5d9fff; + } + @-webkit-keyframes list { + 0% { + -webkit-transform: scaley(1); + transform: scaley(1); + } + + 50% { + -webkit-transform: scaley(0.4); + transform: scaley(0.4); + } + 100% { + -webkit-transform: scaley(1); + transform: scaley(1); + } + } + @keyframes list { + 0% { + -webkit-transform: scaley(1); + transform: scaley(1); + } + + 50% { + -webkit-transform: scaley(0.4); + transform: scaley(0.4); + } + + 100% { + -webkit-transform: scaley(1); + transform: scaley(1); + } + } + .sound-play { + display: flex; + justify-content: center; + align-items: center; + height: 100%; + + } + .sound-cancle { + padding: 20rpx; + font-size: 24rpx; + color: #999999; + text-align: right; + } + .sound-wrapper { + margin-top: 80rpx; + font-family: Source Han Serif SC; + font-weight: 500; + text-align: center; + } + .sound-time { + width: 100%; + text-align: center; + font-size: 30rpx; + color: #333333; + line-height: 1; + letter-spacing: 2rpx; + } + .sound-tips { + font-size: 26rpx; + color: #999999; + text-align: center; + } + + .sound-operate { + display: flex; + justify-content: center; + align-items: center; + margin: 40rpx 0 30rpx 0; + + } + .sound-operate-del, + .sound-operate-finish { + width: 60rpx; + height: 60rpx; + } + + .sound-play .sound-play-item { + background-color: #fff; + width: 6rpx; + height: 40rpx; + border-radius: 6rpx; + margin-right: 7rpx; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + animation: list 1s 0s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85); + -webkit-border-radius: 6rpx; + -moz-border-radius: 6rpx; + -ms-border-radius: 6rpx; + -o-border-radius: 6rpx; + -webkit-animation: list 1s 0s infinite cubic-bezier(0.85, 0.25, 0.37, 0.85); + } + .sound-play .sound-play-item:nth-child(1) { + -webkit-animation-delay: 0.1s !important; + animation-delay: 0.1s !important; + } + .sound-play .sound-play-item:nth-child(2) { + -webkit-animation-delay: 0.2s !important; + animation-delay: 0.2s !important; + } + .sound-play .sound-play-item:nth-child(3) { + -webkit-animation-delay: 0.3s !important; + animation-delay: 0.3s !important; + } + .sound-play .sound-play-item:nth-child(4) { + -webkit-animation-delay: 0.4s !important; + animation-delay: 0.4s !important; + } + .sound-play-stop .sound-play-item { + animation-play-state: paused; + } + .mkf-img{ + display: flex; + align-items: center; + color: #999; + font-size: 26rpx; + font-family: PingFang SC; + margin-top: 34rpx; + } + .mkf-img image{ + width: 46rpx; + height: 46rpx; + margin-right: 9rpx; + } + .audio-play{ + display: flex; + justify-content: space-around; + align-items: center; + height: 90rpx; + margin-top: 20rpx; + border-radius: 20rpx; + } + .audio-play image{ + width: 44rpx; + height: 44rpx; + } + .audio-play .audio-play-left{ + flex: 1; + height: 100%; + box-shadow: 1rpx 4rpx 20rpx 0rpx rgba(237,237,237,0.89); + display: flex; + align-items: center; + padding: 0 20rpx; + box-sizing: border-box; + margin-right: 21rpx; + } + .backC{ + background-color: #fff; + } + .audio-play .audio-play-left .audio-slider { + width: 386rpx; + margin: 0 auto; + } + + .bto_btn{ + display: flex; + margin-top: 20rpx; + padding: 0 20rpx 30rpx; + } + .btn_blue , + .btn_yellow, + .btn_red{ + border-radius: 55rpx; + box-sizing: border-box; + color: #fff; + width: fit-content; + padding: 0rpx 80rpx; + font-size: 23rpx; + font-family: PingFang SC; + font-weight: bold; + } + + .btn_blue{ + background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%); + } + + .btn_yellow{ + margin-left: 20rpx !important; + background: linear-gradient(87deg, #ecab8d 0%, #ecab8d 100%); + } + + .btn_red{ + background: linear-gradient(87deg, #f1560e 0%, #f1560e 100%); + } + + .flex { + display: flex!important; + justify-content: flex-end; + align-items: center; +} + +.popup-content { + max-height: 60vh; +} +.popup-content .card { + border-radius: 20px; + padding: 30rpx; + box-sizing: border-box; + background: #fff; + margin-bottom: 30rpx; +} \ No newline at end of file diff --git a/subpages/myTroubleshootDemand/pages/index/index.js b/subpages/myTroubleshootDemand/pages/index/index.js index 7d0f4f7..b51e9b1 100644 --- a/subpages/myTroubleshootDemand/pages/index/index.js +++ b/subpages/myTroubleshootDemand/pages/index/index.js @@ -7,13 +7,16 @@ Page({ * 页面的初始数据 */ data: { + active:0, tableData:[], + tableData1:[], pageNo:1, pageSize:8, lowerThreshold:'10', loadMoreVisible:false, loadMoreType: "none", - nodata:false + nodata:false, + checkResultFlag:0, }, /** @@ -40,9 +43,10 @@ Page({ onShow() { this.setData({ pageNo:1, - tableData:[] + tableData:[], + tableData1:[] }) - this.getMyTroubleshootDemand() + this.getMyWaitTroubleshootDemandList() }, /** @@ -78,10 +82,17 @@ Page({ loadMoreVisible: true, }) this.data.pageNo += 1 - this.getMyTroubleshootDemand() + // 待我处理 + if(this.data.checkResultFlag===0){ + this.getMyTroubleshootDemandList() + } + // 我上报的 + if(this.data.checkResultFlag===1){ + this.getMyTroubleshootDemandList() + } } }, - getMyTroubleshootDemand(){ + getMyTroubleshootDemandList(){ this.setData({ loadMoreVisible: true, nodata: false, @@ -112,6 +123,38 @@ Page({ }) }, + + getMyWaitTroubleshootDemandList(){ + this.setData({ + loadMoreVisible: true, + nodata: false, + loadMoreType: "more", + }) + let parm = { + pageNo:this.data.pageNo, + pageSize:this.data.pageSize + } + if(!parm.type) delete parm.type + getMyTroubleshootDemand(parm).then(res=>{ + this.setData({ + loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none', + tableData1: this.data.tableData.concat(res.data.list), + }) + if (this.data.tableData1.length == 0) { + this.setData({ + loadMoreVisible: false, + nodata: true + }) + } + }).catch(err=>{ + console.log(err); + this.setData({ + loadMoreVisible: false, + nodata: true, + }) + }) + + }, handleClickPhone(e){ wx.makePhoneCall({ phoneNumber: e.currentTarget.dataset.mobile, @@ -129,5 +172,41 @@ Page({ */ onShareAppMessage() { - } + }, + + toggleColor(e) { + const let1 =e.detail.index + this.setData({ + tableData:[], + tableData1:[], + checkResultFlag:let1, + pageNo: 1, + pageSize:20, + }) + + this.getList() + + this.setData({ + active:let1 + }) + + }, + + getList() { + this.setData({ + loadMoreVisible: true, + nodata: false, + loadMoreType: "more", + }); + + // 待我处理 + if(this.data.checkResultFlag===0){ + this.getMyWaitTroubleshootDemandList() + } + // 我上报的 + if(this.data.checkResultFlag===1){ + this.getMyTroubleshootDemandList() + } + + }, }) \ No newline at end of file diff --git a/subpages/myTroubleshootDemand/pages/index/index.json b/subpages/myTroubleshootDemand/pages/index/index.json index 87ffccf..b84c2d2 100644 --- a/subpages/myTroubleshootDemand/pages/index/index.json +++ b/subpages/myTroubleshootDemand/pages/index/index.json @@ -1,7 +1,9 @@ { "usingComponents": { "load-more": "../../../../components/loadMore/loadMore", - "no-data": "../../../../components/noData/nodata" + "no-data": "../../../../components/noData/nodata", + "van-tab": "@vant/weapp/tab/index", + "van-tabs": "@vant/weapp/tabs/index" }, "navigationBarTitleText": "我摸排的诉求" } \ No newline at end of file diff --git a/subpages/myTroubleshootDemand/pages/index/index.wxml b/subpages/myTroubleshootDemand/pages/index/index.wxml index 557781b..c78c595 100644 --- a/subpages/myTroubleshootDemand/pages/index/index.wxml +++ b/subpages/myTroubleshootDemand/pages/index/index.wxml @@ -1,20 +1,48 @@ - - - - - - {{item.type == 'event'?'事件':'需求'}} - {{item.name}} {{item.mobile}} + + + + + + + + + {{item.type == 'event'?'事件':item.type == 'chengguan'?'城管':'需求'}} + {{item.name}} {{item.mobile}} + + + + {{item.content}} + + + {{item.time}} + + + + - - {{item.content}} + + + + + + + + {{item.type == 'event'?'事件':item.type == 'chengguan'?'城管':'需求'}} + {{item.name}} {{item.mobile}} + + + + {{item.content}} + + + {{item.time}} + + + + + - - {{item.time}} - - - - - - \ No newline at end of file + + + diff --git a/subpages/myTroubleshootDemand/pages/index/index.wxss b/subpages/myTroubleshootDemand/pages/index/index.wxss index da9a73f..d66b35d 100644 --- a/subpages/myTroubleshootDemand/pages/index/index.wxss +++ b/subpages/myTroubleshootDemand/pages/index/index.wxss @@ -40,6 +40,11 @@ page { background-color: #fff1eb; color: #FF783C; } + + .green_small{ + background-color: #eef4fd; + color: #5cc789; +} .content{ width: 100%; padding:0 20rpx ;