dict.js 846 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import request from '@/utils/request'
  2. import qs from 'qs'
  3. export function getDictsWithCondition(params) {
  4. return request({
  5. url: './sys/sysDicts',
  6. method: 'get',
  7. params: params
  8. });
  9. }
  10. export function getDicts(type) {
  11. if (!type) {
  12. return Promise.reject("参数为空");
  13. }
  14. return request({
  15. url: './sys/sysDicts',
  16. method: 'get',
  17. params: {
  18. type
  19. }
  20. });
  21. }
  22. export function getDictByTypeValue(typeCode,value) {
  23. return request({
  24. url: './sys/sysDicts/getDictByTypeValue',
  25. method: 'get',
  26. params: {
  27. typeCode,
  28. value
  29. }
  30. });
  31. }
  32. export function getDictTypes(type) {
  33. return request({
  34. url: './sys/sysDictTypes',
  35. method: 'get',
  36. params: {
  37. type
  38. }
  39. });
  40. }