Browse Source

诉求摸排联调

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
742b987c5b
  1. 3
      app.json
  2. 2
      pages/work/work.wxml
  3. 9
      project.private.config.json
  4. BIN
      subpages/demandCheck/images/bf.png
  5. BIN
      subpages/demandCheck/images/dianji.png
  6. BIN
      subpages/demandCheck/images/ic_yitidingwei@2x.png
  7. BIN
      subpages/demandCheck/images/sc.png
  8. BIN
      subpages/demandCheck/images/selct.png
  9. BIN
      subpages/demandCheck/images/tupian.png
  10. BIN
      subpages/demandCheck/images/xiaobofang.png
  11. BIN
      subpages/demandCheck/images/xiaozanting.png
  12. BIN
      subpages/demandCheck/images/yuyin.png
  13. BIN
      subpages/demandCheck/images/zanting.png
  14. BIN
      subpages/demandCheck/images/zt.png
  15. 439
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js
  16. 5
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.json
  17. 52
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
  18. 35
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss
  19. 292
      subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js
  20. 7
      subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.json
  21. 109
      subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxml
  22. 251
      subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss
  23. 43
      subpages/searchResult/pages/searchResult/searchResult.wxss
  24. 12
      utils/api.js

3
app.json

@ -70,7 +70,8 @@
"root": "subpages/demandCheck",
"name": "demandCheck",
"pages": [
"pages/dissatisfied/demandCheck/demandCheck"
"pages/dissatisfied/demandCheck/demandCheck",
"pages/dissatisfied/searchResi/searchResi"
]
}

2
pages/work/work.wxml

@ -57,7 +57,7 @@
<image src="../../images/work/center.png" mode="" class="center_image"/>
</view>
</view>
<image src="../../images/work/sqmp.png" bind:tap="toDemandCheck" class="center_img" mode=""/>
<!-- <image src="../../images/work/sqmp.png" bind:tap="toDemandCheck" class="center_img" mode=""/> -->
<view class="bto">
<view class="title">
<view>满意度自查</view>

9
project.private.config.json

@ -8,6 +8,13 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "选择居民",
"pathName": "subpages/demandCheck/pages/dissatisfied/searchResi/searchResi",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "诉求摸排",
"pathName": "subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck",
@ -116,5 +123,5 @@
]
}
},
"libVersion": "3.0.2"
"libVersion": "3.1.0"
}

BIN
subpages/demandCheck/images/bf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

BIN
subpages/demandCheck/images/dianji.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
subpages/demandCheck/images/ic_yitidingwei@2x.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

BIN
subpages/demandCheck/images/sc.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
subpages/demandCheck/images/selct.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 B

BIN
subpages/demandCheck/images/tupian.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

BIN
subpages/demandCheck/images/xiaobofang.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

BIN
subpages/demandCheck/images/xiaozanting.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

BIN
subpages/demandCheck/images/yuyin.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

BIN
subpages/demandCheck/images/zanting.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

BIN
subpages/demandCheck/images/zt.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

439
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js

