diff --git a/weapp/src/packages/patrol/index.jsx b/weapp/src/packages/patrol/index.jsx index a0a9cfe7..120343d1 100644 --- a/weapp/src/packages/patrol/index.jsx +++ b/weapp/src/packages/patrol/index.jsx @@ -783,9 +783,14 @@ const Index = () => { } if (nextValue.routeName && nextValue.routeCode && nextValue.sectionNo) { - nextValue.startingPlaceName = data[0]?.startingPlaceName - nextValue.stopPlaceName = data[0]?.stopPlaceName - setRoadCodeHead(data[0]?.routeCode?.charAt(0)) + let find = roadList?.find( + s => nextValue.routeName == s.routeName + && nextValue.routeCode == s.routeCode + && nextValue.sectionNo == s.sectionNo + ) + nextValue.startingPlaceName = find?.startingPlaceName + nextValue.stopPlaceName = find?.stopPlaceName + setRoadCodeHead(find?.routeCode?.charAt(0)) } else { nextValue.startingPlaceName = '' nextValue.stopPlaceName = ''