巴林闲侠 1 year ago
parent
commit
9e3a6ff62f
  1. 18
      weapp/src/packages/patrol/index.jsx

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

@ -559,7 +559,13 @@ const Index = () => {
} }
setRoadStartSel(roadStart) setRoadStartSel(roadStart)
setRoadEndSel(roadEnd) setRoadEndSel(roadEnd)
if (routeName) setRoad(routeName) setRoadSectionStart('')
setRoadSectionEnd('')
if (routeName) {
setRoad(routeName)
} else {
setRoad('')
}
if (kind === 'conserve' && routeCode) { if (kind === 'conserve' && routeCode) {
request.get(getReportList(), { limit: 1, page: 0, codeRoad: routeCode }).then(res => { request.get(getReportList(), { limit: 1, page: 0, codeRoad: routeCode }).then(res => {
if (res.statusCode === 200 && res.data.length) { if (res.statusCode === 200 && res.data.length) {
@ -630,6 +636,11 @@ const Index = () => {
if (value.length >= 9) { if (value.length >= 9) {
queryConserveInfo(roadCodeHead, value) queryConserveInfo(roadCodeHead, value)
} else { } else {
setRoadStartSel([])
setRoadEndSel([])
setRoadSectionStart('')
setRoadSectionEnd('')
setRoad('')
if (!patrolContentEdit) { if (!patrolContentEdit) {
setPatrolContentEdit(true) setPatrolContentEdit(true)
let nextInfo = { ...conserveInfo } let nextInfo = { ...conserveInfo }
@ -941,6 +952,11 @@ const Index = () => {
if (roadCodeEnd.length >= 9) { if (roadCodeEnd.length >= 9) {
queryConserveInfo(e.detail.value[0], roadCodeEnd) queryConserveInfo(e.detail.value[0], roadCodeEnd)
} else { } else {
setRoadStartSel([])
setRoadEndSel([])
setRoadSectionStart('')
setRoadSectionEnd('')
setRoad('')
if (!patrolContentEdit) { if (!patrolContentEdit) {
setPatrolContentEdit(true) setPatrolContentEdit(true)
let nextInfo = { ...conserveInfo } let nextInfo = { ...conserveInfo }

Loading…
Cancel
Save