import axios from '../api'

export default {
  getPicList(params) {
    return axios.post('/api/inspectfile/picList', params)
  },
  savePic(params) {
    return axios.post('/api/inspectfile/savePic', params)
  },
  getReview(params) {
    return axios.post('/api/inspectfile/review', params)
  },
  uploadPic(params) {
    return axios.post('/api/inspectfile/uploadPic', params)
  },
  getDocument(params) {
    return axios.get('/api/inspectfile/document', params)
  },
  setMark(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/setMark?id=' + params.id,
      data: {}
    })
  },

  reviewFinish(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/reviewFinish?id=' + params.id,
      data: {}
    })
  },

  setMarkFinish(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/setMarkFinish?id=' + params.id,
      data: {}
    })
  },

  drop(params) {
    return axios.post('/api/inspectfile/drop', params)
  },

  reviewPic(params) {
    return axios.post('/api/inspectfile/reviewPic', params)
  },

  getReviewPic(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/getReviewPic?id=' + params.id,
      data: {}
    })
  },

  dropPic(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/dropPic?id=' + params.id,
      data: {}
    })
  },

  getDetail(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/view?id=' + params.id,
      data: {}
    })
  },
  print(params) {
    return axios({
      method: "GET",
      url: '/api/inspectDriver/print?id=' + params.id,
      data: {}
    })
  },
  cancelMark(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/cancelMark?id=' + params.id,
      data: {}
    })
  },
  getQuestionList(params) {
    return axios({
      method: "GET",
      url: '/api/inspectfile/questionList',
      data: {}
    })
  },
  downPic(params) {
    return axios({
      method: 'GET',
      url: '/api/inspectfile/downPic?id=' + params.id,
      timeout: 1000000,
      responseType: 'blob',
    })
  },
  down(params) {
    return axios({
      method: 'GET',
      url: '/api/inspectfile/download?ids=' + params.id
    })
  },

  getPhotoList(params) {
    return axios({
      method: "GET",
      url: '/api/admin/photo/list',
      params: {
        ...params
      }
    })
  },

  editPhoto(params) {
    return axios({
      method: "POST",
      url: '/api/admin/photo/edit',
      data: params
    })
  },
}


