elecAttr.js 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import request from '@/utils/request'
  2. // 查询服务区用电属性列表
  3. export function listAttr(query) {
  4. return request({
  5. url: '/ems/basecfg/elec/attr/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. // 查询服务区用电属性详细
  11. export function getAttr(id) {
  12. return request({
  13. url: '/ems/basecfg/elec/attr/' + id,
  14. method: 'get'
  15. })
  16. }
  17. // 新增服务区用电属性
  18. export function addAttr(data) {
  19. return request({
  20. url: '/ems/basecfg/elec/attr',
  21. method: 'post',
  22. data: data
  23. })
  24. }
  25. // 修改服务区用电属性
  26. export function updateAttr(data) {
  27. return request({
  28. url: '/ems/basecfg/elec/attr',
  29. method: 'put',
  30. data: data
  31. })
  32. }
  33. // 删除服务区用电属性
  34. export function delAttr(id) {
  35. return request({
  36. url: '/ems/basecfg/elec/attr/' + id,
  37. method: 'delete'
  38. })
  39. }
  40. // 新增峰谷电价策略
  41. export function addStrategy(data) {
  42. return request({
  43. url: '/ems/basecfg/elecPrice/strategy',
  44. method: 'post',
  45. data: data
  46. })
  47. }
  48. export function listStrategy(params) {
  49. return request({
  50. url: '/ems/basecfg/elecPrice/strategy/list',
  51. method: 'get',
  52. params
  53. })
  54. }
  55. export function updateStrategy(data) {
  56. return request({
  57. url: '/ems/basecfg/elecPrice/strategy',
  58. method: 'put',
  59. data: data
  60. })
  61. }
  62. export function delStrategy(id) {
  63. return request({
  64. url: '/ems/basecfg/elecPrice/strategy/' + id,
  65. method: 'delete'
  66. })
  67. }
  68. //商户计费配置
  69. export function addCharging(data) {
  70. return request({
  71. url: '/ems/basecfg/elecPrice/coCharging',
  72. method: 'post',
  73. data: data
  74. })
  75. }
  76. export function listCharging(params) {
  77. return request({
  78. url: '/ems/basecfg/elecPrice/coCharging/list',
  79. method: 'get',
  80. params
  81. })
  82. }
  83. export function updateCharging(data) {
  84. return request({
  85. url: '/ems/basecfg/elecPrice/coCharging',
  86. method: 'put',
  87. data: data
  88. })
  89. }
  90. export function delCharging(id) {
  91. return request({
  92. url: '/ems/basecfg/elecPrice/coCharging/' + id,
  93. method: 'delete'
  94. })
  95. }