import { defAxios as request } from '@/utils/http'

/**
 * @description: 获取巡检机场
 * @return {*}
 */
export function airportList (params) {
  return request({
    url: '/inspection/airport',
    method: 'GET',
    params
  })
}

/**
 * @description: 获取航线
 * @return {*}
 */
export function airportLine (id) {
  return request({
    url: `/inspection/airport/line/${id}`,
    method: 'GET'
  })
}

/**
 * @description: 获取机场天气
 * @param {*} id 机场id
 * @return {*}
 */
export function airportWeather (id) {
  return request({
    url: `/inspection/airport/weather/${id}`,
    method: 'GET'
  })
}

/**
 * @description: 获取飞行轨迹
 * @param {*} id 机场id
 * @return {*}
 */
export function airportTrack (id) {
  return request({
    url: `/inspection/track/${id}`,
    method: 'GET'
  })
}

/**
 * @description: 获取飞行轨迹
 * @param {*} id 机场id
 * @return {*}
 */
export function missionLive (id) {
  return request({
    url: `/mission/live/${id}`,
    method: 'GET'
  })
}
/**
 * @description:获取机场详细信息
 * @param id 机场id
 */
export function getAirportInfo (data) {
  return request({
    url: `/index/getAirportDetail`,
    method: 'POST',
    data
  })
}
/**
 * @description:获取任务列表接口
 * @param page 页数
 * @param limit 每页显示数
 */
export function getMissionList (data) {
  return request({
    url: `/index/getMissionList`,
    method: 'POST',
    data
  })
}
/**
 * @description:获取问题多选类型
 *
 */
export function getQuestionType () {
  return request({
    url: `/question/type`,
    method: 'GET'
  })
}
/**
 * @description:获取问题列表数据
 */
export function getQuestionList (data) {
  return request({
    url: `/index/getQuestionList`,
    method: 'POST',
    data
  })
}
