riku
2025-09-02 92610ba4eedbc06062240c2f2967b7e1f691797e
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import { $fysp } from '../index';
 
const id = 'IF3DgsgKxSWvTM3M';
const name = 'pcheck';
 
export default {
  /**
   * 获取子任务问题详情
   */
  getProBySubtask(id) {
    return $fysp
      .get('problemlist/subtask', {
        params: {
          stGuid: id
        }
      })
      .then((res) => res.data);
  },
  /**
   * 问题审核
   * @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: { pId, action, remark, userId, userName } }
      )
      .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);
  },
 
  /**
   * 获取巡查中的任意图片
   */
  getAnyPic(inspectionGuid) {
    const params = `${inspectionGuid}`;
    return $fysp.get(`mediafile/${params}/5`).then((res) => res);
  },
  // 获取问题位置
  getLocation({ sceneTypeId }) {
    const params = `?sceneType=${sceneTypeId}`;
    return $fysp.get(`domainitem/location${params}`).then((res) => res);
  },
  // 获取问题建议
  getSuggestion() {
    return $fysp.get(`changeadvice`).then((res) => res);
  },
  // 修改问题
  updateProblem(data) {
    return $fysp.post(`problemlist/updateProblem`, data).then((res) => res);
  },
  // 新增问题
  newProblem(data) {
    return $fysp.post(`problemlist/newProblem`, data).then((res) => res);
  },
  // 修改整改
  updateChange(data) {
    return $fysp.post(`problemlist/updateChange`, data).then((res) => res);
  },
  // 整改上传
  changeProblem(data) {
    return $fysp.post(`problemlist/changeProblem`, data).then((res) => res);
  },
  // 问题删除
  deleteProblem({ pid }) {
    return $fysp.post(`problemlist/${pid}`, {}).then((res) => res.data);
  }
};