index.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <template>
  2. <div class="header">
  3. <div class="headertitle">
  4. <img src="../../assets/images/启东市铁路沿线综合治理信息化管理平台@2x.png" />
  5. </div>
  6. <div class="mum">
  7. <div :class='currentindex==1?"active":""' @click="goTarget(1)">首页</div>
  8. <div :class='currentindex==7?"active":""' @click="goTarget(7)">交通局简介</div>
  9. <div :class='currentindex==2?"active":""' @click="goTarget(2)">设施监测</div>
  10. <div :class='currentindex==6?"active":""' @click="goTarget(6)">综合管理</div>
  11. <div :class='currentindex==3?"active":""' @click="goTarget(3)">治理态势</div>
  12. <div :class='currentindex==4?"active":""' @click="goTarget(4)">安全态势</div>
  13. <div :class='currentindex==5?"active":""' @click="goTarget(5)">公众服务</div>
  14. </div>
  15. <div class="time">
  16. <img src="../../assets/images/图层 9@2x.png" /><span>{{ currenttime }}</span>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import moment from "moment";
  22. export default {
  23. name: "HeaderDiv",
  24. props: {
  25. currentindexP:Number
  26. },
  27. data() {
  28. return {
  29. // 版本号
  30. version: "3.8.1",
  31. currenttime: moment().format("YYYY-MM-DD HH:mm:ss"),
  32. currentindex:this.currentindexP
  33. };
  34. },
  35. mounted() {
  36. setInterval(() => {
  37. this.currenttime = moment().format("YYYY-MM-DD HH:mm:ss");
  38. }, 1000);
  39. },
  40. methods: {
  41. goTarget(index) {
  42. if(index == 1){
  43. this.$router.push('/big')
  44. }else if(index == 2){
  45. this.$router.push('/video')
  46. }else if(index == 3){
  47. this.$router.push('/governance')
  48. }else if(index == 4){
  49. this.$router.push('/safe')
  50. }else if(index == 5){
  51. this.$router.push('/public')
  52. }else if(index == 6){
  53. this.$router.push('/index')
  54. }else if(index == 7){
  55. this.$router.push('/introduction')
  56. }
  57. },
  58. },
  59. };
  60. </script>
  61. <style rel="stylesheet/scss" lang="scss">
  62. .header {
  63. background: url("../../assets/images/top@2x.png") no-repeat;
  64. background-size: 100% 100%;
  65. max-height: 5.2rem;
  66. position: relative;
  67. z-index: 1;
  68. .headertitle {
  69. margin-left: 1.1rem;
  70. img {
  71. width: 41.36rem;
  72. height: 4.2rem;
  73. }
  74. }
  75. .mum {
  76. font-size: 1.6rem;
  77. color: #fff;
  78. position: absolute;
  79. top: 1.2rem;
  80. left: 30%;
  81. >div {
  82. display: inline-block;
  83. margin-right: 7.9rem;
  84. cursor: pointer;
  85. }
  86. .active {
  87. color: #30FFEA;
  88. }
  89. .active::before {
  90. display: inline-block;
  91. content: "";
  92. background: url("../../assets/images/左@2x.png") no-repeat;
  93. width: 2.2rem;
  94. height: 1.4rem;
  95. background-size: 100% 100%;
  96. margin-right: 0.2rem;
  97. }
  98. .active::after {
  99. display: inline-block;
  100. content: "";
  101. background: url("../../assets/images/左@2x.png") no-repeat;
  102. width: 2.2rem;
  103. height: 1.4rem;
  104. background-size: 100% 100%;
  105. margin-left: 0.2rem;
  106. }
  107. }
  108. .time {
  109. position: absolute;
  110. top: 1.2rem;
  111. right: 4.7rem;
  112. font-size: 1.6rem;
  113. color: #fff;
  114. img {
  115. width: 2.4rem;
  116. height: 2.4rem;
  117. vertical-align: middle;
  118. margin-top: -0.1rem;
  119. margin-right: 1.6rem;
  120. }
  121. }
  122. }
  123. .bottombg{
  124. background: url("../../assets/images/底部菜单bg@2x.png");
  125. position: absolute;
  126. background-size: 100% 100%;
  127. z-index: 1;
  128. width: 85.1rem;
  129. height: 16.3rem;
  130. bottom: 0;
  131. left: 50%;
  132. transform: translate(-50%,-0%);
  133. display: flex;
  134. flex-direction: row;
  135. align-items: center;
  136. color:#fff;
  137. font-size:1.6rem;
  138. .item:hover{
  139. cursor: pointer;
  140. }
  141. .item{
  142. width: 33%;
  143. text-align: center;
  144. justify-content: center;
  145. position: relative;
  146. .num{
  147. font-size:3rem;
  148. color:#25f8bd;
  149. }
  150. }
  151. .item1{
  152. width: 33%;
  153. }
  154. .item2::after{
  155. content: "";
  156. background: url("../../assets/images/图层\ 2@2x.png");
  157. background-size: 100% 100%;
  158. width: 0.2rem;
  159. height: 7.3rem;
  160. position: absolute;
  161. top: 0;
  162. right: 0;
  163. }
  164. }
  165. .ol-zoom-in,.ol-zoom-out{
  166. display: none !important;
  167. }
  168. </style>