src/api/fysp/problemApi.js
@@ -5,12 +5,30 @@
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}`).then((res) => res.data);
    // 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 }) {
@@ -26,7 +44,7 @@
    return $fysp.get(`mediafile/${params}/5`).then((res) => res);
  },
  // 获取问题位置
  getLocation({ sceneTypeId }) {
  getLocation({ sceneTypeId }) {
    const params = `?sceneType=${sceneTypeId}`;
    return $fysp.get(`domainitem/location${params}`).then((res) => res);
  },
@@ -35,23 +53,23 @@
    return $fysp.get(`changeadvice`).then((res) => res);
  },
  // 修改问题
  updateProblem(data) {
  updateProblem(data) {
    return $fysp.post(`problemlist/updateProblem`, data).then((res) => res);
  },
  // 新增问题
  newProblem(data) {
    return $fysp.post(`problemlist/newProblem`, data).then((res) => res)
    return $fysp.post(`problemlist/newProblem`, data).then((res) => res);
  },
  // 修改整改
  updateChange(data) {
    return $fysp.post(`problemlist/updateChange`, data).then((res) => res)
    return $fysp.post(`problemlist/updateChange`, data).then((res) => res);
  },
  // 整改上传
  changeProblem(data) {
    return $fysp.post(`problemlist/changeProblem`, data).then((res) => res)
    return $fysp.post(`problemlist/changeProblem`, data).then((res) => res);
  },
  // 问题删除
  deleteProblem({ pid }) {
    return $fysp.post(`problemlist/${pid}`).then((res) => res.data)
    return $fysp.post(`problemlist/${pid}`, {}).then((res) => res.data);
  }
}
};