index.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. methods: {
  47. golist(a, hccount) {
  48. this.showlist = true;
  49. this.$refs.hclistRef.golist(a, hccount);
  50. },
  51. returnCount() {
  52. this.showlist = false;
  53. this.$refs.hcRef.getList();
  54. },
  55. returnList() {
  56. this.isdetail = false;
  57. this.$refs.hcRef.getList();
  58. },
  59. goDetail(val) {
  60. this.isdetail = true
  61. this.$refs.mapRef.setitem(val)
  62. this.$refs.detailsRef.handleClick(val);
  63. },
  64. addGeoJson(maplist) {
  65. this.$refs.mapRef.setlist(maplist)
  66. },
  67. },
  68. };
  69. </script>
  70. <style lang="scss">
  71. .orderPage {
  72. padding: 30rpx;
  73. //background: azure;
  74. padding-bottom: 50px;
  75. position: relative;
  76. height: 100vh;
  77. }
  78. </style>