type.js 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  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 clearCache() {
  42. return request({
  43. url: '/system/dict/type/clearCache',
  44. method: 'delete'
  45. })
  46. }
  47. // 导出字典类型
  48. export function exportType(query) {
  49. return request({
  50. url: '/system/dict/type/export',
  51. method: 'get',
  52. params: query
  53. })
  54. }
  55. // 获取字典选择框列表
  56. export function optionselect() {
  57. return request({
  58. url: '/system/dict/type/optionselect',
  59. method: 'get'
  60. })
  61. }