mapDataService.js 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*!
  2. * 地图数据管理
  3. */
  4. import Vue from 'vue'
  5. /**
  6. * 获取地图列表
  7. * @param params
  8. * @param flag
  9. * @returns {*}
  10. */
  11. const mapList = (params = {}, flag = false) => Vue.prototype.$dataRoomAxios.get('/bigScreen/map/list', params, flag)
  12. /**
  13. * 新增地图
  14. * @param params
  15. * @param flag
  16. * @returns {*}
  17. */
  18. const mapAdd = (params = {}, flag = false) => Vue.prototype.$dataRoomAxios.post('/bigScreen/map/add', params, flag)
  19. /**
  20. * 更新地图
  21. * @param params
  22. * @param flag
  23. * @returns {*}
  24. */
  25. const mapUpdate = (params = {}, flag = false) => Vue.prototype.$dataRoomAxios.post('/bigScreen/map/update', params, flag)
  26. /**
  27. * 删除地图
  28. * @param id
  29. */
  30. const mapDelete = (id = '-1') => Vue.prototype.$dataRoomAxios.post(`/bigScreen/map/delete/${id}`)
  31. /**
  32. * 级联删除地图
  33. * @param id
  34. */
  35. const mapCascadeDelete = (id = '-1') => Vue.prototype.$dataRoomAxios.post(`/bigScreen/map/cascadeDelete/${id}`)
  36. /**
  37. * 根据父编码解析父级json中的子级
  38. * @param code
  39. */
  40. const getMapChildFromGeoJson = (code = '-1') => Vue.prototype.$dataRoomAxios.get(`/bigScreen/map/getMapChildFromGeoJson/${code}`)
  41. /**
  42. * 上传地图json
  43. * @param params
  44. * @param flag
  45. */
  46. const uploadGeoJson = (params = {}, flag = false) => Vue.prototype.$dataRoomAxios.post('/bigScreen/map/upload', params, flag)
  47. /**
  48. * 编码重复校验
  49. * @param params
  50. * @param flag
  51. */
  52. const repeatCheck = (params = {}, flag = false) => Vue.prototype.$dataRoomAxios.post('/bigScreen/map/repeat', params, flag)
  53. export {
  54. mapList,
  55. mapAdd,
  56. mapUpdate,
  57. mapDelete,
  58. mapCascadeDelete,
  59. getMapChildFromGeoJson,
  60. uploadGeoJson,
  61. repeatCheck
  62. }