Browse Source

Merge commit '7caddf0346d1c43290b39ad22dced7c17bcb32b0' into data-page

# Conflicts:
#	app.json
taidong
duanliangtao 1 year ago
parent
commit
7fea3d4737
  1. 74
      app.json
  2. 2
      pages/work2/work2.wxml
  3. 14
      project.private.config.json
  4. 68
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js
  5. 52
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
  6. 22
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss
  7. 307
      subpages/myTroubleshootDemand/pages/event/event.js
  8. 8
      subpages/myTroubleshootDemand/pages/event/event.json
  9. 113
      subpages/myTroubleshootDemand/pages/event/event.wxml
  10. 1039
      subpages/myTroubleshootDemand/pages/event/event.wxss
  11. 91
      subpages/myTroubleshootDemand/pages/index/index.js
  12. 4
      subpages/myTroubleshootDemand/pages/index/index.json
  13. 62
      subpages/myTroubleshootDemand/pages/index/index.wxml
  14. 5
      subpages/myTroubleshootDemand/pages/index/index.wxss

74
app.json

@ -21,21 +21,13 @@
"pages/addhouse/addhouse"
]
},
{
"root": "subpages/safetyinspection",
"name": "safetyinspection",
"pages": [
"pages/safetyinspection/safetyinspection"
]
},
{
"root": "subpages/InspectionReport",
"name": "InspectionReport",
"pages": [
"pages/InspectionReport/InspectionReport"
]
},
"root": "subpages/safetyinspection",
"name": "safetyinspection",
"pages": [
"pages/safetyinspection/safetyinspection"
]
},
{
"root": "subpages/securityCheck",
"name": "securityCheck",
@ -50,30 +42,34 @@
"pages/HotlineCompletion"
]
},
{
"root": "subpages/InspectionReport",
"name": "InspectionReport",
"pages": [
"pages/InspectionReport/InspectionReport"
]
},
{
"root": "subpages/morenews",
"name": "morenews",
"pages": [
"pages/morenews/morenews"
]
},
"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/nohouse",
"name": "nohouse",
"pages": [
"pages/nohouse/nohouse"
]
},
{
"root": "subpages/resnoinformation",
"name": "resnoinformation",
"pages": [
"pages/resnoinformation/resnoinformation"
]
},
{
"root": "subpages/searchResult",
"name": "searchResult",
@ -166,7 +162,8 @@
"root": "subpages/myTroubleshootDemand",
"name": "myTroubleshootDemand",
"pages": [
"pages/index/index"
"pages/index/index",
"pages/event/event"
]
}
],
@ -213,8 +210,6 @@
"iconPath": "images/home/mine.png",
"selectedIconPath": "images/home/mineSelected.png"
}
]
},
"permission": {
@ -226,7 +221,6 @@
"getLocation",
"chooseLocation"
],
"networkTimeout": {
"request": 60000
},

2
pages/work2/work2.wxml

@ -50,7 +50,7 @@
</view>
<view>
<image src="/images/work2/rep_record.png" class="image_13-2" bind:tap="onMyTroubleshootDemand"></image>
<text lines="1" class="text_4-0">诉求上报记录</text>
<text lines="1" class="text_4-0">诉求办理</text>
</view>
<view>
<image src="/images/work2/satisfaction.png" class="image_13-2" bind:tap="onHistoryQuery"></image>

14
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
}
]
}

