import request2 from '@/utils/request2'

// 获取首页数据
export const getIndex = data => request2({
  url: '/api-web/newIndex',
  params: data,
  method: 'get',
})
export const getInspectionItem = data => request2({
  url: '/api-web/inspectionItem/queryPage',
  params: data,
  method: 'get',
})
// 获取异常处理
export const getIndexError = data => request2({
  url: '/api-web/getIndexErrData',
  params: data,
  method: 'get',
})

// 获取事项提醒
export const getRemindMatterData = data => request2({
  url: '/api-web/getRemindMatterData',
  params: data,
  method: 'get',
})

// 处理乐团主管日程安排
export const resetInspectionItem = data => request2({
  url: '/api-web/inspectionItem/update',
  data: data,
  method: 'post',
  requestType:'form'
})

// 获取乐团主管巡查任务
export const getInspectionItemPlan =data => request2({
  url: '/api-web/inspectionItemPlan/queryPage',
  params: data,
  method: 'get',
})
// 获取乐团主管乐团
export const getMusicGroup =data => request2({
  url: '/api-web/inspectionItemPlan/getMusicGroup',
  params: data,
  method: 'get',
})
// 添加乐团主管巡查任务
export const addInspectionItemPlan = data => request2({
  url: '/api-web/inspectionItemPlan/add',
  data: data,
  method: 'post',
  requestType:'form'
})

// 修改乐团主管巡查任务
export const resetInspectionItemPlan = data => request2({
  url: '/api-web/inspectionItemPlan/update',
  data: data,
  method: 'post',
  requestType:'form'
})

// 添加巡查任务
export const inspectionAdd = data => request2({
  url: '/api-web/inspection/add',
  data: data,
  method: 'post',
})

// 删除巡查任务
export const inspectionDelete = data => request2({
  url: '/api-web/inspection/delete',
  params: data,
  method: 'post',
})

// 查看巡查任务详情
export const inspectionGetInfo = data => request2({
  url: '/api-web/inspection/getInfo',
  params: data,
  method: 'get',
})

// 巡查任务列表
export const inspectionQueryPage = data => request2({
  url: '/api-web/inspection/queryPage',
  params: data,
  method: 'get',
})

// 修改巡查任务
export const inspectionUpdate = data => request2({
  url: '/api-web/inspection/update',
  data: data,
  method: 'post',
})

// 获取乐团主管

export const getMusicGroupEduTeacher = data => request2({
  url: '/api-web/inspection/getMusicGroupEduTeacher',
  params: data,
  method: 'get'
})

// 获取统计数据
export const hasIndexErrData = () => request2({
  url: '/api-web/hasIndexErrData',
  method: 'get',
  loading: false,
})
