index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729
  1. <template>
  2. <div v-drag="{ draggable: true, scale: containerScale, handle: '.rankIcon' }" class="time-axis-container">
  3. <div class="expand-btn" @click="changeExpand">{{ timeAxisState.expand ? '收起' : '展开' }}</div>
  4. <div v-show="timeAxisState.expand" class="time-box">
  5. <div class="time-picker-box">
  6. <el-date-picker
  7. v-model="timeAxisState.startTime"
  8. type="datetime"
  9. :editable="false"
  10. :format="timeAxisState.format"
  11. :value-format="timeAxisState.format"
  12. :clearable="false"
  13. />
  14. <el-date-picker
  15. v-model="timeAxisState.endTime"
  16. type="datetime"
  17. :editable="false"
  18. :format="timeAxisState.format"
  19. :value-format="timeAxisState.format"
  20. :clearable="false"
  21. />
  22. </div>
  23. <div class="time-list-box">
  24. <el-timeline>
  25. <el-timeline-item
  26. v-for="(activity, index) in timeAxisState.data"
  27. :key="index"
  28. :ref="(el) => (timelineItems[index] = el)"
  29. :class="timeAxisState.activeIndex === index ? 'active' : ''"
  30. :timestamp="activity.time"
  31. />
  32. </el-timeline>
  33. </div>
  34. <div class="time-tool">
  35. <div class="prevIcon" @click="toPrevTime" />
  36. <div class="playIcon" @click="toPlayTime" />
  37. <div class="nextIcon" @click="toNextTime(true)" />
  38. <div class="speed-btn" @click="changeSpeed">{{ timeAxisState.speed === 2 ? 'x1' : 'x2' }}</div>
  39. <div class="rankIcon" />
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script lang="ts" setup name="TimeAxis">
  45. import { parseTime } from '@/utils/ruoyi';
  46. import carImg from '@/assets/images/car.png';
  47. import VectorSource from 'ol/source/Vector';
  48. import Feature from 'ol/Feature';
  49. import Point from 'ol/geom/Point';
  50. import Icon from 'ol/style/Icon';
  51. import Style from 'ol/style/Style';
  52. import { LineString } from 'ol/geom';
  53. import VectorLayer from 'ol/layer/Vector';
  54. import { Stroke } from 'ol/style';
  55. import arrowImg from '@/assets/images/arrow.png';
  56. const props = defineProps({
  57. activeMap: String
  58. });
  59. const containerScale = inject('containerScale');
  60. const getMapUtils = inject('getMapUtils');
  61. const AMapType = ['vectorgraph', 'satellite'];
  62. let mapUtils, map, AMap;
  63. // 轨迹数据
  64. let moveMarker, movePassedPolyline, movePolyline;
  65. let isNewMarkerPause = false;
  66. let trackPathArr = [];
  67. const timelineItems = ref([]);
  68. const timeAxisState = reactive({
  69. expand: false,
  70. type: '',
  71. format: 'YYYY-MM-DD HH:mm',
  72. startTime: '',
  73. endTime: '',
  74. activeIndex: -1,
  75. playing: false,
  76. show: false,
  77. showDialog: false,
  78. speed: 2,
  79. data: []
  80. });
  81. let originalData = [];
  82. // 展开收起
  83. const changeExpand = () => {
  84. timeAxisState.expand = !timeAxisState.expand;
  85. };
  86. // 设置初始时间
  87. const getInitTime = () => {
  88. // 获取当前时间
  89. const now = new Date();
  90. timeAxisState.endTime = parseTime(now.getTime(), '{y}-{m}-{d} {h}:{i}');
  91. // 计算12小时前的时间
  92. now.setHours(now.getHours() - 12);
  93. timeAxisState.startTime = parseTime(now.getTime(), '{y}-{m}-{d} {h}:{i}');
  94. };
  95. // 返回上一个时间点
  96. const toPrevTime = () => {
  97. if (timeAxisState.type === 'track') {
  98. prevPauseTime();
  99. }
  100. };
  101. // 播放
  102. const toPlayTime = () => {
  103. timeAxisState.playing = !timeAxisState.playing;
  104. if (timeAxisState.type === 'track') {
  105. playOrPauseTrack();
  106. }
  107. };
  108. // 前往下一个时间点
  109. const toNextTime = (flag?: boolean) => {
  110. if (timeAxisState.type === 'track') {
  111. nextPauseTime();
  112. }
  113. };
  114. // 更换倍速
  115. const changeSpeed = () => {
  116. timeAxisState.speed = timeAxisState.speed === 1 ? 2 : 1;
  117. };
  118. // 外部数据传入,开始播放
  119. const initDataToPlay = (obj) => {
  120. timeAxisState.type = obj.type;
  121. originalData = obj.data;
  122. timeAxisState.data = obj.data;
  123. trackPathArr = [];
  124. timeAxisState.data.forEach((item) => {
  125. trackPathArr.push(item.lnglat);
  126. });
  127. // 路线轨迹
  128. if (timeAxisState.type === 'track') {
  129. mapUtils = getMapUtils();
  130. map = mapUtils?.getMap();
  131. if (AMapType.includes(props.activeMap)) {
  132. AMap = mapUtils?.getAMap();
  133. trackPlayback1();
  134. } else {
  135. trackPlayback2();
  136. }
  137. }
  138. };
  139. // 高德地图轨迹
  140. const trackPlayback1 = () => {
  141. clearObj();
  142. // 绘制轨迹
  143. movePolyline = new AMap.Polyline({
  144. map: map,
  145. path: trackPathArr,
  146. showDir: true,
  147. strokeColor: '#28F', //线颜色
  148. // strokeOpacity: 1, //线透明度
  149. strokeWeight: 6, //线宽
  150. // strokeStyle: "solid" //线样式
  151. });
  152. movePassedPolyline = new AMap.Polyline({
  153. map: map,
  154. strokeColor: '#AF5', //线颜色
  155. strokeWeight: 6 //线宽
  156. });
  157. startPlay();
  158. };
  159. let carLayer, carFeature, traceFeature, traceFeature2;
  160. let lastTime;
  161. let distance = 0;
  162. let animationFlag = false;
  163. let route,
  164. lastRoute = [];
  165. let first = 0;
  166. const trackPlayback2 = () => {
  167. if (!!carLayer) {
  168. clearObj();
  169. } else {
  170. const source = new VectorSource();
  171. carLayer = new VectorLayer({
  172. source: source
  173. });
  174. map.addLayer(carLayer);
  175. }
  176. const angle = getAngle(trackPathArr[0], trackPathArr[1]);
  177. lastTime = Date.now();
  178. carFeature = new Feature({
  179. geometry: new Point(trackPathArr[0]),
  180. zIndex: 999
  181. });
  182. const icon = new Icon({
  183. crossOrigin: 'anonymous',
  184. src: carImg,
  185. width: 13,
  186. height: 26,
  187. anchor: [0.5, 0.5],
  188. rotation: angle
  189. });
  190. carFeature.setStyle(
  191. new Style({
  192. image: icon
  193. })
  194. );
  195. route = new Feature({
  196. geometry: new LineString(trackPathArr[0])
  197. });
  198. traceFeature = new Feature({
  199. geometry: new LineString(trackPathArr),
  200. zIndex: 8
  201. });
  202. traceFeature.setStyle(arrowStyleFunction);
  203. traceFeature2 = new Feature({
  204. geometry: new LineString(trackPathArr[0]),
  205. zIndex: 9
  206. });
  207. lastRoute = [trackPathArr[0]];
  208. traceFeature2.setStyle(
  209. new Style({
  210. stroke: new Stroke({
  211. color: '#AF5',
  212. width: 6
  213. })
  214. })
  215. );
  216. carLayer.getSource().addFeatures([carFeature, traceFeature, traceFeature2]);
  217. carLayer.on('postrender', move);
  218. timeAxisState.activeIndex = 0;
  219. timeAxisState.playing = true;
  220. // 触发地图渲染
  221. const geo = carFeature.getGeometry().clone();
  222. carFeature.setGeometry(geo);
  223. };
  224. const move = (e) => {
  225. if (!timeAxisState.playing) return;
  226. const time = e.frameState.time;
  227. // 时间戳差(毫秒)
  228. const elapsedTime = time - lastTime;
  229. // 距离(其实是比例的概念)
  230. distance = distance + ((timeAxisState.speed === 2 ? 1 : 2) * 200 * elapsedTime) / 1e6;
  231. if (distance >= 1) {
  232. if (timeAxisState.activeIndex < trackPathArr.length - 1) {
  233. // 一段走完后
  234. lastRoute.push(traceFeature2.getGeometry().getCoordinates());
  235. console.log(lastRoute);
  236. timeAxisState.activeIndex += 1;
  237. distance = 0;
  238. } else if (first === 0) {
  239. // 所有走完后有时会0.9->1.2导致路没走完
  240. first = 1;
  241. distance = 1;
  242. } else {
  243. first = 0;
  244. distance = 0;
  245. animationFlag = false;
  246. stopAnimation();
  247. return;
  248. }
  249. }
  250. const arr = trackPathArr.slice(timeAxisState.activeIndex, timeAxisState.activeIndex + 2);
  251. route = new Feature({
  252. geometry: new LineString(arr)
  253. });
  254. // 保存当前时间
  255. lastTime = time;
  256. // 上次坐标
  257. const lastCoord = carFeature.getGeometry().getCoordinates();
  258. // 获取新位置的坐标点
  259. let curCoord = route.getGeometry().getCoordinateAt(distance);
  260. if (isNaNCoord(curCoord)) {
  261. curCoord = trackPathArr[0];
  262. }
  263. // 设置新坐标
  264. carFeature.getGeometry().setCoordinates(curCoord);
  265. // 获取当前轨迹坐标数组
  266. const currentCoords = traceFeature2.getGeometry().getCoordinates();
  267. currentCoords.push(curCoord);
  268. traceFeature2.getGeometry().setCoordinates(currentCoords);
  269. map.getView().setCenter(curCoord);
  270. // 设置角度
  271. carFeature.getStyle().getImage().setRotation(getAngle(lastCoord, curCoord));
  272. // 调用地图渲染
  273. map.render();
  274. };
  275. const isNaNCoord = (coord) => {
  276. return JSON.stringify(coord) === '[null,null]'; // NaN 在 JSON.stringify 中会被转换为 null
  277. };
  278. const stopAnimation = () => {
  279. if (carLayer) {
  280. carLayer.un('postrender', move);
  281. }
  282. };
  283. const getAngle = (point1, point2) => {
  284. // 处理无效输入或非数组情况
  285. if (!point1 || !point2 || !point1.length || !point2.length) {
  286. return 0;
  287. }
  288. const dx = point2[0] - point1[0];
  289. const dy = point2[1] - point1[1];
  290. // 处理两点相同的情况
  291. if (dx === 0 && dy === 0) {
  292. return 0;
  293. }
  294. // 使用 Math.atan2 计算角度,并确保结果在 0 到 2π 之间
  295. let angle = Math.atan2(dx, dy);
  296. if (angle < 0) {
  297. angle += 2 * Math.PI;
  298. }
  299. return angle;
  300. };
  301. // 箭头样式生成函数
  302. const arrowStyleFunction = (feature, resolution) => {
  303. const geometry = feature.getGeometry();
  304. const styles = [
  305. // 基础线样式
  306. new Style({
  307. stroke: new Stroke({
  308. color: '#2196F3',
  309. width: 6
  310. })
  311. })
  312. ];
  313. // 计算箭头间隔(每50像素一个箭头)
  314. const length = geometry.getLength();
  315. const pixelInterval = 50;
  316. const geoInterval = pixelInterval * resolution;
  317. const arrowCount = Math.floor(length / geoInterval);
  318. // 生成箭头样式
  319. for (let i = 0; i <= arrowCount; i++) {
  320. const ratio = i / arrowCount;
  321. const coord = geometry.getCoordinateAt(ratio);
  322. // 获取线段方向
  323. const prevCoord = geometry.getCoordinateAt(Math.max(0, ratio - 0.001));
  324. const dx = coord[0] - prevCoord[0];
  325. const dy = coord[1] - prevCoord[1];
  326. const rotation = Math.atan2(dy, dx);
  327. // styles.push(
  328. // new Style({
  329. // geometry: new Point(coord),
  330. // image: new Icon({
  331. // src: arrowImg, // 替换为实际箭头图标路径
  332. // anchor: [0.75, 0.5], // 图标锚点
  333. // rotateWithView: true, // 随地图旋转
  334. // rotation: -rotation, // 方向校准
  335. // scale: 0.05
  336. // }),
  337. // zIndex: 10
  338. // })
  339. // );
  340. }
  341. return styles;
  342. };
  343. // 创建新标点 moveTo调用第二次不生效,重新生成marker
  344. const createMarker = () => {
  345. if (moveMarker) {
  346. // 不停止remove还是有
  347. moveMarker.stopMove();
  348. moveMarker.remove();
  349. }
  350. const icon = new AMap.Icon({
  351. size: new AMap.Size(13, 26),
  352. image: carImg
  353. });
  354. moveMarker = new AMap.Marker({
  355. map: map,
  356. position: trackPathArr[timeAxisState.activeIndex],
  357. icon: icon,
  358. anchor: 'center'
  359. });
  360. moveMarker.on('moving', (e) => {
  361. // 更新已通过路径
  362. const position = e.target.getPosition();
  363. const position2 = trackPathArr.slice(0, timeAxisState.activeIndex);
  364. position2.push(position);
  365. movePassedPolyline.setPath(position2);
  366. map.setCenter(position, true);
  367. });
  368. // 监听移动结束事件,继续播放
  369. moveMarker.on('moveend', () => {
  370. if (timeAxisState.playing) {
  371. createMarker();
  372. playNextNode();
  373. }
  374. });
  375. };
  376. // 轨迹 开始/暂停
  377. const playOrPauseTrack = () => {
  378. if (AMapType.includes(props.activeMap)) {
  379. if (timeAxisState.playing) {
  380. if (timeAxisState.activeIndex >= timeAxisState.data.length - 1) {
  381. // 重新播放
  382. timeAxisState.activeIndex = 0;
  383. timeAxisState.playing = true;
  384. createMarker();
  385. movePassedPolyline.setPath([]);
  386. nextTick(() => {
  387. playNextNode();
  388. });
  389. } else if (isNewMarkerPause) {
  390. playNextNode();
  391. } else {
  392. moveMarker.resumeMove();
  393. }
  394. } else {
  395. moveMarker.pauseMove();
  396. }
  397. isNewMarkerPause = false;
  398. } else {
  399. if (!!timeAxisState.playing) {
  400. lastTime = Date.now();
  401. // 触发地图渲染
  402. const geo = carFeature.getGeometry().clone();
  403. carFeature.setGeometry(geo);
  404. }
  405. }
  406. };
  407. // 轨迹开始播放
  408. const startPlay = () => {
  409. timeAxisState.activeIndex = 0;
  410. createMarker();
  411. timeAxisState.playing = true;
  412. playNextNode();
  413. };
  414. // 轨迹 上一步
  415. const prevPauseTime = () => {
  416. if (timeAxisState.activeIndex <= 0) return;
  417. // 更新索引
  418. timeAxisState.playing = false;
  419. timeAxisState.activeIndex -= 1;
  420. if (AMapType.includes(props.activeMap)) {
  421. moveMarker.stopMove();
  422. createMarker();
  423. movePassedPolyline.setPath(trackPathArr.slice(0, timeAxisState.activeIndex + 1));
  424. isNewMarkerPause = true;
  425. } else {
  426. // 设置新坐标
  427. const curCoord = trackPathArr[timeAxisState.activeIndex];
  428. carFeature.getGeometry().setCoordinates(curCoord);
  429. // 获取当前轨迹坐标数组
  430. const currentCoords = lastRoute[timeAxisState.activeIndex];
  431. lastRoute = lastRoute.slice(0, timeAxisState.activeIndex + 1);
  432. traceFeature2.getGeometry().setCoordinates(currentCoords);
  433. map.getView().setCenter(curCoord);
  434. }
  435. };
  436. const nextPauseTime = () => {
  437. if (timeAxisState.activeIndex <= 0) return;
  438. // 更新索引
  439. timeAxisState.playing = false;
  440. timeAxisState.activeIndex += 1;
  441. if (AMapType.includes(props.activeMap)) {
  442. createMarker();
  443. movePassedPolyline.setPath(trackPathArr.slice(0, timeAxisState.activeIndex + 1));
  444. isNewMarkerPause = true;
  445. } else {
  446. // 设置新坐标
  447. const curCoord = trackPathArr[timeAxisState.activeIndex];
  448. carFeature.getGeometry().setCoordinates(curCoord);
  449. // 获取当前轨迹坐标数组
  450. const currentCoords = lastRoute[lastRoute.length - 1].concat([curCoord]);
  451. lastRoute.push(currentCoords);
  452. traceFeature2.getGeometry().setCoordinates(currentCoords);
  453. map.getView().setCenter(curCoord);
  454. }
  455. };
  456. // 轨迹播放下一个节点
  457. const playNextNode = () => {
  458. if (timeAxisState.activeIndex >= timeAxisState.data.length - 1) {
  459. timeAxisState.playing = false;
  460. return;
  461. }
  462. // 更新索引
  463. timeAxisState.activeIndex += 1;
  464. // 移动到目标节点
  465. moveMarker.moveTo(trackPathArr[timeAxisState.activeIndex], {
  466. duration: timeAxisState.speed === 1 ? 2000 : 1000
  467. });
  468. };
  469. // 滚动到可见到当前点位置
  470. watch(
  471. () => timeAxisState.activeIndex,
  472. (index) => {
  473. nextTick(() => {
  474. const itemRef = timelineItems.value[index];
  475. if (itemRef) {
  476. const itemEl = itemRef.$el;
  477. console.log(itemEl);
  478. itemEl.scrollIntoView({
  479. behavior: 'smooth'
  480. });
  481. }
  482. });
  483. }
  484. );
  485. // 清除元素
  486. const clearObj = () => {
  487. if (AMapType.includes(props.activeMap)) {
  488. if (moveMarker) {
  489. // 不停止remove还是有
  490. moveMarker.stopMove();
  491. moveMarker.remove();
  492. }
  493. movePolyline?.remove();
  494. movePassedPolyline?.remove();
  495. } else {
  496. if (!!carFeature) {
  497. carLayer.getSource().removeFeature(carFeature);
  498. }
  499. if (!!traceFeature) {
  500. carLayer.getSource().removeFeature(traceFeature);
  501. }
  502. if (!!traceFeature2) {
  503. carLayer.getSource().removeFeature(traceFeature2);
  504. }
  505. }
  506. };
  507. onMounted(() => {
  508. getInitTime();
  509. });
  510. onUnmounted(() => {
  511. clearObj();
  512. });
  513. defineExpose({ initDataToPlay });
  514. </script>
  515. <style lang="scss" scoped>
  516. .time-axis-container {
  517. position: absolute;
  518. bottom: 40px;
  519. left: 10px;
  520. z-index: 2;
  521. color: #fff;
  522. font-size: 14px;
  523. height: 40px;
  524. display: flex;
  525. &::before {
  526. content: '';
  527. position: absolute;
  528. top: 50%;
  529. left: -6px;
  530. transform: translateY(-50%);
  531. width: 3px;
  532. height: 45px;
  533. background: url('@/assets/images/timeAxis/timeLeft.png') no-repeat;
  534. background-size: 100% 100%;
  535. }
  536. &::after {
  537. content: '';
  538. position: absolute;
  539. top: 50%;
  540. right: -6px;
  541. transform: translateY(-50%);
  542. width: 3px;
  543. height: 45px;
  544. background: url('@/assets/images/timeAxis/timeRight.png') no-repeat;
  545. background-size: 100% 100%;
  546. }
  547. .expand-btn {
  548. width: 18px;
  549. height: 40px;
  550. background: url('@/assets/images/timeAxis/timeBtn.png') no-repeat;
  551. background-size: 100% 100%;
  552. display: flex;
  553. justify-content: center;
  554. align-items: center;
  555. padding: 0 16px;
  556. cursor: pointer;
  557. font-size: 12px;
  558. }
  559. .time-box {
  560. width: 668px;
  561. height: 47px;
  562. background: url('@/assets/images/timeAxis/timeAxis.png') no-repeat;
  563. background-size: 100% 100%;
  564. display: flex;
  565. }
  566. .time-picker-box {
  567. width: 100px;
  568. display: flex;
  569. justify-content: center;
  570. align-items: center;
  571. flex-direction: column;
  572. :deep(.el-date-editor.el-input) {
  573. width: 100px;
  574. height: 18px;
  575. font-size: 12px;
  576. &:first-child {
  577. margin-top: -7px;
  578. }
  579. }
  580. :deep(.el-input__wrapper) {
  581. background-color: transparent;
  582. border: unset;
  583. box-shadow: unset;
  584. padding: 0 2px;
  585. }
  586. :deep(.el-input__inner) {
  587. color: #b5dbfc;
  588. cursor: pointer;
  589. }
  590. :deep(.el-input__prefix) {
  591. display: none;
  592. }
  593. }
  594. .time-list-box {
  595. flex: 1;
  596. display: flex;
  597. align-items: flex-end;
  598. overflow-x: auto;
  599. overflow-y: hidden;
  600. padding: 0 8px;
  601. -webkit-overflow-scrolling: touch; /* 在移动设备上启用平滑滚动 */
  602. scrollbar-width: none; /* Firefox */
  603. -ms-overflow-style: none; /* Internet Explorer 10+ */
  604. &::-webkit-scrollbar {
  605. display: none; /* Chrome, Safari 和基于 WebKit 的浏览器 */
  606. }
  607. .active {
  608. :deep(.el-timeline-item__node) {
  609. background-color: #ff0000;
  610. box-shadow: 0 0 4px 4px #f68686;
  611. }
  612. }
  613. :deep(.el-timeline) {
  614. display: flex;
  615. align-items: center;
  616. width: 100%;
  617. height: 100%;
  618. padding-left: 5px;
  619. padding-top: 12px;
  620. }
  621. :deep(.el-timeline-item__tail) {
  622. height: 5px;
  623. //background-color: #1f54b6;
  624. background-image: linear-gradient(to bottom, #1064d6 10%, #1876be 50%, #1064d6 90%);
  625. width: 100%;
  626. position: absolute;
  627. top: 3px;
  628. }
  629. :deep(.el-timeline-item__wrapper) {
  630. top: 10px;
  631. left: -11px;
  632. padding-left: 0;
  633. }
  634. :deep(.el-timeline-item__timestamp) {
  635. font-size: 12px;
  636. color: #ffffff;
  637. font-family: 'PingFang SC', sans-serif;
  638. margin-top: 5px;
  639. }
  640. :deep(.el-timeline-item__node) {
  641. background-color: #ffffff;
  642. box-shadow: 0 0 4px 4px #569eff;
  643. width: 5px !important;
  644. height: 5px !important;
  645. top: 3px;
  646. left: 3px;
  647. }
  648. :deep(.el-timeline-item) {
  649. width: 46px;
  650. min-width: 46px;
  651. }
  652. }
  653. .time-tool {
  654. width: 120px;
  655. display: flex;
  656. align-items: center;
  657. padding: 0 5px;
  658. .speed-btn {
  659. margin-right: 5px;
  660. color: #ffffff;
  661. cursor: pointer;
  662. font-size: 12px;
  663. padding-bottom: 6px;
  664. font-family: 'PingFang SC', sans-serif;
  665. }
  666. .prevIcon {
  667. width: 18px;
  668. height: 20px;
  669. background: url('@/assets/images/timeAxis/prev.png') no-repeat;
  670. background-size: 100% 100%;
  671. cursor: pointer;
  672. }
  673. .playIcon {
  674. width: 32px;
  675. height: 32px;
  676. background: url('@/assets/images/timeAxis/play.png') no-repeat;
  677. background-size: 100% 100%;
  678. cursor: pointer;
  679. }
  680. .nextIcon {
  681. width: 18px;
  682. height: 20px;
  683. background: url('@/assets/images/timeAxis/next.png') no-repeat;
  684. background-size: 100% 100%;
  685. cursor: pointer;
  686. }
  687. .rankIcon {
  688. width: 20px;
  689. height: 20px;
  690. background: url('@/assets/images/timeAxis/rank.png') no-repeat;
  691. background-size: 100% 100%;
  692. cursor: pointer;
  693. margin-left: 17px;
  694. }
  695. }
  696. }
  697. </style>