import request from '@/utils/request'

export function createItem(data) {
  return request({
    url: '/system/dict/type/add',
    method: 'post',
    data
  })
}

export function list(query) {
  return request({
    url: '/system/dict/type/list',
    method: 'get',
    params: query
  })
}

export function updateItem(data) {
  return request({
    url: '/system/dict/type/edit',
    method: 'post',
    data
  })
}

export function deleteitem(query) {
  return request({
    url: '/system/dict/type/remove',
    method: 'post',
    params: query
  })
}

export function optionSelect(data) {
  return request({
    url: '/system/dict/type/optionselect',
    method: 'get',
    data
  })
}
export function dataList(query) {
  return request({
    url: '/system/dict/data/list',
    method: 'get',
    params: query
  })
}
export function dataAdd(data) {
  return request({
    url: '/system/dict/data/add',
    method: 'post',
    data
  })
}
export function dataEdit(data) {
  return request({
    url: '/system/dict/data/edit',
    method: 'post',
    data
  })
}
export function dataRemove(query) {
  return request({
    url: '/system/dict/data/remove',
    method: 'post',
    params: query
  })
}
