mapTest.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735
  1. <template>
  2. <div class="container">
  3. <div id="amap-container"></div>
  4. <div class="mapcontroller">
  5. <div class="in_transit_information">
  6. <label class="item_details">起点:{{startPointName}}</label>
  7. <br/>
  8. <label class="item_details">收货地址:{{endPointName}}</label>
  9. <br/>
  10. </div>
  11. <div class="driving_information2">
  12. <label class="item_details">时间:{{runRoute.gtm}}</label>
  13. <br/>
  14. <label class="item_details">车速:{{runRoute.spd}}千米/小时</label>
  15. <br/>
  16. <br/>
  17. <!--控制条-->
  18. <div class="map-control" v-show="isActual">
  19. <!--播放暂停按钮-->
  20. <Icon v-if="!isPlay" class="play-icon play" type="ios-play" @click="isPlay=true;play();navgControl(playIcon)"/>
  21. <Icon v-else class="play-icon pause" type="ios-pause" @click="isPlay=false;stop();navgControl('pause')"/>
  22. <Icon class="play-icon quickly" type="ios-play" @click="addIndex()"/>
  23. <!--已播放时间-->
  24. <!--进度条-->
  25. <div class="mySlider"><Slider class="map-slider" v-model="sliderVal" :tip-format="hideFormat" :step="0.0001"></Slider></div>
  26. </div>
  27. </div>
  28. </div>
  29. <el-row>
  30. <el-button type="primary" @click="slow">慢速</el-button>
  31. <el-button type="success" @click="middle">中速</el-button>
  32. <el-button type="danger" @click="fast">快速</el-button>
  33. <el-button type="success" @click="addIndex" plain>快进</el-button>
  34. <el-button type="danger" @click="stop" plain>暂停</el-button>
  35. <el-button type="success" @click="play" plain>开始</el-button>
  36. <el-select style="width:100px" @change="changeParkingTime" v-model="parkingTime" placeholder="停车" >
  37. <el-option v-for="item in parkingOptions" :key="item.value" :label="item.label" :value="item.value" >
  38. </el-option>
  39. </el-select>
  40. <el-select style="width:100px" @change="changeLeaveTime" v-model="leaveTime" placeholder="离线" >
  41. <el-option v-for="item in parkingOptions" :key="item.value" :label="item.label" :value="item.value" >
  42. </el-option>
  43. </el-select>
  44. </el-row>
  45. </div>
  46. </template>
  47. <script>
  48. import AMapLoader from '@amap/amap-jsapi-loader';
  49. import { shallowRef } from '@vue/reactivity'
  50. import { Loading } from 'element-ui';
  51. import { lazyAMapApiLoaderInstance } from 'vue-amap';
  52. import Slider from './slider.vue'
  53. Vue.use(Slider)
  54. import AMapJS from "amap-js";
  55. import Vue from 'vue';
  56. export default {
  57. name: "PathView",
  58. props:{
  59. orderNumber:'',
  60. capacityNumber:'',
  61. startPointName:'',
  62. endPointName:'',
  63. startTime:'',
  64. endTime:'',
  65. },
  66. setup(){
  67. const map = shallowRef(null);
  68. return{
  69. map,
  70. }
  71. },
  72. watch:{
  73. //监听车牌号变化
  74. orderNumber:{
  75. deep: true,
  76. handler(val, oldVal) {
  77. console.log(val)
  78. this.initData(val);
  79. }
  80. }
  81. },
  82. data() {
  83. return {
  84. ///che
  85. isTimesChoose:false,
  86. isActual:true,
  87. isPlay:false,
  88. passedTime:"12:02:10",
  89. sliderVal:0,
  90. times:1,
  91. totalTime:"11",
  92. speed:10000,
  93. //选择停车时长
  94. parkingTime: null,
  95. //停车时长选择区间
  96. parkingOptions: [
  97. {
  98. value: 600000,
  99. label: "10分钟"
  100. },
  101. {
  102. value: 1200000,
  103. label: "20分钟"
  104. },
  105. {
  106. value: 1800000,
  107. label: "30分钟"
  108. },
  109. {
  110. value: 2400000,
  111. label: "40分钟"
  112. },
  113. {
  114. value: 3000000,
  115. label: "50分钟"
  116. },
  117. {
  118. value: 3600000,
  119. label: "60分钟"
  120. },
  121. {
  122. value: 36000000,
  123. label: "关闭"
  124. }
  125. ],
  126. //离线图标
  127. leaveMark: [],
  128. //停车图标
  129. parkMark: [],
  130. //选择离线时长
  131. leaveTime: null,
  132. //离线时长选择区间
  133. leaveOptions: [
  134. {
  135. value: 600000,
  136. label: "10分钟"
  137. },
  138. {
  139. value: 1200000,
  140. label: "20分钟"
  141. },
  142. {
  143. value: 1800000,
  144. label: "30分钟"
  145. },
  146. {
  147. value: 2400000,
  148. label: "40分钟"
  149. },
  150. {
  151. value: 3000000,
  152. label: "50分钟"
  153. },
  154. {
  155. value: 3600000,
  156. label: "60分钟"
  157. },
  158. {
  159. value: 36000000,
  160. label: "关闭"
  161. }
  162. ],
  163. //已行驶轨迹
  164. runRoute:
  165. {
  166. agl: "",
  167. gtm: "",
  168. hgt: "",
  169. lat: "",
  170. lon: "",
  171. mil: "",
  172. spd: ""
  173. },
  174. point:"",
  175. pointNext:"",
  176. loading : null,
  177. navgtrSpeed:1,
  178. //地图中心位置
  179. centerPoint:{
  180. pointLat:"",
  181. pointLon:""
  182. },
  183. //自定义窗体信息
  184. ctmarkes:{
  185. lat:"33.015888071433764",
  186. lon : "115.96995235868168",
  187. title:"豫SE8888",
  188. details:"安徽省阜阳市颍东区阜阳舜岳水泥公司,西北方向,155.1米"
  189. },
  190. //运输详情
  191. transportDetail:{
  192. //车牌号
  193. capacityNumber:'',
  194. //规划路线
  195. estimateRoute:[
  196. {
  197. lat:"33.015888071433764",
  198. lon : "115.96995235868168"
  199. }
  200. ],
  201. //规划线路
  202. estimatePath:[
  203. [
  204. 114.03046212985384,
  205. 32.49786984660489
  206. ],
  207. ],
  208. //已行驶轨迹
  209. runRoute:[
  210. {
  211. agl: "44",
  212. gtm: "2022年03月09日 16:47:24",
  213. hgt: "13",
  214. lat: "32.906411535084985",
  215. lon: "115.76177868692135",
  216. mil: "429409.2",
  217. spd: "17.0"
  218. },
  219. ],
  220. runPath: [
  221. [
  222. 114.03922119568348,
  223. 32.49746162481379
  224. ],
  225. ],
  226. //当前位置
  227. currentPointName:"中国达州市通川区",
  228. //当前位置经纬度
  229. currentPoint:{
  230. lat:"",
  231. lon:""
  232. },
  233. //起点位置
  234. startPointName:"中国达州市通川区",
  235. //起点位置经纬度
  236. startPoint:{
  237. lon:"114.03922119568348",
  238. lat:"32.49746162481379"
  239. },
  240. //终点位置
  241. endPointName:"中国成都萧山",
  242. //终点位置经纬度
  243. endPoint:{
  244. lon:"115.96995737755431",
  245. lat:"33.01595479752097"
  246. },
  247. //自定义标记
  248. content:[],
  249. //异常位置
  250. abnormalLocation:[],
  251. },
  252. listPath:[
  253. ],
  254. //组件
  255. pathSimplifierIns:{},
  256. pathNavigator:{},
  257. //地图解析
  258. geocoder:null,
  259. currentPointName:""
  260. };
  261. },
  262. created(){
  263. let that=this;
  264. that.initData(that.orderNumber)
  265. },
  266. mounted() {
  267. },
  268. methods: {
  269. //停车时间改变
  270. changeParkingTime() {
  271. let that = this;
  272. //清除之前的停车点
  273. that.hideParkingMark();
  274. //计算时间的点
  275. let calculationPoint = null;
  276. that.listPath[0].runRoute.forEach(function(item, indexOf) {
  277. if (indexOf + 1 < that.listPath[0].runRoute.length) {
  278. //判断calculationPoint是否为空,如果是空的说明当前没有在计算停车时间
  279. if (calculationPoint == null && item.spd == "0.0") {
  280. calculationPoint = item;
  281. } else if (calculationPoint != null && item.spd != "0.0") {
  282. let beforeTime = that.stringToDate(calculationPoint.gtm);
  283. let item2 = that.listPath[0].runRoute[indexOf];
  284. let afterTime = that.stringToDate(item2.gtm);
  285. let second = afterTime - beforeTime;
  286. if (second > that.parkingTime) {
  287. let message = "停车:" + second / 60000;
  288. that.initParkingMarkes(
  289. 20,
  290. 35,
  291. require("@/assets/img/park.png"),
  292. calculationPoint.lon,
  293. calculationPoint.lat,
  294. message.split(".")[0] + "分钟"
  295. );
  296. }
  297. calculationPoint = null;
  298. }
  299. }
  300. });
  301. },
  302. //字符串转为Date
  303. stringToDate(dateString) {
  304. console.log(dateString)
  305. let dateStr = dateString.replace("年", "-").replace("月", "-").replace("日", "");
  306. return Date.parse(dateStr);
  307. },
  308. //停车所有离线图标
  309. hideParkingMark() {
  310. let that = this;
  311. that.parkMark.forEach(function(item, indexOf) {
  312. item.hide();
  313. });
  314. },
  315. //离线时间改变时获得超过时间的点信息
  316. changeLeaveTime() {
  317. let that = this;
  318. //关闭所有图标
  319. that.hideLeaveMark();
  320. that.listPath[0].runRoute.forEach(function(item, indexOf) {
  321. if (indexOf + 1 < that.listPath[0].runRoute.length) {
  322. let beforeTime = that.stringToDate(item.gtm);
  323. let item2 = that.listPath[0].runRoute[indexOf + 1];
  324. let afterTime = that.stringToDate(item2.gtm);
  325. let second = afterTime - beforeTime;
  326. if (second > that.leaveTime) {
  327. let message = "离线:" + second / 60000;
  328. that.initLeaveMarkes(
  329. 20,
  330. 35,
  331. require("@/assets/img/leave.png"),
  332. item2.lon,
  333. item2.lat,
  334. message.split(".")[0] + "分钟"
  335. );
  336. }
  337. }
  338. });
  339. },
  340. //关闭所有离线图标
  341. hideLeaveMark() {
  342. let that = this;
  343. that.leaveMark.forEach(function(item, indexOf) {
  344. item.hide();
  345. });
  346. },
  347. slow(){
  348. console.log("slow")
  349. let that=this;
  350. that.pathNavigator.setSpeed(1000);
  351. },
  352. middle(){
  353. console.log("middle")
  354. let that=this;
  355. that.pathNavigator.setSpeed(10000);
  356. },
  357. fast(){
  358. console.log("fast")
  359. let that=this;
  360. that.pathNavigator.setSpeed(100000);
  361. },
  362. play(){
  363. let that =this;
  364. that.pathNavigator.resume();
  365. },
  366. stop(){
  367. let that =this;
  368. that.pathNavigator.pause();
  369. },
  370. addIndex(){
  371. let that =this;
  372. let increment=(that.listPath[0].runPath.length*0.1)
  373. that.pathNavigator.start(((that.point+increment)%that.listPath[0].runPath.length))
  374. },
  375. ///che
  376. navgControl(){
  377. },
  378. hideFormat(value){
  379. let that=this;
  380. that.sliderVal=value;
  381. },
  382. initParkingMarkes(weight, height, image, lon, lat, title) {
  383. let that = this;
  384. //图标标记点
  385. let pointicon = new AMap.Icon({
  386. size: new AMap.Size(weight, height), // 图标尺寸
  387. image: image, // Icon的图像
  388. imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
  389. imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
  390. });
  391. // 创建一个 Marker 实例:
  392. var pointmarker = new AMap.Marker({
  393. position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
  394. icon: pointicon,
  395. title: title
  396. });
  397. that.parkMark.push(pointmarker);
  398. // 将创建的点标记添加到已有的地图实例:
  399. that.map.add(pointmarker);
  400. },
  401. //创建离线和停车的标记
  402. initLeaveMarkes(weight, height, image, lon, lat, title) {
  403. let that = this;
  404. //图标标记点
  405. let pointicon = new AMap.Icon({
  406. size: new AMap.Size(weight, height), // 图标尺寸
  407. image: image, // Icon的图像
  408. imageOffset: new AMap.Pixel(0, 0), // 图像相对展示区域的偏移量,适于雪碧图等
  409. imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
  410. });
  411. // 创建一个 Marker 实例:
  412. var pointmarker = new AMap.Marker({
  413. position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
  414. icon: pointicon,
  415. title: title
  416. });
  417. that.leaveMark.push(pointmarker);
  418. // 将创建的点标记添加到已有的地图实例:
  419. that.map.add(pointmarker);
  420. },
  421. initData(orderNumber){
  422. let that=this;
  423. that.axios.post("/api/v1/otms/fullPath?orderNumber="+orderNumber).then((res) => {
  424. console.log(res.data)
  425. if(res.data.data=='-1'){
  426. this.$message.error('自提车辆无权查看!');
  427. }else if(res.data.data.startAndEndRoutes!=null){
  428. that.listPath=res.data.data.startAndEndRoutes
  429. that.initMap();
  430. }else{
  431. that.listPath=[];
  432. this.$message.error('车辆没有开启GPS');
  433. }
  434. });
  435. },
  436. endline(){
  437. let that=this;
  438. that.initPolyline(that.listPath[0].estimatePath,"#FF0000");
  439. },
  440. //创建起点终点当前点
  441. threeMarker(){
  442. let that=this;
  443. that.listPath.forEach((element,index) => {
  444. //开始标记点
  445. if(element.startPoint.lon!=''&&element.startPoint.lat!=''){
  446. that.initMarkes(20,35,require('@/assets/img/start.png'),element.startPoint.lon,element.startPoint.lat,'起点');
  447. }
  448. //当前点
  449. that.getCurrentPointName([element.runRoute[element.runRoute.length-1].lon,element.runRoute[element.runRoute.length-1].lat])
  450. //结束标记点
  451. if(element.endPoint.lon!=''&&element.endPoint.lat!=''){
  452. that.initMarkes(20,35,require('@/assets/img/end.png'),element.endPoint.lon,element.endPoint.lat,'终点');
  453. }
  454. });
  455. },
  456. //获得结束地址
  457. getCurrentPointName(lnglatXY){
  458. let that=this;
  459. that.geocoder.getAddress(lnglatXY, function(status, result) {
  460. if (status === 'complete' && result.info === 'OK') {
  461. that.currentPointName = result.regeocode.formattedAddress;
  462. that.initCustomMarkes(that.capacityNumber,"位置:"+that.currentPointName+"<br/>"+"距离:"+that.listPath[0].miled,lnglatXY[0],lnglatXY[1])
  463. }
  464. });
  465. },
  466. //defualt数据
  467. defaultDate(){
  468. // let that=this;
  469. // that.pathNavigator.start(that.listPath[0].runPath.length)
  470. // that.pathNavigator.pause();
  471. },
  472. //初始化地图
  473. initMap(){
  474. lazyAMapApiLoaderInstance.load().then(() => {
  475. let that=this;
  476. that.map = new AMap.Map("amap-container",{ //设置地图容器id
  477. viewMode:"2D", //是否为2D地图模式
  478. zoom:10, //初始化地图级别
  479. center:[105.602725,37.076636], //初始化地图中心点位置
  480. });
  481. that.initGeocoder();
  482. that.initPathSimplifier();
  483. that.threeMarker();
  484. //that.initCustomMarkes(that.capacityNumber+"("+that.listPath[0].miled+")",that.listPath[0].currentPointName,that.listPath[0].currentPoint.lon,that.listPath[0].currentPoint.lat)
  485. that.endline();
  486. });
  487. },
  488. initCustomMarkes(title,details,lon,lat){
  489. let that=this;
  490. //自定义窗体内容
  491. var content = [
  492. "<div style='top:1px;width: 180px; background-color: rgba(22, 160, 133, 1);' ><font color='white'>"+title+"</font>",
  493. "<div style='background-color:(22, 160, 133, 1); ;'><font color='white'>"+details+"</font></div></div>"
  494. ];
  495. // 创建 infoWindow 实例
  496. var infoWindow = new AMap.InfoWindow({
  497. content: content.join("<br>") //传入 dom 对象,或者 html 字符串
  498. });
  499. // 打开信息窗体
  500. infoWindow.open(that.map,[lon,lat]);
  501. },
  502. initPolyline(path,color){
  503. let that=this;
  504. //预计轨迹
  505. var endLine = new AMap.Polyline({
  506. map:that.map,
  507. path: path,
  508. isOutline: true,
  509. outlineColor: color,
  510. borderWeight: 0,
  511. strokeColor: "#FF0000",
  512. strokeOpacity: 1,
  513. strokeWeight: 5,
  514. // 折线样式还支持 'dashed'
  515. strokeStyle: "solid",
  516. // strokeStyle是dashed时有效
  517. strokeDasharray: [10, 5],
  518. lineJoin: 'round',
  519. lineCap: 'round',
  520. zIndex: 50,
  521. })
  522. that.map.setFitView([[ endLine ]])
  523. },
  524. //创建简单的标记
  525. initMarkes(weight,height,image,lon,lat,title){
  526. let that=this;
  527. //图标标记点
  528. let pointicon = new AMap.Icon({
  529. size: new AMap.Size(weight, height), // 图标尺寸
  530. image: image, // Icon的图像
  531. imageOffset: new AMap.Pixel(0,0), // 图像相对展示区域的偏移量,适于雪碧图等
  532. imageSize: new AMap.Size(weight, height) // 根据所设置的大小拉伸或压缩图片
  533. });
  534. // 创建一个 Marker 实例:
  535. var pointmarker = new AMap.Marker({
  536. position: new AMap.LngLat(lon, lat), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9]
  537. icon: pointicon,
  538. title: title
  539. });
  540. // 将创建的点标记添加到已有的地图实例:
  541. that.map.add(pointmarker);
  542. },
  543. //创建轨迹和巡航器
  544. initPathSimplifier() {
  545. let that=this;
  546. // ...你的操作
  547. new AMapUI.load(['ui/misc/PathSimplifier'], (PathSimplifier) => {
  548. if (!PathSimplifier.supportCanvas) {
  549. alert('当前环境不支持 Canvas!')
  550. return
  551. }
  552. //创建轨迹和巡航器
  553. // 创建组件实例
  554. that.pathSimplifierIns = new PathSimplifier({
  555. map: that.map,
  556. zIndex: 100, // 图层叠加顺序
  557. data: that.listPath, // 巡航路径
  558. // 获取巡航路径中的路径坐标数组
  559. getPath: (pathData, pathIndex) => {
  560. return pathData.runPath;
  561. },
  562. //鼠标悬浮停时显示消息
  563. getHoverTitle: function(pathData, pathIndex, pointIndex) {
  564. //返回鼠标悬停时显示的信息
  565. if (pointIndex >= 0) {
  566. if(pathData.runRoute[pointIndex].gtm!=='undefined'){
  567. //鼠标悬停在某个轨迹节点上
  568. return pathData.runRoute[pointIndex].gtm + ',速度'+ pathData.runRoute[pointIndex].spd+'千米/小时' ;
  569. }
  570. }
  571. },
  572. //设置轨迹样式
  573. renderOptions: {
  574. //轨迹线的样式
  575. pathLineStyle: {
  576. strokeStyle: 'black',
  577. lineWidth: 6,
  578. dirArrowStyle: true
  579. }
  580. }
  581. })
  582. // 创建巡航器
  583. that.pathNavigator = that.pathSimplifierIns.createPathNavigator(0, {
  584. loop: true, // 是否循环
  585. speed: that.speed ,// 速度(km/h)
  586. pathNavigatorStyle: {
  587. width: 20,
  588. height: 40,
  589. content:PathSimplifier.Render.Canvas.getImageContent( require('@/assets/img/smallcar.png'), onload, onerror),
  590. strokeStyle: null,
  591. fillStyle: null
  592. }
  593. })
  594. //开启巡航
  595. that.pathNavigator.start()
  596. that.defaultDate();
  597. //开始事件
  598. that.pathNavigator.on("start resume", function() {
  599. // that.navgtr._startTime = Date.now();
  600. // that.navgtr._startDist = this.getMovedDistance();
  601. });
  602. //暂停
  603. that.pathNavigator.on("stop pause", function() {
  604. // that.navgtr._movedTime = Date.now() - that.navgtr._startTime;
  605. // that.navgtr._movedDist = this.getMovedDistance() - that.navgtr._startDist;
  606. });
  607. that.pathNavigator.on('move', function (data,value) {
  608. that.updateLable(value)
  609. });
  610. })
  611. },
  612. updateLable(value){
  613. let that=this;
  614. that.point=value.dataItem.pointIndex;
  615. that.runRoute=value.dataItem.pathData.runRoute[that.point];
  616. that.sliderVal=(value.dataItem.pointIndex/value.dataItem.pathData.runRoute.length)*100;
  617. },
  618. changeSpeed(value){
  619. // console.log(value)
  620. // let that=this;
  621. // that.times=value;
  622. },
  623. playIcon(){
  624. console.log("nihoa")
  625. },
  626. //逆解码函数
  627. initGeocoder(){
  628. let that=this;
  629. console.log("initGeocoder") ;
  630. AMap.plugin('AMap.Geocoder',function(){
  631. that.geocoder = new AMap.Geocoder({
  632. radius: 1000,
  633. extensions: "all"
  634. });
  635. console.log(that.geocoder)
  636. })
  637. },
  638. }
  639. };
  640. </script>
  641. <style>
  642. .mapcontroller{
  643. width: 250px; height: 260px;
  644. background: white;
  645. position: absolute;z-index:99;top:0;left:0
  646. }
  647. .container{
  648. width: 100%;
  649. height: 100%;
  650. }
  651. .item_details {
  652. display: block;
  653. margin-top: 20px;
  654. position: relative;
  655. left: 30px;
  656. width: 200px;
  657. height: 0px;
  658. }
  659. #amap-container {
  660. position: relative;
  661. width: 100%;
  662. height: 100%;
  663. overflow: hidden;
  664. margin: 0;
  665. font-family: "微软雅黑";
  666. }
  667. .driving_information2 {
  668. position: relative;
  669. top: 70px;
  670. }
  671. .driving_information3 {
  672. position: absolute;z-index:99;top:0;left:0;
  673. position: relative;
  674. top: 50px;
  675. }
  676. /* 进度条 */
  677. .mySlider {
  678. width: 150px;
  679. height: 20px;
  680. display: inline-block;
  681. position: relative;
  682. left: 32px;
  683. }
  684. .play {
  685. position: relative;
  686. left: 28px;
  687. }
  688. .quickly
  689. {
  690. float: right;
  691. position: relative;
  692. left: -20px;
  693. top: 10px;
  694. }
  695. .pause {
  696. position: relative;
  697. left: 28px;
  698. }
  699. .passed-time{
  700. position: relative;
  701. left: 5px;
  702. }
  703. .end-time{
  704. position: relative;
  705. left: 5px;
  706. }
  707. .map-times {
  708. position: relative;
  709. background-color: red;
  710. width: 40px;
  711. }
  712. </style>