Browse Source

时间组件,社区摸排页面添加

jw-featrue-zhanlibiao
mk 2 years ago
parent
commit
192b35d8f0
  1. 3
      app.js
  2. 12
      app.json
  3. 477
      components/dist/date-picker-view/index.js
  4. 6
      components/dist/date-picker-view/index.json
  5. 16
      components/dist/date-picker-view/index.wxml
  6. 0
      components/dist/date-picker-view/index.wxss
  7. 9
      components/dist/date-picker-view/locales/en.js
  8. 9
      components/dist/date-picker-view/locales/index.js
  9. 9
      components/dist/date-picker-view/locales/zh_CN.js
  10. 9
      components/dist/date-picker-view/locales/zh_TW.js
  11. 86
      components/dist/date-picker-view/props.js
  12. 23
      components/dist/date-picker/index.js
  13. 7
      components/dist/date-picker/index.json
  14. 45
      components/dist/date-picker/index.wxml
  15. 57
      components/dist/date-picker/index.wxss
  16. 23
      components/dist/date-picker/utils.js
  17. BIN
      images/work/shareBg.png
  18. 50
      pages/work/work.js
  19. 8
      pages/work/work.wxml
  20. 21
      project.private.config.json
  21. 45
      subpages/addResi/pages/addResi/addResi.js
  22. 1
      subpages/addhouse/pages/addhouse/addhouse.js
  23. 10
      subpages/communitySelfInsp/pages/historyQuery/historyQuery.js
  24. 2
      subpages/communitySelfInsp/pages/historyQuery/historyQuery.wxml
  25. BIN
      subpages/demandCheck/images/IC_guanbi@2x.png
  26. BIN
      subpages/demandCheck/images/del.png
  27. BIN
      subpages/demandCheck/images/dianji.png
  28. BIN
      subpages/demandCheck/images/ic_delete@2x.png
  29. BIN
      subpages/demandCheck/images/ic_yitidingwei@2x.png
  30. BIN
      subpages/demandCheck/images/ic_yueduliang.png
  31. BIN
      subpages/demandCheck/images/icon_close.png
  32. BIN
      subpages/demandCheck/images/ig_tianjiatupian@2x.png
  33. BIN
      subpages/demandCheck/images/loading.gif
  34. BIN
      subpages/demandCheck/images/mkf.png
  35. BIN
      subpages/demandCheck/images/right-sword.png
  36. BIN
      subpages/demandCheck/images/save.png
  37. BIN
      subpages/demandCheck/images/tupian.png
  38. BIN
      subpages/demandCheck/images/xiaobofang.png
  39. BIN
      subpages/demandCheck/images/xiaozanting.png
  40. BIN
      subpages/demandCheck/images/yuyin.png
  41. BIN
      subpages/demandCheck/images/zanting.png
  42. 959
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js
  43. 10
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.json
  44. 292
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml
  45. 783
      subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss
  46. 3
      subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml
  47. 7
      subpages/searchResult/pages/searchResult/searchResult.js
  48. 7
      utils/api.js
  49. 1123
      utils/qqmap-wx-jssdk.js

3
app.js

@ -30,7 +30,6 @@ App({
navigationHeight: 40
},
user:{},
share:false,
keyWord:""
share:false
}
})

12
app.json

@ -115,6 +115,18 @@
}
]
},
"permission": {
"scope.userLocation": {
"desc": "亿联社区将获取您的位置信息"
}
},
"requiredPrivateInfos": [
"getLocation",
"chooseLocation"
],
"navigateToMiniProgramAppIdList": [
"wx50ebeb95943868cd"
],
"networkTimeout": {
"request": 60000
},

477
components/dist/date-picker-view/index.js

