index.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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==3?"active":""' @click="goTarget(3)">治理态势</div>
  11. <div :class='currentindex==4?"active":""' @click="goTarget(4)">安全态势</div>
  12. <div :class='currentindex==5?"active":""' @click="goTarget(5)">公众服务</div>
  13. <div :class='currentindex==6?"active":""' @click="goTarget(6)">综合管理</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 == 3){
  45. this.$router.push('/governance')
  46. }else if(index == 4){
  47. this.$router.push('/safe')
  48. }else if(index == 5){
  49. this.$router.push('/public')
  50. }else if(index == 6){
  51. this.$router.push('/index')
  52. }else if(index == 7){
  53. this.$router.push('/introduction')
  54. }
  55. },
  56. },
  57. };
  58. </script>
  59. <style rel="stylesheet/scss" lang="scss">
  60. .header {
  61. background: url("../../assets/images/top@2x.png") no-repeat;
  62. background-size: 100% 100%;
  63. max-height: 5.2rem;
  64. position: relative;
  65. z-index: 1;
  66. .headertitle {
  67. margin-left: 1.1rem;
  68. img {
  69. width: 41.36rem;
  70. height: 4.2rem;
  71. }
  72. }
  73. .mum {
  74. font-size: 1.6rem;
  75. color: #fff;
  76. position: absolute;
  77. top: 1.2rem;
  78. left: 63rem;
  79. >div {
  80. display: inline-block;
  81. margin-right: 7.9rem;
  82. cursor: pointer;
  83. }
  84. .active {
  85. color: #30FFEA;
  86. }
  87. .active::before {
  88. display: inline-block;
  89. content: "";
  90. background: url("../../assets/images/左@2x.png") no-repeat;
  91. width: 2.2rem;
  92. height: 1.4rem;
  93. background-size: 100% 100%;
  94. margin-right: 0.2rem;
  95. }
  96. .active::after {
  97. display: inline-block;
  98. content: "";
  99. background: url("../../assets/images/左@2x.png") no-repeat;
  100. width: 2.2rem;
  101. height: 1.4rem;
  102. background-size: 100% 100%;
  103. margin-left: 0.2rem;
  104. }
  105. }
  106. .time {
  107. position: absolute;
  108. top: 1.2rem;
  109. right: 4.7rem;
  110. font-size: 1.6rem;
  111. color: #fff;
  112. img {
  113. width: 2.4rem;
  114. height: 2.4rem;
  115. vertical-align: middle;
  116. margin-top: -0.1rem;
  117. margin-right: 1.6rem;
  118. }
  119. }
  120. }
  121. .bottombg{
  122. background: url("../../assets/images/底部菜单bg@2x.png");
  123. position: absolute;
  124. background-size: 100% 100%;
  125. z-index: 1;
  126. width: 85.1rem;
  127. height: 16.3rem;
  128. bottom: 0;
  129. left: 50%;
  130. transform: translate(-50%,-0%);
  131. display: flex;
  132. flex-direction: row;
  133. align-items: center;
  134. color:#fff;
  135. font-size:1.6rem;
  136. .item{
  137. width: 27%;
  138. text-align: center;
  139. justify-content: center;
  140. position: relative;
  141. .num{
  142. font-size:3rem;
  143. color:#25f8bd;
  144. }
  145. }
  146. .item1{
  147. width: 23%;
  148. }
  149. .item2::after{
  150. content: "";
  151. background: url("../../assets/images/图层\ 2@2x.png");
  152. background-size: 100% 100%;
  153. width: 0.2rem;
  154. height: 7.3rem;
  155. position: absolute;
  156. top: 0;
  157. right: 0;
  158. }
  159. }
  160. .ol-zoom-in,.ol-zoom-out{
  161. display: none !important;
  162. }
  163. </style>