68
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}`,
})
},
})

52
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml

@ -22,8 +22,9 @@
</view>
<view class="value-mobile" wx:if="{{!optionsId}}">
<radio-group class="radio-group" bind:change="handleChangeType">
<radio checked="{{tabVal === '0'}}" value="0" checked="true" color="#4193fe" class="radio">事件上报</radio>
<radio checked="{{tabVal === '1'}}" value="1" color="#4193fe" class="radio">居民需求</radio>
<radio checked="{{tabVal === '0'}}" value="0" checked="true" color="#4193fe" class="radio small-radio" style="font-size: 12px;">事件上报</radio>
<radio checked="{{tabVal === '1'}}" value="1" color="#4193fe" class="radio small-radio" style="font-size: 12px;">居民需求</radio>
<radio checked="{{tabVal === '2'}}" value="2" color="#4193fe" class="radio small-radio" style="font-size: 12px;">城管事件</radio>
</radio-group>
</view>
<view wx:else>
@ -64,7 +65,7 @@
<textarea maxlength="500" value="{{fmData.content}}" bindblur="bindTextareaInput" bindinput="bindTextareaInput" bindfocus="bindTextareaFocus" placeholder="请输入事件描述(不超过500字)">
</textarea>
<!-- 语音播放 -->
<view class="audio-play" wx:if="{{fmData.voiceList.length>0&& tabVal==0}}">
<view class="audio-play" wx:if="{{fmData.voiceList.length>0&& (tabVal==0 || tabVal==2)}}">
<view class="audio-play-left">
<image src="../../../images/zt.png" mode="" bind:tap="handlePlay" wx:if="{{!hasPlay}}"/>
<image src="../../../images/bf.png" mode="" bind:tap="handlePlay" wx:else/>
@ -74,12 +75,12 @@
<image src="../../../images/sc.png" bind:tap="handleAudioDel" mode=""/>
</view>
<view class="mkf-img" bindtap="showRecordSheet" wx:if="{{fmData.voiceList.length<=0 && tabVal==0}}">
<view class="mkf-img" bindtap="showRecordSheet" wx:if="{{fmData.voiceList.length<=0 && (tabVal==0 || tabVal==2)}}">
<image src="../../../images/mkf.png" mode="widthFix"/> 您也可以语音输入描述
</view>
</view>
<!-- 上传图片 -->
<view class="image-box" wx:if="{{tabVal == 0}}">
<view class="image-box" wx:if="{{tabVal == 0 || tabVal==2}}">
<view class="{{ uploadImageList.length < 4 ? 'image-list' : uploadImageList.length > 3 && uploadImageList.length < 7 ? 'image-list image-list-2' : uploadImageList.length > 6 && uploadImageList.length < 10 ? 'image-list image-list-3' : 'image-list image-list-4' }}">
<view class=" image-list-label">
<view class="field-text">上传图片</view>
@ -120,7 +121,7 @@
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</view>
</view>
<view class="item" wx:if="{{tabVal === '0'}}">
<view class="item" wx:if="{{tabVal === '0' || tabVal === '2'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">发生地点</view>
@ -130,7 +131,7 @@
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</view>
</view>
<view class="item">
<view class="item" wx:if="{{tabVal === '0' || tabVal === '1'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text" >{{tabVal === '1'?'需求人':'联系人'}}</view>
@ -142,7 +143,7 @@
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</navigator>
</view>
<view class="item">
<view class="item" wx:if="{{tabVal === '0' || tabVal === '1'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">联系电话</view>
@ -154,6 +155,40 @@
<input class="telInput" type="text" placeholder="请输入" value="{{resiMobile}}" bindblur="bindMobile"/>
</view>
</view>
<view class="item" wx:if="{{tabVal === '2'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">有无责任单位</view>
</view>
<view hover-class="backC" class="value-dl" >
<radio-group class="radio-group" bind:change="handleChangeResponsibleUnit">
<radio checked="{{ruTabVal === 'yes'}}" value="yes" checked="true" color="#4193fe" class="radio">有</radio>
<radio checked="{{ruTabVal === 'no'}}" value="no" color="#4193fe" class="radio" >无</radio>
</radio-group>
</view>
</view>
<view class="item" wx:if="{{tabVal === '2' && ruTabVal=== 'yes'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">责任人</view>
</view>
<view hover-class="backC" class="value-dl" >
<input class="telInput" type="text" placeholder="请输入" value="{{responsibleName}}" bindblur="bindResponsibleName"/>
</view>
</view>
<view class="item" wx:if="{{tabVal === '2' && ruTabVal=== 'yes'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">责任人电话</view>
</view>
<view hover-class="backC" class="value-dl" >
<input class="telInput" type="text" placeholder="请输入" value="{{responsibleMobile}}" bindblur="bindResponsibleMobile"/>
</view>
</view>
</view>
</view>
<view class="submit-button" wx:if="{{!optionsId}}">
@ -162,6 +197,7 @@
<view class="bto_btn" wx:else>
<button hover-class="btn-hover" bind:tap="update" class="btn_blue" >修改</button>
<button bind:tap="delete" class="btn_yellow">删除</button>
<button bind:tap="process" class="btn_red">处理</button>
</view>
</view>
</block>

22
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%);
}

307
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
})
},
})

8
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"
}
}

113
subpages/myTroubleshootDemand/pages/event/event.wxml

@ -0,0 +1,113 @@
<view class="complete-info" >
<view class="content">
<view class="personal-info">
<view class="basic-info">
<view class="item">
<view class="field" >
<text class="must">*</text>
<view class="field-text">处理方式</view>
</view>
<view class="value">
<radio-group class="radio-group" bind:change="handleChangeType">
<radio checked="{{tabVal === '0'}}" value="0" checked="true" color="#4193fe" class="radio small-radio" style="font-size: 12px;">回复</radio>
<radio checked="{{tabVal === '5'}}" value="5" color="#4193fe" class="radio small-radio" style="font-size: 12px;">指派</radio>
<radio checked="{{tabVal === '6'}}" value="6" color="#4193fe" class="radio small-radio" style="font-size: 12px;">完成并回复</radio>
</radio-group>
</view>
</view>
<view class="item">
<view class="field" >
<text class="must">*</text>
<view class="field-text">事件分类</view>
</view>
<view class="value-dl" bind:tap="onOpen1">
<view class="di-name">{{category?category:'请选择'}}</view>
<image class="di-but" src="../../../../images/right.png" mode="aspectFit" />
</view>
</view>
<view class="item" wx:if="{{tabVal == 5}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">处理部门</view>
</view>
<view class="value-dl" bind:tap="onOpen2">
<view class="{{orgName?'di-name':'di-name1'}}">{{orgName?orgName:'请选择'}}</view>
<image class="di-but" src="../../../../images/right.png" mode="aspectFit" />
</view>
</view>
<view class="add-issue">
<view class="issue-content">
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">{{tabVal === '5'?'转办意见':'回复内容'}}</view>
</view>
</view>
<textarea maxlength="500" value="{{form.content}}" bindblur="bindTextareaInput" bindinput="bindTextareaInput" bindfocus="bindTextareaFocus" placeholder="请输入事件描述(不超过500字)">
</textarea>
</view>
</view>
<!-- 上传附件 -->
<view class="item" wx:if="{{tabVal == 5 || tabVal==6}}">
<view class="field">
<text class="must"></text>
<view class="field-text">附件</view>
</view>
<view>
<van-uploader file-list="{{ fileList }}" bind:delete="deleteFile" max-count="4" bind:after-read="afterRead" />
</view>
</view>
<view class="item" wx:if="{{tabVal == 0 || tabVal==5}}" bind:tap="openCalendar1">
<view class="field">
<text class="must">*</text>
<view class="field-text">办结时限</view>
</view>
<view class="value flex {{form.timeLimit?'':'gray'}}">
{{form.timeLimit ? form.timeLimit : '请选择'}}
<van-icon name="arrow" />
</view>
</view>
</view>
</view>
</view>
<view class="submit-button">
<button bindtap="submitEventReplyInfo" hover-class="hover-submit" >保存</button>
</view>
</view>
<van-popup show="{{ visible1 }}" round position="bottom">
<van-cascader
wx:if="{{ visible1 }}"
default-value="{{ value1 }}"
title="事件分类"
options="{{ casOptions }}"
bind:close="onClose1"
bind:finish="onConfirm1"
field-names="{{catField}}"
/>
</van-popup>
<van-popup show="{{ visible2 }}" round position="bottom">
<van-cascader
wx:if="{{ visible2 }}"
default-value="{{ value2 }}"
title="处理部门"
options="{{ orgOptions }}"
bind:close="onClose2"
bind:finish="onConfirm2"
field-names="{{orgField}}"
/>
</van-popup>
<van-calendar
show="{{ showDate }}"
bind:close="onCloseDate"
bind:confirm="onConfirmDate"
/>

1039
subpages/myTroubleshootDemand/pages/event/event.wxss

File diff suppressed because it is too large

91
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()
}
},
})

4
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": "我摸排的诉求"
}

62
subpages/myTroubleshootDemand/pages/index/index.wxml

@ -1,20 +1,48 @@
<view class="content">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}" bind:tap="toDetail">
<view class="title" >
<view>
<text class="{{item.type == 'event'?'blue_small':'red_small'}}">{{item.type == 'event'?'事件':'需求'}}</text>
{{item.name}} {{item.mobile}}
<van-tabs active="{{active}}" bind:change="toggleColor" title-active-color="#3974F6" color="#3974F6" >
<van-tab title="待我处理" title-class="custom-tab-title" >
<view class="content">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card" wx:for="{{tableData1}}" wx:key="index" data-item="{{item}}" bind:tap="toDetail">
<view class="title" >
<view>
<text class="{{item.type == 'event'?'blue_small':item.type == 'chengguan'?'green_small':'red_small'}}">{{item.type == 'event'?'事件':item.type == 'chengguan'?'城管':'需求'}}</text>
{{item.name}} {{item.mobile}}
</view>
</view>
<view style="margin-top: 10rpx;">
<text class="card_content" maxLines="{{2}}" overflow="ellipsis">{{item.content}}</text>
</view>
<view class="bottom">
<view style="color: #C1C1C1;font-size: 26rpx;">{{item.time}}</view>
</view>
</view>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</scroll-view>
</view>
<view style="margin-top: 10rpx;">
<text class="card_content" maxLines="{{2}}" overflow="ellipsis">{{item.content}}</text>
</van-tab>
<van-tab title="我上报的">
<view class="content">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}" bind:tap="toDetail">
<view class="title" >
<view>
<text class="{{item.type == 'event'?'blue_small':item.type == 'chengguan'?'green_small':'red_small'}}">{{item.type == 'event'?'事件':item.type == 'chengguan'?'城管':'需求'}}</text>
{{item.name}} {{item.mobile}}
</view>
</view>
<view style="margin-top: 10rpx;">
<text class="card_content" maxLines="{{2}}" overflow="ellipsis">{{item.content}}</text>
</view>
<view class="bottom">
<view style="color: #C1C1C1;font-size: 26rpx;">{{item.time}}</view>
</view>
</view>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</scroll-view>
</view>
<view class="bottom">
<view style="color: #C1C1C1;font-size: 26rpx;">{{item.time}}</view>
</view>
</view>
<load-more loadVisible="{{loadMoreVisible}}" loadType="{{loadMoreType}}" ></load-more>
<no-data isShow="{{nodata}}" wx:if="{{nodata}}"></no-data>
</scroll-view>
</view>
</van-tab>
</van-tabs>

5
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 ;

Loading…
Cancel
Save