@ -0,0 +1,477 @@
import baseComponent from '../helpers/baseComponent'
import classNames from '../helpers/classNames'
import locales from './locales/index'
import { props } from './props'
const DATETIME = 'datetime'
const DATE = 'date'
const TIME = 'time'
const MONTH = 'month'
const YEAR = 'year'
const ONE_DAY = 24 * 60 * 60 * 1000
function fomartArray(min, max, step = 1) {
let i = min
let result = []
while (i <= max) {
result.push(i)
i+=step
}
return result
}
function getDaysInMonth(date) {
return new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate()
}
function pad(n) {
return n < 10 ? `0${n}` : n + ''
}
function cloneDate(date) {
return new Date(+date)
}
function setMonth(date, month) {
date.setDate(Math.min(date.getDate(), getDaysInMonth(new Date(date.getFullYear(), month))))
date.setMonth(month)
}
function valueToDate(value, props = {}) {
if (!Array.isArray(value)) {
if (typeof value === 'string') {
value = value.replace(/\-/g, '/')
}
if (!isNaN(Number(value))) {
value = Number(value)
}
return new Date(value)
}
const { mode, use12Hours } = props
const now = new Date()
const year = now.getFullYear()
const month = now.getMonth()
const day = now.getDate()
const newValue = value.map((v) => Number(v))
if (use12Hours && [DATETIME, TIME].includes(mode)) {
const hourIndex = mode === DATETIME ? 3 : 0
const ampmIndex = newValue.length - 1
const ampm = Number(newValue[ampmIndex])
let nhour = Number(newValue[hourIndex])
if (ampm === 1) {
if (nhour <= 12) {
nhour += 12
}
nhour = nhour >= 24 ? 0 : nhour
} else {
if (nhour === 0) {
nhour = 12
}
if (nhour > 12) {
nhour -= 12
}
nhour = nhour >= 12 ? 0 : nhour
}
newValue.splice(hourIndex, 1, nhour)
newValue.splice(ampmIndex, 1)
}
if (mode === TIME) {
newValue.unshift(day)
newValue.unshift(month)
newValue.unshift(year)
} else if (mode === MONTH) {
newValue.push(day)
} else if (mode === YEAR) {
newValue.push(month)
newValue.push(day)
}
while (newValue.length <= 6) {
newValue.push(0)
}
return new Date(...newValue)
}
baseComponent({
properties: props,
data: {
inputValue: [],
options: [],
},
observers: {
inputValue() {
this.updatedCols()
},
value(value) {
this.setValue(value)
},
['mode, minuteStep, use12Hours, minDate, maxDate, minHour, maxHour, minMinute, maxMinute, lang']() {
this.setValue(this.data.inputValue)
},
},
methods: {
getDefaultMinDate() {
if (!this.defaultMinDate) {
this.defaultMinDate = new Date(2000, 1, 1, 0, 0, 0)
}
return this.defaultMinDate
},
getDefaultMaxDate() {
if (!this.defaultMaxDate) {
this.defaultMaxDate = new Date(2030, 1, 1, 23, 59, 59)
}
return this.defaultMaxDate
},
getMinDate() {
return this.data.minDate ? valueToDate(this.data.minDate, this.data) : this.getDefaultMinDate()
},
getMaxDate() {
return this.data.maxDate ? valueToDate(this.data.maxDate, this.data) : this.getDefaultMaxDate()
},
getDateMember(type = 'min', member = 'year') {
const methods = {
min: 'getMinDate',
max: 'getMaxDate',
year: 'getFullYear',
month: 'getMonth',
day: 'getDate',
hour: 'getHours',
minute: 'getMinutes',
}
return this[methods[type]]()[methods[member]]()
},
getDisplayHour(rawHour) {
// 12 hour am (midnight 00:00) -> 12 hour pm (noon 12:00) -> 12 hour am (midnight 00:00)
if (this.data.use12Hours) {
if (rawHour === 0) {
rawHour = 12
}
if (rawHour > 12) {
rawHour -= 12
}
return rawHour
}
return rawHour
},
setHours(date, hour) {
if (this.data.use12Hours) {
const dh = date.getHours()
let nhour = hour
nhour = dh >= 12 ? hour + 12 : hour
nhour = nhour >= 24 ? 0 : nhour // Make sure no more than one day
date.setHours(nhour)
} else {
date.setHours(hour)
}
},
setAmPm(date, index) {
if (index === 0) {
date.setTime(+date - ONE_DAY / 2)
} else {
date.setTime(+date + ONE_DAY / 2)
}
},
getNewDate(values, index) {
const value = parseInt(values[index], 10)
const { mode } = this.data
let newValue = cloneDate(this.getDate())
if (mode === DATETIME || mode === DATE || mode === YEAR || mode === MONTH) {
switch (index) {
case 0:
newValue.setFullYear(value)
break
case 1:
setMonth(newValue, value)
break
case 2:
newValue.setDate(value)
break
case 3:
this.setHours(newValue, value)
break
case 4:
newValue.setMinutes(value)
break
case 5:
this.setAmPm(newValue, value)
break
default:
break
}
} else if (mode === TIME) {
switch (index) {
case 0:
this.setHours(newValue, value)
break
case 1:
newValue.setMinutes(value)
break
case 2:
this.setAmPm(newValue, value)
break
default:
break
}
}
return this.clipDate(newValue)
},
clipDate(date) {
const { mode } = this.data
const minDate = this.getMinDate()
const maxDate = this.getMaxDate()
if (mode === DATETIME) {
if (date < minDate) {
return cloneDate(minDate)
}
if (date > maxDate) {
return cloneDate(maxDate)
}
} else if (mode === DATE || mode === YEAR || mode === MONTH) {
if (+date + ONE_DAY <= minDate) {
return cloneDate(minDate)
}
if (date >= +maxDate + ONE_DAY) {
return cloneDate(maxDate)
}
} else if (mode === TIME) {
const maxHour = maxDate.getHours()
const maxMinutes = maxDate.getMinutes()
const minHour = minDate.getHours()
const minMinutes = minDate.getMinutes()
const hour = date.getHours()
const minutes = date.getMinutes()
if (hour < minHour || hour === minHour && minutes < minMinutes) {
return cloneDate(minDate)
}
if (hour > maxHour || hour === maxHour && minutes > maxMinutes) {
return cloneDate(maxDate)
}
}
return date
},
getDate(d) {
const date = d ? d : this.data.value
return this.clipDate(date ? valueToDate(date, this.data) : this.getMinDate())
},
getDateData(date) {
const { mode, lang } = this.data
const locale = locales[lang]
const selYear = date.getFullYear()
const selMonth = date.getMonth()
const minDateYear = this.getDateMember('min', 'year')
const maxDateYear = this.getDateMember('max', 'year')
const minDateMonth = this.getDateMember('min', 'month')
const maxDateMonth = this.getDateMember('max', 'month')
const minDateDay = this.getDateMember('min', 'day')
const maxDateDay = this.getDateMember('max', 'day')
const years = fomartArray(minDateYear, maxDateYear).map((i) => ({
value: i + '',
label: i + locale.year + '',
}))
if (mode === YEAR) {
return [years]
}
const minMonth = minDateYear === selYear ? minDateMonth : 0
const maxMonth = maxDateYear === selYear ? maxDateMonth : 11
const months = fomartArray(minMonth, maxMonth).map((i) => ({
value: i + '',
label: i + 1 + locale.month + '',
}))
if (mode === MONTH) {
return [years, months]
}
const minDay = minDateYear === selYear && minDateMonth === selMonth ? minDateDay : 1
const maxDay = maxDateYear === selYear && maxDateMonth === selMonth ? maxDateDay : getDaysInMonth(date)
const days = fomartArray(minDay, maxDay).map((i) => ({
value: i + '',
label: i + locale.day + '',
}))
return [years, months, days]
},
getTimeData(date) {
let { minHour, maxHour, minMinute, maxMinute } = this.data
const { mode, minuteStep, use12Hours, lang } = this.data
const locale = locales[lang]
const minDateMinute = this.getDateMember('min', 'minute')
const maxDateMinute = this.getDateMember('max', 'minute')
const minDateHour = this.getDateMember('min', 'hour')
const maxDateHour = this.getDateMember('max', 'hour')
const hour = date.getHours()
if (mode === DATETIME) {
const year = date.getFullYear()
const month = date.getMonth()
const day = date.getDate()
const minDateYear = this.getDateMember('min', 'year')
const maxDateYear = this.getDateMember('max', 'year')
const minDateMonth = this.getDateMember('min', 'month')
const maxDateMonth = this.getDateMember('max', 'month')
const minDateDay = this.getDateMember('min', 'day')
const maxDateDay = this.getDateMember('max', 'day')
if (minDateYear === year && minDateMonth === month && minDateDay === day) {
minHour = minDateHour
if (minDateHour === hour) {
minMinute = minDateMinute
}
}
if (maxDateYear === year && maxDateMonth === month && maxDateDay === day) {
maxHour = maxDateHour
if (maxDateHour === hour) {
maxMinute = maxDateMinute
}
}
} else {
minHour = minDateHour
if (minDateHour === hour) {
minMinute = minDateMinute
}
maxHour = maxDateHour
if (maxDateHour === hour) {
maxMinute = maxDateMinute
}
}
let hours = []
if (minHour === 0 && maxHour === 0 || minHour !== 0 && maxHour !== 0) {
minHour = this.getDisplayHour(minHour)
} else if (minHour === 0 && use12Hours) {
minHour = 1
hours.push({
value: '0',
label: locale.hour ? '12' + locale.hour : '12',
})
}
maxHour = this.getDisplayHour(maxHour)
hours = [...hours, ...fomartArray(minHour, maxHour).map((i) => ({
value: i + '',
label: locale.hour ? i + locale.hour + '' : pad(i),
}))]
const minutes = []
const selMinute = date.getMinutes()
for (let i = minMinute; i <= maxMinute; i += minuteStep) {
minutes.push({
value: i + '',
label: locale.minute ? i + locale.minute + '' : pad(i),
})
if (selMinute > i && selMinute < i + minuteStep) {
minutes.push({
value: selMinute + '',
label: locale.minute ? selMinute + locale.minute + '' : pad(selMinute),
})
}
}
const ampm = [{ value: '0', label: locale.am }, { value: '1', label: locale.pm }]
return [hours, minutes].concat(use12Hours ? [ampm] : [])
},
getValueCols(d) {
const { mode, use12Hours } = this.data
const date = this.getDate(d)
let cols = []
let value = []
if (mode === YEAR) {
return {
cols: this.getDateData(date),
value: [date.getFullYear() + ''],
}
}
if (mode === MONTH) {
return {
cols: this.getDateData(date),
value: [date.getFullYear() + '', date.getMonth() + ''],
}
}
if (mode === DATETIME || mode === DATE) {
cols = this.getDateData(date)
value = [date.getFullYear() + '', date.getMonth() + '', date.getDate() + '']
}
if (mode === DATETIME || mode === TIME) {
cols = cols.concat(this.getTimeData(date))
const hour = date.getHours()
const selMinute = date.getMinutes()
let dtValue = [hour + '', selMinute + '']
let nhour = hour
if (use12Hours) {
nhour = hour === 0 ? 12 : (hour > 12 ? hour - 12 : hour)
dtValue = [nhour + '', selMinute + '', (hour >= 12 ? 1 : 0) + '']
}
value = value.concat(dtValue)
}
return {
value,
cols,
}
},
onValueChange(e) {
const { value, index } = e.detail
const newDate = this.getNewDate(value, index)
const { value: newValue, cols: newCols } = this.getValueCols(newDate)
const values = this.getValue(newValue, newCols)
this.triggerEvent('valueChange', { ...e.detail, ...values, date: +newDate })
},
updatedCols() {
const { cols } = this.getValueCols()
this.setData({ cols })
},
updated(inputValue) {
if (this.data.inputValue !== inputValue) {
this.setData({
inputValue,
})
}
},
setValue(value = this.data.inputValue) {
const { value: inputValue } = this.getValueCols()
this.updated(inputValue)
},
getValue(value = this.data.inputValue, cols = this.data.cols) {
this.picker = this.picker || this.selectComponent('#wux-picker')
return {
...this.picker.getValue(value, cols),
date: +this.getDate(),
}
},
},
attached() {
this.setValue(this.data.value)
},
})

6
components/dist/date-picker-view/index.json

@ -0,0 +1,6 @@
{
"component": true,
"usingComponents": {
"wux-multi-picker-view": "../multi-picker-view/index"
}
}

16
components/dist/date-picker-view/index.wxml

