You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

102 lines
2.1 KiB

  1. /*
  2. * Copyright (c) 2018-2025, lengleng All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions are met:
  6. *
  7. * Redistributions of source code must retain the above copyright notice,
  8. * this list of conditions and the following disclaimer.
  9. * Redistributions in binary form must reproduce the above copyright
  10. * notice, this list of conditions and the following disclaimer in the
  11. * documentation and/or other materials provided with the distribution.
  12. * Neither the name of the pig4cloud.com developer nor the names of its
  13. * contributors may be used to endorse or promote products derived from
  14. * this software without specific prior written permission.
  15. * Author: lengleng (wangiegie@gmail.com)
  16. */
  17. import request from '@/router/axios'
  18. export function fetchList(query) {
  19. return request({
  20. url: '/admin/dict/page',
  21. method: 'get',
  22. params: query
  23. })
  24. }
  25. export function fetchItemList(query) {
  26. return request({
  27. url: '/admin/dict/item/page',
  28. method: 'get',
  29. params: query
  30. })
  31. }
  32. export function addItemObj(obj) {
  33. return request({
  34. url: '/admin/dict/item',
  35. method: 'post',
  36. data: obj
  37. })
  38. }
  39. export function getItemObj(id) {
  40. return request({
  41. url: '/admin/dict/item/' + id,
  42. method: 'get'
  43. })
  44. }
  45. export function delItemObj(id) {
  46. return request({
  47. url: '/admin/dict/item/' + id,
  48. method: 'delete'
  49. })
  50. }
  51. export function putItemObj(obj) {
  52. return request({
  53. url: '/admin/dict/item',
  54. method: 'put',
  55. data: obj
  56. })
  57. }
  58. export function addObj(obj) {
  59. return request({
  60. url: '/admin/dict/',
  61. method: 'post',
  62. data: obj
  63. })
  64. }
  65. export function getObj(id) {
  66. return request({
  67. url: '/admin/dict/' + id,
  68. method: 'get'
  69. })
  70. }
  71. export function delObj(row) {
  72. return request({
  73. url: '/admin/dict/' + row.id,
  74. method: 'delete'
  75. })
  76. }
  77. export function putObj(obj) {
  78. return request({
  79. url: '/admin/dict/',
  80. method: 'put',
  81. data: obj
  82. })
  83. }
  84. export function remote(type) {
  85. return request({
  86. url: '/admin/dict/type/' + type,
  87. method: 'get'
  88. })
  89. }