| | |
| | | fetchInspectionStatistic, |
| | | fetchSubtaskSummaryByArea, |
| | | } from '../../services/inspection/fetchInspection'; |
| | | import dayjs from "dayjs"; |
| | | import dayjs from 'dayjs'; |
| | | |
| | | /** |
| | | * 现场巡查监管相关信息获取逻辑 |
| | |
| | | fetchInspection(page) { |
| | | this.setData({ inspectionLoading: true }); |
| | | const { provinceCode, cityCode, districtCode, townCode, sceneTypeValue, time } = this.data; |
| | | const eTime = dayjs(time).endOf('M').format('YYYY-MM-DD HH:mm:ss') |
| | | const eTime = dayjs(time).endOf('M').format('YYYY-MM-DD HH:mm:ss'); |
| | | fetchSubtaskSummaryByArea({ |
| | | provincecode: provinceCode, |
| | | citycode: cityCode, |
| | |
| | | this.setData({ |
| | | inspectionRes: res.data, |
| | | }); |
| | | this.fetchSupervisionByDistrict(this.data.tabIndex); |
| | | }) |
| | | .finally(() => { |
| | | this.setData({ inspectionLoading: false }); |
| | |
| | | }, |
| | | onTabsChange(e) { |
| | | this.setData({ tabIndex: e.detail.value }); |
| | | this.fetchSupervisionByDistrict(e.detail.value); |
| | | }, |
| | | |
| | | fetchSupervisionByDistrict(index) { |
| | | if (this.data.inspectionRes.length == 0) return; |
| | | |
| | | const { sceneTypeValue } = this.data; |
| | | const { provinceName, cityName, districtName } = this.data.inspectionRes[index]; |
| | | const params = { provinceName, cityName, districtName, sceneTypes: sceneTypeValue }; |
| | | this._fetchSupervision(1, params); |
| | | }, |
| | | |
| | | navToInspection(e) { |
| | | const i1 = e.detail.index; |
| | | const { inspectionRes, time, sceneTypeText, sceneTypeValue, tabIndex } = this.data; |