import request from '@/utils/request'

/**
 * 获取字典项
 * @param {String} dictType 字典属性值
 * @returns
 */
export function get(dictType) {
  return request({
    url: 'system/dataDictDetail/getPageListJson',
    method: 'post',
    data: { dictType },
  })
}

export function add(data) {
  return request({
    url: 'system/dataDictDetail/saveFormJson',
    method: 'post',
    data,
  })
}

export function del(ids) {
  return request({
    url: 'system/dataDictDetail/deleteFormJson',
    method: 'post',
    data: ids,
  })
}

export function edit(data) {
  return request({
    url: 'system/dataDictDetail/saveFormJson',
    method: 'post',
    data,
  })
}

export default { get, add, edit, del }
