|
|
@ -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 ( |
|
|
|
<View> |
|
|
|
<View className='type-box'> |
|
|
|
<View className='item left'> |
|
|
|
<Image className='type-img' src={patrolIcon} /> |
|
|
|
<View>巡查</View> |
|
|
|
<View className='item' onClick={() => onTypeChange(true)}> |
|
|
|
<Image className='type-img' src={isPatrol ? patrolActiveIcon : patrolIcon} /> |
|
|
|
<View style={{color: isPatrol ? '#346FC2': '#999999'}}>巡查</View> |
|
|
|
</View> |
|
|
|
<View className='line'></View> |
|
|
|
<View className='item'> |
|
|
|
<Image className='type-img' src={conserveIcon} /> |
|
|
|
<View>养护</View> |
|
|
|
<View className='item' onClick={() => onTypeChange(false)}> |
|
|
|
<Image className='type-img' src={isPatrol ? conserveIcon : conserveActiveIcon} /> |
|
|
|
<View style={{color: isPatrol ? '#999999': '#346FC2'}}>养护</View> |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
<View className='filter-box'> |
|
|
|