index.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <template>
  2. <view class="orderPage">
  3. <hcCounts v-show="!showlist" ref="hcRef" @golist="golist"></hcCounts>
  4. <view v-show="showlist">
  5. <MapView ref="mapRef"></MapView>
  6. <hcList ref="hclistRef" v-show="!isdetail" @returnCount="returnCount" @addmap="addGeoJson"
  7. @goDetail="goDetail"></hcList>
  8. <hcDetails ref="detailsRef" v-show="isdetail" @returnList="returnList"></hcDetails>
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. import hcCounts from "./index/common/hcCounts.vue";
  14. import hcList from "./index/common/hcList.vue";
  15. import hcDetails from "./index/common/hcDetails.vue";
  16. import MapView from "./check/MapView.vue";
  17. import parse from "wellknown";
  18. import VectorLayer from "ol/layer/Vector";
  19. import VectorSource from "ol/source/Vector";
  20. import {
  21. Style,
  22. Icon
  23. } from "ol/style";
  24. import Stroke from "ol/style/Stroke";
  25. import GeoJSON from "ol/format/GeoJSON";
  26. export default {
  27. name: "list",
  28. components: {
  29. hcCounts,
  30. MapView,
  31. hcList,
  32. hcDetails,
  33. },
  34. data() {
  35. return {
  36. showlist: false,
  37. isdetail: false,
  38. curPageResultLayer: {}
  39. };
  40. },
  41. onLoad() {},
  42. created() {},
  43. mounted() {},
  44. onReady() {
  45. },
  46. onShow() {
  47. if (this.isdetail) {
  48. this.goDetail()
  49. } else {
  50. this.returnList()
  51. }
  52. },
  53. methods: {
  54. golist(a, hccount) {
  55. this.showlist = true;
  56. this.$refs.hclistRef.golist(a, hccount);
  57. },
  58. returnCount() {
  59. this.showlist = false;
  60. this.$refs.hcRef.getList();
  61. },
  62. returnList() {
  63. this.isdetail = false;
  64. this.$refs.hcRef.getList();
  65. this.$refs.hclistRef.getList();
  66. },
  67. goDetail(val) {
  68. this.isdetail = true
  69. this.$refs.mapRef.setitem(val)
  70. this.$refs.detailsRef.handleClick(val);
  71. },
  72. addGeoJson(maplist) {
  73. this.$refs.mapRef.setlist(maplist)
  74. },
  75. },
  76. };
  77. </script>
  78. <style lang="scss">
  79. .orderPage {
  80. padding: 30rpx;
  81. //background: azure;
  82. padding-bottom: 50px;
  83. position: relative;
  84. height: 100vh;
  85. }
  86. </style>