Newer
Older
casic-monitoring-web / src / api / system / dict.js
lwh on 25 May 2021 774 bytes 数据集服务添加
/**
 * 字典接口
 */
import request from '@/utils/request'

// 字典查询
export function getDictList(params) {
  return request({
    url: 'dict/listPage',
    method: 'get',
    params
  })
}

// 添加字典
export function addDict(params) {
  return request({
    url: 'dict/add',
    method: 'post',
    params
  })
}

// 修改字典机构
export function updateDict(params) {
  return request({
    url: 'dict/update',
    method: 'post',
    params
  })
}

// 删除字典机构
export function delDict(id) {
  return request({
    url: 'dict/delete',
    method: 'post',
    params: {
      dictId: id
    }
  })
}

// 根据字典code查询字典
export function getDictByCode(code) {
  return request({
    url: 'dict/code/' + code,
    method: 'get'
  })
}