HomeView.vue 3.7 KB

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