type.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. import request from '@/utils/request'
  2. // 查询字典类型列表
  3. export function listType(query) {
  4. return request({
  5. url: '/system/dict/type/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询字典类型详细
  11. export function getType(dictId) {
  12. return request({
  13. url: '/system/dict/type/' + dictId,
  14. method: 'get'
  15. })
  16. }
  17. // 新增字典类型
  18. export function addType(data) {
  19. return request({
  20. url: '/system/dict/type',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改字典类型
  26. export function updateType(data) {
  27. return request({
  28. url: '/system/dict/type',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 删除字典类型
  34. export function delType(dictId) {
  35. return request({
  36. url: '/system/dict/type/' + dictId,
  37. method: 'delete'
  38. })
  39. }
  40. // 刷新字典缓存
  41. export function refreshCache() {
  42. return request({
  43. url: '/system/dict/type/refreshCache',
  44. method: 'delete'
  45. })
  46. }
  47. // 获取字典选择框列表
  48. export function optionselect() {
  49. return request({
  50. url: '/system/dict/type/optionselect',
  51. method: 'get'
  52. })
  53. }