hcong
2024-11-08 d7d7da5c09340eafcd2e2c672e6b2c001a4cc0be
src/api/fysp/problemApi.js
@@ -15,6 +15,43 @@
  fetchProblemType({ cityCode, districtCode, sceneTypeId }) {
    const params = `?taskTypeId=1&cityCode=${cityCode}&districtCode=${districtCode}&sceneTypeId=${sceneTypeId}`;
    return $fysp.get(`problemtype/search${params}`).then((res) => res.data);
    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)
  },
  // 整改上传
  changeProblem(data) {
    return $fysp.post(`problemlist/changeProblem`, data).then((res) => res)
  },
  // 问题删除
  deleteProblem({ pid }) {
    return $fysp.post(`problemlist/${pid}`).then((res) => res.data)
  }
};
}