HomeView.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <template>
  2. <div class="home">
  3. <Header />
  4. <Edge />
  5. <Layers />
  6. <Map ref="map" />
  7. <!-- 左侧图片区 -->
  8. <div class="home_LeftMainBox">
  9. <img style="width: 500px; height: 50px" src="../assets/images/LT1.png" />
  10. <img style="width: 500px; height: 246px" src="../assets/images/LM1.png" />
  11. <img style="width: 500px; height: 50px" src="../assets/images/LT2.png" />
  12. <img style="width: 500px; height: 246px" src="../assets/images/LM2.png" />
  13. <img style="width: 500px; height: 50px" src="../assets/images/LT3.png" />
  14. <img style="width: 500px; height: 246px" src="../assets/images/LM3.png" />
  15. </div>
  16. <!-- 中上部分3DTiles控件 -->
  17. <div class="home_CentralMainBox">
  18. <el-cascader
  19. placeholder="选择3DTiles模型渲染"
  20. v-model="cascaderValue"
  21. @change="handleChangeCascader"
  22. :options="options"
  23. :props="props"
  24. clearable
  25. ></el-cascader>
  26. </div>
  27. <!-- 右侧图片区 -->
  28. <div class="home_RightMainBox">
  29. <img style="width: 500px; height: 50px" src="../assets/images/RT1.png" />
  30. <img style="width: 500px; height: 246px" src="../assets/images/RM1.png" />
  31. <img style="width: 500px; height: 50px" src="../assets/images/RT2.png" />
  32. <img style="width: 500px; height: 246px" src="../assets/images/RM2.png" />
  33. <img style="width: 500px; height: 50px" src="../assets/images/RT3.png" />
  34. <img style="width: 500px; height: 246px" src="../assets/images/RM3.png" />
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import Map from "@/components/Map.vue";
  40. import Header from "@/components/Header.vue";
  41. import Edge from "@/components/Edge.vue";
  42. import Layers from "@/components/Layers.vue";
  43. import CardTitle from "@/components/cards/CardTitle.vue";
  44. export default {
  45. name: "HomeView",
  46. data() {
  47. return {
  48. props: { multiple: true },
  49. options: [],
  50. cascaderValue: [],
  51. };
  52. },
  53. components: {
  54. Map,
  55. Header,
  56. Edge,
  57. Layers,
  58. CardTitle,
  59. },
  60. mounted() {
  61. // 初始化3DTiles的下拉框options并默认显示
  62. let options_ = [];
  63. let cascaderValue_ = [];
  64. for (let tileName in systemConfig.data3DTiles) {
  65. let children_ = [];
  66. for (let key in systemConfig.data3DTiles[tileName]) {
  67. children_.push({ value: key, label: key });
  68. cascaderValue_.push([tileName, key]);
  69. }
  70. options_.push({ value: tileName, label: tileName, children: children_ });
  71. }
  72. this.options = options_;
  73. // 默认全选所有3DTiles模型
  74. // this.$nextTick(() => {
  75. // setTimeout(() => {
  76. // this.cascaderValue = cascaderValue_;
  77. // this.$refs.map.HomeHandleChangeCascader(cascaderValue_);
  78. // });
  79. // });
  80. },
  81. methods: {
  82. handleChangeCascader(cascaderValue) {
  83. this.$refs.map.HomeHandleChangeCascader(Object.assign([], cascaderValue));
  84. },
  85. },
  86. };
  87. </script>
  88. <style lang="less" scoped>
  89. .home {
  90. width: 100%;
  91. height: 100%;
  92. overflow: hidden;
  93. &_LeftMainBox {
  94. position: fixed;
  95. z-index: 9999;
  96. top: 65px;
  97. left: 0;
  98. width: 500px;
  99. height: calc(100vh - 65px);
  100. overflow: hidden;
  101. display: flex;
  102. flex-direction: column;
  103. flex-wrap: nowrap;
  104. justify-content: space-between;
  105. // pointer-events: none;
  106. background: #00000064;
  107. }
  108. &_CentralMainBox {
  109. position: fixed;
  110. z-index: 9999;
  111. left: 520px;
  112. top: 100px;
  113. width: 350px;
  114. overflow-x: hidden;
  115. display: flex;
  116. flex-direction: column;
  117. flex-wrap: nowrap;
  118. justify-content: space-between;
  119. }
  120. &_RightMainBox {
  121. position: fixed;
  122. z-index: 9999;
  123. top: 65px;
  124. right: 0;
  125. width: 500px;
  126. height: calc(100vh - 65px);
  127. overflow: hidden;
  128. display: flex;
  129. flex-direction: column;
  130. flex-wrap: nowrap;
  131. justify-content: space-between;
  132. // pointer-events: none;
  133. background: #00000064;
  134. }
  135. }
  136. </style>