import request from '@/utils/request'

/**
 * 工单列表
 * @param {Object}} data
 * @returns
 */
export function list(data) {
  return request({
    url: '/api/convenience/v2/services/list',
    method: 'get',
    params: data
  })
}

/**
 * 工单类型列表
 * @returns
 */
export function typeList() {
  return request({
    url: '/api/convenience/v2/services/type/list',
    method: 'get'
  })
}

/**
 * 发起办事
 * @param {Object} data
 * @returns
 */
export function add(data) {
  return request({
    url: '/api/convenience/v2/services/create',
    method: 'post',
    data
  })
}

/**
 * 工单详情
 * @param {String} id
 * @returns
 */
export function info(id) {
  return request({
    url: '/api/convenience/v2/services/info',
    method: 'get',
    params: id
  })
}

/**
 * 工单操作
 * @param {Object} data
 * @returns
 */
export function update(data) {
  return request({
    url: '/api/convenience/v2/services/update',
    method: 'post',
    data
  })
}

/**
 * 获取沟通人员列表
 * @param {String} data
 * @returns
 */
export function communicationList(data) {
  return request({
    url: '/api/convenience/v2/services/communicationList',
    method: 'post',
    data
  })
}
/**
 * 监察工单列表
 * @param {*} data 
 * @returns 
 */
export function listOnlyLook(data) {
  return request({
    url: '/api/convenience/v2/services/listOnlyLook',
    method: 'post',
    data
  })
}

// /convenience/v2/services/listForData
/**
 * 统计数据工单列表筛选
 * @param {*} data 
 * @returns 
 */
export function listForData(data) {
  return request({
    url: '/api/convenience/v2/services/listForData',
    method: 'post',
    data
  })
}

/**
 * LeaderTv
 * @param {*} data 
 * @returns 
 */
export function leaderTVData(data) {
  return request({
    url: '/api/convenience/v2/services/app/statisticalData/leaderForTV',
    method: 'post',
    data
  })
}