riku
2025-06-20 a030cd7ebede3762fda4dcb6511f43712a417a58
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { $fysp } from '../index'
 
const id = 'IF3DgsgKxSWvTM3M'
const name = 'pcheck'
 
export default {
  /**
   * 问题审核
   * @param {Number} action 0:问题通过;1:问题不通过;2:整改通过;3整改不通过
   */
  checkProblem({ pId, action, remark = '', userId = id, userName = name }) {
    const params = `?pId=${pId}&action=${action}&remark=${remark}&userId=${userId}&userName=${userName}`
    return $fysp.post(`problemlist/check${params}`).then((res) => res.data)
  },
 
  fetchProblemType({ cityCode, districtCode, sceneTypeId }) {
    const params = `?taskTypeId=1&cityCode=${cityCode}&districtCode=${districtCode}&sceneTypeId=${sceneTypeId}`
    return $fysp.get(`problemtype/search${params}`).then((res) => res.data)
  },
 
  /**
   * 获取巡查任务的问题和整改
   */
  fetchProblems(subtaskId) {
    return $fysp
      .get('problemlist/subtask', {
        params: {
          stGuid: subtaskId,
          // 包含未审核以及审核不通过的问题
          all: true
        }
      })
      .then((res) => res.data)
  },
 
  /**
   * 获取各问题类型发生的数量统计
   */
  fetchProblemsStatistic(area) {
    return $fysp.post('problemlist/getStatisticalResult', area).then((res) => res.data)
  }
}