import request from '@/utils/request'

// 查询字典列表
export function listSysDict(query) {
  return request({
    url: '/system/dictdata/list',
    method: 'get',
    params: query
  })
}

// 查询字典详细
export function getSysDict(dictId) {
  return request({
    url: '/system/SysDict/' + dictId,
    method: 'get'
  })
}

// 新增字典
export function addSysDict(data) {
  return request({
    url: '/fms/crop/type/add',
    method: 'post',
    data: data
  })
}

// 修改字典
export function updateSysDict(data) {
  return request({
    url: '/system/dictdata/edit',
    method: 'post',
    data: data
  })
}

// 删除字典
export function delSysDict(dictId) {
  return request({
    url: '/system/SysDict/' + dictId,
    method: 'delete'
  })
}
