From 0d0d1e309534bb6ee0b8857ee2296bc4eae1d8e2 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Mon, 25 Jul 2022 10:13:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E9=A1=B5=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/src/packages/patrolView/index.jsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) 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)}> + + 养护