water-ldht/dist/static/js/chunk-60bcfd2b.d9b7c025.js

7 lines
7.6 KiB
JavaScript

/*!
* build: vue-admin-beautiful
* vue-admin-beautiful author: chuzhixin 1204505056@qq.com
* vue-admin-beautiful QQ Group(QQ群): 972435319、1139183756
* time: 2024-10-10 11:14:28
*/
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-60bcfd2b"],{"0182":function(t,e,n){"use strict";n.r(e);var o=n("f2bf");const a={class:"manage-input"},r={class:"manage-button"};function i(t,e,n,i,s,c){const l=Object(o["resolveComponent"])("el-date-picker"),d=Object(o["resolveComponent"])("el-form-item"),u=Object(o["resolveComponent"])("vab-query-form"),m=Object(o["resolveComponent"])("el-form"),g=Object(o["resolveComponent"])("el-button"),p=Object(o["resolveComponent"])("el-dialog");return Object(o["openBlock"])(),Object(o["createBlock"])(p,{modelValue:s.dialogFormVisible,"onUpdate:modelValue":e[2]||(e[2]=t=>s.dialogFormVisible=t),title:s.title,width:"1500px",onClose:t.close},{default:Object(o["withCtx"])(()=>[Object(o["createElementVNode"])("div",a,[Object(o["createVNode"])(m,{ref:"queryForm",model:s.queryForm,"label-width":"80px"},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(u,null,{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(d,{width:"100",prop:"time",label:t.$t("defalult.rq")},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(l,{modelValue:s.queryForm.time,"onUpdate:modelValue":e[0]||(e[0]=t=>s.queryForm.time=t),size:"small",type:"daterange",align:"right","start-placeholder":"开始时间","end-placeholder":"结束时间",onChange:c.changeTime},null,8,["modelValue","onChange"])]),_:1},8,["label"])]),_:1})]),_:1},8,["model"])]),Object(o["createElementVNode"])("div",r,[Object(o["createVNode"])(d,{width:"100"},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(g,{size:"small",onClick:e[1]||(e[1]=t=>c.resetForm())},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.$t("defalult.chongz")),1)]),_:1}),Object(o["createVNode"])(g,{type:"primary",size:"small",onClick:c.search},{default:Object(o["withCtx"])(()=>[Object(o["createTextVNode"])(Object(o["toDisplayString"])(t.$t("defalult.cx")),1)]),_:1},8,["onClick"])]),_:1})]),e[3]||(e[3]=Object(o["createElementVNode"])("div",{id:"mapContainer",style:{height:"500px"}},null,-1))]),_:1},8,["modelValue","title","onClose"])}n("14d9");var s=n("6f56"),c=n("5f99"),l={data(){return{dialogFormVisible:!1,title:"轨迹图",map:{},coords:[],queryForm:{start:"",end:"",time:"",userId:""},coordinate:[],polyline:"",trajectoryData:[]}},mounted(){},methods:{resetForm(){this.$refs.queryForm.resetFields()},search(){this.getData(),setTimeout(()=>{this.setTrajectory()},1e3)},changeTime(){this.queryForm.start=Object(c["getDate"])(this.queryForm.time[0]),this.queryForm.end=Object(c["getDate"])(this.queryForm.time[1])},setDefaultTime(){this.queryForm.time=Object(c["getPastTime1"])(),this.queryForm.start=Object(c["getDate"])(this.queryForm.time[0]),this.queryForm.end=Object(c["getDate"])(this.queryForm.time[1])},loadScript(t){this.dialogFormVisible=!0,this.queryForm=t,this.setDefaultTime(),this.getData(),setTimeout(()=>{this.setTrajectory()},1e3)},async getData(){const{data:t}=await Object(s["getTrajectory"])(this.queryForm);if(this.coordinate=[],this.coordinate.push(t[0]),this.trajectoryData=t,0!=t.length){this.coords=[];for(let e=0;e<t.length;e++)this.coords.push(new qq.maps.LatLng(t[e].latitude,t[e].longitude))}},setTrajectory(){this.map=new qq.maps.Map(document.getElementById("mapContainer"),{center:new qq.maps.LatLng(this.coordinate[0].latitude,this.coordinate[0].longitude),zoom:12});var t=this.trajectoryData;const e=t.length;var n="";if(e>1){n=new qq.maps.LatLng(t[0].latitude,t[0].longitude);var o=new qq.maps.LatLng(t[e-1].latitude,t[e-1].longitude)}else n=new qq.maps.LatLng(t[0].latitude,t[0].longitude);const a=this.map;new qq.maps.Marker({position:n,map:a});if(void 0!==o){new qq.maps.Marker({position:o,map:a}),new qq.maps.Label({position:o,map:a,content:"终点",style:{color:"#fff",backgroundColor:"#00f",padding:"5px"}})}new qq.maps.Label({position:n,map:a,content:"起点",style:{color:"#fff",backgroundColor:"#f00",padding:"5px"}});this.polyline=new qq.maps.Polyline({path:this.coords,strokeColor:"#FF0000",strokeWeight:3,map:this.map}),this.showBox()},showBox(){var t=this.map,e=this.trajectoryData;e.forEach(e=>{console.log(111,e.latitude);const n=new qq.maps.Marker({position:new qq.maps.LatLng(e.latitude,e.longitude),map:t});qq.maps.event.addListener(n,"click",n=>{console.log(e);const o=new qq.maps.InfoWindow({map:t});o.open(),o.setContent(e.time),o.setPosition(n.latLng)})})}}},d=(n("a4c1"),n("d959")),u=n.n(d);const m=u()(l,[["render",i]]);e["default"]=m},"5f99":function(t,e,n){"use strict";function o(t,e){const n=parseInt(t),o=new Date,a=o.getDate(),r=new Date(o.setDate(a+n)),i=r.getFullYear(),s=r.getMonth()+1,c=r.getDate();let l,d;l=s<10?"0"+s:s,d=c<10?"0"+c:c;const u=e||"-";return i+u+l+u+d}function a(t=""){var e=new Date;""!=t&&(e=new Date(t));const n=e.getFullYear();let o=e.getMonth(),a=e.getDate();return o+=1,o=o.toString().padStart(2,"0"),a=a.toString().padStart(2,"0"),`${n}-${o}-${a}`}function r(t=""){var e=new Date;""!=t&&(e=new Date(t));const n=e.getFullYear();let o=e.getMonth();return o+=1,o=o.toString().padStart(2,"0"),`${n}-${o}`}function i(t=""){var e=new Date;""!=t&&(e=new Date(t));const n=e.getFullYear();return""+n}function s(t){const e=new Date,n=e.getFullYear(),o=e.getMonth()+1,a=e.getDate(),r=o-t,i=r<0?r+12:r>10?r:"0"+r,s=o>9?o:"0"+o,c=a>9?a:"0"+a,l=n+"-"+i+"-"+c,d=n+"-"+s+"-"+c;return[l,d]}function c(){const t=new Date,e=t.getFullYear(),n=t.getMonth()+1,o=t.getDate(),a=new Date(t);a.setDate(t.getDate()-1);const r=a.getFullYear(),i=(a.getMonth()+1).toString().padStart(2,"0"),s=a.getDate().toString().padStart(2,"0"),c=n>9?n:"0"+n,l=o>9?o:"0"+o,d=r+"-"+i+"-"+s,u=e+"-"+c+"-"+l;return[d,u]}function l(t){var e=new Date;""!=t&&(e=new Date(t));const n=e.getFullYear();let o=e.getMonth()+1;o=o<10?"0"+o:o;let a=e.getDate();a=a<10?"0"+a:a;let r=e.getHours();r=r<10?"0"+r:r;let i=e.getMinutes();i=i<10?"0"+i:i;let s=e.getSeconds();return s=s<10?"0"+s:s,n+"-"+o+"-"+a+" "+r+":"+i+":"+s}n.r(e),n.d(e,"getFMdate",(function(){return o})),n.d(e,"getDate",(function(){return a})),n.d(e,"getDate1",(function(){return r})),n.d(e,"getDate2",(function(){return i})),n.d(e,"getPastTime",(function(){return s})),n.d(e,"getPastTime1",(function(){return c})),n.d(e,"formatDateTime",(function(){return l}))},"6f56":function(t,e,n){"use strict";n.r(e),n.d(e,"getClockData",(function(){return r})),n.d(e,"doEdit",(function(){return i})),n.d(e,"doDelete",(function(){return s})),n.d(e,"doExport",(function(){return c})),n.d(e,"getTrajectory",(function(){return l}));var o=n("b775"),a=n("f121");function r(t){let e="?page="+t.page+"&size="+t.size+"&projectId="+t.projectId;return""!=t.deviceName&&(e+="&deviceName="+t.deviceName),""!=t.signUser&&(e+="&signUser="+t.signUser),""!=t.start&&(e+="&start="+t.start),""!=t.end&&(e+="&end="+t.end),(""!=t.type&&2!=t.type||0==t.type)&&(e+="&type="+t.type),Object(o["default"])({url:"/sign/list"+e,method:"get",data:t})}function i(t){return Object(o["default"])({url:"/sign/updateLocation?id="+t.id+"&location="+t.location,method:"post",data:t})}function s(t){return Object(o["default"])({url:"/sign/remove",method:"post",data:t})}function c(t){let e="?projectId="+t.projectId;return""!=t.deviceName&&(e+="&deviceName="+t.deviceName),""!=t.signUser&&(e+="&signUser="+t.signUser),void 0!=t.start&&void 0!=t.end&&(e+="&start="+t.start+"&end="+t.end),a["baseURL"]+"/sign/export"+e}function l(t){const e="?userId="+t.userId+"&start="+t.start+"&end="+t.end;return Object(o["default"])({url:"/sign/trajectory"+e,method:"get",data:t})}},"94eb":function(t,e,n){},a4c1:function(t,e,n){"use strict";n("94eb")}}]);