diff --git a/weapp/src/packages/patrolView/index.jsx b/weapp/src/packages/patrolView/index.jsx index 9dccd266..ed52ad54 100644 --- a/weapp/src/packages/patrolView/index.jsx +++ b/weapp/src/packages/patrolView/index.jsx @@ -13,6 +13,7 @@ import conserveIcon from '../../static/img/patrolView/conserve.svg' import conserveActiveIcon from '../../static/img/patrolView/conserve-active.svg' function Index() { + const [isPatrol, setIsPatrol] = useState(true) const [datePicker, setDatePicker] = useState(moment().format('YYYY-MM-DD')) const [listData, setListData] = useState([]) const [inputSite, setInputSite] = useState('') @@ -49,6 +50,10 @@ function Index() { }); }) + const onTypeChange = bool => { + setIsPatrol(bool) + } + const onDateChange = e => { setDatePicker(e.detail.value); } @@ -73,14 +78,14 @@ function Index() { return ( - - - 巡查 + onTypeChange(true)}> + + 巡查 - - - 养护 + onTypeChange(false)}> + + 养护