CehicleOperation.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743
  1. <template>
  2. <Layout>
  3. <template #left>
  4. <div class="left">
  5. <Box
  6. :width="560"
  7. :height="1224"
  8. :name="'线路基本情况'"
  9. class="left-left"
  10. >
  11. <div class="linebase">
  12. <div class="car">
  13. <div class="top">
  14. <Icon
  15. name="1-1"
  16. :size="80"
  17. style="margin-right: 20px;"
  18. />
  19. <div class="name bold">
  20. 1
  21. </div>
  22. <div class="road">
  23. </div>
  24. </div>
  25. <div class="current">
  26. 当前线路
  27. </div>
  28. </div>
  29. <div class="info">
  30. <div
  31. v-for="item in lineInfo"
  32. :key="item.label"
  33. >
  34. <div class="label">
  35. {{ item.label }}
  36. </div>
  37. <div class="val">
  38. {{ item.value }}
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="header">
  44. <div>
  45. <Icon
  46. name="1-2"
  47. :size="30"
  48. />
  49. 起讫点
  50. </div>
  51. <div>
  52. <Icon
  53. name="1-3"
  54. :size="30"
  55. />
  56. 运营时间
  57. </div>
  58. </div>
  59. <div class="detail">
  60. <div>
  61. <div class="row">
  62. <div class="type orange">
  63. 上行
  64. </div>
  65. <div class="name">
  66. 始发点名称 → 终点站名称
  67. </div>
  68. <div class="value">
  69. 06:00~22:00
  70. </div>
  71. </div>
  72. <div class="row">
  73. <div class="type">
  74. 下行
  75. </div>
  76. <div class="name">
  77. 始发点名称 → 终点站名称
  78. </div>
  79. <div class="value">
  80. 06:00~22:00
  81. </div>
  82. </div>
  83. </div>
  84. <div>
  85. <div class="row">
  86. <div class="type orange">
  87. </div>
  88. <div class="name">
  89. 线路上行里程
  90. </div>
  91. <div class="value">
  92. 20km
  93. </div>
  94. </div>
  95. <div class="row">
  96. <div class="type">
  97. </div>
  98. <div class="name">
  99. 线路下行里程
  100. </div>
  101. <div class="value">
  102. 20km
  103. </div>
  104. </div>
  105. <div class="row">
  106. <Icon
  107. name="1-4"
  108. :size="38"
  109. />
  110. <div class="name">
  111. 票价
  112. </div>
  113. <div class="value">
  114. 2元
  115. </div>
  116. </div>
  117. </div>
  118. <div>
  119. <div class="title">
  120. <div class="flex">
  121. <Icon
  122. name="1-5"
  123. :size="30"
  124. />
  125. <div class="name">
  126. 驾驶员数量
  127. </div>
  128. </div>
  129. <div class="value">
  130. <div
  131. class="bold"
  132. style="font-size: 40px"
  133. >
  134. 10
  135. </div>
  136. <div class="">
  137. </div>
  138. </div>
  139. </div>
  140. <div class="starlist">
  141. <div
  142. v-for="item in starlist"
  143. :key="item.label"
  144. class="star"
  145. >
  146. <div>{{ item.label }}</div>
  147. <div class="flex">
  148. <span class="num bold">{{ item.value }}</span>人
  149. </div>
  150. </div>
  151. </div>
  152. </div>
  153. <div style="border: 0;">
  154. <div class="title">
  155. <div class="flex">
  156. <Icon
  157. name="1-1"
  158. :size="30"
  159. />
  160. <div class="name">
  161. 车辆数占比
  162. </div>
  163. </div>
  164. <div class="value">
  165. <div
  166. class="bold"
  167. style="font-size: 40px"
  168. >
  169. 10
  170. </div>
  171. </div>
  172. </div>
  173. <Echart
  174. style="width: 560px;height:318px"
  175. :option="leftContent.leftOp"
  176. />
  177. </div>
  178. </div>
  179. </Box>
  180. <Box
  181. :width="560"
  182. :height="1224"
  183. :name="'线路发班情况'"
  184. class="left-right"
  185. >
  186. <div class="filter">
  187. <div class="name bold">
  188. 筛选
  189. </div>
  190. <div class="odds">
  191. <div
  192. v-for="item in odds"
  193. :key="item.label"
  194. class="odd"
  195. >
  196. {{ item.label }} {{ item.value }}
  197. </div>
  198. </div>
  199. </div>
  200. <div class="frequency">
  201. <div class="title bold">
  202. 上行
  203. </div>
  204. <div class="content">
  205. <div
  206. v-for="item in status"
  207. :key="item"
  208. class="bus"
  209. >
  210. <img
  211. src="../../../../assets/img/1-1.png"
  212. alt="bus"
  213. >
  214. <div
  215. :class="item"
  216. class="status"
  217. >
  218. 执行中
  219. </div>
  220. <div class="info">
  221. <div>
  222. <div class="bold">
  223. 1路
  224. </div>
  225. <div class="busNum">
  226. 川T 12345
  227. </div>
  228. </div>
  229. <div>司机:小A </div>
  230. <div>电量: </div>
  231. </div>
  232. <div class="table">
  233. <div>
  234. <div class="label">
  235. 调度时间
  236. </div>
  237. <div class="value">
  238. 06:30:00
  239. </div>
  240. </div>
  241. <div>
  242. <div class="label">
  243. 实际发车时间
  244. </div>
  245. <div class="value">
  246. 06:30:00
  247. </div>
  248. </div>
  249. <div>
  250. <div class="label">
  251. 发车间隔
  252. </div>
  253. <div class="value">
  254. 1 分钟
  255. </div>
  256. </div>
  257. </div>
  258. </div>
  259. </div>
  260. <div class="page">
  261. <n-pagination :item-count="30">
  262. <template #prefix="{ itemCount }">
  263. 总共 {{ itemCount }} 个项目
  264. </template>
  265. </n-pagination>
  266. </div>
  267. </div>
  268. <div class="frequency">
  269. <div class="title bold">
  270. 下行
  271. </div>
  272. <div class="content">
  273. <div
  274. v-for="item in 3"
  275. :key="item"
  276. class="bus"
  277. >
  278. <img
  279. src="../../../../assets/img/1-1.png"
  280. alt="bus"
  281. >
  282. <div
  283. :class="item"
  284. class="status"
  285. >
  286. 执行中
  287. </div>
  288. <div class="info">
  289. <div>
  290. <div class="bold">
  291. 1路
  292. </div>
  293. <div class="busNum">
  294. 川T 12345
  295. </div>
  296. </div>
  297. <div>司机:小A </div>
  298. <div>电量: </div>
  299. </div>
  300. <div class="table">
  301. <div>
  302. <div class="label">
  303. 调度时间
  304. </div>
  305. <div class="value">
  306. 06:30:00
  307. </div>
  308. </div>
  309. <div>
  310. <div class="label">
  311. 实际发车时间
  312. </div>
  313. <div class="value">
  314. 06:30:00
  315. </div>
  316. </div>
  317. <div>
  318. <div class="label">
  319. 发车间隔
  320. </div>
  321. <div class="value">
  322. 1 分钟
  323. </div>
  324. </div>
  325. </div>
  326. </div>
  327. </div>
  328. <div class="page">
  329. <n-pagination :item-count="30">
  330. <template #prefix="{ itemCount }">
  331. 总共 {{ itemCount }} 个项目
  332. </template>
  333. </n-pagination>
  334. </div>
  335. </div>
  336. </Box>
  337. </div>
  338. <div>2222</div>
  339. </template>
  340. <template #center>
  341. <div>2222</div>
  342. </template>
  343. <template #right>
  344. <div>2222</div>
  345. </template>
  346. </Layout>
  347. </template>
  348. <script setup lang='ts'>
  349. import Layout from '@/components/layout.vue'
  350. import Box from '@/components/box.vue'
  351. import Echart from '@/components/chart.vue'
  352. import { ref } from 'vue'
  353. /* 线路类型:干线公交 车辆总数: 运 营 中:9 辆 非 运 营:1 辆 */
  354. const lineInfo = ref([
  355. { label: '线路类型:', value: '干线公交' },
  356. { label: '车辆总数:', value: '10 辆' },
  357. { label: '运 营 中:', value: '9 辆' },
  358. { label: '非 运 营:', value: '1 辆' }
  359. ])
  360. const starlist = ref([
  361. { label: '五星', value: '1' },
  362. { label: '四星', value: '2' },
  363. { label: '三星', value: '3' },
  364. { label: '二星', value: '4' },
  365. { label: '一星', value: '5' }
  366. ])
  367. const odds = ref([
  368. { label: '全部', value: '10' },
  369. { label: '已完成', value: '4' },
  370. { label: '执行中', value: '1' },
  371. { label: '已处理', value: '1' },
  372. { label: '已下发', value: '1' },
  373. { label: '待发', value: '1' },
  374. { label: '调停', value: '1' },
  375. { label: '非运营', value: '1' }
  376. ])
  377. const status = [ 'success', 'warning', 'error' ]
  378. const leftContent = ref({
  379. leftOp: {
  380. grid: {
  381. containLabel: true
  382. },
  383. // 图表图例
  384. legend: {
  385. show: true,
  386. type: 'scroll',
  387. orient: 'horizontal', // 图例排列方向
  388. icon: 'circle', // 图例样式为圆形
  389. itemWidth: 10, // 图例图形的宽度
  390. itemHeight: 16, // 图例图形的高度
  391. itemGap: 10, // 图例项之间的间隔
  392. left: 'center', // 图例距离容器右侧的距离
  393. bottom: 0, // 图例垂直居中
  394. textStyle: {
  395. color: 'white', // 图例文字颜色
  396. fontSize: 16
  397. }
  398. },
  399. // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
  400. series: [
  401. {
  402. type: 'pie', // 图表类型为饼图
  403. radius: '60%', // 控制内外圆环的半径,30%代表内圆,60%代表外圆
  404. avoidLabelOverlap: true, // 是否启用防止标签重叠策略
  405. showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
  406. label: {
  407. show: true,
  408. fontSize: 16,
  409. formatter: '{b}: {c}条',
  410. color: 'white'
  411. },
  412. data: [
  413. { key: 2, name: '2023', value: 130 },
  414. { key: 2, name: '2022', value: 50 },
  415. { key: 2, name: '2021', value: 50 },
  416. { key: 2, name: '2020', value: 50 },
  417. { key: 2, name: '2019', value: 50 }
  418. ]
  419. }
  420. ]
  421. }
  422. })
  423. </script>
  424. <style lang="scss" scoped>
  425. .left {
  426. display: flex;
  427. justify-content: space-between;
  428. gap: 10px;
  429. color: #fff;
  430. font-size: 18px;
  431. &-left {
  432. .linebase {
  433. height: 216px;
  434. padding: 20px 60px 35px 60px;
  435. display: flex;
  436. align-items: center;
  437. gap: 70px;
  438. .car {
  439. .top {
  440. display: flex;
  441. position: relative;
  442. font-size: 18px;
  443. .name {
  444. width: 63px;
  445. height: 74px;
  446. line-height: 74px;
  447. text-align: center;
  448. border: 2px solid #2185E8;
  449. font-size: 50px;
  450. border-radius: 10px;
  451. background: rgba(33, 133, 232, 0.298);
  452. }
  453. .road {
  454. position: absolute;
  455. bottom: 0;
  456. right: -25px;
  457. }
  458. }
  459. .current {
  460. text-align: center;
  461. text-shadow: 1px 1px 10px rgba(0, 255, 255, 0.698);
  462. margin-top: 10px;
  463. }
  464. }
  465. .info {
  466. width: 100%;
  467. >div {
  468. display: flex;
  469. gap: 10px;
  470. margin: 15.2px 0;
  471. .label {
  472. color: #80FFFF
  473. }
  474. }
  475. }
  476. }
  477. .header {
  478. height: 50px;
  479. background: rgba(33, 133, 232, 0.298);
  480. display: flex;
  481. >div {
  482. width: 50%;
  483. display: flex;
  484. align-items: center;
  485. justify-content: center;
  486. gap: 10px;
  487. }
  488. }
  489. .detail {
  490. padding: 0 20px 0 30px;
  491. >div {
  492. border-bottom: 1px solid rgba(128, 255, 255, 0.298);
  493. padding-bottom: 30px;
  494. padding-top: 16px;
  495. .value {
  496. color: #80FFFF;
  497. width: 200px;
  498. text-align: center;
  499. }
  500. .row {
  501. height: 50px;
  502. display: flex;
  503. align-items: center;
  504. .type {
  505. border: 1px solid #80FFFF;
  506. background: rgba(128, 255, 255, 0.098);
  507. border-radius: 5px;
  508. color: #80FFFF;
  509. padding: 5px 9px;
  510. &.orange {
  511. border: 1px solid #FAAD0E;
  512. background: rgba(250, 173, 14, 0.098);
  513. color: #FAAD0E;
  514. }
  515. }
  516. .name {
  517. flex: 1;
  518. margin-left: 10px;
  519. }
  520. }
  521. .title {
  522. display: flex;
  523. justify-content: space-between;
  524. align-items: center;
  525. .name {
  526. font-size: 24px;
  527. margin-left: 10px;
  528. }
  529. .value {
  530. display: flex;
  531. justify-content: center;
  532. align-items: flex-end;
  533. gap: 10px;
  534. }
  535. }
  536. .starlist {
  537. display: flex;
  538. justify-content: space-around;
  539. margin-top: 17px;
  540. .star {
  541. color: #80FFFF;
  542. .num {
  543. font-size: 24px;
  544. }
  545. }
  546. }
  547. }
  548. }
  549. }
  550. &-right {
  551. flex: 1;
  552. font-size: 18px;
  553. .filter {
  554. display: flex;
  555. align-items: center;
  556. padding: 20px 40px;
  557. .name {
  558. width: 120px;
  559. }
  560. .odds {
  561. display: flex;
  562. gap: 10px;
  563. flex-wrap: wrap;
  564. .odd {
  565. border-radius: 5px;
  566. border: 1px solid #2185E8;
  567. background: rgba(0, 191, 191, 0);
  568. padding: 2px 8px;
  569. min-width: 90px;
  570. text-align: center;
  571. &.checkd {
  572. background: #2185E8;
  573. }
  574. }
  575. }
  576. }
  577. .frequency {
  578. margin-top: 15px;
  579. .title {
  580. background: rgba(24, 145, 255, 0.498);
  581. height: 40px;
  582. line-height: 40px;
  583. font-size: 20px;
  584. text-align: center;
  585. text-shadow: 1px 1px 10px rgba(0, 255, 255, 0.698);
  586. }
  587. .content {
  588. display: flex;
  589. justify-content: space-between;
  590. gap: 10px;
  591. padding: 10px 13px;
  592. .bus {
  593. width: 236px;
  594. height: 401px;
  595. flex: 1;
  596. border: 1px solid #1891FF;
  597. background: rgba(27, 175, 255, 0.098);
  598. overflow: hidden;
  599. position: relative;
  600. .status {
  601. position: absolute;
  602. height: 31px;
  603. line-height: 31px;
  604. text-align: right;
  605. width: 100%;
  606. top: 119px;
  607. padding-right: 10px;
  608. background: linear-gradient(90deg, rgba(0, 0, 0, 0) 1%, #333333 100%);
  609. &.success {
  610. background: linear-gradient(90deg, rgba(0, 238, 200, 0) 4%, #00EEC8 100%);
  611. }
  612. &.warning {
  613. background: linear-gradient(90deg, rgba(250, 173, 14, 0) 1%, #FAAD0E 100%);
  614. }
  615. &.error {
  616. background: linear-gradient(90deg, rgba(231, 61, 65, 0) 1%, #E73D41 100%);
  617. }
  618. }
  619. img {
  620. height: 150px;
  621. width: 100%;
  622. }
  623. .info {
  624. padding: 10px;
  625. >div {
  626. display: flex;
  627. height: 35px;
  628. align-items: center;
  629. .bold {
  630. font-size: 24px;
  631. }
  632. .busNum {
  633. border: 2px solid #FFFFFF;
  634. border-radius: 3px;
  635. background: #1891FF;
  636. padding: 2px 5px;
  637. margin-left: 10px;
  638. }
  639. }
  640. }
  641. .table {
  642. >div {
  643. display: flex;
  644. height: 40px;
  645. align-items: center;
  646. .label {
  647. width: 135px;
  648. height: 40px;
  649. line-height: 40px;
  650. background: rgba(33, 133, 232, 0.298);
  651. color: #80FFFF;
  652. text-align: right;
  653. padding-right: 10px;
  654. }
  655. .value {
  656. text-align: center;
  657. flex: 1;
  658. }
  659. }
  660. }
  661. }
  662. }
  663. .page {
  664. display: flex;
  665. justify-content: flex-end;
  666. margin-top: 25px;
  667. }
  668. }
  669. }
  670. .flex {
  671. display: flex;
  672. gap: 10px;
  673. align-items: center;
  674. }
  675. .bold {
  676. color: #fff;
  677. font-weight: bold;
  678. font-family: Impact Normal;
  679. }
  680. }
  681. </style>