import { config, networkUtils } from '../../../utils'
const { request } = networkUtils;
const { api } = config
const { quality, common } = api
const { ed } = quality

export async function query(params) {
  return request({
    url: ed,
    method: 'get',
    data: params,
  })
}

export async function getSingle(id) {
  return request({
    url: `${ed}/${id}`,
    method: 'get',
  })
}

export async function create(params) {
  return request({
    url: `${ed}/add`,
    method: 'post',
    data: params,
  })
}

export async function remove(ids) {
  return request({
    url: `${ed}/del`,
    method: 'post',
    data: ids,
  })
}
export async function disable(id) {
  return request({
    url: `${ed}/${id}/disable`,
    method: 'post',
  });
}

export async function update(params) {
  return request({
    url: `${ed}/put`,
    method: 'post',
    data: params,
  })
}

export async function getEmp(id) {
  return request({
    url: `/edp/mds/emps/${id}`,
    method: 'get',
  })
}

export async function remoteCfg(params) {
  return request({
    url: `/api/8d/view/config`,
    method: 'get',
    data: params,
  });
}

export async function validate(params) {
  return request({
    url: `${ed}/validate-assignees`,
    method: 'post',
    data: params,
  });
}


