(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a14b7e04"],{1807:function(t,e,a){"use strict";a("d5a1")},"3b50":function(t,e,a){},7866:function(t,e,a){},"9def":function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"track-info",on:{click:t.handleClick}},[a("div",{staticClass:"address-wraper"},[t._m(0),a("div",{staticClass:"address-inner"},[a("div",{staticClass:"address-item"},[a("div",{staticClass:"address"},[t._v(t._s(t.info.saddress))]),a("div",{staticClass:"address-time"},[t._v(t._s(t.info.startTime))])]),a("div",{staticClass:"address-item"},[a("div",{staticClass:"address"},[t._v(t._s(t.info.eaddress))]),a("div",{staticClass:"address-time"},[t._v(t._s(t.info.endTime))])])])]),a("div",{staticClass:"track-info-content"},[a("div",[a("div",[t._v(t._s(t.info.mileage)),a("span",[t._v("Km")])]),a("div",[t._v(t._s(t.$t("main.mileage")))])]),a("div",[a("div",[t._v(t._s(t.info.minute)),a("span",[t._v("min")])]),a("div",[t._v(t._s(t.$t("main.timeUse")))])]),a("div",[a("div",[t._v(t._s(t.info.speed)),a("span",[t._v("Km/h")])]),a("div",[t._v(t._s(t.$t("main.mph")))])])])])},i=[function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"address-icon"},[a("div")])}],n={props:{info:{type:Object,default:function(){return{}}}},data:function(){return{}},methods:{handleClick:function(){this.$router.push({name:"trackDetail",params:{item:this.info}})}}},c=n,r=(a("1807"),a("2877")),o=Object(r["a"])(c,s,i,!1,null,"45e783a9",null),d=o.exports;e["a"]=d},d5a1:function(t,e,a){},de6c:function(t,e,a){"use strict";a("3b50")},df23:function(t,e,a){"use strict";a("7866")},f5fa:function(t,e,a){"use strict";var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"nav-back-bar"},[a("van-nav-bar",{scopedSlots:t._u([{key:"left",fn:function(){return[a("van-icon",{staticStyle:{color:"#ffffff"},attrs:{name:t.icon,size:"18"},on:{click:t.onClickLeft}})]},proxy:!0},{key:"title",fn:function(){return[a("span",{staticStyle:{color:"#ffffff","font-size":"20px"},domProps:{textContent:t._s(t.title)}})]},proxy:!0}])})],1)},i=[],n={name:"NavBackBar",props:{title:{type:String,default:""},icon:{type:String,default:"cross"}},data:function(){return{}},methods:{onClickLeft:function(){this.$router.back()}}},c=n,r=(a("de6c"),a("2877")),o=Object(r["a"])(c,s,i,!1,null,"b680e24e",null),d=o.exports;e["a"]=d},fc0c:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"track full"},[a("div",{staticClass:"track-header"},[a("nav-back-bar",{attrs:{icon:"arrow-left",title:t.navTitle}})],1),a("div",{staticClass:"track-body"},[t._l(t.trackList,(function(t,e){return a("track-info",{key:e,attrs:{info:t}})})),0==t.trackList.length?a("div",{staticStyle:{"padding-top":"50px"}},[a("van-empty",{attrs:{description:t.$t("tips.noData")}})],1):t._e()],2),a("transition",{attrs:{name:"fade"}},[a("router-view")],1)],1)},i=[],n=(a("b680"),a("99af"),a("c276")),c=a("5101"),r=a.n(c),o=a("b562"),d=a("f5fa"),l=a("9def"),f=a("c714"),u={data:function(){return{navTitle:this.$t("main.historyTrack"),trackList:[]}},computed:{token:function(){return this.$store.state.token},deviceid:function(){return this.$store.state.currentDeviceid},isBdMap:function(){return this.$store.state.isBdMap}},mounted:function(){var t=this;this.$toast.loading({forbidClick:!0}),Object(o["h"])(this.deviceid,this.token).then((function(e){t.$toast.clear(),e.records&&e.records.length>0?t.trackList=t.getTrackList(e.records):t.$toast(t.$t("tips.noData"))}))},methods:{getTrackList:function(t){for(var e=this,a=[],s=[],i=null,c=0;c<t.length;c++){var o=t[c],d=Object(n["a"])(o);if(d){var l=Object(f["c"])(o.callon,o.callat),u=Object(f["d"])(o.callon,o.callat);o.blon=l[0],o.blat=l[1],o.glon=u[0],o.glat=u[1],null==i&&(i=[],s.push(i)),i.push(o)}else i=null}return s.forEach((function(t){if(t.length>1){var s=t[0],i=t[t.length-1],n=s.totaldistance,c=i.totaldistance,o=s.updatetime,d=i.updatetime,l=((c-n)/1e3).toFixed(2),f=(c-n)/1e3/((d-o)/1e3/60/60),u=s.callon.toFixed(5),v=s.callat.toFixed(5),m=i.callon.toFixed(5),p=i.callat.toFixed(5),h=localStorage.getItem("".concat(u,"_").concat(v)),_=localStorage.getItem("".concat(m,"_").concat(p)),k={records:t,speed:f.toFixed(2),startTime:r.a.longToDateTimeStr(o,r.a.getOffset()),endTime:r.a.longToDateTimeStr(d,r.a.getOffset()),mileage:l,minute:((d-o)/1e3/60).toFixed(1)};null==h?(k.saddress="地址正在解析....",e.queryAddress(k,"saddress",v,u)):k.saddress=h,null==_?(k.eaddress="地址正在解析....",e.queryAddress(k,"eaddress",p,m)):k.eaddress=_,a.push(k)}})),a},queryAddress:function(t,e,a,s){Object(o["b"])(a,s,this.token,"tw"==this.$i18n.locale).then((function(i){i.address&&(localStorage.setItem("".concat(a,"_").concat(s),i.address),t[e]=i.address)}))}},components:{NavBackBar:d["a"],TrackInfo:l["a"]}},v=u,m=(a("df23"),a("2877")),p=Object(m["a"])(v,s,i,!1,null,"02cd2e86",null),h=p.exports;e["default"]=h}}]);