|
|
@ -65,7 +65,7 @@ const Index = () => { |
|
|
|
const [roadCodeHead, setRoadCodeHead] = useState('X') |
|
|
|
const [roadCodeEnd, setRoadCodeEnd] = useState('') |
|
|
|
const [otherType, setOtherType] = useState('') // 道路类型-其他 |
|
|
|
const [patrolContentEdit, setPatrolContentEdit] = useState(false) // 养护基本信息是否可编辑 |
|
|
|
const [patrolContentEdit, setPatrolContentEdit] = useState(true) // 养护基本信息是否可编辑 |
|
|
|
|
|
|
|
const [patrolContent, setPatrolContent] = useState({ |
|
|
|
inspectionNoException: { |
|
|
@ -158,7 +158,7 @@ const Index = () => { |
|
|
|
unit: '平米', |
|
|
|
}, |
|
|
|
ditchCleaning: { |
|
|
|
label: '开挖、清理边坡', |
|
|
|
label: '开挖、清理边沟', |
|
|
|
value: '', |
|
|
|
unit: '米', |
|
|
|
}, |
|
|
@ -356,7 +356,7 @@ const Index = () => { |
|
|
|
addresscity = res.data.result.address |
|
|
|
|
|
|
|
let street = res.data.result.address_component.street |
|
|
|
setRoad(street) |
|
|
|
// setRoad(street) |
|
|
|
setAddress(addresscity) |
|
|
|
} |
|
|
|
}) |
|
|
@ -607,14 +607,37 @@ const Index = () => { |
|
|
|
setConserveInfo(nextInfo) |
|
|
|
setPatrolContentEdit(false) |
|
|
|
} else { |
|
|
|
setPatrolContentEdit(true) |
|
|
|
if (!patrolContentEdit) { |
|
|
|
setPatrolContentEdit(true) |
|
|
|
let nextInfo = { ...conserveInfo } |
|
|
|
Object.keys(conserveInfo).forEach(key => { |
|
|
|
nextInfo[key].value = '' |
|
|
|
}) |
|
|
|
setConserveInfo(nextInfo) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
setPatrolContentEdit(true) |
|
|
|
if (!patrolContentEdit) { |
|
|
|
setPatrolContentEdit(true) |
|
|
|
let nextInfo = { ...conserveInfo } |
|
|
|
Object.keys(conserveInfo).forEach(key => { |
|
|
|
nextInfo[key].value = '' |
|
|
|
}) |
|
|
|
setConserveInfo(nextInfo) |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
if (!patrolContentEdit) { |
|
|
|
setPatrolContentEdit(true) |
|
|
|
let nextInfo = { ...conserveInfo } |
|
|
|
Object.keys(conserveInfo).forEach(key => { |
|
|
|
nextInfo[key].value = '' |
|
|
|
}) |
|
|
|
setConserveInfo(nextInfo) |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
case "conserveInfo": |
|
|
@ -922,6 +945,7 @@ const Index = () => { |
|
|
|
<Radio value='C' checked={roadCodeHead === 'C'} color='#0080EE' className='radio' disabled={isView}>C</Radio> |
|
|
|
</RadioGroup> |
|
|
|
<Input |
|
|
|
className='input' |
|
|
|
type='text' |
|
|
|
placeholder={isView ? '' : '输入后9位线路编码'} |
|
|
|
value={roadCodeEnd} |
|
|
|