Header.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911
  1. <template>
  2. <div id="header">
  3. <div class="bg-gradient"></div>
  4. <div class="container">
  5. <div class="title">黄浦江水上智能监控系统</div>
  6. <div class="content">
  7. <div class="left">
  8. <i class="humidity"></i>
  9. <div class="wsd-title">
  10. <span>湿度</span>
  11. <span>Humidity</span>
  12. </div>
  13. <span class="wsd-data">{{humidity}}</span>
  14. <span class="wsd-unit">RH%</span>
  15. <i class="temperature"></i>
  16. <div class="wsd-title">
  17. <span>温度</span>
  18. <span>temperature</span>
  19. </div>
  20. <span class="wsd-data">{{temperature}}</span>
  21. <span class="wsd-unit">℃</span>
  22. </div>
  23. <div class="right">
  24. <i class="btn-dfmz" @click="handleDfmz"></i>
  25. <i class="btn-fulls" @click="handleFullExtent"></i>
  26. <i class="btn-tools" @click="changeToolsShow()"></i>
  27. <div class="tool-box" v-show="toolsShow">
  28. <i class="tb-icon-close" @click="changeToolsShow(false)"></i>
  29. <div class="search-wrapper">
  30. <input type="text" class="tools-search"/>
  31. <i class="search-btn"></i>
  32. </div>
  33. <div class="tool-items-wrapper">
  34. <div class="tool-items"
  35. v-for="item, index in toolList"
  36. :key="item.name"
  37. @click="handleToolClick(index)"
  38. >
  39. <img class="tool-icon" :src="item.status? item.iconOn: item.icon" alt="">
  40. <span :class="['tool-label', {'tool-label-highlight':item.status}]">{{item.name}}</span>
  41. </div>
  42. </div>
  43. </div>
  44. <div v-show="waterLevelShow" class="water-level">
  45. <span class="wl-title">水位监测</span>
  46. <div class="wl-main">
  47. <div class="wl-left">
  48. <span class="wl-subtitle">水位值</span>
  49. <div class="wl-aside-main">
  50. <div class="wl-aside-label">
  51. <span v-show="item%500 === 0" v-for="item in waterLevelNum">{{item}}mm</span>
  52. </div>
  53. <div id="water-axis" class="wl-aside-axis">
  54. <div id="dragger-left" class="wl-axis-dragger">
  55. <img src="@/assets/imgs/arrow-left.png" alt="">
  56. <i></i>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. <div id="wl-center" class="wl-center"></div>
  62. <div class="wl-right">
  63. <span class="wl-subtitle">时间轴</span>
  64. <div class="wl-aside-main">
  65. <div id="time-axis" class="wl-aside-axis">
  66. <div @mousedown="handleTimeDrag" id="dragger-right" class="wl-axis-dragger">
  67. <i></i>
  68. <img src="@/assets/imgs/arrow-right.png" alt="">
  69. </div>
  70. </div>
  71. <div class="wl-aside-label">
  72. <span v-show="item%2 ===0" v-for="item in waterLevelTime">{{item}}:00</span>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="right-box" @click="toggleScene">
  79. <span class="now-time">{{time}}</span>
  80. <div class="date">
  81. <span>{{day}}</span>
  82. <span>{{date}}</span>
  83. </div>
  84. <i class="weather"></i>
  85. </div>
  86. <div v-show="sceneBoxShow" class="scene-box">
  87. <div class="sb-time-row">
  88. <div v-for="item, index in sceneList.time" @click="toggleTime((index+1)*6)" class="scene-item">
  89. <img :src="item.icon" alt="">
  90. <span :class="{'highlight': item.status}">{{item.name}}</span>
  91. </div>
  92. </div>
  93. <div class="sb-weather-row">
  94. <div v-for="item, index in sceneList.weather" @click="toggleWeather(index)" class="scene-item">
  95. <img :src="item.icon" alt="">
  96. <span :class="{'highlight': item.status}">{{item.name}}</span>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. </div>
  104. </template>
  105. <script>
  106. export default {
  107. name: 'HomeHeader',
  108. }
  109. </script>
  110. <script setup>
  111. import { onMounted, reactive, ref, computed, nextTick, watch, onBeforeUnmount } from 'vue';
  112. import { useNow, useDateFormat } from '@vueuse/core'
  113. import { addResponseEventListener, callUIInteraction } from '@/webRtcVideo.js'
  114. import { setWaterLevel } from '@/echarts/options'
  115. import bus from '@/utils/bus'
  116. const sceneBoxShow = ref(false)
  117. function toggleScene() {
  118. sceneBoxShow.value = !sceneBoxShow.value
  119. }
  120. const sceneList = reactive({
  121. time: [
  122. { name: '早晨', icon: require('@/assets/imgs/scene/zaochen.png'), status: false },
  123. { name: '中午', icon: require('@/assets/imgs/scene/qingtian.png'), status: false },
  124. { name: '傍晚', icon: require('@/assets/imgs/scene/bangwan.png'), status: false },
  125. { name: '晚上', icon: require('@/assets/imgs/scene/wanshang.png'), status: false },
  126. ],
  127. weather: [
  128. { name: '晴', icon: require('@/assets/imgs/scene/w-qing.png'), status: false },
  129. { name: '多云', icon: require('@/assets/imgs/scene/w-duoyun.png'), status: false },
  130. { name: '雾', icon: require('@/assets/imgs/scene/w-wu.png'), status: false },
  131. { name: '小雨', icon: require('@/assets/imgs/scene/w-xiaoyu.png'), status: false },
  132. { name: '中雨', icon: require('@/assets/imgs/scene/w-zhongyu.png'), status: false },
  133. { name: '大雨', icon: require('@/assets/imgs/scene/w-dayu.png'), status: false },
  134. { name: '小雪', icon: require('@/assets/imgs/scene/w-xiaoxue.png'), status: false },
  135. { name: '中雪', icon: require('@/assets/imgs/scene/w-zhongxue.png'), status: false },
  136. { name: '大雪', icon: require('@/assets/imgs/scene/w-daxue.png'), status: false },
  137. ]
  138. })
  139. function callUIInteractionFormat(action) {
  140. if(action['Parameters']) {
  141. action['Parameters'] = JSON.stringify(action['Parameters'])
  142. }
  143. callUIInteraction(action)
  144. }
  145. function toggleTime(hour) {
  146. let action = {
  147. "ActionName":"change_time",
  148. "Parameters":{
  149. "hour":hour,"minutes":0,"seconds":0
  150. }
  151. }
  152. callUIInteractionFormat(action);
  153. }
  154. function toggleWeather(type) {
  155. let action = {
  156. "ActionName":"change_weather",
  157. "Parameters":{
  158. "weather_type":type,
  159. }
  160. }
  161. console.log(action)
  162. callUIInteractionFormat(action);
  163. }
  164. const waterLevelNow = ref(450)
  165. const waterLevelShow = ref(false)
  166. // 水位时间条拖动时的处理函数
  167. function handleTimeDrag(event) {
  168. let timeDragger = document.getElementById('dragger-right')
  169. let totalH = document.getElementById('time-axis').offsetHeight
  170. event =event||window.event
  171. let tp =event.clientY - timeDragger.offsetTop
  172. let top = event.clientY-tp
  173. timeDragger.onmousemove = function(event){
  174. event =event||window.event
  175. top = event.clientY-tp
  176. if(top>-3 && top<totalH-22) {
  177. timeDragger.style.top= top+"px"
  178. }else {
  179. timeDragger.onmousemove = null
  180. handleTimeDragDone(parseInt(top/totalH*100))
  181. }
  182. }
  183. timeDragger.onmouseup= function(){
  184. timeDragger.onmousemove = null
  185. handleTimeDragDone(parseInt(top/totalH*100))
  186. }
  187. }
  188. // 水位时间条拖动完成时的处理函数
  189. function handleTimeDragDone(perIn) {
  190. let perOut = -perIn*perIn / 60 + 1.8*perIn + 20
  191. let waterAxisH = document.getElementById('water-axis').offsetHeight-23
  192. let height = perOut/100*waterAxisH
  193. let waterLevelDragger = document.getElementById('dragger-left')
  194. waterLevelDragger.style.bottom= parseInt(height) + 'px'
  195. waterLevelNow.value = perOut*10
  196. setWaterLevel(document.getElementById('wl-center'),[waterLevelNow.value])
  197. toggleSwqk(parseInt(perOut*6+100))
  198. }
  199. onMounted(() => [
  200. setWaterLevel(document.getElementById('wl-center'),[waterLevelNow.value])
  201. ])
  202. const temperature = ref('32')
  203. const humidity = ref('42.3')
  204. const time = useDateFormat(useNow(), 'HH:mm')
  205. const date = useDateFormat(useNow(), 'YYYY.MM.DD')
  206. const day = useDateFormat(useNow(), 'ddd', { locales: 'en-US' })
  207. const toolList = reactive([
  208. { name: '船舶位置', icon: require('@/assets/imgs/tool/tool-cbwz.png'), iconOn: require('@/assets/imgs/tool/tool-cbwz-h.png'), status: true },
  209. { name: '行驶航线', icon: require('@/assets/imgs/tool/tool-xshx.png'), iconOn: require('@/assets/imgs/tool/tool-xshx-h.png'), status: false },
  210. { name: '游览灯光', icon: require('@/assets/imgs/tool/tool-yldg.png'), iconOn: require('@/assets/imgs/tool/tool-yldg-h.png'), status: false },
  211. { name: '航线展示', icon: require('@/assets/imgs/tool/tool-hxzs.png'), iconOn: require('@/assets/imgs/tool/tool-hxzs-h.png'), status: false },
  212. { name: '淤泥预警', icon: require('@/assets/imgs/tool/tool-ynyj.png'), iconOn: require('@/assets/imgs/tool/tool-ynyj-h.png'), status: false },
  213. { name: '模拟驾驶', icon: require('@/assets/imgs/tool/tool-mnjs.png'), iconOn: require('@/assets/imgs/tool/tool-mnjs-h.png'), status: false },
  214. { name: '水位情况', icon: require('@/assets/imgs/tool/tool-swqk.png'), iconOn: require('@/assets/imgs/tool/tool-swqk-h.png'), status: false },
  215. { name: '视频融合', icon: require('@/assets/imgs/tool/tool-sprh.png'), iconOn: require('@/assets/imgs/tool/tool-sprh-h.png'), status: false },
  216. { name: '中燃船舶', icon: require('@/assets/imgs/tool/tool-zrcb.png'), iconOn: require('@/assets/imgs/tool/tool-zrcb-h.png'), status: false },
  217. ])
  218. const toolsShow = ref(true)
  219. function changeToolsShow(param) {
  220. toolsShow.value = param || !toolsShow.value
  221. }
  222. function handleFullExtent() {
  223. let action = {
  224. "ActionName":"full_extent"
  225. }
  226. callUIInteractionFormat(action);
  227. }
  228. let dfmzStatus = false
  229. function handleDfmz() {
  230. let action = dfmzStatus? { "ActionName":"icon_close" }: { "ActionName":"icon_start" }
  231. callUIInteractionFormat(action);
  232. dfmzStatus = !dfmzStatus
  233. }
  234. const waterLevelNum = computed(() => {
  235. let arr = []
  236. for(let i=2000; i<=5000; i+=200) {
  237. arr.push(i)
  238. }
  239. return arr
  240. })
  241. const waterLevelTime = computed(() => {
  242. let arr = []
  243. for(let i=24; i>=1; i--) {
  244. let a = ''
  245. if(i<10) {
  246. a = '0'+i
  247. }else {
  248. a = i
  249. }
  250. arr.push(a)
  251. }
  252. return arr
  253. })
  254. function handleToolClick(index) {
  255. toolList[index].status = !toolList[index].status
  256. let status = toolList[index].status
  257. switch (index) {
  258. case 0:
  259. if(status) { cbwzOn() } else { cbwzOff() }
  260. break;
  261. case 1:
  262. xshxOn()
  263. setTimeout(() => {
  264. toolList[index].status = !toolList[index].status
  265. }, 200);
  266. break;
  267. case 2:
  268. if(status) { yldgOn() } else { yldgOff() }
  269. break;
  270. case 3:
  271. if(status) { hxzsOn() } else { hxzsOff() }
  272. break;
  273. case 4:
  274. if(status) { ynyjOn() } else { ynyjOff() }
  275. break;
  276. case 5:
  277. if(status) { mnjsOn() } else { mnjsOff() }
  278. break;
  279. case 6:
  280. if(status) {
  281. waterLevelShow.value = true
  282. swqkOn()
  283. nextTick(() => {
  284. setWaterLevel(document.getElementById('wl-center'),[waterLevelNow.value])
  285. })
  286. } else {
  287. waterLevelShow.value = false
  288. }
  289. break;
  290. case 7:
  291. sprhOn()
  292. setTimeout(() => {
  293. toolList[index].status = !toolList[index].status
  294. }, 200);
  295. break;
  296. case 8:
  297. zrcbOn()
  298. setTimeout(() => {
  299. toolList[index].status = !toolList[index].status
  300. }, 200);
  301. break;
  302. }
  303. }
  304. function cbwzOn() {
  305. let action1 = {
  306. "ActionName":"fly",
  307. "Parameters":{
  308. "x":180389,"y":-96050,"z":230000,"roll_x":0,"roll_y":-65,"roll_z":4.5
  309. }
  310. }
  311. callUIInteractionFormat(action1);
  312. let action2 = {
  313. "ActionName":"boat_realtime"
  314. }
  315. callUIInteractionFormat(action2);
  316. let action3 = {
  317. "ActionName":"start_time"
  318. }
  319. callUIInteractionFormat(action3);
  320. }
  321. function cbwzOff() {
  322. let action = {
  323. "ActionName":"clear_boat_time"
  324. }
  325. callUIInteractionFormat(action);
  326. }
  327. function xshxOn() {
  328. let action = {
  329. "ActionName":"drive_demo_boat"
  330. }
  331. callUIInteractionFormat(action);
  332. }
  333. function yldgOn() {
  334. let action1 = {
  335. "ActionName":"light_start"
  336. }
  337. callUIInteractionFormat(action1);
  338. let action2 = {
  339. "ActionName":"change_time",
  340. "Parameters":{
  341. "hour":23,"minutes":30,"seconds":0
  342. }
  343. }
  344. callUIInteractionFormat(action2);
  345. }
  346. function yldgOff() {
  347. let action1 = {
  348. "ActionName":"light_close"
  349. }
  350. callUIInteractionFormat(action1);
  351. let action2 = {
  352. "ActionName":"change_time",
  353. "Parameters":{
  354. "hour":12,"minutes":30,"seconds":0
  355. }
  356. }
  357. callUIInteractionFormat(action2);
  358. }
  359. function hxzsOn() {
  360. let action1 = {
  361. "ActionName":"fly",
  362. "Parameters":{
  363. "x":247875,"y":-120222,"z":71577,"roll_x":0,"roll_y":-80,"roll_z":64
  364. }
  365. }
  366. callUIInteractionFormat(action1);
  367. let action2 = {
  368. "ActionName":"start_rline"
  369. }
  370. callUIInteractionFormat(action2);
  371. }
  372. function hxzsOff() {
  373. let action = {
  374. "ActionName":"close_rline"
  375. }
  376. callUIInteractionFormat(action);
  377. }
  378. function ynyjOn() {
  379. let action = {
  380. "ActionName":"start_yjyj"
  381. }
  382. callUIInteractionFormat(action);
  383. }
  384. function ynyjOff() {
  385. let action = {
  386. "ActionName":"close_yjyj"
  387. }
  388. callUIInteractionFormat(action);
  389. }
  390. function mnjsOn() {
  391. let action = {
  392. "ActionName":"simulate_drive"
  393. }
  394. callUIInteractionFormat(action);
  395. }
  396. function mnjsOff() {
  397. let action = {
  398. "ActionName":"simulate_drive_close"
  399. }
  400. callUIInteractionFormat(action);
  401. }
  402. function swqkOn() {
  403. let action1 = {
  404. "ActionName":"fly",
  405. "Parameters":{ "x":230843,"y":-78457,"z":998,"roll_x":0,"roll_y":-20,"roll_z":64 }
  406. }
  407. callUIInteractionFormat(JSON.stringify(action1));
  408. toggleSwqk(374)
  409. }
  410. function toggleSwqk(param) {
  411. let action = {
  412. "ActionName":"set_water_z",
  413. "Parameters":{ "water_z":param }
  414. }
  415. callUIInteractionFormat(action);
  416. }
  417. function sprhOn() {
  418. let action = {
  419. "ActionName":"fly_camera"
  420. }
  421. callUIInteractionFormat(action);
  422. }
  423. function zrcbOn() {
  424. let action = {
  425. "ActionName":"fly",
  426. "Parameters":{ "x":666635,"y":-1152420,"z":5000,"roll_x":0,"roll_y":-24,"roll_z":-170.0 }
  427. }
  428. callUIInteractionFormat(action);
  429. }
  430. bus.on('hideToolBox', () => { toolsShow.value = false});
  431. onBeforeUnmount(() => {
  432. bus.off('hideToolBox');
  433. })
  434. </script>
  435. <style lang="scss" scoped>
  436. #header {
  437. position: absolute;
  438. top: 0;
  439. left: 0;
  440. width: 100%;
  441. height: 12.4%;
  442. z-index: 100;
  443. .container {
  444. position: absolute;
  445. top: 0;
  446. left: 0;
  447. width: 100%;
  448. height: 100%;
  449. background: url('@/assets/imgs/header.png') no-repeat;
  450. background-size: 100% 100%;
  451. z-index: 101;
  452. }
  453. .bg-gradient {
  454. position: absolute;
  455. top: 0;
  456. left: 0;
  457. width: 100%;
  458. height: 100%;
  459. background: linear-gradient(0deg, rgba(0,17,50,0), rgba(0,17,51,0.55), rgba(0,17,50,0.8));
  460. z-index: 100;
  461. }
  462. .title {
  463. position: absolute;
  464. width: fit-content;
  465. top: 3.2vh;
  466. left: 50%;
  467. transform: translateX(-50%);
  468. font-family: PMZD;
  469. font-size: 42px;
  470. }
  471. .content {
  472. position: absolute;
  473. top: 6.5vh;
  474. display: flex;
  475. justify-content: space-between;
  476. width: 100%;
  477. .left, .right {
  478. display: flex;
  479. align-items: center;
  480. justify-content: flex-start;
  481. }
  482. }
  483. .left {
  484. margin-left: 40px;
  485. .humidity, .temperature {
  486. display: inline-block;
  487. width: 36px;
  488. height: 36px;
  489. margin-right: 6px;
  490. }
  491. .humidity {
  492. background: url('@/assets/imgs/humidity.png') no-repeat;
  493. }
  494. .temperature {
  495. background: url('@/assets/imgs/temperature.png') no-repeat;
  496. }
  497. .humidity, .temperature {
  498. background-size: contain;
  499. }
  500. .wsd-title {
  501. text-align: left;
  502. margin-right: 9px;
  503. font-family: PFlight;
  504. span {
  505. display: block;
  506. color: #F6F6F6;
  507. }
  508. span:first-child {
  509. font-size: 16px;
  510. line-height: 16px;
  511. margin-bottom: 3px;
  512. }
  513. span:last-child {
  514. font-size: 8px;
  515. line-height: 8px;
  516. }
  517. }
  518. .wsd-data {
  519. font-family: PFlight;
  520. font-size: 26px;
  521. line-height: 26px;
  522. }
  523. .wsd-unit {
  524. font-family: PFlight;
  525. font-size: 14px;
  526. line-height: 14px;
  527. transform: translateY(-5px);
  528. margin: 0 18px 0 3px;
  529. }
  530. }
  531. .right {
  532. .btn-dfmz, .btn-fulls, .btn-tools {
  533. display: inline-block;
  534. width: 40px;
  535. height: 40px;
  536. cursor: pointer;
  537. }
  538. .btn-dfmz {
  539. background: url('@/assets/imgs/dfmz.png') no-repeat;
  540. background-size: contain;
  541. }
  542. .btn-fulls {
  543. background: url('@/assets/imgs/fulls.png') no-repeat;
  544. background-size: contain;
  545. }
  546. .btn-tools {
  547. margin-right: 36px;
  548. background: url('@/assets/imgs/tool/tools.png') no-repeat;
  549. background-size: contain;
  550. }
  551. .tool-box {
  552. position: absolute;
  553. top: 3.5vh;
  554. right: 360px;
  555. display: inline-block;
  556. width: 33.8vh;
  557. height: 40vh;
  558. background: url('@/assets/imgs/tool/toolbox-bg.png') no-repeat;
  559. background-size: contain;
  560. box-sizing: border-box;
  561. padding-top: 28px;
  562. .tb-icon-close {
  563. position: absolute;
  564. display: block;
  565. right: 13px;
  566. top: 33px;
  567. width: 20px;
  568. height: 20px;
  569. background: url('@/assets/imgs/tool/toolbox-close.png') no-repeat;
  570. background-size: contain;
  571. cursor: pointer;
  572. }
  573. .search-wrapper {
  574. position: relative;
  575. width: 100%;
  576. height: 8.2%;
  577. margin-top: 26px;
  578. text-align: center;
  579. .tools-search {
  580. box-sizing: border-box;
  581. width: 84%;
  582. height: 100%;
  583. outline: none;
  584. border: 1px solid #01B9BE;
  585. border-radius: 18px;
  586. background-color: transparent;
  587. color: #fff;
  588. padding: 0 35px 0 15px;
  589. font-size: 14px;
  590. }
  591. .search-btn {
  592. display: inline-block;
  593. position: absolute;
  594. right: 11%;
  595. top: 20%;
  596. width: 6%;
  597. height: 58%;
  598. background: url('@/assets/imgs/icon-search.png') no-repeat;
  599. background-size: contain;
  600. cursor: pointer;
  601. }
  602. }
  603. .tool-items-wrapper {
  604. box-sizing: border-box;
  605. padding: 4% 6% 6%;
  606. width: 100%;
  607. height: 84%;
  608. display: flex;
  609. justify-content: flex-start;
  610. align-items: stretch;
  611. flex-wrap: wrap;
  612. .tool-items {
  613. display: flex;
  614. flex-direction: column;
  615. justify-content: center;
  616. align-items: center;
  617. width: 33.3%;
  618. cursor: pointer;
  619. .tool-icon {
  620. width: 6.94vh;
  621. height: 6.94vh;
  622. transform: translateY(8px);
  623. }
  624. .tool-label {
  625. font-size: 12px;
  626. }
  627. .tool-label-highlight {
  628. color: yellow;
  629. }
  630. }
  631. }
  632. }
  633. .right-box {
  634. display: flex;
  635. justify-content: flex-start;
  636. align-items: center;
  637. cursor: pointer;
  638. }
  639. .now-time {
  640. font-family: PFlight;
  641. font-size: 30px;
  642. margin-right: 16px;
  643. }
  644. .date {
  645. position: relative;
  646. text-align: left;
  647. margin-right: 28px;
  648. span {
  649. color: #ccc;
  650. display: block;
  651. font-size: 12px;
  652. line-height: 14px;
  653. }
  654. &::after {
  655. content: '';
  656. position: absolute;
  657. right: -28px;
  658. top: 7px;
  659. display: inline-block;
  660. width: 1px;
  661. height: 14px;
  662. background-color: #fff;
  663. }
  664. }
  665. .weather {
  666. display: inline-block;
  667. width: 32px;
  668. height: 32px;
  669. background: url('@/assets/imgs/weather-dy.png') no-repeat;
  670. background-size: contain;
  671. margin: 0 36px;
  672. }
  673. .scene-box {
  674. position: absolute;
  675. box-sizing: border-box;
  676. padding: 25px 20px;
  677. top: 5vh;
  678. right: 0.5vw;
  679. width: 300px;
  680. height: 350px;
  681. background-color: rgba(14, 30, 50, 0.7);
  682. transition: all 0.5s linear;
  683. .sb-time-row, .sb-weather-row {
  684. display: flex;
  685. justify-content: space-between;
  686. align-items: center;
  687. flex-wrap: wrap;
  688. }
  689. .sb-weather-row {
  690. margin-top: 10px;
  691. .scene-item {
  692. width: 26%;
  693. }
  694. }
  695. .sb-time-row {
  696. .scene-item {
  697. width: 20%;
  698. }
  699. }
  700. .scene-item {
  701. display: flex;
  702. flex-direction: column;
  703. justify-content: flex-start;
  704. align-items: center;
  705. margin-bottom: 15px;
  706. cursor: pointer;
  707. img {
  708. width: 40px;
  709. height: 40px;
  710. }
  711. .highlight {
  712. color: yellow;
  713. }
  714. }
  715. }
  716. .water-level {
  717. position: absolute;
  718. bottom: -77vh;
  719. right: 19vw;
  720. width: 360px;
  721. height: 370px;
  722. background: rgba(0,38,77,0.5);
  723. text-align: center;
  724. .wl-title {
  725. display: block;
  726. margin: 14px 0 10px;
  727. font-size: 18px;
  728. font-weight: bold;
  729. color: #FFFFFF;
  730. }
  731. .wl-main {
  732. box-sizing: border-box;
  733. padding: 0 20px 18px;
  734. display: flex;
  735. justify-content: space-between;
  736. height: calc(100% - 58px);
  737. }
  738. .wl-subtitle {
  739. display: block;
  740. margin-bottom: 5px;
  741. font-size: 16px;
  742. font-weight: bold;
  743. color: transparent;
  744. background: linear-gradient(180deg, #FFFFFF 0%, #FFD24C 100%);
  745. -webkit-background-clip: text;
  746. text-align: right;
  747. }
  748. .wl-aside-main {
  749. display: flex;
  750. justify-content: space-between;
  751. height: calc(100% - 26px);
  752. }
  753. .wl-aside-label {
  754. box-sizing: border-box;
  755. padding-bottom: 2px;
  756. display: flex;
  757. flex-direction: column;
  758. justify-content: space-between;
  759. &>span {
  760. font-size: 14px;
  761. font-family: DIN;
  762. font-weight: bold;
  763. color: transparent;
  764. background: linear-gradient(183deg, #55C5FF 0%, #FFFFFF 50%, #86D2FF 100%);
  765. -webkit-background-clip: text;
  766. }
  767. }
  768. .wl-aside-axis {
  769. position: relative;
  770. width: 23px;
  771. height: 100%;
  772. background: url('@/assets/imgs/water-level.png') no-repeat;
  773. background-size: contain;
  774. }
  775. .wl-axis-dragger {
  776. position: absolute;
  777. bottom: 40%;
  778. right: 6px;
  779. width: 40px;
  780. height: 24px;
  781. display: flex;
  782. justify-content: space-between;
  783. align-items: center;
  784. i {
  785. display: inline-block;
  786. width: 14px;
  787. height: 14px;
  788. background-color: #fff;
  789. border-radius: 50%;
  790. }
  791. }
  792. .wl-left {
  793. width: 35%;
  794. box-sizing: border-box;
  795. }
  796. .wl-center {
  797. width: 36%;
  798. height: 100%;
  799. }
  800. .wl-right {
  801. width: 28%;
  802. height: 100%;
  803. box-sizing: border-box;
  804. padding-left: 8px;
  805. .wl-subtitle {
  806. text-align: left;
  807. }
  808. .wl-aside-axis {
  809. background: url('@/assets/imgs/water-timeaxis.png') no-repeat;
  810. background-size: contain;
  811. }
  812. .wl-axis-dragger {
  813. cursor: pointer;
  814. left: 0;
  815. bottom: 0;
  816. }
  817. }
  818. }
  819. }
  820. }
  821. </style>