station.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import { axios } from '@/utils/request'
  2. // 网点列表
  3. export const stationList = (params) => {
  4. const url = `/station/query/${params.pageNo}/${params.pageSize}`
  5. delete params.pageNo
  6. delete params.pageSize
  7. return axios.request({
  8. url: url,
  9. data: params,
  10. method: 'post'
  11. })
  12. }
  13. // 查网点列表 不分页
  14. export const stationListQuery = (params) => {
  15. return axios.request({
  16. url: `/station/queryList`,
  17. method: 'post',
  18. data: params
  19. })
  20. }
  21. // 网点详情
  22. export const stationFind = (params) => {
  23. return axios.request({
  24. url: `/station/findById/${params.id}`,
  25. method: 'get'
  26. })
  27. }
  28. // 网点保存
  29. export const stationSave = (params) => {
  30. return axios.request({
  31. url: '/station/save',
  32. data: params,
  33. method: 'post'
  34. })
  35. }
  36. // 网点删除
  37. export const stationDel = (params) => {
  38. return axios.request({
  39. url: `/station/delete/${params.id}`,
  40. method: 'get'
  41. })
  42. }
  43. // 设备绑定
  44. export const stationBind = (params) => {
  45. return axios.request({
  46. url: `/station/binding`,
  47. method: 'post',
  48. data: params
  49. })
  50. }
  51. // 设备解绑
  52. export const stationUnBind = (params) => {
  53. return axios.request({
  54. url: `/station/remBinding`,
  55. method: 'post',
  56. data: params
  57. })
  58. }
  59. // 查询省
  60. export const getProvince = () => {
  61. return axios.request({
  62. url: `/area/PROVINCE`,
  63. method: 'get'
  64. })
  65. }
  66. // 查询市
  67. export const getCityByPro = params => {
  68. return axios.request({
  69. url: `/area/CITY/${params.id}`,
  70. method: 'get'
  71. })
  72. }
  73. // 查询区
  74. export const getDistrictByCity = params => {
  75. return axios.request({
  76. url: `/area/DISTRICT/${params.id}`,
  77. method: 'get'
  78. })
  79. }