|
@ -1,5 +1,5 @@ |
|
|
import React, { useState, useEffect } from 'react'; |
|
|
import React, { useState, useEffect } from 'react'; |
|
|
import Taro from '@tarojs/taro'; |
|
|
import Taro, { useRouter } from '@tarojs/taro'; |
|
|
import { |
|
|
import { |
|
|
View, |
|
|
View, |
|
|
RadioGroup, |
|
|
RadioGroup, |
|
@ -9,14 +9,19 @@ import { |
|
|
Input, |
|
|
Input, |
|
|
Picker |
|
|
Picker |
|
|
} from '@tarojs/components'; |
|
|
} from '@tarojs/components'; |
|
|
import { AtButton, AtTextarea, AtImagePicker } from 'taro-ui'; |
|
|
import { AtButton, AtTextarea, AtImagePicker, AtAvatar } from 'taro-ui'; |
|
|
import InputPicker from '../components/inputPicker'; |
|
|
import InputPicker from '../components/inputPicker'; |
|
|
import request from '@/services/request'; |
|
|
import request from '@/services/request'; |
|
|
import { postReport } from '@/services/api'; |
|
|
import { postReport, getReportDetail } from '@/services/api'; |
|
|
import './index.scss'; |
|
|
import './index.scss'; |
|
|
import arrowIcon from '../../static/img/patrol/arrow-down.svg'; |
|
|
import arrowIcon from '../../static/img/patrol/arrow-down.svg'; |
|
|
|
|
|
|
|
|
const Index = () => { |
|
|
const Index = () => { |
|
|
|
|
|
const router = useRouter() |
|
|
|
|
|
const { params: { type } } = router |
|
|
|
|
|
const isView = type === 'view' ? true : false |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const [reportType, setReportType] = useState('patrol') // 上报类型 |
|
|
const [reportType, setReportType] = useState('patrol') // 上报类型 |
|
|
const [projectType, setProjectType] = useState('') // 工程类型 |
|
|
const [projectType, setProjectType] = useState('') // 工程类型 |
|
|
const [road, setRoad] = useState('') // 所在道路 |
|
|
const [road, setRoad] = useState('') // 所在道路 |
|
@ -32,6 +37,21 @@ const Index = () => { |
|
|
const [roadStartSelector, setRoadStartSelector] = useState([]) |
|
|
const [roadStartSelector, setRoadStartSelector] = useState([]) |
|
|
const [roadEndSelector, setRoadEndSelector] = useState([]) |
|
|
const [roadEndSelector, setRoadEndSelector] = useState([]) |
|
|
|
|
|
|
|
|
|
|
|
const [canReport, setCanReport] = useState(true) |
|
|
|
|
|
|
|
|
|
|
|
const [typeList, setTypeList] = useState([ |
|
|
|
|
|
{ |
|
|
|
|
|
value: 'patrol', |
|
|
|
|
|
text: '巡查', |
|
|
|
|
|
checked: true |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: 'conserve', |
|
|
|
|
|
text: '养护', |
|
|
|
|
|
checked: false |
|
|
|
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
const rPrjTypeSelector = ['道路', '桥梁', '涵洞', '其他'] |
|
|
const rPrjTypeSelector = ['道路', '桥梁', '涵洞', '其他'] |
|
|
const rRoadSelector = ['富山一路', '金沙大道', '玉湖路'] |
|
|
const rRoadSelector = ['富山一路', '金沙大道', '玉湖路'] |
|
|
|
|
|
|
|
@ -39,11 +59,61 @@ const Index = () => { |
|
|
const rRoadEndSelector = ['一段', '二段', '三段'] |
|
|
const rRoadEndSelector = ['一段', '二段', '三段'] |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|
|
|
|
if (isView) { |
|
|
|
|
|
Taro.showLoading({ |
|
|
|
|
|
title: '加载中' |
|
|
|
|
|
}) |
|
|
|
|
|
request.get(getReportDetail(router.params.id)).then(res => { |
|
|
|
|
|
Taro.hideLoading() |
|
|
|
|
|
if (res.statusCode == 200 || res.statusCode == 204) { |
|
|
|
|
|
const { data } = res |
|
|
|
|
|
setReportType(data.reportType) |
|
|
|
|
|
setProjectType(data.projectType) |
|
|
|
|
|
setRoad(data.road) |
|
|
|
|
|
setRoadSectionStart(data.roadSectionStart) |
|
|
|
|
|
setRoadSectionEnd(data.roadSectionEnd) |
|
|
|
|
|
setAddress(data.address) |
|
|
|
|
|
setContent(data.content) |
|
|
|
|
|
setScenePic(data.scenePic ? data.scenePic.map(item => ({ url: item })) : []) |
|
|
|
|
|
setConserveBeforePic(data.conserveBeforePic ? data.conserveBeforePic.map(item => ({ url: item })) : []) |
|
|
|
|
|
setConserveUnderwayPic(data.conserveUnderwayPic ? data.conserveUnderwayPic.map(item => ({ url: item })) : []) |
|
|
|
|
|
setConserveAfterPic(data.conserveAfterPic ? data.conserveAfterPic.map(item => ({ url: item })) : []) |
|
|
|
|
|
} else { |
|
|
|
|
|
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' }) |
|
|
|
|
|
} |
|
|
|
|
|
}, err => { |
|
|
|
|
|
Taro.showToast({ title: err.message || '请求出错', icon: 'none' }) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
setRoadStartSelector(rRoadStartSelector) |
|
|
setRoadStartSelector(rRoadStartSelector) |
|
|
setRoadEndSelector(rRoadEndSelector) |
|
|
setRoadEndSelector(rRoadEndSelector) |
|
|
}, []) |
|
|
}, []) |
|
|
|
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
|
|
setTypeList([ |
|
|
|
|
|
{ |
|
|
|
|
|
value: 'patrol', |
|
|
|
|
|
text: '巡查', |
|
|
|
|
|
checked: reportType === 'patrol' ? true : false |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: 'conserve', |
|
|
|
|
|
text: '养护', |
|
|
|
|
|
checked: reportType === 'conserve' ? true : false |
|
|
|
|
|
} |
|
|
|
|
|
]) |
|
|
|
|
|
}, [reportType]) |
|
|
|
|
|
|
|
|
function report() { |
|
|
function report() { |
|
|
|
|
|
if (!canReport) { return } |
|
|
|
|
|
if (!projectType || !road) { |
|
|
|
|
|
Taro.showToast({ title: '请完善必填信息', icon: 'none' }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (rPrjTypeSelector.indexOf(projectType) === -1) { |
|
|
|
|
|
Taro.showToast({ title: '工程类型错误', icon: 'none' }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
let data = { |
|
|
let data = { |
|
|
reportType, |
|
|
reportType, |
|
|
projectType, |
|
|
projectType, |
|
@ -52,34 +122,46 @@ const Index = () => { |
|
|
roadSectionEnd, |
|
|
roadSectionEnd, |
|
|
address, |
|
|
address, |
|
|
content, |
|
|
content, |
|
|
longitude: 37.000000000000, |
|
|
// longitude: 37.000000000000, |
|
|
latitude: 69.000000000000 |
|
|
// latitude: 69.000000000000 |
|
|
} |
|
|
} |
|
|
if (reportType === 'patrol') { |
|
|
if (reportType === 'patrol') { |
|
|
data['scenePic'] = scenePic.length > 0 && scenePic.map(item => item.url) |
|
|
data['scenePic'] = scenePic.length > 0 ? scenePic.map(item => item.url) : null |
|
|
} else { |
|
|
} else { |
|
|
data['conserveBeforePic'] = conserveBeforePic.length > 0 && conserveBeforePic.map(item => item.url) |
|
|
data['conserveBeforePic'] = conserveBeforePic.length > 0 ? conserveBeforePic.map(item => item.url) : null |
|
|
data['conserveUnderwayPic'] = conserveUnderwayPic.length > 0 && conserveUnderwayPic.map(item => item.url) |
|
|
data['conserveUnderwayPic'] = conserveUnderwayPic.length > 0 ? conserveUnderwayPic.map(item => item.url) : null |
|
|
data['conserveAfterPic'] = conserveAfterPic.length > 0 && conserveAfterPic.map(item => item.url) |
|
|
data['conserveAfterPic'] = conserveAfterPic.length > 0 ? conserveAfterPic.map(item => item.url) : null |
|
|
} |
|
|
|
|
|
for (var key in data) { |
|
|
|
|
|
if (!data[key]) { |
|
|
|
|
|
Taro.showToast({ title: '请完善信息', icon: 'none' }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (rPrjTypeSelector.indexOf(data.projectType) === -1) { |
|
|
|
|
|
Taro.showToast({ title: '工程类型错误', icon: 'none' }) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
} |
|
|
request.post(postReport(), data).then(res => { |
|
|
|
|
|
if (res.statusCode == 200 || res.statusCode == 204) { |
|
|
Taro.showModal({ |
|
|
Taro.showToast({ title: '上报成功', icon: 'none' }) |
|
|
title: '提示', |
|
|
} else { |
|
|
content: '您要进行信息上报么?', |
|
|
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' }) |
|
|
success: function (res) { |
|
|
|
|
|
if (res.confirm) { |
|
|
|
|
|
setCanReport(false) |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
setCanReport(true) |
|
|
|
|
|
}, 3000) // 3秒内不可以重复点击 |
|
|
|
|
|
Taro.showLoading({ |
|
|
|
|
|
title: '上报中' |
|
|
|
|
|
}) |
|
|
|
|
|
request.post(postReport(), data).then(res => { |
|
|
|
|
|
Taro.hideLoading() |
|
|
|
|
|
if (res.statusCode == 200 || res.statusCode == 204) { |
|
|
|
|
|
Taro.showToast({ title: '上报成功', icon: 'none', duration: 1500 }) |
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
Taro.reLaunch({ |
|
|
|
|
|
url: '/pages/home/index' |
|
|
|
|
|
}); |
|
|
|
|
|
}, 1500) |
|
|
|
|
|
} else { |
|
|
|
|
|
Taro.showToast({ title: res.data.message || '请求出错', icon: 'none' }) |
|
|
|
|
|
} |
|
|
|
|
|
}, err => { |
|
|
|
|
|
Taro.showToast({ title: err.message || '请求出错', icon: 'none' }) |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, err => { |
|
|
|
|
|
Taro.showToast({ title: err.message || '请求出错', icon: 'none' }) |
|
|
|
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -139,18 +221,105 @@ const Index = () => { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const typeList = [ |
|
|
function renderAddImg() { |
|
|
{ |
|
|
return ( |
|
|
value: 'patrol', |
|
|
reportType === 'patrol' ? |
|
|
text: '巡查', |
|
|
<View className='patrol-img'> |
|
|
checked: true |
|
|
现场图片: |
|
|
}, |
|
|
<AtImagePicker |
|
|
{ |
|
|
className='img-picker' |
|
|
value: 'conserve', |
|
|
count={3 - scenePic.length} |
|
|
text: '养护', |
|
|
showAddBtn={scenePic.length >= 3 ? false : true} |
|
|
checked: false |
|
|
files={scenePic} |
|
|
} |
|
|
onChange={files => handleImgChange(files, 'scenePic')} |
|
|
] |
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
</View> : |
|
|
|
|
|
<View className='conserve-img'> |
|
|
|
|
|
养护图片: |
|
|
|
|
|
<View className='horizontal-line hl-one'> |
|
|
|
|
|
<View className='circle c-one'></View> |
|
|
|
|
|
<View className='text t-one'>养护前</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<AtImagePicker |
|
|
|
|
|
className='img-picker' |
|
|
|
|
|
count={3 - conserveBeforePic.length} |
|
|
|
|
|
showAddBtn={conserveBeforePic.length >= 3 ? false : true} |
|
|
|
|
|
files={conserveBeforePic} |
|
|
|
|
|
onChange={files => handleImgChange(files, 'conserveBeforePic')} |
|
|
|
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
<View className='horizontal-line hl-two'> |
|
|
|
|
|
<View className='circle c-two'></View> |
|
|
|
|
|
<View className='text t-two'>养护中</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<AtImagePicker |
|
|
|
|
|
className='img-picker' |
|
|
|
|
|
count={3 - conserveUnderwayPic.length} |
|
|
|
|
|
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true} |
|
|
|
|
|
files={conserveUnderwayPic} |
|
|
|
|
|
onChange={files => handleImgChange(files, 'conserveUnderwayPic')} |
|
|
|
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
<View className='horizontal-line hl-three'> |
|
|
|
|
|
<View className='circle c-three'></View> |
|
|
|
|
|
<View className='text t-three'>养护后</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<AtImagePicker |
|
|
|
|
|
className='img-picker' |
|
|
|
|
|
count={3 - conserveAfterPic.length} |
|
|
|
|
|
showAddBtn={conserveAfterPic.length >= 3 ? false : true} |
|
|
|
|
|
files={conserveAfterPic} |
|
|
|
|
|
onChange={files => handleImgChange(files, 'conserveAfterPic')} |
|
|
|
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
</View> |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function renderViewImg() { |
|
|
|
|
|
return ( |
|
|
|
|
|
reportType === 'patrol' ? |
|
|
|
|
|
<View className='patrol-img'> |
|
|
|
|
|
现场图片: |
|
|
|
|
|
<View className='img-box'> |
|
|
|
|
|
{scenePic.map(item => ( |
|
|
|
|
|
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} /> |
|
|
|
|
|
))} |
|
|
|
|
|
</View> |
|
|
|
|
|
</View> : |
|
|
|
|
|
<View className='conserve-img'> |
|
|
|
|
|
养护图片: |
|
|
|
|
|
<View className='horizontal-line hl-one'> |
|
|
|
|
|
<View className='circle c-one'></View> |
|
|
|
|
|
<View className='text t-one'>养护前</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<View className='img-box'> |
|
|
|
|
|
{conserveBeforePic.map(item => ( |
|
|
|
|
|
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} /> |
|
|
|
|
|
))} |
|
|
|
|
|
</View> |
|
|
|
|
|
<View className='horizontal-line hl-two'> |
|
|
|
|
|
<View className='circle c-two'></View> |
|
|
|
|
|
<View className='text t-two'>养护中</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<View className='img-box'> |
|
|
|
|
|
{conserveUnderwayPic.map(item => ( |
|
|
|
|
|
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} /> |
|
|
|
|
|
))} |
|
|
|
|
|
</View> |
|
|
|
|
|
<View className='horizontal-line hl-three'> |
|
|
|
|
|
<View className='circle c-three'></View> |
|
|
|
|
|
<View className='text t-three'>养护后</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<View className='img-box'> |
|
|
|
|
|
{conserveAfterPic.map(item => ( |
|
|
|
|
|
<Image className='img' src={item.url} onClick={() => handleImgClick(undefined, item)} /> |
|
|
|
|
|
))} |
|
|
|
|
|
</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return ( |
|
|
return ( |
|
|
<View className='patrol'> |
|
|
<View className='patrol'> |
|
@ -166,6 +335,7 @@ const Index = () => { |
|
|
checked={item.checked} |
|
|
checked={item.checked} |
|
|
className='radio' |
|
|
className='radio' |
|
|
color='#346FC2' |
|
|
color='#346FC2' |
|
|
|
|
|
disabled={isView} |
|
|
> |
|
|
> |
|
|
{item.text} |
|
|
{item.text} |
|
|
</Radio> |
|
|
</Radio> |
|
@ -181,6 +351,7 @@ const Index = () => { |
|
|
value={projectType} |
|
|
value={projectType} |
|
|
onInput={setProjectType} |
|
|
onInput={setProjectType} |
|
|
selector={rPrjTypeSelector} |
|
|
selector={rPrjTypeSelector} |
|
|
|
|
|
isView={isView} |
|
|
/> |
|
|
/> |
|
|
<InputPicker |
|
|
<InputPicker |
|
|
title='所在道路:' |
|
|
title='所在道路:' |
|
@ -188,6 +359,7 @@ const Index = () => { |
|
|
value={road} |
|
|
value={road} |
|
|
onInput={setRoad} |
|
|
onInput={setRoad} |
|
|
selector={rRoadSelector} |
|
|
selector={rRoadSelector} |
|
|
|
|
|
isView={isView} |
|
|
/> |
|
|
/> |
|
|
|
|
|
|
|
|
<View className='road-section'> |
|
|
<View className='road-section'> |
|
@ -195,34 +367,42 @@ const Index = () => { |
|
|
<Input |
|
|
<Input |
|
|
className='input' |
|
|
className='input' |
|
|
type='text' |
|
|
type='text' |
|
|
placeholder='路段名称' |
|
|
placeholder={isView ? '' : '路段名称'} |
|
|
border={false} |
|
|
border={false} |
|
|
value={roadSectionStart} |
|
|
value={roadSectionStart} |
|
|
onInput={e => handleInput(e, 'roadSectionStart')} |
|
|
onInput={e => handleInput(e, 'roadSectionStart')} |
|
|
|
|
|
disabled={isView} |
|
|
/> |
|
|
/> |
|
|
<Picker |
|
|
{ |
|
|
mode='selector' |
|
|
isView && |
|
|
range={roadStartSelector} |
|
|
<Picker |
|
|
onChange={e => setRoadSectionStart(roadStartSelector[e.detail.value])} |
|
|
mode='selector' |
|
|
> |
|
|
range={roadStartSelector} |
|
|
<Image src={arrowIcon} className='img-l' /> |
|
|
onChange={e => setRoadSectionStart(roadStartSelector[e.detail.value])} |
|
|
</Picker> |
|
|
> |
|
|
|
|
|
<Image src={arrowIcon} className='img-l' /> |
|
|
|
|
|
</Picker> |
|
|
|
|
|
} |
|
|
<View>至 </View> |
|
|
<View>至 </View> |
|
|
<Input |
|
|
<Input |
|
|
className='input' |
|
|
className='input' |
|
|
type='text' |
|
|
type='text' |
|
|
placeholder='路段名称' |
|
|
placeholder={isView ? '' : '路段名称'} |
|
|
border={false} |
|
|
border={false} |
|
|
value={roadSectionEnd} |
|
|
value={roadSectionEnd} |
|
|
onInput={e => handleInput(e, 'roadSectionEnd')} |
|
|
onInput={e => handleInput(e, 'roadSectionEnd')} |
|
|
|
|
|
disabled={isView} |
|
|
/> |
|
|
/> |
|
|
<Picker |
|
|
{ |
|
|
mode='selector' |
|
|
isView && |
|
|
range={roadEndSelector} |
|
|
<Picker |
|
|
onChange={e => setRoadSectionEnd(roadEndSelector[e.detail.value])} |
|
|
mode='selector' |
|
|
> |
|
|
range={roadEndSelector} |
|
|
<Image src={arrowIcon} className='img-r' /> |
|
|
onChange={e => setRoadSectionEnd(roadEndSelector[e.detail.value])} |
|
|
</Picker> |
|
|
> |
|
|
|
|
|
<Image src={arrowIcon} className='img-r' /> |
|
|
|
|
|
</Picker> |
|
|
|
|
|
} |
|
|
</View> |
|
|
</View> |
|
|
|
|
|
|
|
|
<View className='address'> |
|
|
<View className='address'> |
|
@ -230,73 +410,29 @@ const Index = () => { |
|
|
<Input |
|
|
<Input |
|
|
className='input' |
|
|
className='input' |
|
|
type='text' |
|
|
type='text' |
|
|
placeholder='根据定位自动获取,可手动修改' |
|
|
placeholder={isView ? '' : '根据定位自动获取,可手动修改'} |
|
|
value={address} |
|
|
value={address} |
|
|
onInput={e => handleInput(e, 'address')} |
|
|
onInput={e => handleInput(e, 'address')} |
|
|
|
|
|
disabled={isView} |
|
|
/> |
|
|
/> |
|
|
</View> |
|
|
</View> |
|
|
|
|
|
|
|
|
<AtTextarea |
|
|
<AtTextarea |
|
|
count={false} |
|
|
count={false} |
|
|
title='巡查内容:' |
|
|
title='巡查内容:' |
|
|
placeholder='请输入巡查内容' |
|
|
placeholder={isView ? '' : '请输入巡查内容'} |
|
|
value={content} |
|
|
value={content} |
|
|
onChange={(v, e) => handleInput(e, 'content')} |
|
|
onChange={(v, e) => handleInput(e, 'content')} |
|
|
|
|
|
disabled={isView} |
|
|
/> |
|
|
/> |
|
|
{ |
|
|
{ |
|
|
reportType === 'patrol' ? |
|
|
isView ? |
|
|
<View className='patrol-img'> |
|
|
renderViewImg() : |
|
|
现场图片: |
|
|
renderAddImg() |
|
|
<AtImagePicker |
|
|
} |
|
|
className='img-picker' |
|
|
{ |
|
|
count={3 - scenePic.length} |
|
|
!isView && <AtButton type='primary' className='sub-btn' onClick={report}>上报</AtButton> |
|
|
showAddBtn={scenePic.length >= 3 ? false : true} |
|
|
|
|
|
files={scenePic} |
|
|
|
|
|
onChange={files => handleImgChange(files, 'scenePic')} |
|
|
|
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
</View> : |
|
|
|
|
|
<View className='conserve-img'> |
|
|
|
|
|
养护图片: |
|
|
|
|
|
<View className='horizontal-line hl-one'> |
|
|
|
|
|
<View className='circle c-one'></View> |
|
|
|
|
|
<View className='text t-one'>养护前</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<AtImagePicker |
|
|
|
|
|
className='img-picker' |
|
|
|
|
|
count={3 - conserveBeforePic.length} |
|
|
|
|
|
showAddBtn={conserveBeforePic.length >= 3 ? false : true} |
|
|
|
|
|
files={conserveBeforePic} |
|
|
|
|
|
onChange={files => handleImgChange(files, 'conserveBeforePic')} |
|
|
|
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
<View className='horizontal-line hl-two'> |
|
|
|
|
|
<View className='circle c-two'></View> |
|
|
|
|
|
<View className='text t-two'>养护中</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<AtImagePicker |
|
|
|
|
|
className='img-picker' |
|
|
|
|
|
count={3 - conserveUnderwayPic.length} |
|
|
|
|
|
showAddBtn={conserveUnderwayPic.length >= 3 ? false : true} |
|
|
|
|
|
files={conserveUnderwayPic} |
|
|
|
|
|
onChange={files => handleImgChange(files, 'conserveUnderwayPic')} |
|
|
|
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
<View className='horizontal-line hl-three'> |
|
|
|
|
|
<View className='circle c-three'></View> |
|
|
|
|
|
<View className='text t-three'>养护后</View> |
|
|
|
|
|
</View> |
|
|
|
|
|
<AtImagePicker |
|
|
|
|
|
className='img-picker' |
|
|
|
|
|
count={3 - conserveAfterPic.length} |
|
|
|
|
|
showAddBtn={conserveAfterPic.length >= 3 ? false : true} |
|
|
|
|
|
files={conserveAfterPic} |
|
|
|
|
|
onChange={files => handleImgChange(files, 'conserveAfterPic')} |
|
|
|
|
|
onImageClick={handleImgClick} |
|
|
|
|
|
/> |
|
|
|
|
|
</View> |
|
|
|
|
|
} |
|
|
} |
|
|
<AtButton type='primary' className='sub-btn' onClick={report}>上报</AtButton> |
|
|
|
|
|
</View> |
|
|
</View> |
|
|
) |
|
|
) |
|
|
} |
|
|
} |
|
|