@ -0,0 +1,16 @@
<wux-multi-picker-view
id="wux-picker"
wx:if="{{ cols.length > 0 }}"
prefixCls="{{ multiPickerPrefixCls }}"
pickerPrefixCls="{{ pickerPrefixCls }}"
value="{{ inputValue }}"
itemHeight="{{ itemHeight }}"
itemStyle="{{ itemStyle }}"
indicatorStyle="{{ indicatorStyle }}"
indicatorClass="{{ indicatorClass }}"
maskStyle="{{ maskStyle }}"
maskClass="{{ maskClass }}"
labelAlign="{{ labelAlign }}"
options="{{ cols }}"
bind:valueChange="onValueChange"
/>

0
components/dist/date-picker-view/index.wxss

9
components/dist/date-picker-view/locales/en.js

@ -0,0 +1,9 @@
export default {
year: '',
month: '',
day: '',
hour: '',
minute: '',
am: 'AM',
pm: 'PM',
}

9
components/dist/date-picker-view/locales/index.js

@ -0,0 +1,9 @@
import en from './en'
import zh_CN from './zh_CN'
import zh_TW from './zh_TW'
export default {
en,
zh_CN,
zh_TW,
}

9
components/dist/date-picker-view/locales/zh_CN.js

@ -0,0 +1,9 @@
export default {
year: '年',
month: '月',
day: '日',
hour: '时',
minute: '分',
am: '上午',
pm: '下午',
}

9
components/dist/date-picker-view/locales/zh_TW.js

@ -0,0 +1,9 @@
export default {
year: '年',
month: '月',
day: '日',
hour: '時',
minute: '分',
am: '上午',
pm: '下午',
}

86
components/dist/date-picker-view/props.js

@ -0,0 +1,86 @@
export const props = {
prefixCls: {
type: String,
value: 'wux-date-picker',
},
multiPickerPrefixCls: {
type: String,
value: 'wux-picker',
},
pickerPrefixCls: {
type: String,
value: 'wux-picker-col',
},
value: {
type: null,
value: null,
},
itemHeight: {
type: Number,
value: 34,
},
itemStyle: {
type: [String, Object, Array],
value: '',
},
indicatorStyle: {
type: [String, Object, Array],
value: '',
},
indicatorClass: {
type: String,
value: '',
},
maskStyle: {
type: [String, Object, Array],
value: '',
},
maskClass: {
type: String,
value: '',
},
labelAlign: {
type: String,
value: 'center',
},
mode: {
type: String,
value: 'datetime',
},
minuteStep: {
type: Number,
value: 1,
},
use12Hours: {
type: Boolean,
value: false,
},
minDate: {
type: null,
value: null,
},
maxDate: {
type: null,
value: null,
},
minHour: {
type: Number,
value: 0,
},
maxHour: {
type: Number,
value: 23,
},
minMinute: {
type: Number,
value: 0,
},
maxMinute: {
type: Number,
value: 59,
},
lang: {
type: String,
value: 'zh_CN',
},
}

23
components/dist/date-picker/index.js

@ -0,0 +1,23 @@
import baseComponent from '../helpers/baseComponent'
import popupMixin from '../helpers/popupMixin'
import { props } from '../date-picker-view/props'
import { formatDate } from './utils'
const platformProps = {
labelPropName: 'label',
format(values, props) {
const o = {
datetime: 'yyyy-MM-dd hh:mm',
date: 'yyyy-MM-dd',
year: 'yyyy',
month: 'yyyy-MM',
time: 'hh:mm',
}
return formatDate(values.date, o[props.mode])
},
}
baseComponent({
behaviors: [popupMixin('#wux-picker', platformProps)],
properties: props,
})

7
components/dist/date-picker/index.json

@ -0,0 +1,7 @@
{
"component": true,
"usingComponents": {
"wux-popup": "../popup/index",
"wux-date-picker-view": "../date-picker-view/index"
}
}

45
components/dist/date-picker/index.wxml

@ -0,0 +1,45 @@
<wux-popup
position="bottom"
visible="{{ popupVisible }}"
hasHeader="{{ false }}"
hasFooter="{{ false }}"
mountOnEnter="{{ false }}"
safeArea="bottom"
bind:close="close"
bind:closed="onClosed"
>
<view class="{{ classes.wrap }}" wx:if="{{ mounted }}">
<view class="{{ classes.toolbar }}" wx:if="{{ toolbar }}" catchtouchmove="noop">
<view class="{{ classes.inner }}">
<view class="{{ classes.cancel }}" hover-class="{{ classes.hover }}" bindtap="onCancel" wx:if="{{ toolbar.cancelText }}">{{ toolbar.cancelText }}</view>
<view class="{{ classes.title }}">{{ toolbar.title }}</view>
<view class="{{ classes.confirm }}" hover-class="{{ classes.hover }}" bindtap="onConfirm" wx:if="{{ toolbar.confirmText }}">{{ toolbar.confirmText }}</view>
</view>
</view>
<wux-date-picker-view
id="wux-picker"
multiPickerPrefixCls="{{ multiPickerPrefixCls }}"
pickerPrefixCls="{{ pickerPrefixCls }}"
value="{{ inputValue }}"
itemHeight="{{ itemHeight }}"
itemStyle="{{ itemStyle }}"
indicatorStyle="{{ indicatorStyle }}"
indicatorClass="{{ indicatorClass }}"
maskStyle="{{ maskStyle }}"
maskClass="{{ maskClass }}"
labelAlign="{{ labelAlign }}"
mode="{{ mode }}"
minuteStep="{{ minuteStep }}"
use12Hours="{{ use12Hours }}"
minDate="{{ minDate }}"
maxDate="{{ maxDate }}"
minHour="{{ minHour }}"
maxHour="{{ maxHour }}"
minMinute="{{ minMinute }}"
maxMinute="{{ maxMinute }}"
lang="{{ lang }}"
bind:valueChange="onValueChange"
/>
</view>
</wux-popup>
<slot></slot>

57
components/dist/date-picker/index.wxss

@ -0,0 +1,57 @@
.wux-date-picker__toolbar {
position: relative;
width: 100%;
font-size: 34rpx;
line-height: 1.5;
color: rgba(0,0,0,.85);
background-color: #f7f7f8
}
.wux-date-picker__toolbar::before {
content: " ";
position: absolute;
left: 0;
top: 0;
right: 0;
height: 1PX;
border-top: 1PX solid #d9d9d9;
color: #d9d9d9;
transform-origin: 0 0;
transform: scaleY(.5)
}
.wux-date-picker__inner {
height: 88rpx;
display: -ms-flexbox;
display: flex;
text-align: center
}
.wux-date-picker__title {
position: absolute;
display: block;
width: 100%;
padding: 0;
font-size: 34rpx;
font-weight: 400;
line-height: 88rpx;
color: rgba(0,0,0,.85);
text-align: center;
white-space: nowrap
}
.wux-date-picker__button {
position: absolute;
box-sizing: border-box;
height: 88rpx;
line-height: 88rpx;
padding: 0 30rpx;
z-index: 10
}
.wux-date-picker__button--cancel {
left: 0;
color: #b2b2b2
}
.wux-date-picker__button--confirm {
right: 0;
color: #33cd5f
}
.wux-date-picker__button--hover {
background-color: #ececec
}

23
components/dist/date-picker/utils.js

@ -0,0 +1,23 @@
export function formatDate(date, fmt) {
if (!(date instanceof Date)) {
date = new Date(date)
}
const o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3),
'S': date.getMilliseconds(),
}
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
for (const k in o) {
if (new RegExp(`(${k})`).test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
}
}
return fmt
}

BIN
images/work/shareBg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

50
pages/work/work.js

