Btmbutton.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. <template>
  2. <div>
  3. <div class="btmbuttonbg">
  4. <div class="btmbutton">
  5. <div class="btmbutton-con">
  6. <!--<div class="btm-left-btn">-->
  7. <!--<a class="btm-btn">值班信息</a>-->
  8. <!--</div>-->
  9. <div class="yj-name" style="text-indent: 1em">张雨晴</div>
  10. <div class="model-tab">
  11. <button class="on" @click="goJiaShi">驾驶模式</button>
  12. <button @click="goChenJin">沉浸模式</button>
  13. </div>
  14. <div class="time"> {{nowdate}}&nbsp;&nbsp;{{nowtime}}</div>
  15. <div class="btm-con">
  16. <h2 class="yj-sjzs">160</h2>
  17. <div class="yj-sjs">
  18. <div class="yj-cl">
  19. <b>40</b>
  20. <span>未处理</span>
  21. </div>
  22. <div class="yj-k"></div>
  23. <div class="yj-cl">
  24. <b>120</b>
  25. <span>已确认</span>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="btm-con2">
  30. <span>隐患排查</span>
  31. <span>应急物资</span>
  32. </div>
  33. <div class="btm-con3">
  34. <span><i class="iconfont yj-icon-fengsu"></i><u>风力</u></span>
  35. <span><i class="iconfont yj-icon-fengxiang"></i><u>东南风</u></span>
  36. <span><i class="iconfont yj-icon-jiangyuliang"></i><u>10mm</u></span>
  37. <span><i class="iconfont yj-icon-shidu"></i><u>93</u></span>
  38. </div>
  39. <div class="btn-left">
  40. <p><i class="iconfont yj-icon-tongxunlu"></i>通讯录</p>
  41. <p><i class="iconfont yj-icon-weizhi"></i>人员定位</p>
  42. <p><i class="iconfont yj-icon-taizhang"></i>事件台账</p>
  43. <div class="btm-cs">
  44. <b>72</b>
  45. <span>传感器</span>
  46. </div>
  47. </div>
  48. <div class="btn-right">
  49. <p>物联网<i class="iconfont yj-icon-wulianwang"></i></p>
  50. <p>视联网<i class="iconfont yj-icon-shilianwang"></i></p>
  51. <p>电视墙<i class="iconfont yj-icon-dianshiqiang"></i></p>
  52. <div class="btm-cs">
  53. <b>160</b>
  54. <span>摄像头</span>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <script>
  63. export default {
  64. name: 'Btmbutton',
  65. data(){
  66. return {
  67. nowdate : '', //日期
  68. nowtime : '', //时间
  69. newTimer : '', //定时器
  70. }
  71. },
  72. props: {
  73. },
  74. mounted () {
  75. this.timerOneScondRun(); //执行日期函数
  76. clearInterval(this.newTimer); //清除定时器
  77. // 定时获取时间
  78. this.newTimer = setInterval(this.timerOneScondRun, 1000);
  79. },
  80. beforeRouteLeave(to,from,next){
  81. // 离开组件时停掉定时器,节省内存
  82. clearInterval(this.newTimer);
  83. next();
  84. },
  85. methods: {
  86. //获取时间
  87. timerOneScondRun() {
  88. let date = new Date();
  89. // 日期格式 2022年05月31日
  90. this.nowdate =
  91. date.getFullYear() +
  92. "/" +
  93. (date.getMonth() + 1 >= 10
  94. ? date.getMonth() + 1
  95. : "0" + (date.getMonth() + 1)) +
  96. "/" +
  97. (date.getDate() >= 10 ? date.getDate() : "0" + date.getDate());
  98. // 时间格式 12:11:27
  99. this.nowtime =
  100. date.getHours() +
  101. ":" +
  102. (date.getMinutes() >= 10
  103. ? date.getMinutes()
  104. : "0" + date.getMinutes()) +
  105. ":" +
  106. (date.getSeconds() >= 10 ? date.getSeconds() : "0" + date.getSeconds());
  107. },
  108. // 跳转沉浸模式
  109. goChenJin(){
  110. this.$router.push( '/YjCjms');
  111. },
  112. // 跳转驾驶模式
  113. goJiaShi(){
  114. // this.$router.push( '/index');
  115. }
  116. }
  117. }
  118. </script>
  119. <!-- Add "scoped" attribute to limit CSS to this component only -->
  120. <style scoped>
  121. .btmbuttonbg{
  122. position: absolute;
  123. bottom: 0px;
  124. width: 100%;
  125. height: 239px;
  126. background: url("../assets/images/yj-btmbg.png") no-repeat center;
  127. background-size: 100% 100%;
  128. z-index: 2;
  129. }
  130. .btmbutton{
  131. width: 100%;
  132. height: 100%;
  133. position: relative;
  134. }
  135. .btmbutton-con{
  136. width: 900px;
  137. height: 100%;
  138. position: absolute;
  139. top: 0px;
  140. left: 50%;
  141. transform: translateX(-50%);
  142. }
  143. .btmbutton-con .model-tab{
  144. text-align: center;
  145. display: flex;
  146. flex-direction: row;
  147. justify-content: center;
  148. }
  149. .btmbutton-con .model-tab button{
  150. background: url("../assets/images/yj-nav.png") no-repeat center;
  151. display: block;
  152. width: 165px;
  153. height: 25px;
  154. line-height: 25px;
  155. background-size: 100% 100%;
  156. margin-top: -15px;
  157. cursor: pointer;
  158. color: #8b8b8b;
  159. font-size: 14px;
  160. border: 0px;
  161. outline: 0px;
  162. }
  163. .btmbutton-con .model-tab button.on{
  164. background: url("../assets/images/yj-navon.png") no-repeat center;
  165. background-size: 100% 100%;
  166. color: #fff;
  167. }
  168. .btmbutton-con .model-tab button:hover{
  169. background: url("../assets/images/yj-navon.png") no-repeat center;
  170. background-size: 100% 100%;
  171. color: #fff;
  172. }
  173. .time{
  174. text-align: center;
  175. font-family: "黑体";
  176. font-size: 20px;
  177. color: #fff;
  178. font-style: italic;
  179. margin-top: 10px;
  180. }
  181. .btm-con{
  182. background: url("../assets/images/yj-btmcbg1.png") no-repeat center;
  183. width: 313px;
  184. height: 207px;
  185. margin: -20px auto 0px auto;
  186. display: flex;
  187. flex-direction: column;
  188. }
  189. .btm-con h2{
  190. font-size: 55px;
  191. background-image:-webkit-linear-gradient(top,#fff,#6a6a6a);
  192. -webkit-background-clip:text;
  193. -webkit-text-fill-color:transparent;
  194. text-align: center;
  195. margin-top: 50px;
  196. font-family: myfont3;
  197. font-weight: bold;
  198. }
  199. .btm-con .yj-sjs{
  200. display: flex;
  201. flex-direction: row;
  202. justify-content: center;
  203. margin-top: -7px;
  204. }
  205. .btm-con .yj-sjs b{
  206. font-size: 28px;
  207. background-image:-webkit-linear-gradient(top,#fff,#6a6a6a);
  208. -webkit-background-clip:text;
  209. -webkit-text-fill-color:transparent;
  210. text-align: center;
  211. display: block;
  212. font-family: myfont3;
  213. font-weight: bold;
  214. }
  215. .btm-con .yj-sjs span{
  216. color: #fff;
  217. font-size: 12px;
  218. text-align: center;
  219. display: block;
  220. }
  221. .btm-con .yj-k{
  222. width: 70px;
  223. }
  224. .btm-con2{
  225. background: url("../assets/images/yj-btmcbg2.png") no-repeat center;
  226. width: 459px;
  227. height: 43px;
  228. margin: -135px auto 0px auto;
  229. background-size: 100% 100%;
  230. display: flex;
  231. flex-direction: row;
  232. justify-content: space-between;
  233. }
  234. .btm-con2 span{
  235. color: #fff;
  236. font-size: 14px;
  237. line-height: 43px;
  238. }
  239. .btm-con2 span:nth-child(1){
  240. padding-left: 30px;
  241. }
  242. .btm-con2 span:nth-child(2){
  243. padding-right: 30px;
  244. }
  245. .btm-con3{
  246. width:250px ;
  247. height: 20px;
  248. margin: 75px auto 0px auto;
  249. display: flex;
  250. flex-direction: row;
  251. justify-content: space-between;
  252. }
  253. .btm-con3 span{
  254. margin: 0px 5px;
  255. }
  256. .btm-con3 i{
  257. color: #fff;
  258. font-size: 16px;
  259. }
  260. .btm-con3 u{
  261. color: #fff;
  262. font-size: 14px;
  263. text-decoration: none;
  264. padding-left: 5px;
  265. }
  266. .btn-left{
  267. position: absolute;
  268. left: 0px;
  269. top:14px;
  270. }
  271. .btn-left p{
  272. background: url("../assets/images/yj-btmleftbg.png") no-repeat center;
  273. background-size: 100% 100%;
  274. width: 150px;
  275. height: 23px;
  276. line-height: 23px;
  277. margin-bottom: 10px;
  278. color: #fff;
  279. padding-left: 18px;
  280. font-size: 14px;
  281. cursor: pointer;
  282. text-align: left;
  283. }
  284. .btn-left p i{
  285. font-size: 15px;
  286. margin-right: 8px;
  287. }
  288. .btn-left p:nth-child(1){
  289. margin-left: 85px;
  290. }
  291. .btn-left p:nth-child(2){
  292. margin-left: 72px;
  293. }
  294. .btn-left p:nth-child(3){
  295. margin-left: 62px;
  296. }
  297. .btn-left p:nth-child(4){
  298. margin-left: 50px;
  299. }
  300. .btm-cs{
  301. display: flex;
  302. flex-direction: column;
  303. align-items: center;
  304. margin-top: 25px;
  305. }
  306. .btm-cs b{
  307. font-size: 50px;
  308. background-image:-webkit-linear-gradient(top,#fff,#6a6a6a);
  309. -webkit-background-clip:text;
  310. -webkit-text-fill-color:transparent;
  311. text-align: center;
  312. display: block;
  313. font-family: myfont3;
  314. font-weight: bold;
  315. }
  316. .btm-cs span{
  317. color: #fff;
  318. font-size: 12px;
  319. }
  320. .btn-right{
  321. position: absolute;
  322. right: 0px;
  323. top:14px;
  324. }
  325. .btn-right p{
  326. background: url("../assets/images/yj-btmrightbg.png") no-repeat center;
  327. background-size: 100% 100%;
  328. width: 150px;
  329. height: 23px;
  330. line-height: 23px;
  331. margin-bottom: 10px;
  332. color: #fff;
  333. padding-right: 18px;
  334. font-size: 14px;
  335. cursor: pointer;
  336. text-align: right;
  337. }
  338. .btn-left p:hover,.btn-right p:hover{
  339. text-shadow: 0px 0px 5px #1cf4ff;
  340. }
  341. .btn-right p i{
  342. font-size: 15px;
  343. margin-left: 8px;
  344. }
  345. .btn-right p:nth-child(1){
  346. margin-right: 85px;
  347. }
  348. .btn-right p:nth-child(2){
  349. margin-left: 13px;
  350. }
  351. .btn-right p:nth-child(3){
  352. margin-left: 28px;
  353. }
  354. .btn-right .btm-cs{
  355. margin-top: 25px;
  356. }
  357. .btm-left-btn{
  358. position: absolute;
  359. left: 90px;
  360. top: -26px;
  361. z-index: 99;
  362. display: flex;
  363. flex-direction: row;
  364. }
  365. .btm-right-btn{
  366. position: fixed;
  367. right: 20px;
  368. bottom:18px;
  369. z-index: 99;
  370. display: flex;
  371. flex-direction: row;
  372. }
  373. .btm-btn{
  374. background: url("../assets/images/yj-btmxbg.png") no-repeat center;
  375. background-size: 100% 100%;
  376. width: 85px;
  377. height: 28px;
  378. line-height: 28px;
  379. display: block;
  380. text-align: center;
  381. font-size: 12px;
  382. color: #fff;
  383. cursor: pointer;
  384. margin: 0px 5px;
  385. }
  386. .btm-btn:hover{
  387. text-shadow: 0px 0px 5px #1cf4ff;
  388. }
  389. .yj-name{
  390. position: absolute;
  391. cursor: pointer;
  392. padding-left: 72px;
  393. height: 26px;
  394. line-height: 26px;
  395. right: 101px;
  396. top: -25px;
  397. color: #fff;
  398. font-size: 16px;
  399. background: url("../assets/images/yj-name.png") no-repeat center;
  400. }
  401. </style>