App.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. <template>
  2. <div id="app">
  3. <header>
  4. <heads class="headS"></heads>
  5. </header>
  6. <div class="viewContent">
  7. <!-- <keep-alive> -->
  8. <router-view></router-view>
  9. <!-- </keep-alive> -->
  10. <timeSelect :select="select" />
  11. </div>
  12. <div class="bg"></div>
  13. <transition name="el-fade-in-linear">
  14. <!-- 普通弹框 -->
  15. <div class="tableTooltipwt sadianTankang" v-show="stores.$state.arrayList.length > 0">
  16. <img src="~@a/img/icon/close.png" alt="" class="close" @click="close" />
  17. <el-row class="tableContent">
  18. <el-col class="mk" v-for="li in stores.$state.arrayList" :key="li" v-show="li.title[1]">
  19. <p v-show="li.title[1]">{{ li.title[0] }}</p>
  20. <el-row>
  21. <el-col v-for="ch in li.children" :key="ch" :span="ch[2]" v-show="li.title[1] && ch[1]">
  22. <span class="color1">{{ ch[0] }}</span>
  23. <span class="color2">{{ ch[1] }}</span>
  24. </el-col>
  25. <el-row style="margin-top: 10px" v-if="li.type">
  26. <iframe
  27. :src="li.url"
  28. allowfullscreen="true"
  29. style="width: 100%"
  30. ></iframe>
  31. </el-row>
  32. </el-row>
  33. </el-col>
  34. </el-row>
  35. </div>
  36. </transition>
  37. </div>
  38. </template>
  39. <script>
  40. import heads from "@v/head";
  41. import timeSelect from "@v/time-select";
  42. export default {
  43. components: { heads, timeSelect },
  44. name: "App",
  45. data() {
  46. return {
  47. stores: this.$useStore(),
  48. baogao:false,
  49. select:null
  50. };
  51. },
  52. mounted() {
  53. },
  54. methods: {
  55. /**
  56. * 弹框关闭
  57. */
  58. close() {
  59. setTimeout(()=>{
  60. this.stores.$state.arrayList = [];
  61. },1000)
  62. },
  63. },
  64. computed: {
  65. isFollow3() {
  66. return this.stores.$state.tankuangXY; //需要监听撒点距离xy坐标
  67. },
  68. },
  69. watch: {
  70. $route(to, from) {
  71. if(to.fullPath == "/enforcement-dynamic"){
  72. this.select = "jinyinian"
  73. }else{
  74. this.select = "dangyue"
  75. }
  76. if (this.stores.$state.leftBtn) {
  77. this.stores.$state.leftBtn = true; //左侧收起按钮
  78. }
  79. if (this.stores.$state.leftBtn) {
  80. this.stores.$state.rightBtn = true; //右侧收起按钮
  81. }
  82. if (this.stores.$state.streetTown) {
  83. this.stores.$state.streetTown = ""; //街镇信息存储
  84. }
  85. if (this.stores.$state.tankuangXY) {
  86. this.stores.$state.tankuangXY = {}; //撒点弹框坐标
  87. }
  88. if (this.stores.$state.arrayList) {
  89. this.stores.$state.arrayList = []; //撒点弹框数据存储
  90. }
  91. if (this.stores.$state.mapSpotId) {
  92. this.stores.$state.mapSpotId = ""; //地图撒点id
  93. }
  94. },
  95. isFollow3(newVal) {
  96. // let height = document.getElementsByClassName("tableTooltipwt")[0].clientHeight;
  97. // document.getElementsByClassName("tableTooltipwt")[0].style.top = newVal.y - 100 + "px";
  98. // document.getElementsByClassName("tableTooltipwt")[0].style.left = newVal.x - 2.4 * 80 + "px";
  99. },
  100. },
  101. };
  102. </script>
  103. <style lang="scss">
  104. #app {
  105. width: 100%;
  106. height: 100%;
  107. display: flex;
  108. flex-direction: column;
  109. // background-color: #ccc;
  110. overflow: hidden !important;
  111. // white-space: nowrap !important;
  112. text-overflow: ellipsis !important;
  113. }
  114. .bg{
  115. width:100%;
  116. height:100%;
  117. position: absolute;
  118. top:0;
  119. left:0;
  120. background: url("~@a/img/bg.png");
  121. background-size: 100% 100%;
  122. z-index: -1;
  123. }
  124. </style>
  125. <style lang="scss" scoped>
  126. @import "@/assets/scss/color.scss";
  127. #app {
  128. .headS {
  129. width: 100%;
  130. }
  131. .viewContent {
  132. flex: 1;
  133. box-sizing: border-box;
  134. overflow: hidden;
  135. margin-top: -0.3125rem;
  136. }
  137. }
  138. .tableTooltipwt {
  139. width: 5rem;
  140. background: transparent;
  141. border-radius: 0.05rem;
  142. box-shadow: inset 0 0 1px 0.0125rem rgba(115, 251, 253, 1);
  143. background: rgba(0, 29, 49, 0.5);
  144. font-size: 0.2rem;
  145. padding: 0.1875rem;
  146. position: fixed;
  147. // top: 140px;
  148. // right: 600px;
  149. z-index: 10000;
  150. .close {
  151. width: 20px;
  152. height: 20px;
  153. position: absolute;
  154. right: 10px;
  155. top: 10px;
  156. z-index: 10000;
  157. display: block;
  158. }
  159. .tableContent {
  160. p {
  161. @include color_primary($color-primary1);
  162. }
  163. .el-col {
  164. margin-top: 0.05rem;
  165. line-height: 0.3rem;
  166. text-overflow: ellipsis !important;
  167. white-space: normal !important;
  168. }
  169. .mk {
  170. margin-top: 0px;
  171. .color1 {
  172. @include color_primary($color-primary3);
  173. }
  174. .color2 {
  175. @include color_primary($color-primary1);
  176. }
  177. }
  178. }
  179. }
  180. </style>