riku
2024-10-21 e8b4c98c16b6721a7d6617aecf82bfbc23655a58
src/api/fysp/problemApi.js
@@ -5,18 +5,45 @@
export default {
  /**
   * 获取子任务统计信息
   * 问题审核
   * @param {Number} action 0:问题通过;1:问题不通过;2:整改通过;3整改不通过
   */
  checkProblem({ pId, action, remark = '', userId = id, userName = name }) {
    return $fysp
      .post('problemlist/check', {
        pId: pId,
        action: action,
        remark: remark,
        userId: userId,
        userName: userName,
      })
      .then((res) => res.data);
    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);
  },
  /**
   * 获取巡查中的任意图片
   */
  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)
  }
};