@ -12,7 +12,8 @@ Page({
SearchRecordsList:[],
communitySelfInspList:[],
communitySelfInspTop:{}
communitySelfInspTop:{},
questionnaireUrl:''
},
/**
@ -115,9 +116,9 @@ Page({
*/
onShareAppMessage() {
return{
title: '亿星社区',
path: ''
title:`${this.data.communitySelfInspTop.agencyName}${this.data.communitySelfInspTop.monthName}月份满意度调查`,
path:'/pages/webView/webView?url=' + this.data.questionnaireUrl,
imageUrl:'../../images/work/shareBg.png'
}
},
onShareTimeline(){
@ -152,9 +153,8 @@ Page({
return
}
wx.navigateTo({
url: `/subpages/searchResult/pages/searchResult/searchResult?type=${this.data.setlectVal}`,
url: `/subpages/searchResult/pages/searchResult/searchResult?type=${this.data.setlectVal}&keyWord=${this.data.keyWord}`,
})
console.log(this.data.setlectVal);
if(this.data.setlectVal == 'house'){
// 获取当前的搜索记录
let records = wx.getStorageSync('searchRecords') || [];
@ -203,7 +203,43 @@ Page({
url: '/subpages/communitySelfInsp/pages/synthesis/synthesis',
})
},
handelClickCopy() {
handelClickShare(e) {
// $wuxActionSheet().showSheet({
// // titleText: '自定义操作',
// buttons: [
// {
// text: '分享给朋友',
// openType:'share'
// },
// {
// text: '分享给朋友圈',
// openType:'share'
// },
// ],
// buttonClicked(index, item) {
// index === 0 &&
// wx.showShareMenu({
// menus:['shareAppMessage']
// })
// index === 1 &&
// wx.showShareMenu({
// menus:['shareTimeline']
// })
// return true
// },
// cancelText: '取消',
// cancel() {},
// // destructiveText: '删除',
// destructiveButtonClicked() {},
// })
this.setData({
questionnaireUrl:e.currentTarget.dataset.item.questionnaireUrl
})
wx.showShareImageMenu({
menus:['shareAppMessage', 'shareTimeline']
})

8
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>
@ -66,9 +66,11 @@
<view class="content">
<view class="bg_box">
<view class="bg_left">
<view class="h2" bind:tap="toWebView" >{{communitySelfInspTop.agencyName}}{{communitySelfInspTop.monthName}}月份满意度自查</view>
<view class="h2" bind:tap="toWebView" >
{{communitySelfInspTop.agencyName}}{{communitySelfInspTop.monthName}}月份满意度自查
</view>
<view class="submit">已提交 <b>{{communitySelfInspTop.personQty?communitySelfInspTop.personQty:'--'}}</b> 人</view>
<view class="btn_Box"> <button class="btn_fx" bind:tap="handelClickCopy" open-type="share" >一键分享</button> <view class="btn_tj" bind:tap="toSynthesis">查看统计</view>
<view class="btn_Box"> <button class="btn_fx" bind:tap="handelClickShare" data-item="{{communitySelfInspTop}}" open-type="share" >一键分享</button> <view class="btn_tj" bind:tap="toSynthesis">查看统计</view>
</view>
</view>
<view class="bg_right">

21
project.private.config.json

@ -8,6 +8,20 @@
"condition": {
"miniprogram": {
"list": [
{
"name": "诉求摸排",
"pathName": "subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "查询结果",
"pathName": "subpages/searchResult/pages/searchResult/searchResult",
"query": "type=resi&keyWord=马",
"launchMode": "default",
"scene": null
},
{
"name": "回访记录详情",
"pathName": "subpages/communitySelfInsp/pages/followUpDetail/followUpDetail",
@ -64,13 +78,6 @@
"launchMode": "default",
"scene": null
},
{
"name": "查询结果",
"pathName": "subpages/searchResult/pages/searchResult/searchResult",
"query": "type=resi&keyWord=小程序",
"launchMode": "default",
"scene": null
},
{
"name": "新增居民",
"pathName": "subpages/addResi/pages/addResi/addResi",

45
subpages/addResi/pages/addResi/addResi.js

@ -239,8 +239,11 @@ Page({
console.log(err);
})
},
// 获取婚姻信息
getFamilyInfoDetailById(){
api.getFamilyInfoDetailById(this.data.resiId).then(res=>{
console.log(this.data.marriageList);
console.log(res);
this.setData({
'form.familyInfoDto':res.data,
marriageName:this.data.marriageList.filter(item=>item.value ==res.data.marriage)[0].label
@ -386,8 +389,11 @@ Page({
if (this.data.isFirstLoadGrid) {
// 编辑回填逻辑
const id = this.data.form.gridId;
console.log(id);
console.log(this.data.gridList);
const temp = this.data.gridList.filter(item => item.value == id);
const gridName = ''
console.log(temp);
let gridName = ''
if(temp.length != 0){
gridName = temp[0].label
}else{
@ -430,7 +436,14 @@ Page({
if (this.data.isFirstLoadVillage) {
// 编辑回填逻辑
const id = this.data.form.villageId;
const villageName = this.data.villageList.filter(item => item.value == id)[0].label;
const temp = this.data.villageList.filter(item => item.value == id);
let villageName = ''
if(temp.length != 0){
villageName = temp[0].label
}else{
this.showToast('小区信息有误')
return
}
this.setData({
villageName: villageName,
"form.villageId": id
@ -439,6 +452,7 @@ Page({
this.setData({
isFirstLoadVillage: false
});
console.log(this.data.villageList,'小区');
} else {
// 正常修改逻辑
const selectedIndex = e.detail.value;
@ -465,7 +479,14 @@ Page({
bindPickerChangebuilding(e){
if (this.data.isFirstLoadBuilding) {
const id = this.data.form.buildId;
const buildingName = this.data.buildingList.filter(item => item.value == id)[0].label;
const temp = this.data.buildingList.filter(item => item.value == id);
let buildingName = ''
if(temp.length != 0){
buildingName = temp[0].label
}else{
this.showToast('小区信息有误')
return
}
this.setData({
buildingName: buildingName,
"form.buildId": id
@ -493,7 +514,14 @@ Page({
bindPickerChangeUnit(e){
if (this.data.isFirstLoadUnit) {
const id = this.data.form.unitId;
const unitName = this.data.unitList.filter(item => item.value == id)[0].label;
const temp = this.data.unitList.filter(item => item.value == id);
let unitName = ''
if(temp.length != 0){
unitName = temp[0].label
}else{
this.showToast('楼栋信息有误')
return
}
this.setData({
unitName: unitName,
"form.unitId": id,
@ -518,7 +546,14 @@ Page({
bindPickerChangeHouse(e){
if (this.data.isFirstLoadHouse) {
const id = this.data.form.homeId;
const houseName = this.data.houseList.filter(item => item.value == id)[0].label;
const temp = this.data.houseList.filter(item => item.value == id);
let houseName = ''
if(temp.length != 0){
houseName = temp[0].label
}else{
this.showToast('房屋信息有误')
return
}
this.setData({
houseName: houseName,
"form.homeId": id

1
subpages/addhouse/pages/addhouse/addhouse.js

@ -127,6 +127,7 @@ Page({
})
await this.setDataAsync({
form:res.data,
'form.sysCoding':res.data.ownerIdCard,
gridId:res.data.gridId
});
setTimeout(()=>{

10
subpages/communitySelfInsp/pages/historyQuery/historyQuery.js

@ -78,13 +78,17 @@ Page({
*/
onShareAppMessage() {
return{
title:'问卷调查',
path:'/pages/webView/webView?url=' + this.data.url
title:`${this.data.agencyName}${this.data.monthName}月份满意度调查`,
path:'/pages/webView/webView?url=' + this.data.questionnaireUrl,
imageUrl:'../../../../images/work/shareBg.png'
}
},
share(e){
console.log(e);
this.setData({
url:e.currentTarget.dataset.url
url:e.currentTarget.dataset.item.questionnaireUrl,
agencyName:e.currentTarget.dataset.item.agencyName,
monthName:e.currentTarget.dataset.item.monthName
})
},
getTable(){

2
subpages/communitySelfInsp/pages/historyQuery/historyQuery.wxml

@ -18,7 +18,7 @@
</view>
<view class="right">
<view wx:if="{{item.status == 1}}" class="bule">
<image src="../../../../images/share.png" mode=""/> <button open-type="share" bind:tap="share" data-url="{{item.questionnaireUrl}}">分享</button>
<image src="../../../../images/share.png" mode=""/> <button open-type="share" bind:tap="share" data-item="{{item}}">分享</button>
</view>
<view wx:else class="score">
<b>{{item.synthesisScore}}</b>分

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
subpages/demandCheck/images/del.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
subpages/demandCheck/images/dianji.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

BIN
subpages/demandCheck/images/ic_yueduliang.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
subpages/demandCheck/images/icon_close.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
subpages/demandCheck/images/loading.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
subpages/demandCheck/images/mkf.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 606 B

BIN
subpages/demandCheck/images/right-sword.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

BIN
subpages/demandCheck/images/save.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
subpages/demandCheck/images/tupian.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
subpages/demandCheck/images/xiaobofang.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
subpages/demandCheck/images/xiaozanting.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

BIN
subpages/demandCheck/images/yuyin.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
subpages/demandCheck/images/zanting.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

959
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.js

@ -1,19 +1,711 @@
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 timer;
Page({
/**
* 页面的初始数据
*/
data: {
fmData: {
time:'',
grid:''
},
minDate:'2018-01-01 00:00:00',
timeLabel:'',
placeholderShow: true,
uploadImageList: [],
streetList: [], // 街道
imageId: 1,
addressContent: '',
address: '',
overDuration: 600000,
duration: 0,
url: '',
hasStop: false,
hasStart: false, // 录音开始 暂停
isStart: false, // 是否开启录音
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: "", // 录音时长
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'},
angencyVisible:false,
angencyValue:[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.data.qqMapWX = new QQMapWX({
key: 'CMJBZ-4DECI-JXGGN-5B4WU-QLV2H-B5BEJ'
})
this.getLocation().then(() => {
this.reverseLocation()
})
this.setData({
'fmData.time':Date.now(),
})
this.getAgencygridtree()
},
// 组织树
getAgencygridtree(){
api.getAgencygridtree().then(res=>{
this.setData({
angencyList:[res.data]
})
console.log(this.data.angencyList);
}).catch(err=>{
console.log(err);
})
},
// 触底函数
onReachBottom() {
if (this.projectlist) {
this.projectlist.onReachBottom()
}
},
toughGetLocation() {
this.getLocation(false);
wx.chooseLocation({
success: res => {
console.log('resadddres', res)
const { fmData } = this.data;
this.setData({
fmData: {
...fmData,
addressContent: res.address,
longitude: res.longitude,
latitude: res.latitude
},
});
}
})
},
showRecordSheet () {
this.setData({
showRecord: true,
recorderData: {},
recorderTimeMax: "00:00",
recorderTimeCur: "00:00",
isRecord: 0,
recordingTime: 0,
uploadRecord: {
uploaded: true,
url: ""
}
})
},
// 获取经纬度
getLocation() {
return new Promise((resolve, reject) => {
const _this = this
wx.getLocation({
type: 'gcj02',
success(res) {
if (res.latitude && res.longitude) {
_this.setData({
'personalInfo.issueLatitude': res.latitude,
'personalInfo.issueLongitude': res.longitude
})
resolve(true)
}
},
fail(err) {
reject(err)
}
})
})
},
// 提交按钮
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)
if (isUploadDown) {
wx.showToast({
title: '请等待图片上传完成',
icon: 'none',
duration: 1000
})
return false
}
}
if (this.data.uploadImageList.length > 0) {
this.data.uploadImageList.forEach(item => {
imagesList.push(item.ossUrl)
})
}
this.setData({
'personalInfo.images': imagesList,
'personalInfo.itemVoice': this.data.uploadRecord.url,
'personalInfo.duration': this.data.recorderDuration
})
if (this.data.isNewUser) { // 新用户
this.setData({
formSub: true
})
this.getTokenV3() // 通过gridId 拿到userId
} else { // 老用户
console.log('直接调接口')
this.submitItem()
// this.submitPersonalInfoByWx()
}
},
// 提交接口
submitItem() {
wx.showLoading({
title: '提交中...',
mask: true
})
this.setData({
submitDisabled: true
})
const para = this.data.personalInfo
submitItem(para).then(res => {
wx.hideLoading()
if (res.data) {
wx.showModal({
title: '提示',
content: `您的诉求我们已经查收,正在快马加鞭办理,请您耐心等待\r\n诉求编号为:${res.data}`,
confirmText: '确认',
showCancel: false,
success: res => {
this.setData({
submitDisabled: false,
'personalInfo.nickname': '',
'personalInfo.itemContent': '',
'personalInfo.itemVoice': '',
'personalInfo.duration': '',
'personalInfo.images': [],
'personalInfo.contactName': '',
'personalInfo.issueAddress': '',
uploadImageList: [],
recorderData: {},
uploadRecord: {
uploaded: true,
url: ""
},
})
this.projectlist = this.selectComponent('#projectlist')
}
})
} else {
wx.showToast({
title: "提交失败,请重试~",
icon: "none",
duration: 1500
})
this.setData({
submitDisabled: false
})
}
}).catch(err => {
console.log(err)
wx.hideLoading()
this.setData({
submitDisabled: false
})
})
},
// 我是居民/我是党员/我是企业 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
})
},
// 点击空白,隐藏sheet
onHideSheet() {
this.setData({
showRecord: false
})
},
//
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) {
wx.showToast({
title: "最多上传10张照片",
icon: "none"
})
return
}
const _this = this
$wuxActionSheet().showSheet({
buttons: [
{ text: '拍照' },
{ text: '从相册中获取' },
],
className: 'dialog-class',
buttonClicked(index) {
if (index === 0) {
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['camera'],
success(res) {
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = [..._this.data.uploadImageList]
if (res.tempFiles[0].size <= 5 * 1024 * 1024) {
uploadImageList.push({
uploaded: false,
ossUrl: '',
imgUrl: res.tempFiles[0].path,
imageId: ++_this.data.imageId
})
} else {
_this.showToast('图片上限5M,请压缩后重试~')
return false
}
_this.setData({
uploadImageList
})
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFilePaths[0],
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
// 删除
const index = _this.data.uploadImageList.findIndex(item => item.imageId === _this.data.imageId)
if (index > -1) {
_this.data.uploadImageList.splice(index, 1)
_this.setData({
uploadImageList: _this.data.uploadImageList
})
}
} else {
uploadImageList[uploadImageList.length - 1].uploaded = true
uploadImageList[uploadImageList.length - 1].ossUrl = JSON.parse(fileRes.data).data
_this.setData({
uploadImageList
})
}
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
}
})
} else if (index === 1) {
wx.chooseImage({
count: 1,
sizeType: ['original', 'compressed'],
sourceType: ['album'],
success(res) {
let deleteLength = _this.data.uploadImageList.length
const uploadImageList = []
const endIndex = _this.data.uploadImageList.length
res.tempFiles.forEach(item => {
if (item.size <= 5 * 1024 * 1024) {
uploadImageList.push({
uploaded: false,
ossUrl: '',
imgUrl: item.path,
imageId: ++_this.data.imageId
})
} else {
_this.showToast('图片上限5M,请压缩后重试~')
}
})
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
uploadImageList.forEach((item, index) => {
return (function (index) {
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvariedfile`,
filePath: res.tempFilePaths[index],
name: 'file',
header: {
'Content-type': 'application/json;charset=UTF-8',
'Authorization': wx.getStorageSync('token')
},
success(fileRes) {
if (!JSON.parse(fileRes.data).data) {
_this.showToast('图片上传失败,请重试~')
_this.data.uploadImageList.splice(deleteLength, _this.data.uploadImageList.length - deleteLength)
_this.setData({
uploadImageList: _this.data.uploadImageList
})
} else {
uploadImageList[index].uploaded = true
uploadImageList[index].ossUrl = JSON.parse(fileRes.data).data
_this.data.uploadImageList = _this.data.uploadImageList.slice(0, endIndex)
_this.setData({
uploadImageList: [..._this.data.uploadImageList, ...uploadImageList]
})
}
console.log(_this.data.uploadImageList.length, '图片上传长度');
},
fail(fileRes) {
_this.setData({
uploadImageList: []
})
_this.showToast('图片上传失败,请重试~')
}
})
})(index)
})
}
})
}
return true
},
cancelText: '取消',
cancel() { },
destructiveButtonClicked() { },
})
},
// 删除选中的图片
deleteImage(e) {
const index = this.data.uploadImageList.findIndex(item => item.imageId === e.currentTarget.dataset.imageid)
if (index > -1) {
this.data.uploadImageList.splice(index, 1)
this.setData({
uploadImageList: this.data.uploadImageList
})
}
},
// 代码简化,弹窗统一封装
showToast(title) {
wx.showToast({
title: title,
icon: 'none',
duration: 2000
})
},
// 街道社区
getDeptTree() {
getDeptTree().then(res => {
this.setData({
streetList: res.data[0].children
})
if (this.data.personalInfo.streetId && this.data.personalInfo.communityId) {
this.data.streetList.forEach(element => {
if (element.value == this.data.personalInfo.streetId) {
this.setData({
'personalInfo.street': element.label,
communityList: element.children // 社区
})
// 循环社区
element.children.forEach(community => {
if (community.value == this.data.personalInfo.communityId) {
this.setData({
'personalInfo.community': community.label,
gridList: community.children
// 'personalInfo.grid': community.children[0].label, // 网格默认选择第一个
// 'personalInfo.gridId': community.children[0].value // 网格
})
}
});
}
});
}
}).catch(err => {
console.log(err)
})
},
// 单选点击事件
inputSyncPicker(e) {
let {
detail: { value },
currentTarget: {
dataset: { idKey, nameKey, listName, subname, subindex },
},
} = e;
let item = this.data[listName][value];
let { personalInfo } = this.data;
if (subname && subindex !== undefined) {
personalInfo[subname][subindex][idKey] = item.value;
personalInfo[subname][subindex][nameKey] = item.label;
} else {
personalInfo[idKey] = item.value;
personalInfo[nameKey] = item.label;
}
this.setData({ personalInfo });
this.dataHandle(listName)
},
dataHandle(listName) {
if (listName == 'streetList') {
this.setData({
communityList: [],
gridList: [],
'personalInfo.community': '', // 社区
'personalInfo.communityId': '', // 社区
'personalInfo.grid': '', // 网格
'personalInfo.gridId': '' // 网格
})
} else if (listName == 'communityList') {
this.setData({
gridList: [],
'personalInfo.grid': '', // 网格
'personalInfo.gridId': '' // 网格
})
}
if (this.data.personalInfo.streetId) { // 选择街道
this.data.streetList.forEach((element, index) => {
if (this.data.personalInfo.streetId == element.value) {
this.setData({
communityList: element.children
})
}
});
}
if (this.data.personalInfo.communityId) { // 选择社区
this.data.communityList.forEach((element, index) => {
if (this.data.personalInfo.communityId == element.value) {
this.setData({
gridList: element.children
// 'personalInfo.grid': element.children[0].label, // 网格默认选择第一个
// 'personalInfo.gridId': element.children[0].value // 网格
})
}
});
}
},
// 逆地址解析
reverseLocation() {
const _this = this
this.data.qqMapWX.reverseGeocoder({
location: {
latitude: _this.data.personalInfo.issueLatitude,
longitude: _this.data.personalInfo.issueLongitude
},
success(res) {
_this.setData({
fmData: {
addressContent: res.result.address,
address: res.result.address,
},
})
},
fail(err) {
console.debug(err)
}
})
},
onConfirmDate(e) {
console.log(e);
this.setData({
'fmData.time': e.detail.label,
timeLabel: e.detail.displayValue.join(' '),
visibleTime:false
})
console.log(this.data.fmData.time)
},
// onVisibleChange(e) {
// this.setData({
// // timeLabel: e.detail.displayValue.join(' '),
// })
// },
onCancel(){
this.setData({
visibleTime:false
})
},
showTimePicker(){
this.setData({
visibleTime:true
})
},
onPageScroll: function (e) {
if (this.projectlist) {
this.projectlist.onPageScroll(e)
}
},
/**
@ -51,17 +743,270 @@ Page({
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
// /page/user?id=123
onShareAppMessage() {
return {
path: 'pages/peopleLivelihood/peopleLivelihood',
}
},
handleRecordDel() {
const { hasStop, isStart } = this.data
console.log('hasStop---', this.data.hasStop)
if (isStart && !hasStop) {
recorderManager.stop()
}
// if (!hasStop && hasStart) recorderManager.stop();
// recorderManager.stop();
clearInterval(timer)
timer = null
this.setData({
recordingTime: '00:00',
recordingLength: 0,
hasStart: false,
isStart: false,
hasStop: false,
url: '',
duration: 0
})
},
handleRecord() {
let { hasStart } = this.data
console.log(hasStart);
if (hasStart) this.recortPause()
else this.recortResume()
},
handleOpenRecord() {
this.setData({
isStart: true,
});
console.log('opppppp')
this.recordStart()
},
// 录音暂停
recortPause() {
recorderManager.pause();
this.setData({
hasStart: false
})
clearInterval(timer)
timer = null
},
// 录音继续
recortResume() {
this.recordingTimer()
recorderManager.resume();
this.setData({
hasStart: true
})
},
uploadRecord(file, duration) {
console.log(file,duration);
wx.uploadFile({
url: `${config.BASEURL()}oss/file/uploadvoice`,
filePath: file,
name: "file",
header: {
"Content-type": "multipart/form-data",
'Authorization': wx.getStorageSync('token')
},
success: (fileRes) => {
wx.hideLoading()
console.log('ressss', fileRes)
if (!JSON.parse(fileRes.data).data) {
wx.showToast({
title: "录音上传失败,请重试~",
icon: "none",
duration: 1500
})
this.setData({
"uploadRecord.uploaded": true,
"uploadRecord.url": "",
recorderDuration: "",
recorderData: {}
})
} else {
this.setData({
"uploadRecord.uploaded": true,
"uploadRecord.url": JSON.parse(fileRes.data).data
})
console.log(this.data.uploadRecord);
}
},
fail: (fileRes) => {
console.log(fileRes);
wx.showToast({
title: "录音上传失败,请重试~",
icon: "none",
duration: 1500
})
this.setData({
"uploadRecord.uploaded": true,
"uploadRecord.url": "",
recorderDuration: "",
recorderData: {}
})
}
})
},
// 录音开始
recordStart() {
this.setData({
hasStart: true,
});
const options = {
duration: this.data.overDuration,
format: 'mp3',
type: 'voice'
};
this.recordingTimer()
recorderManager.start(options);
recorderManager.onStart(res => {
console.log('recorder start', res);
});
recorderManager.onPause(res => {
console.log('onPause', res)
})
console.log(recorderManager);
recorderManager.onResume(res => {
console.log('onResume', res)
})
recorderManager.onStop((res) => {
console.log('recorder stop', res);
const { tempFilePath, duration } = res;
this.setData({
hasStop: true,
url: tempFilePath,
duration
})
//
});
recorderManager.onFrameRecorded(res => {
console.log('onFrameRecorded', res)
})
recorderManager.onError((res) => {
console.log('recorder onError', res);
wx.showToast({
title: res.errMsg,
icon: 'none',
duration: 1500
})
});
},
// 录音暂停
recortPause() {
recorderManager.pause();
this.setData({
hasStart: false
})
clearInterval(timer)
timer = null
},
// 录音继续
recortResume() {
this.recordingTimer()
recorderManager.resume();
this.setData({
hasStart: true
})
},
// 录音结束
recordStop() {
const { url, duration, hasStop } = this.data
this.setData({
hasStart: false
})
wx.showLoading({
title: '录音上传中...'
})
console.log(url, duration, hasStop)
if (hasStop) {
this.uploadRecord(url, 600000)
console.log('hasStop', hasStop)
} else {
console.log('hasStopeee', hasStop)
recorderManager.stop();
clearInterval(timer)
timer = null
recorderManager.onStop((res) => {
console.log('recorder stop1111', res);
const { tempFilePath, duration } = res;
this.uploadRecord(tempFilePath, duration)
//
});
}
},
recordingTimer() {
clearInterval(timer)
timer = null
timer = setInterval(() => {
let { overDuration, recordingLength } = this.data
if (recordingLength * 1000 >= overDuration) {
wx.showToast({
title: '录音已超时,已停止录音',
icon: 'none',
duration: 1500
})
console.log('lllllllll超时了')
recorderManager.stop();
clearInterval(timer)
timer = null
this.setData({
hasStart: false
})
return
}
let time = this.data.recordingLength + 1;
this.setData({
recordingLength: time,
recordingTime: this.formatTime(time)
});
console.log('timer,还在执行')
}, 1000);
},
formatTime(num) {
let min = parseInt(num / 60)
let second = num % 60
min = min >= 10 ? min : '0' + min
second = second >= 10 ? second : '0' + second
return min + ':' + second
},
hancleCancle() {
this.handleRecordDel()
this.setData({
showRecord:false
})
},
hidePicker(){
this.setData({
angencyVisible:false
})
},
showPicker(){
this.setData({
angencyVisible:true
})
},
onConfirmAngecy(e){
console.log(e);
this.setData({
agencyName:e.detail.label,
'form.grid':e.detail.value[e.detail.value.length - 1],
angencyVisible:false
})
console.log(this.form);
},
onValueChange(e){
console.log(e);
}
})

10
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.json

@ -1,3 +1,11 @@
{
"usingComponents": {}
"usingComponents": {
"wux-actionsheet": "../../../../../components/dist/actionsheet/index",
"wux-segmented-control": "../../../../../components/dist/segmented-control/index",
"wux-date-picker": "../../../../../components/dist/date-picker/index",
"wux-cell-group": "../../../../../components/dist/cell-group/index",
"wux-picker": "../../../../../components/dist/picker/index"
},
"navigationBarTitleText": "诉求摸排"
}

292
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxml

@ -1,114 +1,116 @@
<view class="complete-info" >
<block >
<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 class="field-text">所属组织</view>
</view>
<view class="value-dl" bindtap="getPosition">
<view class="di-name">{{addressContent}}</view>
<image class="di-but" src="../../images/dingwei.png" mode="aspectFit" />
<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>
<view class="item">
<view class="field field-d">
<view class="field-text">详细地址</view>
<view class="field">
<text class="must">*</text>
<view class="field-text">诉求类型</view>
</view>
<view class="value-mobile">
<radio-group class="radio-group" bindchange="bindFlagChange">
<radio checked="{{personalInfo.showFlag === '0'}}" value="0" checked="true" color="#4193fe" class="radio">事件上报</radio>
<radio checked="{{personalInfo.showFlag === '1'}}" value="1" color="#4193fe" class="radio">居民需求</radio>
</radio-group>
</view>
<view class="value value-d">
<view class="input" style="width: 100%;">
<input type="text"
placeholder-class="placeholder-style"
value="{{ personalInfo.issueAddress }}"
placeholder="请输入准确位置,便于事件办理"
bindinput="bindIssueAddressInput"
cursor-spacing="14"
maxlength="100" />
</view>
</view>
</view>
<!-- wx:if="{{streetList.length>0}}" -->
<view class="add-issue">
<view class="issue-content">
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">所属街道</view>
<view class="field-text">事件描述</view>
</view>
<view class="value">
<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/arrow.png" mode="aspectFit" />
</picker>
</view>
<textarea maxlength="500" value="{{fmData.itemContent}}" bindblur="bindTextareaBlur" bindinput="bindTextareaInput" bindfocus="bindTextareaFocus" placeholder="请输入事件描述(不超过500字)">
</textarea>
<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">
<view class="field-text">上传图片</view>
</view>
<view
class="image-item"
wx:for="{{uploadImageList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="imageId">
<image class="issue-image" src="{{item.imgUrl}}" />
<image wx:if="{{!item.uploaded}}" class="loading" src="../../../images/loading.gif" />
<image bindtap="deleteImage" data-imageid="{{item.imageId}}" class="close" wx:else src="../../../images/icon_close.png" />
</view>
<image wx:if="{{uploadImageList.length < 3}}" src="../../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" />
</view>
</view>
<!-- wx:if="{{communityList.length>0}}" -->
</view>
<view class="personal-info">
<view class="basic-info">
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">所属社区</view>
<view class="field-text">发生时间</view>
</view>
<view class="value" data-name="community" bindtap="organizationTip">
<picker class="picker"
disabled="{{ communityList.length == 0 ? true : false }}"
range="{{communityList}}"
range-key="label"
data-list-name="communityList"
data-id-key="communityId"
data-name-key="community"
bindchange="inputSyncPicker">
<view class="picker-text" wx:if="{{personalInfo.community}}">{{personalInfo.community}}</view>
<view class="picker-text z-weak" wx:else>请选择</view>
<image class="menu-arrow" src="../../images/arrow.png" mode="aspectFit" />
</picker>
<view class="value-dl" bind:tap="showTimePicker">
<view class="di-name">{{timeLabel?timeLabel:'请选择发生时间'}}</view>
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</view>
</view>
<!-- wx:if="{{gridList.length>0}}" -->
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">所属网格</view>
<view class="field-text">发生地点</view>
</view>
<view class="value" data-name="grid" bindtap="organizationTip">
<picker class="picker"
disabled="{{ gridList.length == 0 ? true : false }}"
range="{{gridList}}"
range-key="label"
data-list-name="gridList"
data-id-key="gridId"
data-name-key="grid"
bindchange="inputSyncPicker">
<view class="picker-text" wx:if="{{personalInfo.grid}}">{{personalInfo.grid}}</view>
<view class="picker-text z-weak" wx:else>请选择</view>
<image class="menu-arrow" src="../../images/arrow.png" mode="aspectFit" />
</picker>
<view class="value-dl" bind:tap="toughGetLocation">
<view class="di-name">{{fmData.addressContent}}</view>
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</view>
</view>
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">是否公开</view>
<view class="field-text">联系人</view>
</view>
<view class="value-mobile">
<radio-group class="radio-group" bindchange="bindFlagChange">
<radio checked="{{personalInfo.showFlag === '0'}}" value="0" color="#F82525" class="radio">不公开</radio>
<radio checked="{{personalInfo.showFlag === '1'}}" value="1" color="#F82525" class="radio">公开</radio>
</radio-group>
<view class="value-dl">
<view class="di-name"></view>
<image class="di-but" src="../../../../../images/right.png" mode="aspectFit" />
</view>
</view>
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">联系人姓名</view>
<view class="field-text">联系电话</view>
</view>
<view class="value">
<view class="input">
@ -122,123 +124,69 @@
</view>
</view>
</view>
<view class="item no-border-bottom" wx:if="{{getMobileType === 'wx'}}">
<view class="field mobile-field">
<text class="must">*</text>
<view class="field-text">手机号</view>
</view>
<view class="value-mobile">
<input wx:if="{{ personalInfo.mobile }}" disabled="{{true}}" type="number" bindblur="bindMobileInput" bindinput="bindMobileInput" value="{{ personalInfo.mobile }}" placeholder-class="placeholder-style" placeholder="请获取手机号" />
<button hover-class="button-hover" class="get-code" open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">{{ personalInfo.mobile ? '重新获取' : '获取手机号'}}</button>
</view>
</view>
<view class="item" wx:if="{{getMobileType === 'self'}}">
<view class="field">
<view class="must">*</view>
<view class="field-text">手机号</view>
</view>
<view class="value">
<view class="input">
<input
type="number"
bindblur="bindMobileInput"
bindinput="bindMobileInput"
value="{{personalInfo.mobile}}"
placeholder-class="placeholder-style"
placeholder="请输入手机号" />
</view>
</view>
</view>
<view class="item no-border-bottom" wx:if="{{getMobileType === 'self'}}">
<view class="field">
<text class="must">*</text>
<view class="field-text">验证码</view>
</view>
<view class="value-mobile">
<input bindblur="bindSmsCodeInput" bindinput="bindSmsCodeInput" value="{{personalInfo.smsCode}}" placeholder-class="placeholder-style" placeholder="请输入验证码" />
<button disabled="{{smsCodeText !== '获取验证码'}}" bindtap="getSmsCode" hover-class="button-hover" class="get-code">{{smsCodeText}}</button>
</view>
<view class="submit-button">
<button disabled="{{ submitDisabled }}" bindtap="submitPersonalInfo" hover-class="hover-submit">提交</button>
</view>
</view>
<view class="note" bindtap="changeGetMobileType">{{getMobileType === 'wx' ? '*如若获取手机号异常,请点击切换至手机号/验证码注册方式' : '*点击可切回至从微信获取手机号注册方式'}}</view>
</block>
</view>
<view class="sheet-bg" wx:if="{{showRecord}}"></view>
<view class="record-actionsheet {{showRecord ? '' : 'record-actionsheet-hide'}}">
<view class="add-issue">
<view class="issue-content">
<view class="item">
<view class="field">
<text class="must">*</text>
<view class="field-text">问题描述</view>
</view>
</view>
<textarea maxlength="500" value="{{personalInfo.itemContent}}" bindblur="bindTextareaBlur" bindinput="bindTextareaInput" bindfocus="bindTextareaFocus">
<view class="textarea-placeholder" wx:if="{{placeholderShow}}">
<view>请输入主要问题内容(不少于10字)</view>
</view>
</textarea>
<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-item"
wx:for="{{uploadImageList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="imageId">
<image class="issue-image" src="{{item.imgUrl}}" />
<image wx:if="{{!item.uploaded}}" class="loading" src="../../images/loading.gif" />
<image bindtap="deleteImage" data-imageid="{{item.imageId}}" class="close" wx:else src="../../images/icon_close.png" />
</view>
<!-- <image wx:if="{{uploadImageList.length < 3}}" src="../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" /> -->
</view>
<view class="audio" wx:if="{{recorderData.tempFilePath && !showRecord}}">
<view class="delete-audio">
<image bindtap="deleteRecord" src="../../images/icon_close.png" />
</view>
<view class="control-button" wx:if="{{!uploadRecord.uploaded}}">
<image src="../../images/loading.gif"/>
<view class="sound-cancle" bind:tap="hancleCancle">取消</view>
<view class="sound-operate">
<view class="sound-operate-del" bind:tap="handleRecordDel">
<image wx:if="{{isStart}}" src="../../../images/del.png" />
</view>
<block wx:else>
<view class="control-button">
<image src="../../images/xiaozanting.png" wx:if="{{!isPlayAudio}}" bindtap="onPlayAudio"/>
<image src="../../images/xiaobofang.png" wx:else bindtap="onStopAudio"/>
<view class="sound-operate-btn">
<view class="sound-circel">
<view wx:if="{{isStart}}" class="sound-circle-bd" bind:tap="handleRecord">
<view class="sound-play {{!hasStart && 'sound-play-stop'}}">
<view class="sound-play-item"></view>
<view class="sound-play-item"></view>
<view class="sound-play-item"></view>
<view class="sound-play-item"></view>
</view>
<view class="control-line">
<slider class="control-slider" value="{{audioTimeline}}" bindchange="sliderchange" min="0" max="100" block-size="15" selected-color="#fd6161"/>
<view class="line-time">
<view class="time-text">{{recorderTimeCur}}</view>
<view class="time-text">{{recorderTimeMax}}</view>
</view>
<view wx:else class="sound-circle-bd sound-circle-bg" bind:tap="handleOpenRecord"></view>
</view>
</block>
</view>
<!-- <view class="{{ uploadImageList.length < 3 ? 'image-list' : uploadImageList.length > 2 && uploadImageList.length < 6 ? 'image-list image-list-2' : uploadImageList.length > 5 && uploadImageList.length < 9 ? 'image-list image-list-3' : 'image-list image-list-4' }}">
<view
class="image-item"
wx:for="{{uploadImageList}}"
wx:for-index="index"
wx:for-item="item"
wx:key="imageId">
<image class="issue-image" src="{{item.imgUrl}}" />
<image wx:if="{{!item.uploaded}}" class="loading" src="../../../../images/loading.gif" />
<image bindtap="deleteImage" data-imageid="{{item.imageId}}" class="close" wx:else src="../../images/icon_close.png" />
<view class="sound-operate-finish" bind:tap="recordStop">
<image wx:if="{{isStart}}" src="../../../images/save.png" />
</view>
<image wx:if="{{uploadImageList.length < 10}}" src="../../images/ig_tianjiatupian@2x.png" bindtap="chooseImage" />
</view>
<view class="tip">*最多可添加10张图片</view> -->
<view class="sound-tips">
<view >点击发布语音内容</view>
<view >限10分钟内</view>
</view>
<view class="image-box">
<!-- <view class="yg-zp">图片、录音</view> -->
<!-- <view class="yg-zp-1">图片不多于 10 张、录音不超过 1 分钟</view> -->
<view>
<image class="add-icon" src="../../images/tupian.png" bindtap="chooseImage"/>
<image class="add-icon" src="../../images/yuyin.png" bindtap="showRecordSheet"/>
</view>
</view>
</view>
<view class="submit-button">
<button disabled="{{ submitDisabled }}" bindtap="submitPersonalInfo" hover-class="hover-submit">提交</button>
</view>
</view>
<wux-actionsheet id="wux-actionsheet" />
<wux-date-picker
visible="{{ visibleTime }}"
controlled
mode="datetime"
value="{{ fmData.time }}"
lang="zh_CN"
minDate="{{minDate}}"
bind:confirm="onConfirmDate"
bind:visibleChange="onVisibleChange"
bind:cancel="onCancel"
/>
<wux-picker
options="{{ angencyList }}"
value="{{ angencyValue }}"
visible="{{angencyVisible}}"
defaultFieldNames="{{defaultFieldNames}}"
controlled
cascade
cols="3"
bind:cancel="hidePicker"
bind:confirm="onConfirmAngecy"
bind:valueChange="onValueChange"
>
</wux-picker>

783
subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss

@ -1,10 +1,35 @@
/* subpages/demandCheck/pages/dissatisfied/demandCheck/demandCheck.wxss */
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 - 100rpx);
}
.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%;
@ -12,6 +37,7 @@
padding: 0 20rpx;
overflow: hidden;
}
.basic-info {
width: 100%;
background: #fff;
@ -21,6 +47,345 @@
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;
padding: 0rpx 20rpx 0;
}
.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 {
margin-top: 15rpx;
width: 100%;
height: 298rpx;
background-color: #f7f7f7;
padding:30rpx;
font-size: 34rpx;
color: #333;
line-height: 50rpx;
position: relative;
}
.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: 214rpx;
margin-top:80rpx ;
}
.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%;
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;
@ -156,3 +521,419 @@
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;
}
.radio-group radio + radio {
margin-left: 20rpx;
}
.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: 80rpx;
margin: 0 auto;
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;
}
.mkf-img image{
width: 50rpx;
height: 50rpx;
}

3
subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml

@ -1,7 +1,8 @@
<!--subpages/gatherInformation/pages/gatherInformation/gatherInformation.wxml-->
<view class="search" >
<view class="filter" bind:tap="handelShow">
{{typeVal =='resi'?'居民信息采集':typeVal=='house'?'房屋信息采集':'全部信息'}} <text wx:if="{{collectTypeVal != ''}}">,</text> {{collectTypeVal =='add'?'新增':collectTypeVal =='edit'?'修改':collectTypeVal == 'del'?'删除':''}}
{{typeVal =='resi'?'居民信息采集':typeVal=='house'?'房屋信息采集':'全部信息'}} <text wx:if="{{collectTypeVal != ''}}"></text>
<!-- {{collectTypeVal =='add'?'新增':collectTypeVal =='edit'?'修改':collectTypeVal == 'del'?'删除':''}} -->
<image src="../images/down.png" mode=""/>
</view>
<view class="box">

7
subpages/searchResult/pages/searchResult/searchResult.js

@ -30,9 +30,8 @@ Page({
share:app.globalData.share,
title:options.type =='resi'?'居民查询结果':'房屋查询结果',
type:options.type,
keyWord:app.globalData.keyWord
keyWord:options.keyWord
})
console.log(this.data.keyWord,'dataK');
this.getTable()
},
@ -47,7 +46,6 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow() {
console.log(this.data.keyWord,'show');
},
/**
@ -103,7 +101,6 @@ Page({
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(res.data.list),
})
console.log(this.data.loadMoreType);
if (this.data.tableData.length == 0) {
this.setData({
loadMoreVisible: false,
@ -122,7 +119,6 @@ Page({
loadMoreType: res.data.list.length === this.data.pageSize ? 'more' : 'none',
tableData: this.data.tableData.concat(res.data.list),
})
console.log(this.data.loadMoreType);
if (this.data.tableData.length == 0) {
this.setData({
loadMoreVisible: false,
@ -155,7 +151,6 @@ Page({
}
},
handelClickedit(e){
console.log(e);
if(this.data.type == 'resi'){
wx.navigateTo({
url: `/subpages/addResi/pages/addResi/addResi?type=edit&resiId=${e.currentTarget.dataset.item.resiId}`,

7
utils/api.js

@ -34,7 +34,8 @@ module.exports = {
getFollowUpList,
followUpSave,
followUpDelete,
logout
logout,
getAgencygridtree
}
// 消息列表
function getIntelligentMessage(param){
@ -177,3 +178,7 @@ function followUpSave (parm) {
function followUpDelete (parm) {
return fly.post(`governance/satisfaction/communitySelfInsp/followUp/delete/${parm}`,)
}
// 获取组织树
function getAgencygridtree () {
return fly.post(`gov/org/customeragency/agencygridtree`,)
}

1123
utils/qqmap-wx-jssdk.js

File diff suppressed because it is too large
Loading…
Cancel
Save