PassengerFlow.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206
  1. <template>
  2. <Layout>
  3. <template #left>
  4. <div class="left">
  5. <Box
  6. :width="1370"
  7. :height="406"
  8. :name="'区域流量'"
  9. class="left-top"
  10. >
  11. <Echart
  12. v-for="(item, index) in leftContent.tCharts"
  13. :key="index"
  14. :option="item.option"
  15. />
  16. </Box>
  17. <div class="left-bottom">
  18. <template
  19. v-for="(item, index) in leftContent.bCharts"
  20. :key="index"
  21. >
  22. <Box
  23. :width="450"
  24. :height="400"
  25. :name="item.name"
  26. >
  27. <Echart
  28. v-if="!item.isList"
  29. :option="item.option"
  30. />
  31. <div
  32. v-else
  33. class="lineList"
  34. >
  35. <div
  36. v-for="line, i in item.list"
  37. :key="i"
  38. class="line"
  39. >
  40. <div
  41. :class="'index' + i"
  42. class="index"
  43. >
  44. {{ i + 1 }}
  45. </div>
  46. <div class="name">
  47. {{ line.name }}
  48. </div>
  49. <div class="content">
  50. {{ line.startStation }} → {{ line.endStation }}
  51. </div>
  52. </div>
  53. </div>
  54. </Box>
  55. </template>
  56. </div>
  57. </div>
  58. </template>
  59. <template #center>
  60. <div>777</div>
  61. </template>
  62. <template #right>
  63. <div class="right">
  64. <div class="right-top">
  65. <Box
  66. :width="460"
  67. :height="406"
  68. :name="'客运量排名'"
  69. >
  70. <Echart :option="rightContent.top1" />
  71. </Box>
  72. <Box
  73. :width="900"
  74. :height="406"
  75. :name="'运能分析'"
  76. >
  77. <Echart :option="rightContent.top2" />
  78. </Box>
  79. </div>
  80. <Box
  81. class="right-center"
  82. :width="1370"
  83. :height="406"
  84. :name="'今日客流'"
  85. >
  86. <Echart :option="rightContent.center" />
  87. </Box>
  88. <Box
  89. class="right-bottom"
  90. :width="1370"
  91. :height="406"
  92. :name="'本月客流'"
  93. >
  94. <Echart :option="rightContent.bottom" />
  95. </Box>
  96. </div>
  97. </template>
  98. </Layout>
  99. </template>
  100. <script setup lang='ts'>
  101. import Layout from '@/components/layout.vue'
  102. import Box from '@/components/box.vue'
  103. import Echart from '@/components/chart.vue'
  104. import { ref } from 'vue'
  105. import { graphic } from 'echarts'
  106. const leftContent = ref({
  107. tCharts: [
  108. {
  109. name: '客流线路分布',
  110. option: {
  111. title: {
  112. text: '客流总数/万人', // 图标内容文本
  113. subtext: '10',
  114. left: 'center', // 图标内容水平居中
  115. top: 'center', // 图标内容垂直居中
  116. // 文本样式
  117. textStyle: {
  118. color: '#fff', // 图标内容文字颜色
  119. fontSize: '18px', // 图标内容文字大小
  120. fontWeight: 'normal'
  121. },
  122. subtextStyle: {
  123. color: '#fff', // 图标内容文字颜色
  124. fontSize: '18px', // 图标内容文字大小
  125. fontWeight: 'normal'
  126. }
  127. },
  128. grid: {
  129. containLabel: true
  130. },
  131. // 图表图例
  132. legend: {
  133. show: true,
  134. type: 'scroll',
  135. orient: 'vertical', // 图例排列方向
  136. icon: 'circle', // 图例样式为圆形
  137. itemWidth: 10, // 图例图形的宽度
  138. itemHeight: 16, // 图例图形的高度
  139. itemGap: 10, // 图例项之间的间隔
  140. left: 10, // 图例距离容器右侧的距离
  141. top: 'center', // 图例垂直居中
  142. textStyle: {
  143. color: 'white', // 图例文字颜色
  144. fontSize: 20
  145. }
  146. },
  147. // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
  148. series: [
  149. {
  150. type: 'pie', // 图表类型为饼图
  151. radius: [ '55%', '75%' ], // 控制内外圆环的半径,30%代表内圆,60%代表外圆
  152. avoidLabelOverlap: true, // 是否启用防止标签重叠策略
  153. showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
  154. label: {
  155. show: true,
  156. formatter: '{d}%',
  157. color: 'white'
  158. },
  159. data: [
  160. { key: 2, name: '雨城区', value: 30619 },
  161. { key: 2, name: '芦山县', value: 5921 },
  162. { key: 2, name: '名山县', value: 1153 },
  163. { key: 2, name: '天全县', value: 266 },
  164. { key: 2, name: '宝兴县', value: 87 },
  165. { key: 2, name: '汉源县', value: 999 },
  166. { key: 2, name: '石棉县', value: 5921 }
  167. ]
  168. }
  169. ]
  170. }
  171. },
  172. {
  173. name: '客流线路分布',
  174. option: {
  175. grid: {
  176. containLabel: true
  177. },
  178. tooltip: {
  179. trigger: 'axis',
  180. axisPointer: {
  181. type: 'shadow'
  182. }
  183. },
  184. legend: {
  185. top: 10,
  186. right: '40%',
  187. itemWidth: 18,
  188. itemHeight: 18,
  189. itemGap: 30,
  190. textStyle: {
  191. fontSize: 18,
  192. color: '#C9D2FA'
  193. }
  194. },
  195. xAxis: {
  196. // name: "班级",
  197. triggerEvent: true,
  198. data: [
  199. '雨城区',
  200. '芦山县',
  201. '名山县',
  202. '天全县',
  203. '宝兴县',
  204. '汉源县'
  205. ],
  206. axisLabel: {
  207. interval: 0,
  208. show: true,
  209. fontSize: 18,
  210. color: '#C9D2FA'
  211. },
  212. axisLine: {
  213. show: false,
  214. lineStyle: {
  215. show: false,
  216. color: '#F3F3F3',
  217. width: 2
  218. }
  219. },
  220. axisTick: {
  221. show: false
  222. }
  223. },
  224. yAxis: [
  225. {
  226. splitNumber: 2,
  227. axisLabel: {
  228. show: true,
  229. fontSize: 18,
  230. color: '#C9D2FA'
  231. },
  232. axisLine: {
  233. show: false
  234. },
  235. axisTick: {
  236. show: false
  237. },
  238. splitLine: {
  239. lineStyle: {
  240. type: 'dashed',
  241. color: '#3E4A82'
  242. }
  243. }
  244. }
  245. ],
  246. series: [
  247. {
  248. name: '客流量',
  249. type: 'bar',
  250. silent: true,
  251. itemStyle: {
  252. normal: {
  253. color: new graphic.LinearGradient(
  254. 0,
  255. 1,
  256. 0,
  257. 0,
  258. [ {
  259. offset: 0,
  260. color: 'rgba(96, 132, 255, 0)'// 0% 处的颜色
  261. },
  262. {
  263. offset: 1,
  264. color: 'rgba(96, 132, 255, 1)' // 100% 处的颜色
  265. }
  266. ],
  267. false
  268. )
  269. }
  270. },
  271. barWidth: 30,
  272. data: [ 200, 108, 200, 40, 210, 100 ]
  273. }
  274. ]
  275. }
  276. }
  277. ],
  278. bCharts: [
  279. {
  280. name: '客流线路分布',
  281. option: {
  282. grid: {
  283. containLabel: true
  284. },
  285. // 图表图例
  286. legend: {
  287. show: true,
  288. type: 'scroll',
  289. orient: 'horizontal', // 图例排列方向
  290. icon: 'circle', // 图例样式为圆形
  291. itemWidth: 10, // 图例图形的宽度
  292. itemHeight: 16, // 图例图形的高度
  293. itemGap: 10, // 图例项之间的间隔
  294. left: 'center', // 图例距离容器右侧的距离
  295. bottom: 0, // 图例垂直居中
  296. textStyle: {
  297. color: 'white', // 图例文字颜色
  298. fontSize: 20
  299. }
  300. },
  301. // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
  302. series: [
  303. {
  304. type: 'pie', // 图表类型为饼图
  305. radius: '60%', // 控制内外圆环的半径,30%代表内圆,60%代表外圆
  306. avoidLabelOverlap: true, // 是否启用防止标签重叠策略
  307. showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
  308. label: {
  309. show: true,
  310. formatter: '{b}: {c}条',
  311. color: 'white'
  312. },
  313. data: [
  314. { key: 2, name: '常规', value: 130 },
  315. { key: 2, name: '快线', value: 50 },
  316. { key: 2, name: '特色线路', value: 50 }
  317. ]
  318. }
  319. ]
  320. }
  321. },
  322. {
  323. name: '消费类型',
  324. option: {
  325. title: {
  326. text: '客流总数/万人', // 图标内容文本
  327. subtext: '10',
  328. left: 'center', // 图标内容水平居中
  329. top: 'center', // 图标内容垂直居中
  330. // 文本样式
  331. textStyle: {
  332. color: '#fff', // 图标内容文字颜色
  333. fontSize: '18px', // 图标内容文字大小
  334. fontWeight: 'normal'
  335. },
  336. subtextStyle: {
  337. color: '#fff', // 图标内容文字颜色
  338. fontSize: '18px', // 图标内容文字大小
  339. fontWeight: 'normal'
  340. }
  341. },
  342. grid: {
  343. containLabel: true
  344. },
  345. // 图表图例
  346. legend: {
  347. show: true,
  348. type: 'scroll',
  349. orient: 'horizontal', // 图例排列方向
  350. icon: 'circle', // 图例样式为圆形
  351. itemWidth: 10, // 图例图形的宽度
  352. itemHeight: 16, // 图例图形的高度
  353. itemGap: 10, // 图例项之间的间隔
  354. left: 'center', // 图例距离容器右侧的距离
  355. bottom: 0, // 图例垂直居中
  356. textStyle: {
  357. color: 'white', // 图例文字颜色
  358. fontSize: 20
  359. }
  360. },
  361. // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
  362. series: [
  363. {
  364. type: 'pie', // 图表类型为饼图
  365. radius: [ '55%', '75%' ], // 控制内外圆环的半径,30%代表内圆,60%代表外圆
  366. avoidLabelOverlap: true, // 是否启用防止标签重叠策略
  367. showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
  368. label: {
  369. show: true,
  370. formatter: '{d}%',
  371. color: 'white'
  372. },
  373. data: [
  374. { key: 2, name: '老年卡', value: 180 },
  375. { key: 2, name: '电子钱包', value: 50 },
  376. { key: 2, name: '现金', value: 30 },
  377. { key: 2, name: '学生卡', value: 20 },
  378. { key: 2, name: '免费', value: 10 }
  379. ]
  380. }
  381. ]
  382. }
  383. },
  384. {
  385. name: '乘距分布',
  386. option: {
  387. grid: {
  388. containLabel: true
  389. },
  390. // 图表图例
  391. legend: {
  392. show: true,
  393. type: 'scroll',
  394. orient: 'horizontal', // 图例排列方向
  395. icon: 'circle', // 图例样式为圆形
  396. itemWidth: 10, // 图例图形的宽度
  397. itemHeight: 16, // 图例图形的高度
  398. itemGap: 10, // 图例项之间的间隔
  399. left: 'center', // 图例距离容器右侧的距离
  400. bottom: 0, // 图例垂直居中
  401. textStyle: {
  402. color: 'white', // 图例文字颜色
  403. fontSize: 20
  404. }
  405. },
  406. // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
  407. series: [
  408. {
  409. type: 'pie', // 图表类型为饼图
  410. radius: '60%', // 控制内外圆环的半径,30%代表内圆,60%代表外圆
  411. avoidLabelOverlap: true, // 是否启用防止标签重叠策略
  412. showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
  413. label: {
  414. show: true,
  415. formatter: '{b}: {c}万人次',
  416. color: 'white'
  417. },
  418. data: [
  419. { key: 2, name: '2km', value: 5 },
  420. { key: 2, name: '2-5km', value: 3 },
  421. { key: 2, name: '5-10km', value: 2 },
  422. { key: 2, name: '>10km', value: 1 }
  423. ]
  424. }
  425. ]
  426. }
  427. },
  428. {
  429. name: '通勤时间占比',
  430. option: {
  431. grid: {
  432. containLabel: true
  433. },
  434. // 图表图例
  435. legend: {
  436. show: true,
  437. type: 'scroll',
  438. orient: 'horizontal', // 图例排列方向
  439. icon: 'circle', // 图例样式为圆形
  440. itemWidth: 10, // 图例图形的宽度
  441. itemHeight: 16, // 图例图形的高度
  442. itemGap: 10, // 图例项之间的间隔
  443. left: 'center', // 图例距离容器右侧的距离
  444. bottom: 0, // 图例垂直居中
  445. textStyle: {
  446. color: 'white', // 图例文字颜色
  447. fontSize: 20
  448. }
  449. },
  450. // color: [ '#6386e0', '#fb9a55', '#6bd98d', '#8dfd15', '#6bd98d', '#fff' ],
  451. series: [
  452. {
  453. type: 'pie', // 图表类型为饼图
  454. radius: '60%', // 控制内外圆环的半径,30%代表内圆,60%代表外圆
  455. avoidLabelOverlap: true, // 是否启用防止标签重叠策略
  456. showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
  457. label: {
  458. show: true,
  459. formatter: '{b}: {c}条',
  460. color: 'white'
  461. },
  462. data: [
  463. { key: 2, name: '<30分钟', value: 130 },
  464. { key: 2, name: '30-60分钟', value: 50 },
  465. { key: 2, name: '60-70分钟', value: 50 },
  466. { key: 2, name: '>90分钟', value: 50 }
  467. ]
  468. }
  469. ]
  470. }
  471. },
  472. {
  473. name: '换乘次数占比',
  474. option: {
  475. grid: {
  476. containLabel: true
  477. },
  478. // 图表图例
  479. legend: {
  480. show: true,
  481. type: 'scroll',
  482. orient: 'horizontal', // 图例排列方向
  483. icon: 'circle', // 图例样式为圆形
  484. itemWidth: 10, // 图例图形的宽度
  485. itemHeight: 16, // 图例图形的高度
  486. itemGap: 10, // 图例项之间的间隔
  487. left: 'center', // 图例距离容器右侧的距离
  488. bottom: 0, // 图例垂直居中
  489. textStyle: {
  490. color: 'white', // 图例文字颜色
  491. fontSize: 20
  492. }
  493. },
  494. series: [
  495. {
  496. type: 'pie', // 图表类型为饼图
  497. radius: '60%', // 控制内外圆环的半径,30%代表内圆,60%代表外圆
  498. avoidLabelOverlap: true, // 是否启用防止标签重叠策略
  499. showEmptyCircle: true, // 是否在无数据的时候显示一个占位圆
  500. label: {
  501. show: true,
  502. formatter: '{b}: {c}人次',
  503. color: 'white'
  504. },
  505. data: [
  506. { key: 2, name: '0次', value: 130 },
  507. { key: 2, name: '1次', value: 30 },
  508. { key: 2, name: '2次', value: 20 },
  509. { key: 2, name: '3次以上', value: 10 }
  510. ]
  511. }
  512. ]
  513. }
  514. },
  515. {
  516. name: '热门出行线路排名',
  517. isList: true,
  518. list: [
  519. {
  520. name: '1号',
  521. startStation: '北京',
  522. endStation: '上海'
  523. },
  524. {
  525. name: '2号',
  526. startStation: '北京',
  527. endStation: '上海'
  528. },
  529. {
  530. name: '3号',
  531. startStation: '北京',
  532. endStation: '上海'
  533. },
  534. {
  535. name: '4号',
  536. startStation: '北京',
  537. endStation: '上海'
  538. },
  539. {
  540. name: '5号',
  541. startStation: '北京',
  542. endStation: '上海'
  543. }
  544. ]
  545. }
  546. ]
  547. })
  548. const rightContent = ref({
  549. top1: {
  550. grid: {
  551. containLabel: true,
  552. bottom: '0'
  553. },
  554. tooltip: {
  555. trigger: 'axis',
  556. axisPointer: {
  557. type: 'shadow'
  558. }
  559. },
  560. legend: {
  561. top: 10,
  562. right: '40%',
  563. itemWidth: 18,
  564. itemHeight: 18,
  565. itemGap: 30,
  566. textStyle: {
  567. fontSize: 18,
  568. color: '#C9D2FA'
  569. }
  570. },
  571. xAxis: {
  572. type: 'value',
  573. splitLine: {
  574. show: true,
  575. lineStyle: {
  576. color: '#232e32'
  577. }
  578. },
  579. axisLine: {
  580. show: false
  581. },
  582. axisLabel: {
  583. show: true,
  584. textStyle: {
  585. color: '#fff',
  586. fontSize: 16
  587. }
  588. },
  589. data: [ '1路', '2路', '3路', '4路', '5路' ],
  590. axisTick: {
  591. show: false
  592. }
  593. },
  594. yAxis: [ {
  595. type: 'category',
  596. inverse: true,
  597. data: [ '1路', '2路', '3路', '4路', '5路' ],
  598. axisLine: {
  599. show: false
  600. },
  601. axisTick: {
  602. show: false
  603. },
  604. axisLabel: {
  605. // "margin": 10,
  606. textStyle: {
  607. color: '#fff',
  608. fontSize: 16
  609. }
  610. }
  611. } ],
  612. series: [ { // 内
  613. type: 'bar',
  614. barWidth: 30,
  615. barGap: 0.5,
  616. name: '客流量',
  617. label: {
  618. show: true,
  619. position: 'right',
  620. textStyle: {
  621. color: '#fff',
  622. fontSize: 16,
  623. padding: [ 0, 10 ],
  624. rich: {
  625. a: {
  626. color: '#fff',
  627. fontSize: 36
  628. }
  629. }
  630. }
  631. },
  632. legendHoverLink: false,
  633. silent: true,
  634. itemStyle: {
  635. color: new graphic.LinearGradient(
  636. 0,
  637. 0,
  638. 1,
  639. 1,
  640. [ {
  641. offset: 0,
  642. color: '#0f224066'// 0% 处的颜色
  643. },
  644. {
  645. offset: 1,
  646. color: '#625fdf' // 100% 处的颜色
  647. }
  648. ],
  649. false
  650. )
  651. },
  652. data: [ '80', '70', '60', '50', '40' ]
  653. }
  654. ]
  655. },
  656. top2: {
  657. grid: {
  658. containLabel: true,
  659. right: 30,
  660. left: 50
  661. },
  662. legend: {
  663. show: true,
  664. left: 'center',
  665. top: '10',
  666. icon: 'stack',
  667. itemWidth: 15,
  668. itemHeight: 10,
  669. textStyle: {
  670. color: '#646464',
  671. fontSize: 18
  672. }
  673. },
  674. xAxis: [ {
  675. type: 'category',
  676. axisLine: {
  677. show: false
  678. },
  679. axisLabel: {
  680. color: '#fff',
  681. fontSize: 18
  682. // formatter: (value: number) => format( 1'时')
  683. },
  684. splitLine: {
  685. show: false
  686. },
  687. axisTick: {
  688. show: false
  689. },
  690. data: [ '1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时' ]
  691. } ],
  692. yAxis: [ {
  693. name: '人数/人',
  694. nameLocation: 'center',
  695. nameGap: 50,
  696. nameTextStyle: {
  697. color: '#fff',
  698. fontSize: 18
  699. },
  700. padding: 5,
  701. // max: 1000,
  702. splitLine: {
  703. show: true,
  704. lineStyle: {
  705. color: '#A1A7B3'
  706. // type: 'dashed'
  707. }
  708. },
  709. axisLine: {
  710. show: false
  711. },
  712. axisLabel: {
  713. show: true,
  714. margin: 10,
  715. textStyle: {
  716. color: '#fff'
  717. }
  718. },
  719. axisTick: {
  720. show: false
  721. }
  722. }
  723. ],
  724. series: [ {
  725. name: '客流',
  726. type: 'line',
  727. smooth: true,
  728. symbolSize: 0,
  729. itemStyle: {
  730. normal: {
  731. // color: '#4293FD',
  732. lineStyle: {
  733. // color: '#4293FD',
  734. width: 2
  735. }
  736. }
  737. },
  738. areaStyle: {
  739. normal: {
  740. color: new graphic.LinearGradient(0, 0, 0, 1, [
  741. {
  742. offset: 0,
  743. color: 'rgba(19, 95, 172, 0)'
  744. },
  745. {
  746. offset: 1,
  747. color: 'rgba(112, 154, 195, 0.4)'
  748. }
  749. ], false)
  750. }
  751. },
  752. data: [ 120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330 ]
  753. },
  754. {
  755. name: '运能',
  756. type: 'line',
  757. smooth: true,
  758. symbolSize: 0,
  759. itemStyle: {
  760. normal: {
  761. // color: '#23D0C4',
  762. lineStyle: {
  763. // color: '#23D0C4',
  764. width: 2
  765. }
  766. }
  767. },
  768. areaStyle: {
  769. normal: {
  770. color: new graphic.LinearGradient(0, 0, 0, 1, [
  771. {
  772. offset: 0,
  773. color: 'rgba(50, 216, 205, 0)'
  774. },
  775. {
  776. offset: 1,
  777. color: 'rgba(35, 208, 196, 0.4)'
  778. }
  779. ], false)
  780. }
  781. },
  782. data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
  783. }
  784. ],
  785. dataZoom: {}
  786. },
  787. center: {
  788. grid: {
  789. containLabel: true,
  790. right: 30,
  791. left: 50
  792. },
  793. legend: {
  794. show: true,
  795. left: 'center',
  796. top: '10',
  797. icon: 'stack',
  798. itemWidth: 15,
  799. itemHeight: 10,
  800. textStyle: {
  801. color: '#646464',
  802. fontSize: 18
  803. }
  804. },
  805. xAxis: [ {
  806. type: 'category',
  807. axisLine: {
  808. show: false
  809. },
  810. axisLabel: {
  811. color: '#fff',
  812. fontSize: 18
  813. // formatter: (value: number) => format( 1'时')
  814. },
  815. splitLine: {
  816. show: false
  817. },
  818. axisTick: {
  819. show: false
  820. },
  821. data: [ '1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时' ]
  822. } ],
  823. yAxis: [ {
  824. name: '人数/人',
  825. nameLocation: 'center',
  826. nameGap: 50,
  827. nameTextStyle: {
  828. color: '#fff',
  829. fontSize: 18
  830. },
  831. padding: 5,
  832. // max: 1000,
  833. splitLine: {
  834. show: true,
  835. lineStyle: {
  836. color: '#A1A7B3'
  837. // type: 'dashed'
  838. }
  839. },
  840. axisLine: {
  841. show: false
  842. },
  843. axisLabel: {
  844. show: true,
  845. margin: 10,
  846. textStyle: {
  847. color: '#fff'
  848. }
  849. },
  850. axisTick: {
  851. show: false
  852. }
  853. }
  854. ],
  855. series: [ {
  856. name: '当前',
  857. type: 'line',
  858. smooth: true,
  859. symbolSize: 0,
  860. itemStyle: {
  861. normal: {
  862. // color: '#4293FD',
  863. lineStyle: {
  864. // color: '#4293FD',
  865. width: 2
  866. }
  867. }
  868. },
  869. areaStyle: {
  870. normal: {
  871. color: new graphic.LinearGradient(0, 0, 0, 1, [
  872. {
  873. offset: 0,
  874. color: 'rgba(19, 95, 172, 0)'
  875. },
  876. {
  877. offset: 1,
  878. color: 'rgba(112, 154, 195, 0.4)'
  879. }
  880. ], false)
  881. }
  882. },
  883. data: [ 120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330 ]
  884. },
  885. {
  886. name: '环比',
  887. type: 'line',
  888. smooth: true,
  889. symbolSize: 0,
  890. itemStyle: {
  891. normal: {
  892. // color: '#23D0C4',
  893. lineStyle: {
  894. // color: '#23D0C4',
  895. width: 2
  896. }
  897. }
  898. },
  899. areaStyle: {
  900. normal: {
  901. color: new graphic.LinearGradient(0, 0, 0, 1, [
  902. {
  903. offset: 0,
  904. color: 'rgba(50, 216, 205, 0)'
  905. },
  906. {
  907. offset: 1,
  908. color: 'rgba(35, 208, 196, 0.4)'
  909. }
  910. ], false)
  911. }
  912. },
  913. data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
  914. },
  915. {
  916. name: '同比',
  917. type: 'line',
  918. smooth: true,
  919. symbolSize: 0,
  920. itemStyle: {
  921. normal: {
  922. // color: '#23D0C4',
  923. lineStyle: {
  924. // color: '#23D0C4',
  925. width: 2
  926. }
  927. }
  928. },
  929. areaStyle: {
  930. normal: {
  931. color: new graphic.LinearGradient(0, 0, 0, 1, [
  932. {
  933. offset: 0,
  934. color: 'rgba(50, 216, 205, 0)'
  935. },
  936. {
  937. offset: 1,
  938. color: 'rgba(35, 208, 196, 0.4)'
  939. }
  940. ], false)
  941. }
  942. },
  943. data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
  944. }
  945. ],
  946. dataZoom: {}
  947. },
  948. bottom: {
  949. grid: {
  950. containLabel: true,
  951. right: 30,
  952. left: 50
  953. },
  954. legend: {
  955. show: true,
  956. left: 'center',
  957. top: '10',
  958. icon: 'stack',
  959. itemWidth: 15,
  960. itemHeight: 10,
  961. textStyle: {
  962. color: '#646464',
  963. fontSize: 18
  964. }
  965. },
  966. xAxis: [ {
  967. type: 'category',
  968. axisLine: {
  969. show: false
  970. },
  971. axisLabel: {
  972. color: '#fff',
  973. fontSize: 18
  974. // formatter: (value: number) => format( 1'时')
  975. },
  976. splitLine: {
  977. show: false
  978. },
  979. axisTick: {
  980. show: false
  981. },
  982. data: [ '1时', '2时', '3时', '4时', '5时', '6时', '7时', '8时', '9时', '10时', '11时', '12时' ]
  983. } ],
  984. yAxis: [ {
  985. name: '人数/人',
  986. nameLocation: 'center',
  987. nameGap: 50,
  988. nameTextStyle: {
  989. color: '#fff',
  990. fontSize: 18
  991. },
  992. padding: 5,
  993. // max: 1000,
  994. splitLine: {
  995. show: true,
  996. lineStyle: {
  997. color: '#A1A7B3'
  998. // type: 'dashed'
  999. }
  1000. },
  1001. axisLine: {
  1002. show: false
  1003. },
  1004. axisLabel: {
  1005. show: true,
  1006. margin: 10,
  1007. textStyle: {
  1008. color: '#fff'
  1009. }
  1010. },
  1011. axisTick: {
  1012. show: false
  1013. }
  1014. }
  1015. ],
  1016. series: [ {
  1017. name: '当前',
  1018. type: 'line',
  1019. smooth: true,
  1020. symbolSize: 0,
  1021. itemStyle: {
  1022. normal: {
  1023. // color: '#4293FD',
  1024. lineStyle: {
  1025. // color: '#4293FD',
  1026. width: 2
  1027. }
  1028. }
  1029. },
  1030. areaStyle: {
  1031. normal: {
  1032. color: new graphic.LinearGradient(0, 0, 0, 1, [
  1033. {
  1034. offset: 0,
  1035. color: 'rgba(19, 95, 172, 0)'
  1036. },
  1037. {
  1038. offset: 1,
  1039. color: 'rgba(112, 154, 195, 0.4)'
  1040. }
  1041. ], false)
  1042. }
  1043. },
  1044. data: [ 120, 132, 101, 134, 90, 230, 210, 182, 191, 234, 290, 330 ]
  1045. },
  1046. {
  1047. name: '环比',
  1048. type: 'line',
  1049. smooth: true,
  1050. symbolSize: 0,
  1051. itemStyle: {
  1052. normal: {
  1053. // color: '#23D0C4',
  1054. lineStyle: {
  1055. // color: '#23D0C4',
  1056. width: 2
  1057. }
  1058. }
  1059. },
  1060. areaStyle: {
  1061. normal: {
  1062. color: new graphic.LinearGradient(0, 0, 0, 1, [
  1063. {
  1064. offset: 0,
  1065. color: 'rgba(50, 216, 205, 0)'
  1066. },
  1067. {
  1068. offset: 1,
  1069. color: 'rgba(35, 208, 196, 0.4)'
  1070. }
  1071. ], false)
  1072. }
  1073. },
  1074. data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
  1075. },
  1076. {
  1077. name: '同比',
  1078. type: 'line',
  1079. smooth: true,
  1080. symbolSize: 0,
  1081. itemStyle: {
  1082. normal: {
  1083. // color: '#23D0C4',
  1084. lineStyle: {
  1085. // color: '#23D0C4',
  1086. width: 2
  1087. }
  1088. }
  1089. },
  1090. areaStyle: {
  1091. normal: {
  1092. color: new graphic.LinearGradient(0, 0, 0, 1, [
  1093. {
  1094. offset: 0,
  1095. color: 'rgba(50, 216, 205, 0)'
  1096. },
  1097. {
  1098. offset: 1,
  1099. color: 'rgba(35, 208, 196, 0.4)'
  1100. }
  1101. ], false)
  1102. }
  1103. },
  1104. data: [ 220, 182, 191, 234, 290, 330, 310, 201, 154, 190, 330, 410 ]
  1105. }
  1106. ],
  1107. dataZoom: {}
  1108. }
  1109. })
  1110. </script>
  1111. <style lang="scss" scoped>
  1112. .left {
  1113. &-top {
  1114. :deep(.box-content) {
  1115. display: flex;
  1116. justify-content: space-between;
  1117. }
  1118. }
  1119. &-bottom {
  1120. display: flex;
  1121. justify-content: space-between;
  1122. flex-wrap: wrap;
  1123. gap: 10px;
  1124. :deep(.box-content) {
  1125. position: relative;
  1126. }
  1127. .lineList {
  1128. padding: 25px;
  1129. display: flex;
  1130. flex-wrap: wrap;
  1131. gap: 15px;
  1132. height: 335px;
  1133. overflow: scroll;
  1134. .line {
  1135. width: 100%;
  1136. display: flex;
  1137. align-items: center;
  1138. font-size: 24px;
  1139. color: #fff;
  1140. .index {
  1141. width: 45px;
  1142. height: 45px;
  1143. line-height: 45px;
  1144. text-align: center;
  1145. border-radius: 50%;
  1146. border: 1px solid #00FFFF;
  1147. background-color: rgba(0, 191, 191, 0.3);
  1148. &.index0 {
  1149. border: 1px solid #FFFF00;
  1150. background-color: rgba(255, 255, 0, 0.3);
  1151. }
  1152. &.index1 {
  1153. border: 1px solid #F2F2F2;
  1154. background: rgba(242, 242, 242, 0.298);
  1155. }
  1156. &.index2 {
  1157. border: 1px solid #FAAD0E;
  1158. background: rgba(250, 173, 14, 0.298);
  1159. }
  1160. }
  1161. .name {
  1162. margin: 0 50px 0 15px;
  1163. text-shadow: 1px 1px 5px rgba(0, 255, 255, 0.8);
  1164. }
  1165. .content {
  1166. color: #80FFFF;
  1167. font-size: 20px;
  1168. }
  1169. }
  1170. }
  1171. }
  1172. }
  1173. .right {
  1174. &-top {
  1175. display: flex;
  1176. gap: 10px;
  1177. // justify-content: space-between;
  1178. }
  1179. }
  1180. </style>