import{_ as t,n as s,r as i,y as e,a,h as o,s as n,g as l,j as h,k as c,c as d,w as r,o as m,b as u,d as g,t as f,B as p,l as P,m as x,F as y,i as v,e as S,C as T,q as w,A as C,u as N}from"./index-DMBEjVPC.js";import{A as _}from"./AdminLayout.BmiPWvwA.js";import{N as b}from"./NavWsClient.yRYqLpZ1.js";import{j as I}from"./js-yaml.B4KHq08c.js";import{_ as L,a as O,b as k,c as W}from"./u8.CnuOEoOS.js";import{_ as M,a as A,b as F}from"./u2310.Cdr7c-Zw.js";const D=t({components:{AdminLayout:_},data:()=>({_armSent:!1,navWs:null,mapList:[],showPopup:!1,currentMapName:"",isFirst:!0,enableRobotRing:!0,cdPoints:[],isLoading:!1,loadingText:"导航加载中...",timer:null,IP:"192.168.40.62",isNav:3,yamlConfig:{resolution:.05,origin:[-1.22,-6.42,0]},sxTest:"行驶中",pgmData:[],_offLocal:null,isConnected:!1,imagePath:"",canvasWidth:"",canvasHeight:"",animationSpeed:1,currentPointIndex:0,animationTimer:null,znPosition:{x:85,y:200},znImage:"/static/dp_30_17.png",huzgPoints:{x:0,y:0},bjdPoints:[],jqPoints:[],wzPoints:[],ysPoints:[],cdImage:"/static/u298.png",addLine:[],goArr:[],imgWidth:"",imgHeight:"",dx:"",dy:"",linePoints:[],points:[],yaw:"",goIndex:-1,goToLineIndex:0,isLoop:!0,isLoopIndex:1,isjl:!1,dqDistance:0,isdb:!1,defaultNumber:"",isConnecting:!1,locationData:[],isCharge:!1,isMap:!1,scale:1,offsetX:0,offsetY:0,minScale:.3,maxScale:3,reconnectTimer:null,isManualClose:!1,wsStatus:"底盘离线",RECONNECT_DELAY:5e3,WsUrl:"",_offPath:null,reconnectTimerDh:null,wsUrlDh:"",isArm:!1,heartTimer:null,navigationState:""}),mounted(){setTimeout((()=>{this.loadPGMFile()}),300),setTimeout((()=>{this.initCanvas()}),500)},beforeDestroy(){const t=document.getElementById("myCanvas");t&&t.removeEventListener("wheel",this.canvasWheel())},onNavigationBarButtonTap(t){0===t.index&&s({url:"/pages/navigation/navigationLog"})},onLoad(){this.defaultNumber=localStorage.getItem("defaultNumber"),this.IP=localStorage.getItem("ip"),this.goStopChassis();const t=localStorage.getItem("ysPoints");this.ysPoints=t?JSON.parse(t):[];const s=localStorage.getItem("cdPoints");this.cdPoints=s?JSON.parse(s):[];const i=localStorage.getItem("wzPoints");this.wzPoints=i?JSON.parse(i):[];const e=localStorage.getItem("mapName"),a=e?JSON.parse(e):[];this.currentMapName=a.name,this.wzPoints=this.wzPoints.map((t=>({...t,remaining_distance:0}))),this.setState("OFF"),setTimeout((()=>{this.setState("ON")}),1e3),this.navWs=new b(this.IP),this.navWs.connect(),this._offLocal=this.navWs.onTopic("/localization_pose",(t=>{console.log(t),this.handleLocalPose(t)})),this._offPath=this.navWs.onTopic("/astar_path",(t=>{this.handlePath(t)})),this._offPath=this.navWs.onTopic("/navigation_state",(t=>{this.handleNavigationState(t)})),this.navWs.onDisconnectOnce=()=>this.startArm(),this.getMap()},onUnload(){this.stopAnimation(),this._offLocal&&this._offLocal(),this._offPath&&this._offPath(),this.navWs&&this.navWs.release()},methods:{startArm(){this._armSent||(this._armSent=!0,i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1017,msg:"",data:""}),success:t=>console.log("startArm ok",t),fail:t=>console.error("startArm err",t)}),setTimeout((()=>{this._armSent=!1}),8e4))},goStopChassis(){let t=JSON.stringify({code:"",cmd:1015,msg:"",data:{x_speed:0,y_speed:0,angular:0,stop:!0}});t&&i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:t,fail:t=>{}})},calcMapSize(){console.log("imgWidth=",this.imgWidth,"imgHeight=",this.imgHeight,"resolution=",this.yamlConfig.resolution);const t=this.yamlConfig.resolution,s=this.imgWidth*t,i=this.imgHeight*t,e=s*i;return console.log("地图尺寸:",s.toFixed(2),"m ×",i.toFixed(2),"m"),console.log("地图面积:",e.toFixed(2),"m²"),{wM:s,hM:i,area:e}},calcFreeArea(t){if(!t)return;const s=this.imgWidth*this.imgHeight;let i=0;for(let o=0;o0&&i++;const e=i*this.yamlConfig.resolution**2,a=(i/s*100).toFixed(1);return console.log(`可通行面积:${e.toFixed(2)} m²(占比 ${a}%)`),{freeArea:e,ratio:a}},handleLocalPose(t){const s=t.pose.pose.position;if(s&&s.x!=this.locationData.x&&s.y!=this.locationData.y&&(this.locationData=s,this.drawCanvas()),s.x&&1==this.isNav){const t=this.worldToPixel(s.x,s.y);if(t){const s=this.linePoints[this.linePoints.length-1];s&&s.x===t.x&&s.y===t.y||(this.linePoints.push({x:t.x,y:t.y}),this.drawCanvas())}const i=this.addLine.length-1;this.goIndex{this.goTo()}),2e3)):(this.isNav=2,this.sxTest="已到达目标点,完成本次行驶",this.stopAnimation())}},handleNavigationState(t){this.navigationState=t.data,console.log(this.navigationState)},handlePath(t){this.points=[];const s=t.poses;s.length>0&&1==this.isNav&&(s.forEach(((t,s)=>{const i=this.worldToPixel(t.pose.position.x,t.pose.position.y);i&&this.points.push({x:i.x,y:i.y})})),this.drawCanvas())},getMapNameStatus(){i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:2006,msg:"",data:""}),success:t=>{"MAPPING"==t.data.data.mode?i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:2003,msg:"",data:""}),success:t=>{this.getNavState()},fail:t=>console.error(t)}):this.getNavState()},fail:t=>console.error(t)})},setCurrentMap(t){this.showPopup=!1,e({title:"提示",content:"确定要切换该地图吗?",success:s=>{s.confirm&&i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1021,msg:"",data:{op:4,number:t.number}}),success:s=>{console.log(s),0==s.data.code?(i({url:"http://"+that.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:2004,msg:"",data:{}}),success:t=>{console.log(t)},fail:t=>console.error(t)}),localStorage.setItem("defaultNumber",t.number),this.points=[],a({title:"切换中..."}),this.defaultNumber=t.number,this.getPoints(),setTimeout((()=>{this.loadPGMFile()}),500),setTimeout((()=>{o(),this.initCanvas()}),1e3)):n({title:"切换失败,请重新操作",icon:"none"})},fail:t=>console.error(t)})}})},switchMap(){this.showPopup=!0},getPoints(){this.defaultNumber&&i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1013,msg:"",data:{op:1,number:this.defaultNumber}}),success:t=>{if(t.data.data){const s=t.data.data.ret;if(s.ysPoints){this.points=s.ysPoints;const t=JSON.stringify(s.ysPoints);localStorage.setItem("ysPoints",t)}if(s.cdPoints){this.cdPoints=s.cdPoints;const t=JSON.stringify(s.cdPoints);localStorage.setItem("cdPoints",t)}if(s.ysPoints){this.wzPoints=s.wzPoints;const t=JSON.stringify(s.wzPoints);localStorage.setItem("wzPoints",t)}}},fail:t=>console.error(t)})},async getMap(){var t,s,e;try{const a=await new Promise(((t,s)=>{i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1021,msg:"",data:{op:1}}),success:t,fail:s})}));if(!(null==(t=a.data)?void 0:t.data))return;const o=a.data.data,n=[];for(let t=0;t{i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1013,msg:"",data:{op:1,number:a}}),success:t,fail:s})}))).data)?void 0:s.data)?void 0:e.ret;h&&h.mapForm&&(l.name=h.mapForm.name),n.push(l)}this.mapList=n}catch(a){console.error("加载地图失败",a)}},getNavStateNow(){i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:2011,msg:"",data:""}),success:t=>{"ON"==t.data.data||this.getNavState()},fail:t=>console.error(t)})},getNavState(){i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:2011,msg:"",data:""}),success:t=>{"ON"==t.data.data?(setTimeout((()=>{this.setState("OFF")}),300),setTimeout((()=>{this.setState("ON")}),1e3)):setTimeout((()=>{this.setState("ON")}),300)},fail:t=>console.error(t)})},setState(t){i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:2012,msg:"",data:{state:t}}),success:s=>{console.log(t)},fail:t=>console.error(t)})},goToCharge(){if(!this.websocket||!this.isConnected)return void n({title:"服务连接异常,请检查88",icon:"none"});this.websocket.send(JSON.stringify({code:0,cmd:1006,msg:"",data:""})),this.goCharge=!0,this.animationTimer=setInterval((()=>{this.getLocation()}),1e3)},findRobot(){this.navWs?(this.enableRobotRing=!0,setTimeout((()=>{this.drawCanvas()}),500)):n({title:"暂无机器人位置数据,请稍后点击",icon:"none"})},showLoading(t="导航加载中..."){this.loadingText=t,this.isLoading=!0},hideLoading(){this.isLoading=!1},launchRecord(){i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1025,msg:"",data:{op:4}}),success:t=>{t.data.data},fail:t=>console.error(t)})},addMap(){this.addLine.length<=0?n({title:"请设置行驶路线",icon:"none"}):this.addLine.length<=1?n({title:"请至少选择两个站点",icon:"none"}):(this.linePoints=[],this.points=[],this.goOneTo())},selectLine(t){this.wzPoints[t]!=this.addLine[this.addLine.length-1]?this.addLine.push(this.wzPoints[t]):n({title:"相邻的位置点不能相同",icon:"none"})},disconnectFromRos(){this.websocket&&(this.websocket.close(),this.isConnected=!1,this.connectionStatus="已断开")},markerClass:t=>"start"===t?"marker-green":"normal"===t?"marker-blue":"",cancelNavigation(){if(!this.websocket||!this.isConnected)return void n({title:"服务连接异常,请检查10",icon:"none"});this.websocket.send(JSON.stringify({code:0,cmd:1026,msg:"",data:""}))},closeRecord(){i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1025,msg:"",data:{op:5}}),success:t=>{t.data.data},fail:t=>console.error(t)})},closeNav(){i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1010,msg:"",data:{op:5}}),success:t=>{},fail:t=>console.error(t)})},initCanvas(){l().in(this).select("#myCanvas").boundingClientRect((t=>{t&&(this.canvasWidth=t.width,this.canvasHeight=t.height,this.ctx=h("myCanvas",this),this.scale=1,this.offsetX=0,this.offsetY=0,this.drawCanvas(),this.bindCanvasWheel())})).exec()},bindCanvasWheel(){const t=document.getElementById("myCanvas");t&&(t.removeEventListener("wheel",this.canvasWheel),t.addEventListener("wheel",this.canvasWheel,{passive:!1}))},drawCanvas(){if(!this.ctx||!this.imagePath)return;this.ctx.clearRect(0,0,this.canvasWidth,this.canvasHeight),this.ctx.save(),this.ctx.translate(this.offsetX,this.offsetY),this.ctx.scale(this.scale,this.scale);const t=this.canvasWidth/this.scale,s=this.canvasHeight/this.scale,i=(t-this.imgWidth)/2,e=(s-this.imgHeight)/2;if(this.dx=i,this.dy=e,this.ctx.drawImage(this.imagePath,i,e,this.imgWidth,this.imgHeight),this.ysPoints.forEach(((t,s)=>{this.ctx.beginPath(),this.ctx.setFontSize(12),this.ctx.setFillStyle("#333333"),this.ctx.fillText(t.name,t.x+i+6,t.y+e+5),this.ctx.setFillStyle("#00e3ff"),this.ctx.arc(t.x+i,t.y+e,4,0,2*Math.PI),this.ctx.fill(),this.ctx.closePath()})),this.ctx.setStrokeStyle("#66cccc"),this.ctx.setLineWidth(2),this.ctx.setLineCap("round"),this.points.length>0&&(this.ctx.beginPath(),this.ctx.moveTo(this.points[0].x+i,this.points[0].y+e),this.points.forEach(((t,s)=>{s>0&&this.ctx.lineTo(t.x+i,t.y+e)})),this.ctx.stroke(),this.ctx.beginPath(),this.ctx.setFillStyle("#aa66ff"),this.ctx.setFillStyle("#ff0000"),this.ctx.beginPath(),this.ctx.arc(this.points[this.points.length-1].x+i,this.points[this.points.length-1].y+e,5,0,2*Math.PI),this.ctx.fill(),this.ctx.setFontSize(12),this.ctx.setFillStyle("#0099ff")),this.ctx.setStrokeStyle("#aa66ff"),this.ctx.setLineWidth(2),this.ctx.setLineCap("round"),this.linePoints.length>0&&(this.ctx.beginPath(),this.ctx.moveTo(this.linePoints[0].x+i,this.linePoints[0].y+e),this.linePoints.forEach(((t,s)=>{s>0&&this.ctx.lineTo(t.x+i,t.y+e)})),this.ctx.stroke()),this.locationData&&void 0!==this.locationData.x){const t=this.locationData.x,s=this.locationData.y,a=this.worldToPixel(t,s);this.enableRobotRing&&this.ctx.drawImage(this.znImage,a.x+i,a.y+e,15,15)}if(this.cdPoints.length>0){const t=this.pixelToWorld(this.cdPoints[0],this.cdPoints[1]);t&&this.ctx.drawImage(this.cdImage,t[0]+i,t[1]+e,15,15)}this.ctx.draw()},goAdd(){this.startAnimation()},startAnimation(){this.animationTimer||(this.isAnimating=!0,this.currentPointIndex=1,this.animationTimer=setInterval((()=>{this.drawTrajectorySegment(),this.currentPointIndex++}),2e3/this.animationSpeed))},drawTrajectorySegment(){const t=h("myCanvas",this);if(t.draw(!0),t.setStrokeStyle(this.trajectoryColor),t.setLineWidth(3),t.setLineCap("round"),t.setLineJoin("round"),t.setStrokeStyle("#0099ff"),this.linePoints.length>0){if(t.beginPath(),t.moveTo(this.linePoints[0].x+this.dx,this.linePoints[0].y+this.dy),this.linePoints.length>1)for(let s=1;s<=this.currentPointIndex;s++)s=this.canvasWidth||a.y<0||a.y>=this.canvasHeight)?[a.x,a.y]:void 0},worldToPixel(t,s){if(!this.yamlConfig||!this.pgmData)return null;return{x:Math.round((t-this.yamlConfig.origin[0])/this.yamlConfig.resolution),y:Math.round((this.yamlConfig.origin[1]+this.imgHeight*this.yamlConfig.resolution-s)/this.yamlConfig.resolution)}},resetCanvas(){this.scale=1,this.offsetX=0,this.offsetY=0,this.drawCanvas()},canvasTouchStart(t){const s=t.touches;if(1===s.length)this.touchStartX=s[0].x,this.touchStartY=s[0].y,this.touchStartOffsetX=this.offsetX,this.touchStartOffsetY=this.offsetY;else if(2===s.length){const t=s[1].x-s[0].x,i=s[1].y-s[0].y;this.touchStartDistance=Math.sqrt(t*t+i*i),this.touchStartScale=this.scale}},canvasTouchMove(t){const s=t.touches;if(1===s.length){const t=s[0].x-this.touchStartX,i=s[0].y-this.touchStartY;this.offsetX=this.touchStartOffsetX+t,this.offsetY=this.touchStartOffsetY+i,this.drawCanvas()}else if(2===s.length){const t=s[1].x-s[0].x,i=s[1].y-s[0].y;let e=Math.sqrt(t*t+i*i)/this.touchStartDistance*this.touchStartScale;e=Math.max(this.minScale,Math.min(this.maxScale,e)),this.scale=e,this.drawCanvas()}},savePointsToJson(){const t={op:2,stations:{ysPoints:this.ysPoints,wzPoints:this.wzPoints,cdPoints:this.cdPoints},number:this.defaultNumber};i({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1013,msg:"",data:t}),success:t=>{},fail:t=>console.error(t)})},canvasTouchEnd(){},canvasWheel(t){t.preventDefault();const s=t.deltaY>0?-.1:.1;let i=this.scale+s;i=Math.max(this.minScale,Math.min(this.maxScale,i)),this.scale=i,this.drawCanvas()},getYaml(){this.defaultNumber&&i({url:"http://"+this.IP+":9002/static/imgs/"+this.defaultNumber+"/map.yaml",method:"GET",success:t=>{const s=I.load(t.data);this.yamlConfig=s},fail:t=>{console.error(t)}})},loadPGMFile(){if(!this.defaultNumber)return;const t="http://"+this.IP+":9002/static/imgs/"+this.defaultNumber+"/map.pgm";i({url:t,method:"GET",responseType:"ArrayBuffer",success:t=>{if(200!==t.statusCode)return;this.getYaml();const s=this.parsePGMData(t.data);this.imgWidth=s.width,this.imgHeight=s.height;const i=document.createElement("canvas"),e=i.getContext("2d");i.width=s.width,i.height=s.height;const a=e.createImageData(s.width,s.height);for(let o=0;o{console.error("请求PGM文件出错:",t)}})},parsePGMData(t){const s=new TextDecoder("ascii"),i=new Uint8Array(t);let e=0,a=[],o="",n=0;for(let m=0;m=3)break}else o+=String.fromCharCode(i[m]);if(a.length<3)throw new Error("PGM文件头部信息不完整");const l=a[0],h=a[1].split(" ").map(Number),c=parseInt(a[2]);if("P5"!==l&&"P2"!==l)throw new Error("不支持的PGM格式: "+l);if(h.length<2||isNaN(h[0])||isNaN(h[1]))throw new Error("无效的PGM维度信息");const d=h[0],r=h[1];if(isNaN(c)||c<=0)throw new Error("无效的PGM最大值");if("P5"===l){const s=new Uint8Array(t,e);return{width:d,height:r,data:this.normalizePixelData(s,c),maxVal:c,type:"P5 (二进制)"}}{const i=s.decode(new Uint8Array(t,e)).trim().split(/\s+/).map(Number);return{width:d,height:r,data:this.normalizePixelData(new Uint8Array(i),c),maxVal:c,type:"P2 (ASCII)"}}},normalizePixelData(t,s){if(255===s)return t;const i=new Uint8Array(t.length);for(let e=0;e{t.setState("ON")}),1e3),t.isNav=3,t.goIndex=-1,t.goToLineIndex=0,t.stopAnimation(),t.addLine=[],t.sxTest="行驶中",t.points=[],t.linePoints=[],t.isLoop=!1,t.drawCanvas())}})}else this.addLine=[],this.isNav=3,this.goIndex=-1,this.goToLineIndex=0,this.stopAnimation(),this.sxTest="行驶中",this.points=[],this.linePoints=[],this.isLoop=!1,this.drawCanvas()},goOneTo(){this.isFirst&&(this.isFirst=!1),this.isNav=1,this.sendGoalPose(this.addLine[0].x,this.addLine[0].y)},sendGoalPose(t,s){this.navWs?this.navWs.sendGoalPose(t,s):n({title:"请先连接WS",icon:"none"})},goTo(){if(console.log(999),!this.navWs)return void n({title:"服务连接异常,请检查77",icon:"none"});console.log(888);const t=this.goIndex+1;t!=this.goToLineIndex&&(this.goToLineIndex=t,this.isNav=1,this.addLine.length>0&&t=this.addLine.length)return console.error("无效数组或索引"),!1;this.addLine.splice(t,1),this.isAdd=!0}}},[["render",function(t,s,i,e,a,o){const n=v,l=S,h=T,_=w,b=C,I=c("AdminLayout");return m(),d(I,{active:"下发任务",breadcrumb:["任务管理","下发任务"]},{default:r((()=>[u(n,{class:"nav-toolbar"},{default:r((()=>[u(n,{class:"tool-left"},{default:r((()=>[u(n,{class:"nav-btn-add"},{default:r((()=>[g("下发任务+")])),_:1})])),_:1}),u(n,{class:"tool-center"},{default:r((()=>[u(l,{class:"map-name"},{default:r((()=>[g(f(a.currentMapName),1)])),_:1}),u(l,{class:"map-label"},{default:r((()=>[g("当前地图")])),_:1})])),_:1}),u(n,{class:"tool-right"})])),_:1}),u(n,{class:"ota-arm"},{default:r((()=>[u(n,{class:"contentx"},{default:r((()=>[a.isLoading?(m(),d(n,{key:0,class:"loading-modal"},{default:r((()=>[u(n,{class:"loading-content"},{default:r((()=>[u(n,{class:"loading-spinner"}),u(l,{class:"loading-text"},{default:r((()=>[g(f(a.loadingText),1)])),_:1})])),_:1})])),_:1})):p("",!0),a.locationData.x&&(a.enableRobotRing||3!=a.isNav)?(m(),d(n,{key:1,class:"pos-info-box"},{default:r((()=>[u(n,{class:"info-row"},{default:r((()=>[u(l,{class:"label-zb"},{default:r((()=>[g("当前坐标:")])),_:1}),u(l,{class:"val"},{default:r((()=>[g(f(a.locationData.x.toFixed(2))+", "+f(a.locationData.y.toFixed(2)),1)])),_:1})])),_:1}),u(n,{class:"info-row"},{default:r((()=>[u(l,{class:"label-zb"},{default:r((()=>[g("偏航角:")])),_:1}),u(l,{class:"val"},{default:r((()=>[g(f(a.locationData.z.toFixed(1))+"°",1)])),_:1})])),_:1})])),_:1})):p("",!0),u(n,{class:"line"},{default:r((()=>[u(h,{class:"item-logo lleft",src:L}),u(n,{class:"item-font"},{default:r((()=>[g("位置点")])),_:1}),u(h,{class:"item-line lleft",src:O}),u(n,{class:"item-font"},{default:r((()=>[g("禁行线")])),_:1}),u(h,{class:"item-logo lleft",src:k}),u(n,{class:"item-font"},{default:r((()=>[g("禁区")])),_:1}),u(h,{class:"item-logo lleft",src:W}),u(n,{class:"item-font"},{default:r((()=>[g("擦除")])),_:1})])),_:1}),u(n,{class:"canvas-wrap",catchtouchmove:""},{default:r((()=>[u(_,{"canvas-id":"myCanvas",id:"myCanvas",onTouchstart:o.canvasTouchStart,onTouchmove:o.canvasTouchMove,onTouchend:o.canvasTouchEnd,onTouchcancel:o.canvasTouchEnd,class:"canvas"},null,8,["onTouchstart","onTouchmove","onTouchend","onTouchcancel"])])),_:1}),u(n,{class:"fixed-images"},{default:r((()=>[u(h,{class:"fixed-image first-image",src:M,mode:"aspectFit",onClick:s[0]||(s[0]=t=>o.findRobot())})])),_:1})])),_:1}),u(n,{class:"footer panel"},{default:r((()=>[u(n,{class:"rtitle"},{default:r((()=>[g("设置任务路线")])),_:1}),u(n,{class:"section-title"},{default:r((()=>[g("请选择任务模式:")])),_:1}),u(n,{class:"xhms"},{default:r((()=>[g("循环模式")])),_:1}),3==a.isNav?(m(),d(n,{key:0,class:"route-page"},{default:r((()=>[u(n,{class:"section-title"},{default:r((()=>[g("请选择途径地点:")])),_:1}),u(n,{class:"place-buttons"},{default:r((()=>[(m(!0),P(y,null,x(a.wzPoints,((t,s)=>(m(),d(n,{class:"place-btn",onClick:t=>o.selectLine(s)},{default:r((()=>[g("+ "+f(t.name),1)])),_:2},1032,["onClick"])))),256))])),_:1}),a.addLine.length>0?(m(),d(n,{key:0,class:"section-title"},{default:r((()=>[g("已选择路线:")])),_:1})):p("",!0),u(n,{class:"route-list"},{default:r((()=>[(m(!0),P(y,null,x(a.addLine,((t,s)=>(m(),d(n,{class:"route-item",key:s},{default:r((()=>[u(n,{class:"drag-handle"},{default:r((()=>[g(f(s+1),1)])),_:2},1024),u(n,{class:"point-marker marker-blue"}),u(n,{class:"point-name"},{default:r((()=>[g(f(t.name),1)])),_:2},1024),u(n,{class:"del-btn",onClick:t=>o.delLine(s)},{default:r((()=>[u(h,{class:"del-img",src:A}),g("️ ")])),_:2},1032,["onClick"])])),_:2},1024)))),128))])),_:1})])),_:1})):(m(),d(n,{key:1,class:"cxsm"},{default:r((()=>[u(n,{class:"cxsm-ts"},{default:r((()=>[g(" 行驶路线:"),u(l,{class:"xs-font"},{default:r((()=>[g(f(a.sxTest),1)])),_:1})])),_:1}),u(n,{class:"route-list"},{default:r((()=>[(m(!0),P(y,null,x(a.addLine,((t,s)=>(m(),d(n,{class:N({"route-item":a.goIndex=s}),key:s},{default:r((()=>[u(n,{class:N({"drag-handle":a.goIndex=s})},{default:r((()=>[g(f(s+1),1)])),_:2},1032,["class"]),u(n,{class:"point-marker marker-blue"}),u(n,{class:"point-name"},{default:r((()=>[g(f(t.name),1)])),_:2},1024),a.goIndex>=s?(m(),d(n,{key:0,class:"del-btn"},{default:r((()=>[u(h,{class:"del-img",src:F}),g("️ ")])),_:1})):p("",!0)])),_:2},1032,["class"])))),128))])),_:1})])),_:1})),3==a.isNav?(m(),d(b,{key:2,onClick:s[1]||(s[1]=t=>o.addMap()),class:"bottom-button"},{default:r((()=>[g("开始任务")])),_:1})):(m(),d(b,{key:3,onClick:s[2]||(s[2]=t=>o.outNav()),class:"bottom-buttonx"},{default:r((()=>[g("结束任务")])),_:1}))])),_:1}),a.showPopup?(m(),d(n,{key:0,class:"popup-mask",onClick:s[3]||(s[3]=t=>a.showPopup=!1)})):p("",!0),a.showPopup?(m(),d(n,{key:1,class:"popup-box"},{default:r((()=>[(m(!0),P(y,null,x(a.mapList,(t=>(m(),d(n,{class:N(["itemxf",{active:a.defaultNumber==t.number}]),key:t.id,onClick:s=>o.setCurrentMap(t)},{default:r((()=>[u(l,{class:"fx-text"},{default:r((()=>[g(f(t.name),1)])),_:2},1024)])),_:2},1032,["class","onClick"])))),128))])),_:1})):p("",!0)])),_:1})])),_:1})}],["__scopeId","data-v-25375122"]]);export{D as default};