import axios from '../api'

export default {

  getWaterDriver(){
    return axios({
      url: '/api/index/water/driver',
      method: 'GET',
      params:{}
    })
  },

  getDateIndex(params) {
    return axios({
      url: '/api/front/data/index',
      method: 'get',
      params: {}
    })
  },
  getInspectQuestionDriverList(type){
    return axios({
      url: '/api/front/data/getInspectQuestionDriverList',
      method: 'GET',
      params:{
        type
      }
    })
  },

  getWaterAlarmInfoList(type){
    return axios({
      url: '/api/front/data/getWaterAlarmInfoList',
      method: 'GET',
      params:{
        type
      }
    })
  },

  getQuestionList(params){
    return axios({
      url: '/api/index/question/list',
      method: 'GET',
      params:{
        ...params
      }
    })
  },

  getQuestionDetail(id){
    return axios({
      url: '/api/index/question/detail',
      method: 'GET',
      params:{
        id
      }
    })
  },

  questionAssign(params){
    return axios({
      url: '/api/index/question/assign',
      method: 'POST',
      data:params
    })
  },

  getAskCount(params){
    return axios({
      url: '/api/index/inspect/count',
      method: 'GET',
      params:params
    })
  },

  getAskList(params){
    return axios({
      url: '/api/index/inspect/list',
      method: 'GET',
      params:{
        ...params
      }
    })
  },

  addTask(params){
    return axios({
      url: '/api/index/inspect/addTask',
      method: 'POST',
      data:params
    })
  },

  getQuaWarnList(params){
    return axios({
      url: '/api/index/water/warn',
      method: 'GET',
      params:{}
    })
  },

  getQuaTrend(params){
    return axios({
      url: '/api/index/water/trend',
      method: 'GET',
      params:{}
    })
  },

  getDriverWaterAlarmInfo(params){
    return axios({
      url: '/api/front/data/getDriverWaterAlarmInfo',
      method: 'POST',
      data:params
    })
  },

  getDriverWaterAlarmInfoList(params){
    return axios({
      url: '/api/front/data/getDriverWaterAlarmInfoList',
      method: 'POST',
      data:params
    })
  },

  getMultiDriverWaterAlarmInfo(params){
    return axios({
      url: '/api/front/data/getMultiDriverWaterAlarmInfo',
      method: 'POST',
      data:params
    })
  },

  getMultiDriverWaterAlarmInfoList(params){
    return axios({
      url: '/api/front/data/getMultiDriverWaterAlarmInfoList',
      method: 'POST',
      data:params
    })
  },

}
