|
|
@ -20,7 +20,6 @@ const Index = () => { |
|
|
|
|
|
|
|
const router = useRouter() |
|
|
|
const { params: { type, kind, wait, handle, videoShow } } = router |
|
|
|
console.log(router); |
|
|
|
const isView = type === 'view' ? true : false |
|
|
|
const isPatrol = kind === 'patrol' || kind == 'conserve' ? true : false |
|
|
|
const isRoad = kind === 'road' ? true : false |
|
|
@ -108,7 +107,7 @@ const Index = () => { |
|
|
|
Taro.setNavigationBarTitle({ title: '在建项目' }) |
|
|
|
} else if (wait == 'wait') { |
|
|
|
Taro.setNavigationBarTitle({ title: '待办事项' }) |
|
|
|
}else if (handle == 'handle') { |
|
|
|
} else if (handle == 'handle') { |
|
|
|
Taro.setNavigationBarTitle({ title: '已办事项' }) |
|
|
|
} else if (isAnomaly) { |
|
|
|
Taro.setNavigationBarTitle({ title: '异常反馈' }) |
|
|
@ -141,6 +140,7 @@ const Index = () => { |
|
|
|
setAddress(data.address) |
|
|
|
setContent(data.content) |
|
|
|
setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: imgUrl + item })) : []) |
|
|
|
setHandlePic(data.handlePic ? data.handlePic.map(item => ({ url: imgUrl + item })) : []) |
|
|
|
setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: imgUrl + item })) : []) |
|
|
|
setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: imgUrl + item })) : []) |
|
|
|
setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: imgUrl + item })) : []) |
|
|
@ -148,9 +148,6 @@ const Index = () => { |
|
|
|
if (data.handleContent) { |
|
|
|
setHandleCenter(data.handleContent) |
|
|
|
} |
|
|
|
if (data.handlePic.length) { |
|
|
|
setHandlePic(data.handlePic) |
|
|
|
} |
|
|
|
} else { |
|
|
|
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' }) |
|
|
|
} |
|
|
@ -395,6 +392,7 @@ const Index = () => { |
|
|
|
setImg(false) |
|
|
|
} |
|
|
|
function setImg(isAdd, url) { |
|
|
|
console.log(url, '图片地址'); |
|
|
|
switch (type) { |
|
|
|
case 'scenePic': |
|
|
|
let nextImg = sceneImg |
|
|
@ -457,6 +455,9 @@ const Index = () => { |
|
|
|
case 'scenePic': |
|
|
|
i = scenePic.length |
|
|
|
break; |
|
|
|
case 'wait': |
|
|
|
i = handlePic.length |
|
|
|
break; |
|
|
|
case 'conserveBeforePic': |
|
|
|
i = conserveBeforePic.length |
|
|
|
break; |
|
|
@ -529,17 +530,12 @@ const Index = () => { |
|
|
|
Taro.showToast({ title: '内容字数不能超过50', icon: 'none' }) |
|
|
|
return |
|
|
|
} |
|
|
|
let handlePicList = [] |
|
|
|
if (handlePic.length) { |
|
|
|
handlePic.forEach(e => { |
|
|
|
handlePicList.push(e.url) |
|
|
|
}) |
|
|
|
} |
|
|
|
let data = { |
|
|
|
handleContent: str, |
|
|
|
handlePic: handlePicList, |
|
|
|
handlePic: handlePicPn, |
|
|
|
handleState: '已处理' |
|
|
|
} |
|
|
|
console.log(data, 'data'); |
|
|
|
Taro.showModal({ |
|
|
|
title: '提示', |
|
|
|
content: '您要进行处理提交吗?', |
|
|
@ -598,7 +594,7 @@ const Index = () => { |
|
|
|
}) |
|
|
|
} |
|
|
|
console.log(scenePic, '现场图片'); |
|
|
|
console.log(videoShow, 'videoShow'); |
|
|
|
console.log(handlePic, '处理图片'); |
|
|
|
return ( |
|
|
|
<View className='patrol'> |
|
|
|
{/* { |
|
|
@ -895,7 +891,7 @@ const Index = () => { |
|
|
|
} |
|
|
|
</View> |
|
|
|
} |
|
|
|
{ |
|
|
|
{/* { |
|
|
|
videoShow ? '' : |
|
|
|
<view> |
|
|
|
<Video |
|
|
@ -911,7 +907,7 @@ const Index = () => { |
|
|
|
|
|
|
|
<AtButton type='secondary' size='small' onClick={addVideo}>添加视频</AtButton> |
|
|
|
</view> |
|
|
|
} |
|
|
|
} */} |
|
|
|
{ |
|
|
|
isView ? |
|
|
|
isSuperAdmin && |
|
|
@ -936,7 +932,7 @@ const Index = () => { |
|
|
|
handle == 'handle' ? |
|
|
|
<View className='img-box'> |
|
|
|
{handlePic.map(item => ( |
|
|
|
<Image className='img' src={item} onClick={() => handleImgClicks(undefined, item)} /> |
|
|
|
<Image className='img' src={item.url} onClick={() => handleImgClicks(undefined, item)} /> |
|
|
|
))} |
|
|
|
</View> : |
|
|
|
<AtImagePicker |
|
|
|