index.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059
  1. <template>
  2. <div class="dashboard">
  3. <div class="dashboard-head flex">
  4. <!-- <div class="dashboard-head-title">{{title}}</div> -->
  5. <div class="dashboard-head-tabs flex-wrap">
  6. <div class="dashboard-head-tabs-list" :class="tabsIndex == index ? 'active' : ''" @click="tabClick(item, index)" v-for="(item, index) in tabs" :key="index">
  7. {{ item.label }}
  8. </div>
  9. </div>
  10. <!-- <div class="dashboard-head-zw"></div> -->
  11. </div>
  12. <div class="dashboard-content">
  13. <div class="dashboard-content-top flex">
  14. <div class="dashboard-content-top-left">
  15. <div class="dashboard-content-top-left-item">
  16. <div class="dashboard-content-top-left-item-top">
  17. <div class="dashboard-content-top-left-item-top-title">
  18. 小时峰值分布
  19. </div>
  20. <div class="dashboard-content-top-left-item-top-time" @click="showDatePicker">
  21. <el-icon color="#ffffff" size="18">
  22. <Calendar />
  23. </el-icon>
  24. <el-icon color="#ffffff">
  25. <CaretBottom />
  26. </el-icon>
  27. </div>
  28. </div>
  29. <div class="dashboard-content-top-left-item-bottom">
  30. <Echarts id="ww1" :option="optionLeft" />
  31. </div>
  32. </div>
  33. <div class="dashboard-content-top-left-item">
  34. <div class="dashboard-content-top-left-item-top">
  35. <div class="dashboard-content-top-left-item-top-title">
  36. 运单趋势分析
  37. </div>
  38. <div class="dashboard-content-top-left-item-top-time" @click="showDatePicker">
  39. <el-icon color="#ffffff" size="18">
  40. <Calendar />
  41. </el-icon>
  42. <el-icon color="#ffffff">
  43. <CaretBottom />
  44. </el-icon>
  45. </div>
  46. </div>
  47. <div class="dashboard-content-top-left-item-bottom">
  48. <Echarts id="ww12" :option="optionLeft" />
  49. </div>
  50. </div>
  51. </div>
  52. <!-- 地图 -->
  53. <div class="dashboard-content-top-center">
  54. <div class="dashboard-content-top-center-top"></div>
  55. <div class="dashboard-content-top-center-bottom">
  56. <div class="dashboard-content-top-center-bottom-box1">
  57. <div class="dashboard-content-top-center-bottom-box1-title">航班数</div>
  58. <div class="dashboard-content-top-center-bottom-box1-info">
  59. <div>本年:1000</div>
  60. <div>同期:1100</div>
  61. </div>
  62. <div class="dashboard-content-top-center-bottom-box1-info">
  63. <div>本年:1000</div>
  64. <div>同期:1100</div>
  65. </div>
  66. <div class="dashboard-content-top-center-bottom-box1-info">
  67. <div>本年:1000</div>
  68. <div>同期:1100</div>
  69. </div>
  70. </div>
  71. <div class="dashboard-content-top-center-bottom-box2">
  72. <div class="dashboard-content-top-center-bottom-box2-title">运单数</div>
  73. <div class="dashboard-content-top-center-bottom-box2-info">
  74. <div>本年:1000</div>
  75. <div>同期:1100</div>
  76. <div>重量:1100</div>
  77. </div>
  78. <div class="dashboard-content-top-center-bottom-box2-info">
  79. <div>本年:1000</div>
  80. <div>同期:1100</div>
  81. <div>重量:1100</div>
  82. </div>
  83. <div class="dashboard-content-top-center-bottom-box2-info">
  84. <div>本年:1000</div>
  85. <div>同期:1100</div>
  86. <div>重量:1100</div>
  87. </div>
  88. </div>
  89. <EchartsMap id="ww2" />
  90. </div>
  91. </div>
  92. <div class="dashboard-content-top-right">
  93. <div class="dashboard-content-top-right-item">
  94. <div class="dashboard-content-top-right-item-top">
  95. <div class="dashboard-content-top-right-item-top-title">
  96. 航班预警报警分析
  97. </div>
  98. <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker">
  99. <el-icon color="#ffffff" size="18">
  100. <Calendar />
  101. </el-icon>
  102. <el-icon color="#ffffff">
  103. <CaretBottom />
  104. </el-icon>
  105. </div>
  106. </div>
  107. <div class="dashboard-content-top-right-item-bottom">
  108. <Echarts id="ww3" :option="airlineAbnormalBaggage.option" />
  109. </div>
  110. </div>
  111. <div class="dashboard-content-top-right-item">
  112. <div class="dashboard-content-top-right-item-top">
  113. <div class="dashboard-content-top-right-item-top-title">
  114. 航司运量统计
  115. </div>
  116. <div class="dashboard-content-top-right-item-top-time" @click="showDatePicker">
  117. <el-icon color="#ffffff" size="18">
  118. <Calendar />
  119. </el-icon>
  120. <el-icon color="#ffffff">
  121. <CaretBottom />
  122. </el-icon>
  123. </div>
  124. </div>
  125. <div class="dashboard-content-top-left-item-bottom">
  126. <Echarts id="ww33" :option="airCompaneBaggage.option" />
  127. </div>
  128. </div>
  129. </div>
  130. </div>
  131. <div class="dashboard-content-bottom flex">
  132. <div class="dashboard-content-bottom-left">
  133. <div class="dashboard-content-bottom-left-top">
  134. <div class="dashboard-content-bottom-left-top-title">
  135. 节点峰值分布
  136. </div>
  137. <div class="dashboard-content-bottom-left-top-time" @click="showDatePicker">
  138. <el-icon color="#ffffff" size="18">
  139. <Calendar />
  140. </el-icon>
  141. <el-icon color="#ffffff">
  142. <CaretBottom />
  143. </el-icon>
  144. </div>
  145. </div>
  146. <div class="dashboard-content-bottom-left-bottom">
  147. <Echarts id="ww4" :option="hourPeak.option" />
  148. </div>
  149. </div>
  150. <div class="dashboard-content-bottom-center">
  151. <div class="dashboard-content-bottom-center-top">
  152. <div class="dashboard-content-bottom-center-top-title">
  153. 节点效率分析
  154. </div>
  155. <div class="dashboard-content-bottom-center-top-time" @click="showDatePicker">
  156. <el-icon color="#ffffff" size="18">
  157. <Calendar />
  158. </el-icon>
  159. <el-icon color="#ffffff">
  160. <CaretBottom />
  161. </el-icon>
  162. </div>
  163. </div>
  164. <div class="dashboard-content-bottom-center-bottom">
  165. <Echarts id="ww5" :option="nodeEfficiency.option" />
  166. </div>
  167. </div>
  168. <div class="dashboard-content-bottom-right">
  169. <div class="dashboard-content-bottom-right-top">
  170. <div class="dashboard-content-bottom-center-top-title">
  171. 航班动态统计
  172. </div>
  173. </div>
  174. <div class="dashboard-content-bottom-right-bottom">
  175. <Echarts id="ww6" :option="airStutas.option" />
  176. </div>
  177. </div>
  178. </div>
  179. </div>
  180. <Dialog :flag="flag" @resetForm="resetForm" @submitForm="submitForm">
  181. <el-form :model="form" label-width="120px">
  182. <el-form-item label="开始日期">
  183. <el-date-picker :disabled-date="disabledStartDate" v-model="form.startDate" type="date" placeholder="请选择开始日期" size="default" format="YYYY/MM/DD" value-format="YYYY-MM-DD" />
  184. </el-form-item>
  185. <el-form-item label="结束日期">
  186. <el-date-picker :disabled-date="disabledEndDate" v-model="form.endDate" type="date" placeholder="请选择结束日期" size="default" format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
  187. </el-form-item>
  188. </el-form>
  189. </Dialog>
  190. </div>
  191. </template>
  192. <script setup lang="ts">
  193. import { ref, onMounted } from "vue";
  194. import Echarts from "@/components/Echarts/commonChartsBar.vue";
  195. import EchartsMap from "@/components/Echarts/commonChartsChinaMap.vue";
  196. import { Calendar, CaretBottom } from "@element-plus/icons-vue";
  197. import Dialog from "@/components/dialog/index.vue";
  198. import axios from "axios";
  199. const title = ref("决策管理驾驶舱");
  200. const form = ref({
  201. startDate: Date.now(),
  202. endDate: Date.now(),
  203. });
  204. const disabledStartDate = (time: Date) => {
  205. let data = new Date(form.value.endDate);
  206. return time.getTime() > data.getTime();
  207. };
  208. const disabledEndDate = (time: Date) => {
  209. let data = new Date(form.value.startDate);
  210. return data.getTime() > time.getTime();
  211. };
  212. const flag = ref(false);
  213. const resetForm = () => {
  214. flag.value = false;
  215. };
  216. const submitForm = () => {
  217. flag.value = false;
  218. };
  219. const tabs = [
  220. {
  221. id: 1,
  222. label: "国内进港",
  223. value: "one",
  224. },
  225. {
  226. id: 2,
  227. label: "国内出港",
  228. value: "two",
  229. },
  230. {
  231. id: 3,
  232. label: "国际进港",
  233. value: "three",
  234. },
  235. {
  236. id: 4,
  237. label: "国际出港",
  238. value: "four",
  239. },
  240. ];
  241. const tabsIndex = ref(0);
  242. const optionLeft = {
  243. tooltip: {
  244. trigger: "axis",
  245. },
  246. legend: {
  247. show: true,
  248. top: 0,
  249. left:'30%',
  250. icon: 'roundRect'
  251. },
  252. grid: {
  253. left: "0%",
  254. right: "5%",
  255. bottom: "0%",
  256. top: "15%",
  257. containLabel: true,
  258. },
  259. color: ["#F5BB3D", "#73D970", "#6A9DD9"],
  260. xAxis: {
  261. type: "category",
  262. boundaryGap: true,
  263. data: ["0:00", "2:00", "4:00", "6:00", "8:00", "10:00", "12:00", "14:00", "16:00", "18:00", "20:00", "22:00"],
  264. axisLine: {
  265. show: true,
  266. lineStyle: {
  267. color: "#8897BC",
  268. },
  269. },
  270. axisTick: {
  271. show: false,
  272. },
  273. axisLabel: {
  274. color: "#8897BC",
  275. },
  276. },
  277. yAxis: [
  278. {
  279. type: "value",
  280. axisLabel: {
  281. color: "#8897BC",
  282. formatter: function (item) {
  283. return item / 10000 + "万";
  284. },
  285. },
  286. splitLine: {
  287. lineStyle: {
  288. type: "dashed",
  289. color: "rgba(196,194,225, 0.54)",
  290. },
  291. },
  292. name:"单"
  293. },
  294. {
  295. type: "value",
  296. axisLabel: {
  297. color: "#8897BC",
  298. },
  299. splitLine: {
  300. lineStyle: {
  301. type: "dashed",
  302. color: "rgba(196,194,225, 0.54)",
  303. },
  304. },
  305. name:"吨"
  306. },
  307. ],
  308. series: [
  309. {
  310. name: "运单/单",
  311. type: "line",
  312. symbol: "none",
  313. key: "bagsnum",
  314. yAxisIndex: 0,
  315. data: [120, 132, 101, 134, 90, 230, 210,132, 101, 134, 90, 230],
  316. areaStyle: {
  317. color: {
  318. type: "linear",
  319. x: 0,
  320. y: 0,
  321. x2: 0,
  322. y2: 1,
  323. colorStops: [
  324. {
  325. offset: 0,
  326. color: "rgba(125,72,255,0.5)",
  327. },
  328. {
  329. offset: 1,
  330. color: "rgba(0,180,255,0.01)",
  331. },
  332. ],
  333. global: false,
  334. },
  335. },
  336. },
  337. {
  338. name: "重量/吨",
  339. type: "line",
  340. symbol: "none",
  341. yAxisIndex: 1,
  342. key: "passengers",
  343. data: [220, 182, 191, 234, 290, 330, 310, 132, 101, 134, 90, 230],
  344. areaStyle: {
  345. color: {
  346. type: "linear",
  347. x: 0,
  348. y: 0,
  349. x2: 0,
  350. y2: 1,
  351. colorStops: [
  352. {
  353. offset: 0,
  354. color: "rgba(125,72,255,0.5)",
  355. },
  356. {
  357. offset: 1,
  358. color: "rgba(0,180,255,0.01)",
  359. },
  360. ],
  361. global: false,
  362. },
  363. },
  364. },
  365. ],
  366. };
  367. const airlineAbnormalBaggage = ref({
  368. component: "commonChartsBar",
  369. option: {
  370. baseOption: {
  371. tooltip: {
  372. trigger: "axis",
  373. valueFormatter:function(value){
  374. return value +"单"
  375. }
  376. },
  377. legend: {
  378. data: ["报警", "预警"],
  379. right: "20%",
  380. textStyle: {
  381. color: "#8897BC",
  382. },
  383. // top:"-10"
  384. },
  385. color: ["#EC3B71", "#E5B35C"],
  386. grid: {
  387. bottom: "10%",
  388. left: "5%",
  389. right: "1%",
  390. top: "15%",
  391. },
  392. xAxis: {
  393. data: ["卸机", "机下交接", "货站交接", "提取"],
  394. axisLine: {
  395. show: true,
  396. lineStyle: {
  397. color: "#8897BC",
  398. },
  399. },
  400. axisTick: {
  401. show: false,
  402. },
  403. axisLabel: {
  404. color: "#8897BC",
  405. },
  406. },
  407. yAxis: {
  408. type: "value",
  409. axisLabel: {
  410. color: "#8897BC",
  411. },
  412. splitLine: {
  413. lineStyle: {
  414. type: "dashed",
  415. color: "rgba(196,194,225, 0.54)",
  416. },
  417. },
  418. name:'单'
  419. },
  420. series: [
  421. {
  422. name: "报警",
  423. type: "bar",
  424. data: [ 11, 16, 4, 6],
  425. },
  426. {
  427. name: "预警",
  428. type: "bar",
  429. data: [11, 15, 17, 4],
  430. },
  431. ],
  432. },
  433. },
  434. });
  435. const airCompaneBaggage = ref({
  436. component: "commonChartsBar",
  437. option: {
  438. baseOption: {
  439. tooltip: {
  440. trigger: "axis",
  441. },
  442. legend: {
  443. data: ["运单/单", "重量/吨"],
  444. right: "20%",
  445. textStyle: {
  446. color: "#8897BC",
  447. },
  448. },
  449. color: ["#51DEE9", "#4C88E1"],
  450. grid: {
  451. bottom: "10%",
  452. left: "13%",
  453. right: "8%",
  454. top: "15%",
  455. },
  456. xAxis: {
  457. data: ["国航", "南航", "深航", "东航", "海航", "国泰", "川航"],
  458. axisLine: {
  459. show: true,
  460. lineStyle: {
  461. color: "#8897BC",
  462. },
  463. },
  464. axisTick: {
  465. show: false,
  466. },
  467. axisLabel: {
  468. color: "#8897BC",
  469. },
  470. },
  471. yAxis: [
  472. {
  473. type: "value",
  474. axisLabel: {
  475. color: "#8897BC",
  476. formatter: function (item) {
  477. return item / 10000 + "万";
  478. },
  479. },
  480. splitLine: {
  481. lineStyle: {
  482. type: "dashed",
  483. color: "rgba(196,194,225, 0.54)",
  484. },
  485. },
  486. name:"单"
  487. },
  488. {
  489. type: "value",
  490. axisLabel: {
  491. color: "#8897BC",
  492. },
  493. splitLine: {
  494. lineStyle: {
  495. type: "dashed",
  496. color: "rgba(196,194,225, 0.54)",
  497. },
  498. },
  499. name:"吨"
  500. },
  501. ],
  502. series: [
  503. {
  504. name: "运单/单",
  505. type: "bar",
  506. data: [12, 10, 15, 11, 16, 4, 6],
  507. yAxisIndex: 0,
  508. },
  509. {
  510. name: "重量/吨",
  511. type: "bar",
  512. data: [11, 15, 17, 8, 1, 4, 6],
  513. yAxisIndex: 1,
  514. },
  515. ],
  516. },
  517. },
  518. });
  519. const airStutas = ref({
  520. component: "commonChartsBar",
  521. option: {
  522. baseOption: {
  523. // legend: {
  524. // data: ['2020年', '2021年'],
  525. // right:"20",
  526. // textStyle:{
  527. // color: "#8897BC"
  528. // }
  529. // // top:"-10"
  530. // },
  531. tooltip: {
  532. trigger: "axis",
  533. valueFormatter:function(value){
  534. return value +"单"
  535. }
  536. },
  537. color: ["#51DEE9", "#4C88E1"],
  538. grid: {
  539. bottom: "10%",
  540. left: "5%",
  541. right: "1%",
  542. top: "15%",
  543. },
  544. xAxis: {
  545. data: ["机下交接", "货站交接", "理货"],
  546. axisLine: {
  547. show: true,
  548. lineStyle: {
  549. color: "#8897BC",
  550. },
  551. },
  552. axisTick: {
  553. show: false,
  554. },
  555. axisLabel: {
  556. color: "#8897BC",
  557. },
  558. },
  559. yAxis: {
  560. type: "value",
  561. axisLabel: {
  562. color: "#8897BC",
  563. },
  564. splitLine: {
  565. lineStyle: {
  566. type: "dashed",
  567. color: "rgba(196,194,225, 0.54)",
  568. },
  569. },
  570. name:'单'
  571. },
  572. series: [
  573. {
  574. type: "bar",
  575. data: [12, 10, 15],
  576. },
  577. ],
  578. },
  579. },
  580. });
  581. const nodeEfficiency = ref({
  582. component: "commonChartsLine",
  583. option: {
  584. tooltip: {
  585. trigger: "axis",
  586. valueFormatter:function(value){
  587. return value +"秒"
  588. }
  589. },
  590. legend: {
  591. top: "1%",
  592. right: "5%",
  593. data: ["平均时间", "最长时间", "最短时间"],
  594. itemWidth: 25,
  595. itemHeight: 14,
  596. },
  597. grid: {
  598. bottom: "10%",
  599. left: "1%",
  600. right: "1%",
  601. top: "15%",
  602. },
  603. color: ["#3ca4fc", "#f1ce7c", "#36ccba"],
  604. xAxis: {
  605. axisLabel: {
  606. interval: 0,
  607. },
  608. data: [
  609. "卸机", "机下交接", "货站交接", "提取"
  610. ],
  611. },
  612. yAxis: {
  613. type: "value",
  614. axisLabel: {
  615. color: "#8897BC",
  616. },
  617. splitLine: {
  618. lineStyle: {
  619. type: "dashed",
  620. color: "rgba(196,194,225, 0.54)",
  621. },
  622. },
  623. name:"单位:秒"
  624. },
  625. series: [
  626. {
  627. name: "平均时间",
  628. type: "line",
  629. smooth: true,
  630. stack: "",
  631. areaStyle: {
  632. opacity: 0,
  633. },
  634. data: [
  635. 4016, 4652, 1570, 6334, 12052, 3115, 10604, 12733, 14533, 2464, 4168,
  636. 3844,
  637. ],
  638. },
  639. {
  640. name: "最长时间",
  641. type: "line",
  642. smooth: true,
  643. stack: "",
  644. areaStyle: {
  645. opacity: 0,
  646. },
  647. data: [
  648. 4558, 770, 11745, 2699, 11205, 6497, 1544, 1555, 4181, 447, 60, 9804,
  649. ],
  650. },
  651. {
  652. name: "最短时间",
  653. type: "line",
  654. smooth: true,
  655. stack: "",
  656. areaStyle: {
  657. opacity: 0,
  658. },
  659. data: [
  660. 14240, 3190, 1699, 14446, 11349, 11182, 14829, 11740, 2418, 4824, 9707, 8126,
  661. ],
  662. },
  663. ],
  664. },
  665. });
  666. const node = [
  667. "卸机", "机下交接", "货站交接", "提取"
  668. ];
  669. const hours = Array.from({ length: 24 }, (v, i) => i + 1);
  670. const hourPeak = ref({
  671. component: "commonChartsScatter",
  672. option: {
  673. tooltip: {
  674. trigger: "axis",
  675. valueFormatter:function(value){
  676. return value +"单"
  677. }
  678. },
  679. title: node.map((month, index) => ({
  680. top: ((index + 0.5) * 100) / 4 - 3 + "%",
  681. text: month,
  682. textStyle: {
  683. fontSize: 12,
  684. fontWeight: "normal",
  685. color: "#698dc3",
  686. },
  687. })),
  688. singleAxis: node.map((month, index) => ({
  689. type: "category",
  690. data: hours,
  691. top: ((index + 0.5) * 100) / 4 - 3 + "%",
  692. height: 100 / 4 - 5 + "%",
  693. left: "12%",
  694. right: "1%",
  695. axisTick: {
  696. show: false,
  697. },
  698. splitLine: {
  699. show: false,
  700. },
  701. })),
  702. series: node.map((month, index) => ({
  703. singleAxisIndex: index,
  704. coordinateSystem: "singleAxis",
  705. type: "scatter",
  706. data: [
  707. 3, 6, 1, 4, 0, 4, 2, 5, 4, 4, 6, 2, 0, 3, 1, 6, 6, 1, 0, 3, 6, 3, 0, 5,
  708. ],
  709. symbolSize: function (dataItem) {
  710. return dataItem * 3;
  711. },
  712. })),
  713. },
  714. });
  715. const getHourPeakData = () => {
  716. axios
  717. .get("./mock/hourPeakData.json")
  718. .then((res) => {
  719. if (res.data.code === 200 || res.data.code === "200") {
  720. res.data.data.series.forEach((item, index) => {
  721. hourPeak.value.option.series[index].data = item.data;
  722. });
  723. } else {
  724. // this.$message.error('小时高峰量统计分析-初始化数据失败')
  725. }
  726. })
  727. .catch((err) => {
  728. // this.$message.error(err)
  729. });
  730. };
  731. const router = useRouter()
  732. const tabClick = (item, index) => {
  733. tabsIndex.value = index;
  734. if(index==0){
  735. router.push({
  736. path:'../homein'
  737. })
  738. }
  739. if(index==1){
  740. router.push({
  741. path:'../homeOut'
  742. })
  743. }
  744. if(index==2){
  745. router.push({
  746. path:'../indexIn'
  747. })
  748. }
  749. if(index==3){
  750. router.push({
  751. path:'../indexOut'
  752. })
  753. }
  754. };
  755. const showDatePicker = () => {
  756. flag.value = true;
  757. };
  758. onMounted(() => {
  759. // getHourPeakData()
  760. });
  761. </script>
  762. <style lang="scss" scoped>
  763. .dashboard {
  764. position: absolute;
  765. width: 100%;
  766. height: 100%;
  767. left: 0;
  768. top: 0;
  769. background: linear-gradient(185deg, #1e305f, #0f1015);
  770. z-index: 2000;
  771. color: #fff;
  772. &-head {
  773. padding: 0 32px;
  774. height: 40px;
  775. line-height: 40px;
  776. background: #1d2948;
  777. width: 100%;
  778. display: flex;
  779. justify-content: center;
  780. &-title {
  781. font-size: 24px;
  782. font-family: Microsoft YaHei;
  783. font-weight: bold;
  784. color: #51dee9;
  785. }
  786. &-tabs {
  787. font-size: 16px;
  788. font-family: Microsoft YaHei;
  789. font-weight: 400;
  790. color: #ffffff;
  791. &-list {
  792. margin-right: 60px;
  793. cursor: pointer;
  794. position: relative;
  795. &:last-child {
  796. margin-right: 0;
  797. }
  798. }
  799. .active {
  800. color: #51dee9;
  801. &::after {
  802. content: "";
  803. position: absolute;
  804. bottom: 0;
  805. width: 80%;
  806. left: 10%;
  807. height: 2px;
  808. background: #51dee9;
  809. }
  810. }
  811. }
  812. &-zw {
  813. width: 190px;
  814. }
  815. }
  816. &-content {
  817. padding: 0 20px;
  818. height: calc(100% - 40px);
  819. box-sizing: border-box;
  820. display: flex;
  821. flex-direction: column;
  822. &-top {
  823. width: 100%;
  824. height: 65%;
  825. &-left,
  826. &-right {
  827. width: calc(30% - 20px);
  828. &-item {
  829. width: 100%;
  830. height: calc(50% - 20px);
  831. margin: 20px 0;
  832. display: flex;
  833. flex-direction: column;
  834. background-image: url("../../assets/home/pic_border.png");
  835. background-repeat: no-repeat;
  836. background-size: 100% 100%;
  837. padding: 13px;
  838. box-sizing: border-box;
  839. &-top {
  840. width: 100%;
  841. height: 45px;
  842. display: flex;
  843. padding-top: 15px;
  844. box-sizing: border-box;
  845. &-title {
  846. font-size: 16px;
  847. font-weight: bold;
  848. color: #75cee1;
  849. line-height: 1.8;
  850. margin-right: 10px;
  851. }
  852. &-time {
  853. display: flex;
  854. justify-content: flex-start;
  855. align-items: center;
  856. cursor: pointer;
  857. }
  858. }
  859. &-bottom {
  860. width: 100%;
  861. flex: 1;
  862. position: relative;
  863. // margin-top: 10px;
  864. }
  865. }
  866. }
  867. &-center {
  868. width: 40%;
  869. box-sizing: border-box;
  870. display: flex;
  871. flex-direction: column;
  872. &-top {
  873. width: 100%;
  874. height: 32px;
  875. display: flex;
  876. padding-top: 15px;
  877. box-sizing: border-box;
  878. &-title {
  879. font-size: 16px;
  880. font-weight: bold;
  881. color: #75cee1;
  882. line-height: 1.8;
  883. margin-right: 10px;
  884. }
  885. &-time {
  886. display: flex;
  887. justify-content: flex-start;
  888. align-items: center;
  889. cursor: pointer;
  890. }
  891. }
  892. &-bottom {
  893. width: 100%;
  894. flex: 1;
  895. position: relative;
  896. &-box1 {
  897. z-index: 10;
  898. width: 205px;
  899. height: 120px;
  900. border: 2px solid #468fc3;
  901. position: absolute;
  902. left: 50px;
  903. display: flex;
  904. flex-direction: column;
  905. padding: 15px 0 15px 15px;
  906. &-title {
  907. font-size: 16px;
  908. font-weight: bold;
  909. color: #ffffff;
  910. margin-bottom: 10px;
  911. }
  912. &-info {
  913. font-size: 14px;
  914. font-weight: 400;
  915. color: #c0cbe4;
  916. display: flex;
  917. div {
  918. margin-right: 10px;
  919. }
  920. }
  921. }
  922. &-box2 {
  923. z-index: 10;
  924. width: 284px;
  925. height: 120px;
  926. border: 2px solid #468fc3;
  927. position: absolute;
  928. right: 60px;
  929. display: flex;
  930. flex-direction: column;
  931. padding: 15px 0 15px 15px;
  932. &-title {
  933. font-size: 16px;
  934. font-weight: bold;
  935. color: #ffffff;
  936. margin-bottom: 10px;
  937. }
  938. &-info {
  939. font-size: 14px;
  940. font-weight: 400;
  941. color: #c0cbe4;
  942. display: flex;
  943. div {
  944. margin-right: 10px;
  945. }
  946. }
  947. }
  948. }
  949. }
  950. }
  951. &-bottom {
  952. width: 100%;
  953. flex: 1;
  954. &-left,
  955. &-right {
  956. width: calc(30% - 20px);
  957. display: flex;
  958. flex-direction: column;
  959. box-sizing: border-box;
  960. background-image: url("../../assets/home/pic_border.png");
  961. background-repeat: no-repeat;
  962. background-size: 100% 100%;
  963. padding: 13px;
  964. box-sizing: border-box;
  965. margin-top: 20px;
  966. margin-bottom: 20px;
  967. &-top {
  968. width: 100%;
  969. height: 45px;
  970. display: flex;
  971. padding-top: 15px;
  972. box-sizing: border-box;
  973. &-title {
  974. font-size: 16px;
  975. font-weight: bold;
  976. color: #75cee1;
  977. line-height: 1.8;
  978. margin-right: 10px;
  979. }
  980. &-time {
  981. display: flex;
  982. justify-content: flex-start;
  983. align-items: center;
  984. cursor: pointer;
  985. }
  986. }
  987. &-bottom {
  988. width: 100%;
  989. flex: 1;
  990. position: relative;
  991. // margin-top: 10px;
  992. }
  993. }
  994. &-center {
  995. width: 40%;
  996. padding: 13px;
  997. margin-top: 20px;
  998. margin-bottom: 20px;
  999. box-sizing: border-box;
  1000. display: flex;
  1001. flex-direction: column;
  1002. background-image: url("../../assets/home/pic_border.png");
  1003. background-repeat: no-repeat;
  1004. background-size: 100% 100%;
  1005. background-position: center center;
  1006. box-sizing: border-box;
  1007. &-top {
  1008. width: 100%;
  1009. height: 45px;
  1010. display: flex;
  1011. padding-top: 15px;
  1012. box-sizing: border-box;
  1013. &-title {
  1014. font-size: 16px;
  1015. font-weight: bold;
  1016. color: #75cee1;
  1017. line-height: 1.8;
  1018. margin-right: 10px;
  1019. }
  1020. &-time {
  1021. display: flex;
  1022. justify-content: flex-start;
  1023. align-items: center;
  1024. cursor: pointer;
  1025. }
  1026. }
  1027. &-bottom {
  1028. width: 100%;
  1029. flex: 1;
  1030. position: relative;
  1031. // margin-top: 10px;
  1032. }
  1033. }
  1034. }
  1035. .pBox {
  1036. background-image: url("../../assets/home/pic_border.png");
  1037. background-repeat: no-repeat;
  1038. background-size: 100% 100%;
  1039. }
  1040. }
  1041. }
  1042. </style>