Browse Source

(*)待办事项列表请求

dev
ww664853070 2 years ago
parent
commit
05a9eb677a
  1. 11
      weapp/src/packages/patrolView/index.jsx

11
weapp/src/packages/patrolView/index.jsx

@ -14,7 +14,7 @@ import patrolActiveIcon from '../../static/img/patrolView/patrol-active.svg'
import conserveIcon from '../../static/img/patrolView/conserve.svg'
import conserveActiveIcon from '../../static/img/patrolView/conserve-active.svg'
function Index () {
function Index() {
const userInfo = Taro.getStorageSync('userInfo') || {};
const router = useRouter()
const { params: { filter, kind } } = router
@ -22,7 +22,7 @@ function Index () {
const isPatrol = kind === 'patrol' || kind == 'conserve' ? true : false
const isRoad = kind === 'road' ? true : false
const isAnomaly = kind === 'anomaly' ? true : false
const isWait = kind === 'wait' ? true : false
const isWait = kind === 'wait' ? true : false
const [reportType, setReportType] = useState(kind || 'patrol')
const [datePicker, setDatePicker] = useState('')
@ -41,7 +41,7 @@ function Index () {
Taro.setNavigationBarTitle({ title: '异常反馈' })
} else if (kind == 'conserve') {
Taro.setNavigationBarTitle({ title: '养护上报' })
}else if(isWait){
} else if (isWait) {
Taro.setNavigationBarTitle({ title: '待办事项' })
} else {
Taro.setNavigationBarTitle({ title: '巡查上报' })
@ -57,7 +57,7 @@ function Index () {
getList(page == 0 ? true : false)
}, [num])
function dealError (error) {
function dealError(error) {
Taro.showToast({
title: error,
icon: 'none',
@ -73,8 +73,9 @@ function Index () {
startTime: datePicker ? datePicker + ' 00:00:00' : '',
endTime: datePicker ? datePicker + ' 23:59:59' : '',
keyword: filterText,
reportType: reportType,
reportType: isWait ? 'anomaly' : reportType,
userId: filter === 'my' ? userInfo.id : '',
handleState: isWait ? '待处理' : '',
}
request.get(getReportList(), data).then(res => {
Taro.hideLoading()

Loading…
Cancel
Save