@ -1,9 +1,10 @@
var api = require('../../../../../utils/api')
import { $wuxActionSheet } from '../../../../../components/dist/index'
const QQMapWX = require('../../../../../utils/qqmap-wx-jssdk')
const config = require('../../../../../utils/config')
const app = getApp()
var recorderManager = wx.getRecorderManager();
var innerAudioContext = wx.createInnerAudioContext()
import api from "../../../../../utils/api"
var timer;
Page({
@ -13,18 +14,23 @@ Page({
data: {
fmData: {
time: '',
grid:''
gridId: '',
attachmentList:[],//图片
voiceList:[],
latitude:"",
longitude:"",
resiId:"1698525635288653825",
happenTime:"",
content:"",//内容
address:""//地址
},
minDate: '2018-01-01 00:00:00',
timeLabel: '',
placeholderShow: true,
uploadImageList: [],
uploadImageList: [],//图片上传的数组
streetList: [], // 街道
imageId: 1,
addressContent: '',
address: '',
overDuration: 600000,
duration: 0,
@ -35,43 +41,25 @@ Page({
recordingTime: '00:00',
recordingLength: 0,
setInter: null,
recorderData: {}, // 录音文件数据
recorderTimeMax: "", // 00:00
recorderTimeCur: "", // 00:00
showRecord: false, // 是否显示录音sheet
isRecord: 0, // 是否开始录音 0-未开始 1-正在录音 2-录音完成
recordingTime: 0, // 计时器
isPlayAudio: false, // 上传的音频播放状态
audioTimeline: 0, // 当前播放值
uploadRecord: {
uploaded: true,
url: ""
},
recorderDuration: "", // 录音时长
totalTime: "00:00", // 录音时长
submitDisabled: false,
// 时间组件
visibleTime: false,
angencyList:[{
agencyName:'测试',
agencyId:'cnmmmm',
subAgencyList:[
{
agencyName:'测试1',
agencyId:'cnmmmm1',
subAgencyList:[
{
agencyId:'cnmmmm2',
agencyName:'测试2',
subAgencyList:null
}
]
}
]
}],
defaultFieldNames:{label:'agencyName',value:'agencyId',children:'subAgencyList'},
angencyList: [],//组织下拉数据
angencyId:"",
totalMax: 0,
stepValue: 0,
hasPlay: false,
playUrl: "",
// defaultFieldNames: { label: 'agencyName', value: 'agencyId', children: 'subAgencyList' },
angencyVisible: false,
angencyValue: [],
},
@ -80,6 +68,14 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options);
if(options.resiId){
this.setData({
"fmData.resiId":options.resiId,
resiName:options.resiName,
resiMobile:options.mobile
})
}
this.data.qqMapWX = new QQMapWX({
key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ'
})
@ -88,16 +84,21 @@ Page({
})
this.setData({
'fmData.time': Date.now(),
angencyId:app.globalData.user.agencyId
})
this.getAgencygridtree()
},
// 组织树
getAgencygridtree() {
api.getAgencygridtree().then(res=>{
let parm ={
agencyId:this.data.angencyId,
purpose:'query'
}
api.getGridoptionDict(parm).then(res => {
console.log(res);
this.setData({
angencyList:[res.data]
angencyList: res.data
})
console.log(this.data.angencyList);
}).catch(err => {
console.log(err);
})
@ -120,11 +121,12 @@ Page({
this.setData({
fmData: {
...fmData,
addressContent: res.address,
address:res.address,
longitude: res.longitude,
latitude: res.latitude
},
});
console.log(this.data.fmData);
}
})
},
@ -132,10 +134,7 @@ Page({
this.setData({
showRecord: true,
recorderData: {},
recorderTimeMax: "00:00",
recorderTimeCur: "00:00",
isRecord: 0,
recordingTime: 0,
recordingTime: "0:00",
uploadRecord: {
uploaded: true,
url: ""
@ -167,41 +166,6 @@ Page({
// 提交按钮
submitPersonalInfo() {
if (!this.data.addressContent) {
return this.showToast('请选择事件位置')
}
if (!this.data.personalInfo.streetId) {
return this.showToast('请选择所属街道')
}
if (!this.data.personalInfo.communityId) {
return this.showToast('请选择所属社区')
}
if (!this.data.personalInfo.gridId) {
return this.showToast('请选择所属网格')
}
if (!this.data.personalInfo.contactName) {
return this.showToast('请填写联系人姓名')
}
if (!this.data.personalInfo.mobile) {
return this.showToast('请填写手机号')
}
if (!this.data.personalInfo.itemContent) {
return this.showToast('请填写问题描述')
}
if (this.data.personalInfo.itemContent.length < 11) {
return this.showToast('问题描述不少于 10 字')
}
// 如果我上报时候没有提交“详细地址”,电脑pc端的位置就是应该显示事件位置
if (!this.data.personalInfo.issueAddress || this.data.personalInfo.issueAddress.length == 0) {
this.setData({
'personalInfo.issueAddress': this.data.addressContent
})
} else {
this.setData({
'personalInfo.issueAddress': this.data.addressContent + this.data.personalInfo.issueAddress
})
}
const imagesList = []
if (this.data.uploadImageList.length > 0) {
const isUploadDown = this.data.uploadImageList.some(item => !item.uploaded)
@ -220,20 +184,10 @@ Page({
})
}
this.setData({
'personalInfo.images': imagesList,
'personalInfo.itemVoice': this.data.uploadRecord.url,
'personalInfo.duration': this.data.recorderDuration
})
if (this.data.isNewUser) { // 新用户
this.setData({
formSub: true
'fmData.attachmentList': imagesList,
})
this.getTokenV3() // 通过gridId 拿到userId
} else { // 老用户
console.log('直接调接口')
console.log(this.data.fmData);
this.submitItem()
// this.submitPersonalInfoByWx()
}
},
@ -247,9 +201,13 @@ Page({
this.setData({
submitDisabled: true
})
const para = this.data.personalInfo
submitItem(para).then(res => {
const para = this.data.fmData
para.resiId = '1501821695344775169'
para.gridId = '9c55c566524a8b171df57a792d2933bd'
para.happenTime = '2023-04-05 03:07:00'
api.addEvent(para).then(res => {
wx.hideLoading()
console.log(res);
if (res.data) {
wx.showModal({
title: '提示',
@ -264,10 +222,7 @@ Page({
'personalInfo.itemVoice': '',
'personalInfo.duration': '',
'personalInfo.images': [],
'personalInfo.contactName': '',
'personalInfo.issueAddress': '',
uploadImageList: [],
recorderData: {},
uploadRecord: {
uploaded: true,
url: ""
@ -294,58 +249,16 @@ Page({
})
})
},
// 我是居民/我是党员/我是企业 tab切换
// 详细地址
bindIssueAddressInput(e) {
this.setData({
'personalInfo.issueAddress': e.detail.value
})
},
bindContactNameInput(e) {
this.setData({
'personalInfo.contactName': e.detail.value
})
},
// 手机号 双向绑定
bindMobileInput(e) {
this.setData({
'personalInfo.mobile': e.detail.value
})
},
// 双向绑定 地址输入框
bindAddressInput(e) {
this.setData({
addressContent: e.detail.value
})
},
// 解决ios占位符遮挡问题
bindTextareaFocus() {
this.setData({
placeholderShow: false,
})
},
// 解决ios占位符遮挡问题
bindTextareaBlur(e) {
this.setData({
'personalInfo.itemContent': e.detail.value
})
if (this.data.personalInfo.itemContent.length == 0) {
this.setData({
placeholderShow: true
})
}
},
// 双向绑定 内容输入框
bindTextareaInput(e) {
this.setData({
'personalInfo.itemContent': e.detail.value
'fmData.content': e.detail.value
})
console.log(this.data.fmData);
},
// 点击空白,隐藏sheet
onHideSheet() {
this.setData({
@ -353,57 +266,13 @@ Page({
})
},
//
countRecordTimeline() {
clearInterval(this.data.setInter)
this.data.setInter = setInterval(() => {
this.setData({
recordingTime: this.data.recordingTime + 1
}, () => {
if (this.data.recordingTime < 10) {
this.setData({
recorderTimeCur: "00:0" + this.data.recordingTime
})
} else {
this.setData({
recorderTimeCur: "00:" + this.data.recordingTime
})
}
if (!this.data.showRecord) {
let max = Math.ceil(this.data.recorderData.duration / 1000)
let value = parseFloat(this.data.recordingTime / max).toFixed(2)
this.setData({
audioTimeline: value * 100
})
}
})
}, 1000)
},
sliderchange() {
let max = Math.ceil(this.data.recorderData.duration / 1000)
let value = parseFloat(this.data.recordingTime / max).toFixed(2)
this.setData({
audioTimeline: value * 100
})
},
handleTimeChange(e) {
let { personalInfo } = this.data
const { dateTimeArray, dateTime } = e.detail
personalInfo.reportTime = `${dateTimeArray[0][dateTime[0]]}-${dateTimeArray[1][dateTime[1]]}-${dateTimeArray[2][dateTime[2]]} ${dateTimeArray[3][dateTime[3]]}:${dateTimeArray[4][dateTime[4]]}:${dateTimeArray[5][dateTime[5]]}`
console.log('change', e.detail)
this.setData({
personalInfo
})
},
// 录音end
// 选择图片 上传弹窗 - 上传图片方式 - 选择图片 - 上传图片 - 回调赋值
chooseImage() {
if (this.data.uploadImageList.length > 9) {
if (this.data.uploadImageList.length > 3) {
wx.showToast({
title: "最多上传10张照片",
title: "最多上传3张照片",
icon: "none"
})
return
@ -464,7 +333,6 @@ Page({
uploadImageList
})
}
},
fail(fileRes) {
_this.setData({
@ -481,6 +349,8 @@ Page({
sizeType: ['original', 'compressed'],
sourceType: ['album'],
success(res) {
console.log(res,'图片上传的res');
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = []
const endIndex = _this.data.uploadImageList.length
@ -625,8 +495,7 @@ Page({
gridList: [],
'personalInfo.community': '', // 社区
'personalInfo.communityId': '', // 社区
'personalInfo.grid': '', // 网格
'personalInfo.gridId': '' // 网格
})
} else if (listName == 'communityList') {
this.setData({
@ -660,15 +529,14 @@ Page({
reverseLocation() {
const _this = this
this.data.qqMapWX.reverseGeocoder({
location: {
latitude: _this.data.personalInfo.issueLatitude,
longitude: _this.data.personalInfo.issueLongitude
},
success(res) {
console.log(res);
_this.setData({
fmData: {
addressContent: res.result.address,
address: res.result.address,
longitude:res.result.location.lng,
latitude:res.result.location.lat
},
})
},
@ -681,17 +549,16 @@ Page({
onConfirmDate(e) {
console.log(e);
this.setData({
'fmData.time': e.detail.label,
'fmData.happenTime': e.detail.label + ':00',
timeLabel: e.detail.displayValue.join(' '),
visibleTime: false
})
console.log(this.data.fmData.time)
},
// onVisibleChange(e) {
// this.setData({
// // timeLabel: e.detail.displayValue.join(' '),
// })
// },
onVisibleChange(e) {
this.setData({
// timeLabel: e.detail.displayValue.join(' '),
})
},
onCancel() {
this.setData({
visibleTime: false
@ -759,8 +626,8 @@ Page({
if (isStart && !hasStop) {
recorderManager.stop()
}
// if (!hasStop && hasStart) recorderManager.stop();
// recorderManager.stop();
if (!hasStop && isStart) recorderManager.stop();
recorderManager.stop();
clearInterval(timer)
timer = null
this.setData({
@ -804,9 +671,8 @@ Page({
})
},
// 录音上传
uploadRecord(file, duration) {
console.log(file,duration);
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvoice`,
filePath: file,
@ -827,14 +693,26 @@ Page({
this.setData({
"uploadRecord.uploaded": true,
"uploadRecord.url": "",
recorderDuration: "",
recorderData: {}
totalTime: "",
showRecord: false,
hasStart: false,
isStart: false,
recordingTime: '00:00'
})
} else {
let { recordingLength } = this.data
if (duration - (recordingLength * 1000) > 1000 ) duration = recordingLength * 1000
this.setData({
"uploadRecord.uploaded": true,
"uploadRecord.url": JSON.parse(fileRes.data).data
"uploadRecord.url": JSON.parse(fileRes.data).data,
'fmData.voiceList':[JSON.parse(fileRes.data).data],
showRecord: false,
hasStart: false,
isStart: false,
recordingTime: '00:00',
duration
})
this.downLoadAudio()
console.log(this.data.uploadRecord);
}
},
@ -848,8 +726,7 @@ Page({
this.setData({
"uploadRecord.uploaded": true,
"uploadRecord.url": "",
recorderDuration: "",
recorderData: {}
totalTime: "",
})
}
})
@ -918,7 +795,7 @@ Page({
},
// 录音结束
recordStop() {
const { url, duration, hasStop } = this.data
const { url, recordingLength, hasStop } = this.data
this.setData({
hasStart: false
})
@ -926,7 +803,7 @@ Page({
title: '录音上传中...'
})
console.log(url, duration, hasStop)
console.log(url, recordingLength, hasStop)
if (hasStop) {
this.uploadRecord(url, 600000)
@ -941,6 +818,11 @@ Page({
const { tempFilePath, duration } = res;
this.uploadRecord(tempFilePath, duration)
//
console.log(duration,'上传结束的语音时间');
this.setData({
recordingLength: 0,
totalTime:this.format(duration)
})
});
}
@ -971,7 +853,7 @@ Page({
recordingLength: time,
recordingTime: this.formatTime(time)
});
console.log('timer,还在执行')
console.log('timer,还在执行',this.data.recordingLength)
}, 1000);
},
formatTime(num) {
@ -1001,12 +883,145 @@ Page({
console.log(e);
this.setData({
agencyName: e.detail.label,
'form.grid':e.detail.value[e.detail.value.length - 1],
'fmData.gridId': e.detail.value[e.detail.value.length - 1],
angencyVisible: false
})
console.log(this.form);
console.log(this.data.fmData);
},
onValueChange(e) {
console.log(e);
},
// 播放逻辑
initDuration() {
var _a = this.data, duration = _a.duration;
if (duration) {
this.setData({
totalMax: duration
});
}
console.log('totalMax', this.data.totalMax);
},
downLoadAudio() {
var _this = this;
wx.downloadFile({
url: this.data.uploadRecord.url.url,
success(res) {
console.log(res);
if (res.statusCode === 200) {
console.log('res2222222', res);
_this.setData({
playUrl: res.tempFilePath
});
_this.initAudio();
}
else {
wx.showToast({
title: '音频加载失败',
icon: 'none',
duration: 1500
});
}
},
fail(err) {
console.log(err);
wx.showToast({
title: '音频加载失败',
icon: 'none',
duration: 1500
});
}
});
},
initAudio() {
var _this = this;
innerAudioContext.src = this.data.playUrl;
innerAudioContext.autoplay = false;
this.initDuration();
console.log('ppppplllaaa', innerAudioContext);
innerAudioContext.onCanplay(() => {
console.log('初始化播放', innerAudioContext.duration);
});
innerAudioContext.onPlay(() => {
console.log('开始播放', innerAudioContext.duration);
});
innerAudioContext.onTimeUpdate(() => {
console.log("duration-onTimeUpdate", innerAudioContext.duration);
console.log("currentTime", innerAudioContext.currentTime);
if (innerAudioContext.duration) {
_this.setData({
totalMax: (innerAudioContext.duration * 1000),
});
}
_this.setData({
stepValue: (innerAudioContext.currentTime * 1000),
});
console.log('stepValue', _this.data.stepValue);
console.log('totalTime', _this.data.totalTime);
console.log('totalMax', _this.data.totalMax);
});
innerAudioContext.onEnded(function () {
console.log("end");
_this.setData({
hasPlay: false
});
});
innerAudioContext.onError((res) => {
console.log("errMsg", res.errMsg);
wx.showToast({
title: res.errMsg,
icon: 'none',
duration: 1500
});
});
},
handlePlay() {
var hasPlay = this.data.hasPlay;
if (hasPlay)
this.audioPause();
else
this.audioPlay();
},
audioPause() {
innerAudioContext.pause();
this.setData({
hasPlay: false
});
},
audioPlay() {
innerAudioContext.play();
this.setData({
hasPlay: true
});
console.log('innerAudioContext', innerAudioContext);
},
slideChange(e) {
this.audioPause();
var value = e.detail.value;
console.log('slidechange', value);
innerAudioContext.seek(value / 1000);
this.setData({
stepValue: value,
});
this.audioPlay();
},
handleSlideMove(e) {
this.audioPause();
},
handleAudioDel() {
innerAudioContext.stop();
console.log('innerAudioContextdel', innerAudioContext);
this.setData({
totalTime:'00:00',
'fmData.voiceList':[]
})
},
format(num) {
let min = parseInt(num / 1000 / 60)
let second = parseInt(num / 1000) % 60
min = min >= 10 ? min : '0' + min
second = second >= 10 ? second : '0' + second
return min + ':' + second
},
})

5
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.json

@ -7,5 +7,8 @@
"wux-picker": "../../../../../components/dist/picker/index"
},
"navigationBarTitleText": "诉求摸排"
"navigationBarTitleText": "诉求摸排",
"permissions": {
"scope.record": true
}
}

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

@ -1,6 +1,5 @@
<view class="complete-info" >
<block >
<view class="content">
<view class="personal-info">
<view class="basic-info">
@ -10,18 +9,6 @@
<view class="field-text">所属组织</view>
</view>
<view class="value" bind:tap="showPicker">
<!-- <picker class="picker"
range="{{streetList}}"
range-key="label"
data-list-name="streetList"
data-id-key="streetId"
data-name-key="street"
bindchange="inputSyncPicker">
<view class="picker-text" wx:if="{{personalInfo.street}}">{{personalInfo.street}}</view>
<view class="picker-text z-weak" wx:else>请选择</view>
<image class="menu-arrow" src="../../../../../images/right.png" mode="aspectFit" />
</picker> -->
{{agencyName?agencyName:'请选择'}}
</view>
</view>
@ -50,12 +37,24 @@
<view class="field-text">事件描述</view>
</view>
</view>
<textarea maxlength="500" value="{{fmData.itemContent}}" bindblur="bindTextareaBlur" bindinput="bindTextareaInput" bindfocus="bindTextareaFocus" placeholder="请输入事件描述(不超过500字)">
<textarea maxlength="500" value="{{fmData.itemContent}}" bindblur="bindTextareaInput" bindinput="bindTextareaInput" bindfocus="bindTextareaFocus" placeholder="请输入事件描述(不超过500字)">
</textarea>
<!-- 语音播放 -->
<view class="audio-play" wx:if="{{fmData.voiceList.length>0}}">
<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/>
<slider value="{{stepValue}}" min="0" max="{{totalMax}}" bindchange="slideChange" bindchanging="handleSlideMove" class="audio-slider" active-color="#3A80E7" block-color="#3A80E7" block-size="2" />
<view class="audio-time">{{totalTime}}</view>
</view>
<image src="../../../images/sc.png" bind:tap="handleAudioDel" mode=""/>
</view>
<view class="mkf-img" bindtap="showRecordSheet">
<image src="../../../images/mkf.png" mode=""/> 您也可以语音输入描述
</view>
</view>
<!-- 上传图片 -->
<view class="image-box">
<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">
@ -102,25 +101,21 @@
<text class="must">*</text>
<view class="field-text" >联系人</view>
</view>
<view class="value-dl">
<view class="di-name"></view>
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
<navigator hover-class="backC" class="value-dl" url="/subpages/demandCheck/pages/dissatisfied/searchResi/searchResi" >
<view class="di-name" >
{{resiName?resiName:'请选择'}}
</view>
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</navigator>
</view>
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">联系电话</view>
</view>
<view class="value">
<view class="input">
<input type="text"
placeholder-class="placeholder-style"
value="{{ personalInfo.contactName }}"
placeholder="请输入"
bindinput="bindContactNameInput"
cursor-spacing="14"
maxlength="100" />
<view hover-class="backC" class="value-dl" >
<view class="di-name" >
{{resiMobile?resiMobile:'请输入'}}
</view>
</view>
</view>
@ -136,7 +131,7 @@
<view class="record-actionsheet {{showRecord ? '' : 'record-actionsheet-hide'}}">
<view class="sound-cancle" bind:tap="hancleCancle">取消</view>
<view class="sound-time">{{recordingTime}}</view>
<view class="sound-operate">
<view class="sound-operate-del" bind:tap="handleRecordDel">
<image wx:if="{{isStart}}" src="../../../images/del.png" />
@ -164,7 +159,6 @@
</view>
</view>
<wux-actionsheet id="wux-actionsheet" />
<wux-date-picker
visible="{{ visibleTime }}"
@ -181,10 +175,8 @@
options="{{ angencyList }}"
value="{{ angencyValue }}"
visible="{{angencyVisible}}"
defaultFieldNames="{{defaultFieldNames}}"
controlled
cascade
cols="3"
bind:cancel="hidePicker"
bind:confirm="onConfirmAngecy"
bind:valueChange="onValueChange"

35
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss

@ -450,7 +450,7 @@ color: #333;
.di-name{
margin-right: 14rpx;
text-align: right;
text-align: left;
width: calc(100% - 30rpx);
}
@ -866,8 +866,8 @@ background: rgb(175, 1, 1);
text-align: center;
}
.sound-time {
width: 80rpx;
margin: 0 auto;
width: 100%;
text-align: center;
font-size: 30rpx;
color: #333333;
line-height: 1;
@ -937,3 +937,32 @@ background: rgb(175, 1, 1);
width: 50rpx;
height: 50rpx;
}
.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;
}

292
subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js

@ -0,0 +1,292 @@
// subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.js
import {getResidentBaseInfo} from "../../../../../utils/api"
import api from "../../../../../utils/api"
Page({
/**
* 页面的初始数据
*/
data: {
selectVal:'search',
keyWord:'张三',
lowerThreshold:'10',
loadMoreVisible:false,
loadMoreType: "none",
nodata:false,
pageNo:1,
pageSize:10,
tableData:[],
selectedRadio:null,
resiId:"",
resiName:"",
resiMobile:"",
villageList:[],//小区
villageName:'',
buildingList:[],
buildingName:'',
unitList:[],
unitName:'',
houseList:[],
houseName:'',
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getTable()
this.getQuartersOptions()
},
getTable(){
this.setData({
loadMoreVisible: true,
nodata: false,
loadMoreType: "more",
})
let parm ={
searchKey:this.data.keyWord,
pageSize:this.data.pageSize,
pageNo:this.data.pageNo
}
getResidentBaseInfo(parm).then(res=>{
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,
nodata: true
})
}
}).catch(err=>{
this.setData({
loadMoreVisible: false,
nodata: true,
})
})
},
onScrollToLower(e){
if (this.data.loadMoreType === 'more') {
this.setData({
loadMoreVisible: true,
})
this.data.pageNo += 1
this.getTable()
}
},
getQuartersOptions(){
api.getQuartersOptions().then(res=>{
this.setData({
villageList:res.data
})
}).catch(err=>{
console.log(err);
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
},
chosseTabBar(e){
this.setData({
selectVal:e.currentTarget.dataset.type
})
},
handelBlurKeyWord(e){
this.setData({
keyWord:e.detail.value
})
},
handelClickSearch(){
this.setData({
pageNo:1,
tableData:[]
})
this.getTable()
},
toAddResi(){
wx.navigateTo({
url: '/subpages/addResi/pages/addResi/addResi',
})
},
radioChange(e) {
console.log(e);
this.setData({
selectedRadio: e.detail.value,
resiId:e.currentTarget.dataset.item.resiId,
resiName:e.currentTarget.dataset.item.name,
resiMobile:e.currentTarget.dataset.item.mobile,
});
},
bindPickerChangevillageId(e) {
const selectedIndex = e.detail.value;
const selectedVillage = this.data.villageList[selectedIndex];
this.setData({
villageName: selectedVillage.label,
"form.villageId": selectedVillage.value,
'form.buildId':'',
'form.unitId':'',
'form.homeId':'',
buildingName:'',
buildingList:[],
unitName:'',
unitList:[],
houseName:'',
houseList:[],
});
this.getBuildingoption(selectedVillage.value);
},
bindPickerChangebuilding(e){
const selectedIndex = e.detail.value;
const selectedVillage = this.data.buildingList[selectedIndex];
this.setData({
buildingName: selectedVillage.label,
"form.buildId": selectedVillage.value,
'form.unitId':'',
'form.homeId':'',
unitName:'',
unitList:[],
houseName:'',
houseList:[],
});
this.getUnitoption(selectedVillage.value);
},
bindPickerChangeUnit(e){
const selectedIndex = e.detail.value;
const selectedVillage = this.data.unitList[selectedIndex];
this.setData({
unitName: selectedVillage.label,
"form.unitId": selectedVillage.value,
'form.homeId':'',
houseName:'',
houseList:[],
});
this.getHouseoption(selectedVillage.value);
},
bindPickerChangeHouse(e){
const selectedIndex = e.detail.value;
console.log( this.data.houseList);
const selectedVillage = this.data.houseList[selectedIndex];
this.setData({
houseName: selectedVillage.label,
"form.homeId": selectedVillage.value
});
this.getResidentBaseInfo()
},
bindPickerChangeResi(e){
const selectedIndex = e.detail.value;
const selectedVillage = this.data.resiList[selectedIndex];
console.log(selectedVillage);
this.setData({
resiName: selectedVillage.name,
resiMobile:selectedVillage.mobile,
resiId:selectedVillage.resiId,
});
},
// 获取楼栋列表
getBuildingoption(villageId){
api.getBuildingoption(villageId).then(res=>{
this.setData({
buildingList:res.data
})
}).catch(err=>{
console.log(err);
})
},
// 获取单元列表
getUnitoption(buildingId){
api.getUnitoption(buildingId).then(res=>{
this.setData({
unitList:res.data
})
}).catch(err=>{
console.log(err);
})
},
// 获取房屋列表
getHouseoption(unitId){
api.getHouseoption(unitId).then(res=>{
this.setData({
houseList:res.data
})
}).catch(err=>{
console.log(err);
})
},
getResidentBaseInfo(){
let parm = {
pageNo:1,
pageSize:1000,
villageId:this.data.form.villageId,
buildId:this.data.form.buildId,
unitId:this.data.form.unitId,
homeId:this.data.form.homeId,
}
api.getResidentBaseInfoPage(parm).then(res=>{
this.setData({
resiList:res.data.list
})
}).catch(err=>{
console.log(err);
})
},
toDemandCheck(){
console.log(111);
wx.navigateTo({
url: '/subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck?resiId=' + this.data.resiId + '&mobile=' + this.data.resiMobile + "&resiName=" + this.data.resiName,
})
}
})

7
subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.json

@ -0,0 +1,7 @@
{
"usingComponents": {
"load-more": "../../../../../components/loadMore/loadMore",
"no-data": "../../../../../components/noData/nodata"
},
"navigationBarTitleText": "选择居民"
}

109
subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxml

@ -0,0 +1,109 @@
<view class="header">
<view class="selectBar">
<view bind:tap="chosseTabBar" class="{{selectVal == 'search'?'search-select':''}}" data-type="search" hover-stay-time="300" hover-class="hover-tabbar">查询居民</view>
<view bind:tap="chosseTabBar" class="{{selectVal == 'filter'?'filter-select':''}}" data-type="filter" hover-stay-time="300" hover-class="hover-tabbar">选择居民</view>
<view bind:tap="chosseTabBar" class="{{selectVal == 'card'?'card-select':''}}" data-type="card" hover-stay-time="300" hover-class="hover-tabbar">身份证识别</view>
<image class="selectBarImg {{selectVal=='search'?'search-select':selectVal == 'filter'?'filter-select':'card-select'}}" src="../../../images/selct.png" mode=""/>
</view>
<view class="inout_box" wx:if="{{selectVal == 'search'}}">
<image src="../../../../../images/work/search.png" mode=""/>
<input type="text" placeholder="姓名/手机/身份证/住址等任意组合关键词" bindinput="handelBlurKeyWord" bindblur="handelBlurKeyWord" value="{{keyWord}}" />
<view class="btn_box" bind:tap="handelClickSearch"><text>搜索</text></view>
</view>
</view>
<view wx:if="{{selectVal == 'search'}}">
<scroll-view class="scroll" scroll-y="{{true}}" lower-threshold="{{ lowerThreshold }}" bindscrolltolower="onScrollToLower">
<view class="card">
<view class="list_card" wx:for="{{tableData}}" wx:key="index" data-item="{{item}}">
<view class="radio" style="margin-right: 30rpx;">
<!-- <radio value="{{index}}" color="#3f92fe"/> -->
<radio-group bindchange="radioChange" data-item="{{item}}">
<radio name="userRadioGroup" value="{{index}}" checked="{{selectedRadio == index}}" color="#3f92fe" />
</radio-group>
</view>
<view class="left">
<view > {{item.name}} {{item.mobile}}</view>
<view class="address">地址:{{item.homeName}}</view>
</view>
<view class="right">
<image src="../../../../../../images/right.png" mode=""/>
</view>
</view>
</view>
<view wx:if="{{loadMoreVisible}}" class="loadVisible">{{loadMoreVisible?'如果找不到该居民的信息,您也可以先':'加载中...'}}<text wx:if="{{loadMoreVisible}}" style="color: #3A80E7;" bind:tap="toAddResi">新增居民</text></view>
</scroll-view>
</view>
<view wx:if="{{selectVal == 'filter'}}" >
<view class="form_card">
<view class="form_item">
<view class="label" style="width: 240rpx;">
<view class="title">需求人所在小区</view>
</view>
<view class="input">
<picker bindchange="bindPickerChangevillageId" range-key="label" value="{{index}}" range="{{villageList}}">
<view class="{{villageName?'':'gray'}}">
{{villageName?villageName:'请选择'}}
</view>
</picker>
<image src="../../../../../images/right.png" mode=""/>
</view>
</view>
<view class="form_item">
<view class="label">
<view class="title">所在楼栋</view>
</view>
<view class="input">
<picker bindchange="bindPickerChangebuilding" range-key="label" value="{{index}}" range="{{buildingList}}">
<view class="{{buildingName?'':'gray'}}">
{{buildingName?buildingName:'请选择'}}
</view>
</picker>
<image src="../../../../../images/right.png" mode=""/>
</view>
</view>
<view class="form_item">
<view class="label">
<view class="title">所在单元</view>
</view>
<view class="input">
<picker bindchange="bindPickerChangeUnit" range-key="label" value="{{index}}" range="{{unitList}}">
<view class="{{unitName?'':'gray'}}">
{{unitName?unitName:'请选择'}}
</view>
</picker>
<image src="../../../../../images/right.png" mode=""/>
</view>
</view>
<view class="form_item">
<view class="label ">
<view class="title">门牌号</view>
</view>
<view class="input">
<picker bindchange="bindPickerChangeHouse" range-key="label" value="{{index}}" range="{{houseList}}">
<view class="{{houseName?'':'gray'}}">
{{houseName?houseName:'请选择'}}
</view>
</picker>
<image src="../../../../../images/right.png" mode=""/>
</view>
</view>
<view class="form_item">
<view class="label ">
<view class="title">居民姓名</view>
</view>
<view class="input">
<picker bindchange="bindPickerChangeResi" range-key="name" value="{{index}}" range="{{resiList}}">
<view class="{{resiName?'':'gray'}}">
{{resiName?resiName:'请选择'}}
</view>
</picker>
<image src="../../../../../images/right.png" mode=""/>
</view>
</view>
</view>
<view wx:if="{{loadMoreVisible}}" class="loadVisible">{{loadMoreVisible?'如果找不到该居民的信息,您也可以先':'加载中...'}}<text wx:if="{{loadMoreVisible}}" style="color: #3A80E7;" bind:tap="toAddResi">新增居民</text></view>
</view>
<view wx:if="{{selectVal == 'card'}}">
身份证识别
</view>
<button class="fixed_btn" bind:tap="toDemandCheck" hover-class="white">{{type=='card'?'开始识别':'确 定'}}</button>

251
subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss

@ -0,0 +1,251 @@
/* subpages/demandCheck/pages/dissatisfied/searchResi/searchResi.wxss */
page{
width: 100%;
height: 100%;
overflow: hidden;
background-color: #f7f7f7;
}
.white{
color: white;
}
.header{
min-height: 90rpx;
display: flex;
flex-direction: column;
background-color: #ffff;
padding: 0 20rpx;
box-sizing: border-box;
overflow: hidden;
}
.header .selectBar{
display: flex;
justify-content: space-around;
position: relative;
align-items: center;
}
.header .selectBarImg{
position: absolute;
bottom: -15rpx;
left: 0;
width: 140rpx;
height: 14rpx;
transition: left 0.5s ease;
}
.header .selectBar .search-select{
left: 6%;
transition: left 0.5s ease;
color: #3A80E7;
}
.header .selectBar .filter-select{
left: 38%;
transition: left 0.5s ease;
color: #3A80E7;
}
.header .selectBar .card-select{
left: 72%;
transition: left 0.5s ease;
color: #3A80E7;
}
.header .inout_box {
position: relative;
margin: 40rpx 0 20rpx;
}
.header .inout_box input{
width: auto;
background: #F5F5FA;
border-radius: 47rpx;
padding:0 100rpx 0 69rpx;
height: 76rpx;
font-size: 26rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.header .inout_box image{
position: absolute;
left: 21rpx;
top: 24rpx;
width: 30rpx;
height: 30rpx;
}
.header .inout_box .btn_box{
width: 110rpx;
height: 50rpx;
position: absolute;
top: 15rpx;
right:-10rpx;
display: flex;
align-items: center;
}
.header .inout_box .btn_box text{
width: 80rpx;
height: 30rpx;
line-height: 30rpx;
font-size: 28rpx;
box-sizing: border-box;
color:#3A80E7;
padding-left: 15rpx;
border-left:2rpx #3A80E7 solid ;
}
.scroll {
height: calc(100vh - 250rpx);
overflow-y: scroll;
margin-top: 20rpx;
}
.scroll .card{
background-color: #fff;
border-radius: 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
}
button{
width: 360rpx;
height: 76rpx;
background: linear-gradient(87deg, #81B5FB 0%, #3E92FF 100%);
border-radius: 76rpx !important;
font-size: 32rpx;
font-weight: 400 !important;
font-family: PingFang SC;
color: #FFFFFF;
position: fixed;
bottom: 63rpx;
left: 50%;
transform: translateX(-180rpx);
}
.fixed_btn{
position: fixed;
bottom: 30rpx;
left: 50%;
transform: translateX(-184rpx);
}
.scroll .card{
background-color: #fff;
border-radius: 0 0 20rpx 20rpx;
padding: 0 30rpx;
box-sizing: border-box;
}
.card .list_card{
display: flex;
justify-content: space-around;
padding: 30rpx 0;
align-items: center;
color: #333333;
border-top: 1px solid #f7f7f7;
}
.card .list_card .left{
flex: 1;
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card .list_card .left :nth-child(1),
.card .list_card .left :nth-child(2){
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.card .list_card .left .address{
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 500;
color: #999999;
margin-top: 29rpx;
}
.list_card .right image{
width: 20rpx;
height: 20rpx;
}
.loadVisible{
color: #c1c1c1;
font-size: 24rpx;
width: 100%;
text-align: center;
margin-top: 20rpx;
}
.form_card {
background-color: #fff;
border-radius: 10rpx;
padding: 0 30rpx;
box-sizing: border-box;
height: auto;
}
.form_card > .title{
height: 90rpx;
line-height: 90rpx;
font-size: 34rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
position: relative;
}
.form_card .title .tag{
width: 10rpx;
height: 28rpx;
background: #3A80E7;
border-radius: 4rpx;
position: absolute;
left: -30rpx;
top: 50%;
transform: translateY(-14rpx);
}
.form_card .form_item{
display: flex;
align-items: center;
border-top: 1px solid #EAEAEA;
height: 100rpx;
}
.form_card .form_house{
height: 139rpx;
display: flex;
flex-direction: column;
}
.form_card .form_house .form_bottom{
font-size: 24rpx;
color:#C1C1C1;
position: relative;
top: -10rpx;
}
.form_card .form_item .label{
width: 130rpx;
height: 100%;
line-height: 100rpx;
font-size: 32rpx;
font-family: PingFang SC;
font-weight: 500;
color: #666666;
position: relative;
}
.form_card .form_item .input{
flex: 1;
display: flex;
justify-content: space-around;
align-items: center;
margin-left: 51rpx;
overflow: hidden;
}
.form_card .form_item .input .residentCategorySty{
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.form_card .form_item .input picker,
.form_card .form_item .input input{
flex: 1;
}
.form_card .form_item .input image{
height: 22rpx;
width: 22rpx;
}

43
subpages/searchResult/pages/searchResult/searchResult.wxss

@ -60,27 +60,6 @@ page {
padding: 0 30rpx;
box-sizing: border-box;
}
.content .content_header{
height:162rpx;
background:linear-gradient(531deg, #cfe5f7 0%, #E8F2FF 66%, #F7F7F7 100%);
padding: 30rpx;
border-radius:20rpx 20rpx 0 0;
}
.content .content_header .title{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.content .content_header .font{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
margin: 30rpx 0;
}
.content .card .list_card{
display: flex;
justify-content: space-around;
@ -119,6 +98,28 @@ page {
width: 20rpx;
height: 20rpx;
}
.content .content_header{
height:162rpx;
background:linear-gradient(531deg, #cfe5f7 0%, #E8F2FF 66%, #F7F7F7 100%);
padding: 30rpx;
border-radius:20rpx 20rpx 0 0;
}
.content .content_header .title{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
}
.content .content_header .font{
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #666666;
margin: 30rpx 0;
}
button{
width: 360rpx;
height: 76rpx;

12
utils/api.js

@ -35,7 +35,9 @@ module.exports = {
followUpSave,
followUpDelete,
logout,
getAgencygridtree
getAgencygridtree,
addEvent,
getResidentBaseInfoPage
}
// 消息列表
function getIntelligentMessage(param){
@ -182,3 +184,11 @@ function followUpDelete (parm) {
function getAgencygridtree () {
return fly.post(`gov/org/customeragency/agencygridtree`,)
}
// 上报诉求
function addEvent (parm) {
return fly.post(`governance/icEvent/add-event-resi`,parm)
}
// 上报诉求
function getResidentBaseInfoPage (parm) {
return fly.post(`actual/base/residentBaseInfo/page`,parm)
}

Loading…
Cancel
Save