HomePage.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674
  1. <template>
  2. <Layout>
  3. <template #left>
  4. <div class="left">
  5. <div class="left-top">
  6. <template
  7. v-for="(item, index) in leftTopCount"
  8. :key="index"
  9. >
  10. <div>
  11. <template
  12. v-for="(it, id) in item"
  13. :key="id"
  14. >
  15. <div>
  16. <Icon
  17. :name="it.icon"
  18. :size="96"
  19. style="margin-right: 20px;"
  20. />
  21. <div>
  22. <p>
  23. <span>{{ it.num }}</span>
  24. {{ it.until }}
  25. </p>
  26. <p>{{ it.name }}</p>
  27. </div>
  28. </div>
  29. </template>
  30. </div>
  31. </template>
  32. </div>
  33. <div class="left-content">
  34. <template
  35. v-for="(item, index) in leftContentChart"
  36. :key="index"
  37. >
  38. <Box
  39. :width="655"
  40. :height="455"
  41. :name="item.name"
  42. />
  43. </template>
  44. </div>
  45. </div>
  46. </template>
  47. <template #center>
  48. <div>111111</div>
  49. </template>
  50. <template #right>
  51. <div class="right">
  52. <Box
  53. :width="655"
  54. :height="622"
  55. :name="rightContent[0].name"
  56. >
  57. <div class="statistics">
  58. <div class="statistics-top">
  59. <template
  60. v-for="(item, index) in rightContent[0].content[0]"
  61. :key="index"
  62. >
  63. <div>
  64. <p>{{ item.num }}</p>
  65. <p>{{ item.name }}</p>
  66. </div>
  67. </template>
  68. </div>
  69. <div class="statistics-content">
  70. <template
  71. v-for="(item, ids) in rightContent[0].content[1]"
  72. :key="ids"
  73. >
  74. <div>
  75. <Icon
  76. :name="item.icon"
  77. :size="74"
  78. />
  79. <div>
  80. <p>
  81. {{ item.name }}
  82. </p>
  83. <p>
  84. <span>{{ item.num }}</span>
  85. </p>
  86. </div>
  87. </div>
  88. </template>
  89. </div>
  90. </div>
  91. </Box>
  92. <Box
  93. :width="655"
  94. :height="622"
  95. :name="rightContent[1].name"
  96. >
  97. <div class="classes">
  98. <div class="classes-top">
  99. <template
  100. v-for="(item, id) in rightContent[1].content[0]"
  101. :key="id"
  102. >
  103. <div>
  104. <Icon
  105. :name="item.icon"
  106. :size="74"
  107. />
  108. <div>
  109. <p>
  110. {{ item.name }}
  111. </p>
  112. <p>
  113. <span>{{ item.num }}</span>
  114. {{ item.util }}
  115. </p>
  116. </div>
  117. </div>
  118. </template>
  119. </div>
  120. <div class="classes-scroll">
  121. <div class="classes-scroll-head">
  122. <span>线路名称</span>
  123. <span>
  124. 班次
  125. <i>计划/实际</i>
  126. </span>
  127. </div>
  128. <div class="scrollBox">
  129. <TankSeamlessScroll
  130. :step-length="60"
  131. :debug="false"
  132. :reverse="false"
  133. >
  134. <template
  135. v-for="(item, index) in rightContent[1].content[1]"
  136. :key="index"
  137. >
  138. <div class="classes-scroll-content">
  139. <div>
  140. <div>
  141. <span>{{ item.name }}<i>{{ item.num }}</i></span>
  142. <span>始</span>
  143. <span>{{ item.start }}</span>
  144. <span>终</span>
  145. <span>{{ item.end }}</span>
  146. </div>
  147. <div>{{ item.plan }}/{{ item.pratic }}</div>
  148. </div>
  149. <div>
  150. <n-progress
  151. type="line"
  152. :percentage="item.pratic"
  153. :show-indicator="false"
  154. processing
  155. />
  156. </div>
  157. </div>
  158. </template>
  159. </TankSeamlessScroll>
  160. </div>
  161. </div>
  162. </div>
  163. </Box>
  164. <Box
  165. :width="655"
  166. :height="622"
  167. :name="rightContent[2].name"
  168. >
  169. <div class="classes">
  170. <div class="classes-top">
  171. <template
  172. v-for="(item, id) in rightContent[2].content[0]"
  173. :key="id"
  174. >
  175. <div>
  176. <n-progress
  177. type="circle"
  178. :percentage="item.num"
  179. :offset-degree="180"
  180. :color="item.color"
  181. :indicator-text-color="item.color"
  182. />
  183. <div>
  184. <p>
  185. {{ item.name }}
  186. </p>
  187. <p>
  188. <span>{{ item.num }}</span>
  189. {{ item.util }}
  190. </p>
  191. </div>
  192. </div>
  193. </template>
  194. </div>
  195. </div>
  196. </Box>
  197. <Box
  198. :width="655"
  199. :height="622"
  200. :name="rightContent[3].name"
  201. >
  202. <div class="classes">
  203. <div class="classes-top">
  204. <template
  205. v-for="(item, id) in rightContent[3].content[0]"
  206. :key="id"
  207. >
  208. <div>
  209. <Icon
  210. v-if="id === 0"
  211. :name="item.icon"
  212. :size="74"
  213. />
  214. <n-progress
  215. v-else
  216. type="circle"
  217. :percentage="item.num"
  218. :offset-degree="180"
  219. :color="item.color"
  220. :indicator-text-color="item.color"
  221. />
  222. <div>
  223. <p>
  224. {{ item.name }}
  225. </p>
  226. <p>
  227. <span>{{ item.num }}</span>
  228. {{ item.util }}
  229. </p>
  230. </div>
  231. </div>
  232. </template>
  233. </div>
  234. <div class="classes-scroll">
  235. <div class="classes-scroll-head">
  236. <span>线路名称</span>
  237. <span>
  238. 班次
  239. <i>已发数/准点数</i>
  240. </span>
  241. </div>
  242. <div class="scrollBox">
  243. <TankSeamlessScroll
  244. :step-length="60"
  245. :debug="false"
  246. :reverse="false"
  247. >
  248. <template
  249. v-for="(item, index) in rightContent[3].content[1]"
  250. :key="index"
  251. >
  252. <div class="classes-scroll-content">
  253. <div>
  254. <div>
  255. <span>{{ item.name }}<i>{{ item.num }}</i></span>
  256. <span>始</span>
  257. <span>{{ item.start }}</span>
  258. <span>终</span>
  259. <span>{{ item.end }}</span>
  260. </div>
  261. <div>{{ item.plan }}/{{ item.pratic }}</div>
  262. </div>
  263. <div>
  264. <n-progress
  265. type="line"
  266. :percentage="item.pratic"
  267. :show-indicator="false"
  268. processing
  269. />
  270. </div>
  271. </div>
  272. </template>
  273. </TankSeamlessScroll>
  274. </div>
  275. </div>
  276. </div>
  277. </Box>
  278. </div>
  279. </template>
  280. </Layout>
  281. </template>
  282. <script setup lang='ts'>
  283. import Layout from '@/components/layout.vue'
  284. import { ref } from 'vue'
  285. import Box from '@/components/box.vue'
  286. import TankSeamlessScroll from 'tank-vue3-seamless-scroll'
  287. const leftTopCount = ref([
  288. [
  289. {
  290. num: 6.8, icon: '11', name: '总刷卡量', until: '亿人次'
  291. },
  292. {
  293. num: 6.8, icon: '12', name: '总客流量', until: '亿人次'
  294. },
  295. {
  296. num: 6.8, icon: '13', name: '安全行驶', until: '万公里'
  297. }
  298. ],
  299. [
  300. {
  301. num: 6.8, icon: '14', name: '累计减少碳排放', until: '吨'
  302. },
  303. {
  304. num: 6.8, icon: '15', name: '累计责任事故率', until: '起/百万公里'
  305. },
  306. {
  307. num: 6.8, icon: '16', name: '乘客满意度', until: '%'
  308. }
  309. ]
  310. ])
  311. const leftContentChart = ref([
  312. { name: '客运量', option: '' },
  313. { name: '消费占比', option: '' },
  314. { name: '客流排名', option: '' },
  315. { name: '线路客流排名', option: '' }
  316. ])
  317. const rightContent = ref([
  318. {
  319. name: '舆情统计',
  320. content: [
  321. [
  322. { name: '报警总数', num: 0 },
  323. { name: '报警企业', num: 0 },
  324. { name: '待反馈', num: 0 },
  325. { name: '待解除', num: 0 }
  326. ],
  327. [
  328. { name: '事件', num: 0, icon: '17' },
  329. { name: '舆情', num: 0, icon: '18' },
  330. { name: '高风险', num: 0, icon: '19' },
  331. { name: '汛情', num: 0, icon: '20' },
  332. { name: '网络检查', num: 0, icon: '21' },
  333. { name: '火险', num: 0, icon: '22' },
  334. { name: '驾驶员报警', num: 0, icon: '23' },
  335. { name: '充电', num: 0, icon: '24' },
  336. { name: '电池高温', num: 0, icon: '25' }
  337. ]
  338. ]
  339. },
  340. {
  341. name: '班次完成率',
  342. content: [
  343. [
  344. {
  345. name: '昨日总班次', num: 100, icon: '26', util: '次'
  346. },
  347. {
  348. name: '昨日完成率', num: 100, icon: '27', util: '%'
  349. }
  350. ],
  351. [
  352. {
  353. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  354. },
  355. {
  356. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  357. },
  358. {
  359. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  360. },
  361. {
  362. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  363. },
  364. {
  365. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  366. }
  367. ]
  368. ]
  369. },
  370. {
  371. name: '班次准点率',
  372. content: [
  373. [
  374. {
  375. name: '昨日首末班车准点率', num: 70, icon: '26', util: '%', color: '#04FF77'
  376. },
  377. {
  378. name: '昨日中途站准点率', num: 70, icon: '29', util: '%', color: '#04FF77'
  379. }
  380. ]
  381. ]
  382. },
  383. {
  384. name: '发车准点率',
  385. content: [
  386. [
  387. {
  388. name: '昨日准点班次数', num: 70, icon: '26', util: '次', color: '#04FF77'
  389. },
  390. {
  391. name: '昨日准点率', num: 70, icon: '29', util: '%', color: '#04FF77'
  392. }
  393. ],
  394. [
  395. {
  396. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  397. },
  398. {
  399. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  400. },
  401. {
  402. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  403. },
  404. {
  405. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  406. },
  407. {
  408. name: '1路', num: '(45567)', start: '始发站牌名称', end: '始发站牌名称', plan: 100, pratic: 70
  409. }
  410. ]
  411. ]
  412. }
  413. ] as any)
  414. </script>
  415. <style lang="scss" scoped>
  416. .left {
  417. padding-right: 40px;
  418. &-top {
  419. &>div {
  420. display: flex;
  421. }
  422. &>div:first-child,
  423. &>div:nth-child(2) {
  424. background: linear-gradient(180deg, rgba(33, 133, 232, 0.0902) 0%, rgba(0, 170, 255, 0) 99%);
  425. &>div {
  426. display: flex;
  427. color: white;
  428. text-shadow: 1px 1px 5px rgba(0, 255, 255, 0.647058823529412);
  429. width: 440px;
  430. height: 160px;
  431. align-items: center;
  432. justify-content: center;
  433. &>div {
  434. &>p:first-child {
  435. font-size: 18px;
  436. span {
  437. font-size: 50px;
  438. }
  439. }
  440. &>p:last-child {
  441. font-size: 24px;
  442. }
  443. }
  444. }
  445. }
  446. }
  447. &-content {
  448. display: flex;
  449. justify-content: space-between;
  450. flex-wrap: wrap;
  451. }
  452. }
  453. .right {
  454. display: flex;
  455. justify-content: space-between;
  456. flex-wrap: wrap;
  457. padding-left: 40px;
  458. white-space: nowrap;
  459. text-shadow: 1px 1px 5px rgba(0, 255, 255, 0.647058823529412);
  460. .statistics {
  461. padding: 20px;
  462. &-top {
  463. display: flex;
  464. justify-content: space-between;
  465. &>div {
  466. width: 145px;
  467. height: 145px;
  468. font-size: 20px;
  469. color: #80FFFF;
  470. text-align: center;
  471. background: rgba(33, 133, 232, 0.098);
  472. border: 1px solid rgba(0, 255, 255, 0.298);
  473. &>p:first-child {
  474. padding-top: 33px;
  475. padding-bottom: 10px;
  476. font-weight: 700;
  477. font-style: normal;
  478. font-size: 40px;
  479. color: #FFFFFF;
  480. text-align: center;
  481. }
  482. &>p:last-child {
  483. font-size: 20px;
  484. }
  485. }
  486. }
  487. &-content {
  488. display: flex;
  489. flex-wrap: wrap;
  490. justify-content: space-between;
  491. &>div {
  492. display: flex;
  493. width: 205px;
  494. overflow: hidden;
  495. margin-top: 40px;
  496. &>div {
  497. width: 100px;
  498. color: white;
  499. padding-left: 20px;
  500. &>p {
  501. font-size: 20px;
  502. span {
  503. font-size: 34px;
  504. font-weight: 400;
  505. }
  506. }
  507. }
  508. }
  509. }
  510. }
  511. .classes {
  512. padding: 20px;
  513. &-top {
  514. display: flex;
  515. justify-content: space-between;
  516. &>div {
  517. width: 300px;
  518. height: 145px;
  519. font-size: 20px;
  520. color: #80FFFF;
  521. text-align: center;
  522. background: rgba(33, 133, 232, 0.098);
  523. border: 1px solid rgba(0, 255, 255, 0.298);
  524. display: flex;
  525. align-items: center;
  526. justify-content: center;
  527. &>div {
  528. padding-left: 20px;
  529. text-align: left;
  530. &>p:last-child {
  531. color: white;
  532. font-family: 'Impact Normal', 'Impact', sans-serif;
  533. &>span {
  534. font-size: 34px;
  535. font-weight: 400;
  536. margin-right: 5px;
  537. }
  538. }
  539. }
  540. }
  541. }
  542. &-scroll {
  543. &-head {
  544. margin-top: 40px;
  545. margin-bottom: 20px;
  546. display: flex;
  547. justify-content: space-between;
  548. font-size: 20px;
  549. color: #80FFFF;
  550. &>span:last-child {
  551. color: white;
  552. i {
  553. color: #80FFFF;
  554. }
  555. }
  556. }
  557. &-content {
  558. font-family: Arial Normal;
  559. &>div:first-child {
  560. display: flex;
  561. justify-content: space-between;
  562. align-items: center;
  563. &>div:first-child {
  564. display: flex;
  565. font-size: 18px;
  566. align-items: flex-end;
  567. text-shadow: none;
  568. &>span {
  569. &:first-child {
  570. width: 153px;
  571. height: 48px;
  572. border-radius: 5px;
  573. background: rgba(33, 133, 232, 0.298);
  574. border: 3px solid #80FFFF;
  575. font-size: 24px;
  576. color: white;
  577. text-align: center;
  578. line-height: 40px;
  579. overflow: hidden;
  580. margin-right: 10px;
  581. i {
  582. font-size: 20px;
  583. margin-left: 10px;
  584. }
  585. }
  586. &:nth-child(4),
  587. &:nth-child(2) {
  588. width: 30px;
  589. height: 30px;
  590. color: #FFFFFF;
  591. border-radius: 50%;
  592. border: 1px solid #2bb972;
  593. background: #2BB97249;
  594. text-align: center;
  595. line-height: 30px;
  596. margin: 0 5px;
  597. }
  598. &:nth-child(4) {
  599. border: 1px solid #E73D41;
  600. background: #E73D4149;
  601. margin-left: 10px;
  602. }
  603. &:nth-child(3),
  604. &:last-child {
  605. color: #81D3F8;
  606. padding-bottom: 5px;
  607. }
  608. }
  609. }
  610. &>div:last-child {
  611. font-size: 24px;
  612. text-align: right;
  613. color: #FFFFFF;
  614. }
  615. }
  616. &>div:last-child {
  617. height: 40px;
  618. padding: 13px 0;
  619. }
  620. }
  621. }
  622. .scrollBox {
  623. height: 270px;
  624. overflow: hidden;
  625. }
  626. }
  627. }
  628. </style>