Browse Source

fix 处理内容只有在已办未半可看

dev
巴林闲侠 2 years ago
parent
commit
7bca110a50
  1. 25
      weapp/src/packages/patrol/index.jsx

25
weapp/src/packages/patrol/index.jsx

@ -255,7 +255,7 @@ const Index = () => {
])
}, [reportType])
function report() {
function report () {
if (!canReport) { return }
if (
(isPatrol && (!projectType || !road))
@ -332,7 +332,7 @@ const Index = () => {
})
}
function deleteReport() {
function deleteReport () {
Taro.showModal({
title: '提示',
content: '确定删除吗?',
@ -359,7 +359,7 @@ const Index = () => {
})
}
function handleInput({ detail: { value } }, type) {
function handleInput ({ detail: { value } }, type) {
switch (type) {
case 'roadSectionStart':
setRoadSectionStart(value)
@ -394,15 +394,15 @@ const Index = () => {
}
}
function handleTypeChange(e) {
function handleTypeChange (e) {
setReportType(e.detail.value)
}
function handleImgChange(files, operationType, index, type) {
function handleImgChange (files, operationType, index, type) {
if (operationType === 'remove') {
setImg(false)
}
function setImg(isAdd, url) {
function setImg (isAdd, url) {
switch (type) {
case 'scenePic':
let nextImg = sceneImg
@ -502,12 +502,12 @@ const Index = () => {
}
}
function handleImgClick(index, file) {
function handleImgClick (index, file) {
Taro.previewImage({
urls: [file.url] // http
})
}
function handleImgClicks(index, file) {
function handleImgClicks (index, file) {
Taro.previewImage({
urls: [file] // http
})
@ -529,7 +529,7 @@ const Index = () => {
}
}
}, [road])
function handleOk() {
function handleOk () {
if (!canReport) { return }
let str = handleCenter.trim()
if (!str) {
@ -574,14 +574,14 @@ const Index = () => {
}
})
}
function addVideo() {
function addVideo () {
wx.chooseMedia({
count: 1,
mediaType: ['video'],
sourceType: ['album', 'camera'],
maxDuration: 15,
camera: 'back',
success(res) {
success (res) {
const tempFilePaths = res.tempFiles[0].tempFilePath
let token = getState('token') || Taro.getStorageSync('token')
if (res.tempFiles[0].duration < 15) {
@ -947,7 +947,8 @@ const Index = () => {
<AtButton type='primary' className='sub-btn' onClick={report}>上报</AtButton>
}
{
handleType == '已处理' || wait == 'wait' || handle == 'handle' ? <view>
// handleType == '' ||
wait == 'wait' || handle == 'handle' ? <view>
<view className='patrol-img'><text style={{ color: 'red' }}>*</text>处理内容</view>
<AtTextarea
title='处理内容:'

Loading…
Cancel
Save