Browse Source

故障修复

dev
liujiangyong 1 year ago
parent
commit
74c811f4f3
  1. 30
      weapp/src/packages/patrol/index.jsx
  2. 4
      weapp/src/packages/patrol/index.scss

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

@ -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 {
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)
}
}
})
}
} 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}

4
weapp/src/packages/patrol/index.scss

@ -180,6 +180,10 @@ page {
.radio {
margin-right: 10px;
}
.input {
width: 240px;
}
}
.patrol-content {

Loading…
Cancel
Save