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