Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index copy.fdc6372f.js 3.2KB

vor 3 Monaten
1
  1. var g=(A,h,t)=>new Promise((l,r)=>{var f=o=>{try{e(t.next(o))}catch(c){r(c)}},u=o=>{try{e(t.throw(o))}catch(c){r(c)}},e=o=>o.done?l(o.value):Promise.resolve(o.value).then(f,u);e((t=t.apply(A,h)).next())});import{A as N}from"./index.fa5dc7de.js";import{u as L}from"./orderManage.fe83d1aa.js";import{d as H,k as I,a1 as P,r as y,o as V,a2 as T,f as k,g as B,c as R,e as i,w as v,b as s,t as _,x as Y,N as w,h as M}from"./index.551f5afa.js";const U={class:"track-playback"},j=s("div",{id:"map",class:"map"},null,-1),z=M("\u64AD\u653E\u8F68\u8FF9"),W=M("\u6682\u505C\u52A8\u753B"),E=M("\u7EE7\u7EED\u52A8\u753B"),F=s("div",{class:"tips"},[s("div",null,"\u51CF\u901F"),s("div",null,"\u52A0\u901F")],-1),O=H({name:"trackPlayback"}),Q=Object.assign(O,{setup(A){const h=I(),t=P(null),l=y(),r=y([]),f=1e4,u=y(50),e=y({}),o=()=>g(this,null,function*(){try{const n=yield L(h.query.orderId);e.value=n.data,r.value=n.data.locusLocationList.map(a=>[a.lng,a.lat]);const d=yield N.load({key:"75043a78a63743c51c18058e73a2a70e",version:"2.0",AMapUI:{version:"1.1",plugins:[]},plugins:[]});t.value=new d.Map("map",{resizeEnable:!0,center:r.value[0],zoom:17}),window.AMapUI.load(["ui/misc/PathSimplifier","lib/$"],function(a,S){if(!a.supportCanvas){alert("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301 Canvas\uFF01");return}const p=new a({iconLabel:"1",iconStyle:"//webapi.amap.com/theme/v1.3/markers/b/mark_r.png",offset:new d.Pixel(-19,-60),getPath(m){return m.path},map:t.value,getHoverTitle:(m,$,b)=>{if(b>=0)return m.name+"\uFF0C\u65F6\u95F4\uFF1A"+w(n.data.locusLocationList[b].gpst).format("YYYY-MM-DD HH:mm")},showPositionPoint:!0,position:r.value[0],zIndex:100,renderOptions:{dirArrowStyle:{stepSpace:35,strokeStyle:"#ffffff",lineWidth:2},pathLineStyle:{strokeStyle:"#28F",lineWidth:6,dirArrowStyle:!0}}});p.setData([{name:n.data.carNo,path:r.value}]),l.value=p.createPathNavigator(0,{speed:f,pathNavigatorStyle:{width:20,height:42,content:a.Render.Canvas.getImageContent("https://a.amap.com/jsapi_demos/static/demo-center-v2/car.png"),autoRotate:!0,pathLinePassedStyle:{lineWidth:6,strokeStyle:"#AF5",dirArrowStyle:!1}}})})}catch(n){console.error(n)}}),c=()=>{l.value.start()},C=()=>{l.value.pause()},x=()=>{l.value.resume()},D=()=>{const n=f*u.value/50;l.value.setSpeed(n)};return V(()=>g(this,null,function*(){yield o()})),T(()=>{t.value&&t.value.destroy()}),(n,d)=>{const a=k("el-button"),S=k("el-slider"),p=k("el-card");return B(),R("div",U,[j,i(p,{class:"input-card"},{default:v(()=>[i(a,{type:"primary",icon:"VideoPlay",onClick:c},{default:v(()=>[z]),_:1}),i(a,{type:"primary",onClick:C},{default:v(()=>[W]),_:1}),i(a,{type:"primary",onClick:x},{default:v(()=>[E]),_:1}),F,i(S,{modelValue:u.value,"onUpdate:modelValue":d[0]||(d[0]=m=>u.value=m),step:1,max:100,onInput:D},null,8,["modelValue"])]),_:1}),i(p,{class:"title-card"},{default:v(()=>[s("div",null,"\u8F66\u724C\u53F7\uFF1A"+_(e.value.carNo),1),s("div",null,"\u7528\u8F66\u65F6\u95F4\uFF1A"+_(Y(w)(e.value.beginTime).format("YYYY-MM-DD HH:mm")),1),s("div",null,"\u7ED3\u675F\u65F6\u95F4\uFF1A"+_(Y(w)(e.value.endTime).format("YYYY-MM-DD HH:mm")),1),s("div",null,"\u53F8\u673A\u59D3\u540D\uFF1A"+_(e.value.driverName),1),s("div",null,"\u8F66\u673A\u8F68\u8FF9\u91CC\u7A0B(km)\uFF1A"+_(e.value.gpsMileage),1)]),_:1})])}}});export{Q as default};