| 1 |
- import{_ as t,c as s,a as e,w as i,b as a,d as o,n,F as A,e as c,f as h,g as l,s as r,r as d,h as g,i as f,o as m,j as u,t as p,k as C,l as B,m as w,p as P,q as y,I,u as E}from"./index-CHEhgZNv.js";import{_ as x,a as M}from"./u11.3SWZsuMf.js";import{_ as Q}from"./u9.q25SM3qF.js";import{U as T}from"./uni-icons.D2toDlEg.js";import{U as S}from"./uni-popup.CwhK8xKj.js";import{j as k}from"./js-yaml.B4KHq08c.js";const D={data:()=>({defaultNumber:"",showBtnMotor:!1,showBtn:!1,IP:"127.0.0.1",isLoading:!1,loadingText:"导航加载中...",first:!0,isAdd:!0,isCharge:!1,yamlConfig:[],pgmData:[],websocket:null,isConnected:!1,imagePath:"",canvasWidth:"",canvasHeight:"",pageType:1,cdImage:"/static/u298.png",znImage:"/static/dp_30_17.png",points:[],bjdPoints:[],jqPoints:[],dpPoints:[],cdPoints:[],wzPoints:[],addLine:[],imgWidth:"",imgHeight:"",dx:"",dy:"",yaw:"",timer:null,goToTimer:null,isMap:!1,goCharge:!1,scale:1,offsetX:0,offsetY:0,minScale:.3,maxScale:3,touchStartX:0,touchStartY:0,touchStartDistance:0,touchStartScale:1,touchStartOffsetX:0,touchStartOffsetY:0}),mounted(){setTimeout((()=>{this.getLocation()}),300),setTimeout((()=>{this.initCanvas()}),800)},onReady(){},onLoad(){setTimeout((()=>{this.connectToRos()}),1e3)},onShow(){this.loadPGMFile(),this.IP=localStorage.getItem("ip"),this.IP||this.$refs.mc.open("bottom"),this.IP=localStorage.getItem("ip"),this.defaultNumber=localStorage.getItem("defaultNumber")||"",this.defaultNumber?this.getPoints():this.getDefault(),this.loadPGMFile()},onUnload(){this.disconnectFromRos()},onNavigationBarButtonTap(t){0===t.index?c({url:"/pages/map/mapManagement"}):c({url:"/pages/setting/index"})},methods:{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,e=s[1].y-s[0].y;this.touchStartDistance=Math.sqrt(t*t+e*e),this.touchStartScale=this.scale}},canvasTouchMove(t){const s=t.touches;if(1===s.length){const t=s[0].x-this.touchStartX,e=s[0].y-this.touchStartY;this.offsetX=this.touchStartOffsetX+t,this.offsetY=this.touchStartOffsetY+e,this.drawCanvas()}else if(2===s.length){const t=s[1].x-s[0].x,e=s[1].y-s[0].y;let i=Math.sqrt(t*t+e*e)/this.touchStartDistance*this.touchStartScale;i=Math.max(this.minScale,Math.min(this.maxScale,i)),this.scale=i,this.drawCanvas()}},canvasTouchEnd(){},canvasWheel(t){t.preventDefault();const s=t.deltaY>0?-.1:.1;let e=this.scale+s;e=Math.max(this.minScale,Math.min(this.maxScale,e)),this.scale=e,this.drawCanvas()},goToMotor(){this.showBtnMotor?(this.showBtnMotor=!1,c({url:"/pages/index/motorInfo"})):this.showBtnMotor=!0},goToRec(){this.showBtn?(this.showBtn=!1,c({url:"/pages/index/roboticArm"})):this.showBtn=!0},initCanvas(){h().in(this).select("#myCanvas").boundingClientRect((t=>{t&&(this.canvasWidth=t.width,this.canvasHeight=t.height,this.ctx=l("myCanvas",this),this.scale=1,this.offsetX=0,this.offsetY=0,this.drawCanvas())})).exec()},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,e=(t-this.imgWidth)/2,i=(s-this.imgHeight)/2;if(this.ctx.drawImage(this.imagePath,e,i,this.imgWidth,this.imgHeight),this.points.forEach((t=>{this.ctx.beginPath(),this.ctx.setFontSize(12),this.ctx.setFillStyle("#0099ff"),this.ctx.fillText(t.name,t.x+e+6,t.y+i+5),this.ctx.setFillStyle("#0066ff"),this.ctx.arc(t.x+e,t.y+i,4,0,2*Math.PI),this.ctx.fill(),this.ctx.closePath()})),this.cdPoints.length>0){const t=this.pixelToWorld(this.cdPoints[0],this.cdPoints[1]);t&&this.ctx.drawImage(this.cdImage,t[0]+e,t[1]+i,15,15)}if(this.dpPoints.length>0){const t=this.pixelToWorld(this.dpPoints[0],this.dpPoints[1]);t&&this.ctx.drawImage(this.znImage,t[0]+e,t[1]+i,15,15)}this.ctx.restore(),this.ctx.draw()},addMap(){this.addLine.length<=0?r({title:"请设置行驶路线",icon:"none"}):this.websocket&&this.isConnected?this.goTo():(this.showLoading(),d({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1010,msg:"",data:""}),success:t=>console.log(t.data),fail:t=>console.error(t)}),setTimeout((()=>{this.connectToRos(),this.timer=setInterval((()=>{this.connectToRos()}),2e3)}),5e3),this.isMap=!0)},connectToRos(){if(!this.isConnected&&1!=this.pageType)try{this.websocket=new WebSocket("ws://"+this.IP+":9001"),this.websocket.onopen=()=>{console.log("Connected to ROS2 Bridge"),this.isConnected=!0,this.timer&&(clearInterval(this.timer),this.timer=null),this.isMap&&(this.isMap=!1,console.log("连上了,下发指令"),this.goToTimer=setInterval((()=>{this.goTo()}),2e3))},this.websocket.onmessage=t=>{const s=JSON.parse(t.data);if("1002"==s.cmd){if(this.yaw=s.data.yaw,1==this.first&&(this.$set(this.dpPoints,0,s.data.x),this.$set(this.dpPoints,1,s.data.y),this.first=!1),this.isCharge){this.$set(this.cdPoints,0,s.data.x),this.$set(this.cdPoints,1,s.data.y);JSON.stringify(s.data);this.isCharge=!1,this.savePointsToJson()}if(this.goCharge){const t=s.data;Math.sqrt(Math.pow(t.x-this.cdPoints[0],2)+Math.pow(t.y-this.cdPoints[1],2))<=.5&&this.stopChassis()}}},this.websocket.onerror=t=>{console.error("WebSocket error:",t),this.connectionStatus="连接错误: "+t,this.isConnected=!1},this.websocket.onclose=()=>{console.log("WebSocket connection closed"),this.isConnected=!1,this.connectionStatus="连接已关闭"}}catch(t){console.error("Failed to connect to ROS2:",t),this.connectionStatus="连接失败: "+t.message}},stopChassis(){d({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1014,msg:"",data:""}),success:t=>{c({url:"/pages/map/add"})},fail:t=>console.error(t)})},closeMcPopup(){this.$refs.mc.close()},updateNetwork(){localStorage.setItem("ip",this.IP),this.closeMcPopup(),window.location.reload()},getLocation(){if(!this.websocket||!this.isConnected)return;this.websocket.send(JSON.stringify({code:0,cmd:1002,msg:"",data:""}))},goToCharge(){if(!this.websocket||!this.isConnected)return;this.websocket.send(JSON.stringify({code:0,cmd:1006,msg:"",data:""})),this.goCharge=!0,this.animationTimer=setInterval((()=>{this.getLocation()}),1e3)},goTo(){if(!this.websocket||!this.isConnected)return void r({title:"服务连接异常,请检查",icon:"none"});const t={code:0,cmd:1003,msg:"",data:{target_x:this.addLine[0].x,target_y:this.addLine[0].y,target_yaw:0}};this.websocket.send(JSON.stringify(t));const s=JSON.stringify(this.addLine);localStorage.setItem("addLine",s),this.hideLoading(),this.goToTimer&&(clearInterval(this.goToTimer),this.goToTimer=null),c({url:"/pages/index/gj"})},loadPGMFile(){const t=this,s="http://"+t.IP+":9002/static/imgs/map.pgm";d({url:s,method:"GET",responseType:"ArrayBuffer",success:s=>{if(200===s.statusCode){t.pageType=2,t.getYaml();const e=s.data,i=t.parsePGMData(e),a=document.createElement("canvas"),o=a.getContext("2d");a.width=i.width,a.height=i.height,t.imgWidth=i.width,t.imgHeight=i.height;const n=o.createImageData(i.width,i.height);for(let t=0;t<i.data.length;t++){const s=i.data[t];n.data[4*t]=s,n.data[4*t+1]=s,n.data[4*t+2]=s,n.data[4*t+3]=255}o.putImageData(n,0,0),t.imagePath=a.toDataURL("image/png")}else console.error("请求PGM文件失败,状态码:",s.statusCode)},fail:t=>{console.error("请求PGM文件出错:",t)}})},getPoints(){this.defaultNumber&&d({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(console.log(t),t.data.data){const s=t.data.data.ret;s.ysPoints&&(this.points=s.ysPoints),s.cdPoints&&(this.cdPoints=s.cdPoints),s.ysPoints&&(this.wzPoints=s.wzPoints)}},fail:t=>console.error(t)})},parsePGMData(t){const s=new TextDecoder("ascii"),e=new Uint8Array(t);let i=0,a=[],o="",n=0;for(let d=0;d<e.length;d++)if(10===e[d]){const t=o.trim();if(o="",t.startsWith("#")||""===t){i=d+1;continue}if(a.push(t),n++,i=d+1,n>=3)break}else o+=String.fromCharCode(e[d]);if(a.length<3)throw new Error("PGM文件头部信息不完整");const A=a[0],c=a[1].split(" ").map(Number),h=parseInt(a[2]);if("P5"!==A&&"P2"!==A)throw new Error("不支持的PGM格式: "+A);if(c.length<2||isNaN(c[0])||isNaN(c[1]))throw new Error("无效的PGM维度信息");const l=c[0],r=c[1];if(isNaN(h)||h<=0)throw new Error("无效的PGM最大值");if("P5"===A){const s=new Uint8Array(t,i);return{width:l,height:r,data:this.normalizePixelData(s,h),maxVal:h,type:"P5 (二进制)"}}{const e=s.decode(new Uint8Array(t,i)).trim().split(/\s+/).map(Number);return{width:l,height:r,data:this.normalizePixelData(new Uint8Array(e),h),maxVal:h,type:"P2 (ASCII)"}}},normalizePixelData(t,s){if(255===s)return t;const e=new Uint8Array(t.length);for(let i=0;i<t.length;i++)e[i]=Math.round(255*t[i]/s);return e},getYaml(){d({url:"http://"+this.IP+":9002/static/imgs/map.yaml",method:"GET",success:t=>{const s=k.load(t.data);this.yamlConfig=s},fail:t=>{console.error(t)}})},getDefault(){d({url:"http://"+this.IP+":9002/static/js/default_map.json",method:"GET",success:t=>{t.data.number&&(this.defaultNumber=t.data.number,localStorage.setItem("defaultNumber",this.defaultNumber),this.getPoints())},fail:t=>{console.error(t)}})},goMapDirectory(){d({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1008,msg:"",data:""}),success:t=>{c({url:"/pages/map/add"})},fail:t=>console.error(t)})},goAdd(){d({url:"http://"+this.IP+":9002",method:"POST",header:{"Content-Type":"application/json"},data:JSON.stringify({code:"",cmd:1008,msg:"",data:""}),success:t=>{c({url:"/pages/map/add"})},fail:t=>console.error(t)})},goEdit(){c({url:`/pages/map/edit?number=${this.defaultNumber}`})},addCharge(){const t=this;t.isCharge=!0,t.getLocation(),g({title:"提示",content:"确认当前底盘位置为充电桩位置?",success:function(s){if(s.confirm){if(!t.websocket||!t.isConnected)return void r({title:"服务连接异常,请检查",icon:"none"});const s={code:0,cmd:1005,msg:"",data:""};t.websocket.send(JSON.stringify(s))}}})},pixelToWorld(t,s){const e=parseFloat(t),i=parseFloat(s);if(isNaN(e)||isNaN(i))return;const a=this.worldToPixel(e,i);return a&&!(a.x<0||a.x>=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)}},selectLine(t){this.isAdd&&(this.wzPoints[t]!=this.addLine[this.addLine.length-1]?this.addLine.push(this.wzPoints[t]):r({title:"相邻的位置点不能相同",icon:"none"}))},delLine(t){if(t<0||t>=this.addLine.length)return console.error("无效数组或索引"),!1;this.addLine.splice(t,1),this.isAdd=!0},disconnectFromRos(){this.websocket&&(this.websocket.close(),this.isConnected=!1,this.connectionStatus="已断开")},showLoading(t="导航加载中..."){this.loadingText=t,this.isLoading=!0},hideLoading(){this.isLoading=!1},savePointsToJson(){const t={op:2,stations:{ysPoints:this.points,wzPoints:this.wzPoints,cdPoints:this.cdPoints}};d({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)})}}},G=t(Object.assign(D,{__name:"index",setup(t){return(t,c)=>{const h=B,l=w,r=f,d=P,g=y,k=I;return m(),s(A,null,[1==t.pageType?(m(),e(r,{key:0,class:"container"},{default:i((()=>[o(r,{class:"contentd"},{default:i((()=>[o(h,{class:"logo",src:x}),o(l,{class:"text"},{default:i((()=>[u("点击新建地图 +")])),_:1}),o(l,{class:"xs-font-red",onClick:c[0]||(c[0]=t=>this.$refs.mc.open("bottom"))},{default:i((()=>[u("配网")])),_:1})])),_:1}),o(r,{class:"footer"},{default:i((()=>[o(d,{onClick:c[1]||(c[1]=s=>t.goAdd()),class:"bottom-button"},{default:i((()=>[u("新建地图")])),_:1})])),_:1})])),_:1})):a("",!0),o(r,{class:"gre-btn",style:n({right:t.showBtnMotor?"10rpx":"-40rpx"}),onClick:t.goToMotor},{default:i((()=>[u("电池信息")])),_:1},8,["style","onClick"]),o(r,{class:"rec-btn",style:n({right:t.showBtn?"10rpx":"-40rpx"}),onClick:t.goToRec},{default:i((()=>[u("机械臂")])),_:1},8,["style","onClick"]),2==t.pageType?(m(),e(r,{key:1,class:"containerDh"},{default:i((()=>[t.isLoading?(m(),e(r,{key:0,class:"loading-modal"},{default:i((()=>[o(r,{class:"loading-content"},{default:i((()=>[o(r,{class:"loading-spinner"}),o(l,{class:"loading-text"},{default:i((()=>[u(p(t.loadingText),1)])),_:1})])),_:1})])),_:1})):a("",!0),o(r,{class:"contentDh"},{default:i((()=>[o(r,{class:"line"},{default:i((()=>[o(h,{class:"item-logo lleft",src:Q}),o(r,{class:"item-font"},{default:i((()=>[u("位置点")])),_:1}),o(h,{class:"item-logo lleft",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEuSURBVDhPnVKhTgNBFJylFQgkAoGsQCIQCBJS1ya41vAFIEEjFj6AgCEYRA1pBb6iIaQpCQKH4eqqUMiTDce83be9u3J3aZjk7cy+29l9+/ZqWAUWXTTxiENMMcZMs1hTLocYDfpUu4yGyyn+mi22GPuqg7HOeGL0JB1glD0sNpmZUG0jwTX1BbU3JjjGFeayTDef5082uOe4w9igtuQi4xm/vTFGqdmixbHrJxkkuFsy3jgNPKRlX7pTT/0kh5gbtMl7GeMt159ny5ZyiyBXGC0bRWTNi/crwLryIBgFqTnBs6oqHPHeB6pzJ78qVyFmfHsZzPJjGAydLkfE6prsfKRz1NT4Qi0Nk852yO/MyRv/MD7ccwEnNH6RFzBswCc5GNtcsEr5DlL2v4wA8Au+fkjPP47tyAAAAABJRU5ErkJggg=="}),o(r,{class:"item-font"},{default:i((()=>[u("充电点")])),_:1}),o(h,{class:"item-logo lleft",src:x}),o(r,{class:"item-font"},{default:i((()=>[u("智能底盘")])),_:1})])),_:1})])),_:1}),o(r,{class:"content"},{default:i((()=>[o(r,{class:"canvas-wrap",catchtouchmove:""},{default:i((()=>[o(g,{"canvas-id":"myCanvas",id:"myCanvas",class:"canvas",onTouchstart:t.canvasTouchStart,onTouchmove:t.canvasTouchMove,onTouchend:t.canvasTouchEnd,onTouchcancel:t.canvasTouchEnd,onWheel:t.canvasWheel},null,8,["onTouchstart","onTouchmove","onTouchend","onTouchcancel","onWheel"])])),_:1}),o(r,{class:"fixed-images"},{default:i((()=>[o(h,{class:"fixed-image first-image",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAC7ElEQVR42mL8z8DA8OX/LYZPQPifgRGMGRhAooxgkgFJDCLCw8DPYAISYAAIIMb/DE//X2D4A9fCANUAMwAhyohkJDODGoMaI0AAMTEwXARr/Q+3hxGJhzAKYjMjVMVfhutAFkAAMZ37/wduOiOKBka4wxHgPxhDXHDkP0AAMX2C+ogRRYoByd8w2xC+hqj+yAAQQCyfkASRbUIXg3kG4bq/DAABxMQAN5MRybGMSBr2MJQy7ISqQXUZQACxIMKUEcWhsHDYwjAHSHIyuMPlEWoBAoiJEUmQES2aGKFaBRgi0XwOUQUQQEz/kYIBkUC2MPQBI3AzWKsgQzmDFlq4Q3gAAcSCHEwwJ+8Ga3rJcBNsaxmDJlj8OcNaBnUGF6QgAwggFka0RPCf4TXDEjAforUcqBUk+pihheEFw3kGV6Q4AAggpv9IzoDYPpfhA5ynBLQLpPApWCsDgyM8DkAkQAAxIfwLIb8zXEPy2zmGCUC/P4Fq9WeIRlELEEAs/5GyAIi8x/AJJWgOMfxieAj0L0hrIkrKY2AACCAWRpRQZmD4x4AOToBJkFZGNIsAAogJFsqwRMjKgA3IM8Sj5G8IAAggJtTg+s+gAQwiTPAQ7HdENoHoAAggJtRMCNJugtVuQWABAHMjLAEDBBALIqVCgv8aw1YsWoOAzkYtZUAkQACxMCClrv/A8qELHMuuDLeAToUAaYY4BnOkjInwIkAAwZPnf7CtXQzvgewUBh9gqF8EG6PEoICkHDleGBkAAojlPzzF/GfoBCsHaWUE+tAIJfkwwl3HCLcOIIBYkDMZRKsviob/aEUgcsEBEEAsyFl/A5IXEAUdqhbk/A4QQEw8KE77D8eoZdl/FH9D1DIzAAQQEz9aKfIfXooyopXX/9GqAR4GgABiMmFEztGI0pERrhiz/ISoUWQACCBgClNHSTWIBMiIUtAj2wwiZRjkGAECiBFi6pH/n4BpF1v5jZ4dGBmYGPiAcS8HNAUgwAByZAiCgGm8qgAAAABJRU5ErkJggg==",mode:"aspectFit",onClick:c[2]||(c[2]=s=>t.addCharge())}),o(h,{class:"fixed-image first-image",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAQAAACROWYpAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQ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F7ENPBGrOgutCk2er3+7e0tm82izSiBq9WKIsCdxyqEmAaSg3uH6YZ7QDL3QKBQKKDamCuBQID18vHgDu52u3w+v9/vkQ1I4npbLBZMLcxUnAAC8KfT6efnZ/YPfuf/zau/mrtI12AwQL+iwogdcxftgBogRZha7EN8/NJoNBrIBnklBD2C6YkNU3ODwXBzSgz3WkYDZVSr1WRLhVKp5BqB0cDMcbvdZEsFBDDzac/Ug3br9Xo4HKJZv/MPCn4IkCK0+MvLC+u61/hXyGQ/Ab4lPfzVfoYRAAAAAElFTkSuQmCC",mode:"aspectFit",onClick:t.resetCanvas},null,8,["onClick"])])),_:1})])),_:1}),o(r,{class:"footer"},{default:i((()=>[o(r,{class:"cxsm"},{default:i((()=>[o(r,{class:"cxsm-ts"},{default:i((()=>[u("设置行驶路线"),o(l,{class:"xs-font",onClick:t.goToCharge},{default:i((()=>[u("去充电")])),_:1},8,["onClick"]),o(l,{class:"xs-font-red",onClick:c[5]||(c[5]=t=>this.$refs.mc.open("bottom"))},{default:i((()=>[u("配网")])),_:1})])),_:1}),o(r,{class:"line"},{default:i((()=>[(m(!0),s(A,null,C(t.wzPoints,((s,a)=>(m(),e(r,{class:E({"line-item":1==t.isAdd,"line-item-dis":0==t.isAdd}),onClick:s=>t.selectLine(a)},{default:i((()=>[u(" + "+p(s.name),1)])),_:2},1032,["class","onClick"])))),256))])),_:1})])),_:1}),t.addLine.length>0?(m(),e(r,{key:0,class:"cxsm"},{default:i((()=>[o(r,{class:"cxsm-ts"},{default:i((()=>[u("行驶路线")])),_:1}),o(r,{class:"line"},{default:i((()=>[o(h,{class:"addlogo",src:x}),o(h,{class:"jt",src:M}),(m(!0),s(A,null,C(t.addLine,((n,c)=>(m(),s(A,null,[o(r,{class:"line-item",onClick:s=>t.delLine(c)},{default:i((()=>[u(p(n.name)+" ",1),o(l,{class:"sc"},{default:i((()=>[u("X")])),_:1})])),_:2},1032,["onClick"]),c<t.addLine.length-1?(m(),e(h,{key:0,class:"jt",src:M})):a("",!0)],64)))),256))])),_:1})])),_:1})):a("",!0),o(d,{onClick:c[6]||(c[6]=s=>t.addMap()),class:"bottom-button"},{default:i((()=>[u("开始导航")])),_:1})])),_:1})])),_:1})):a("",!0),o(S,{ref:"mc",type:"bottom","background-color":"#fff","border-radius":"10px 10px 0 0",show:!0,onClose:t.closeMcPopup},{default:i((()=>[o(r,{style:{"border-bottom":"1rpx solid #E5E5E5",padding:"24rpx 0 32rpx","text-align":"center","font-weight":"bold","font-size":"17px"}},{default:i((()=>[u("配网")])),_:1}),o(r,{class:"flex-colomn"},{default:i((()=>[o(r,{class:"tet"},{default:i((()=>[o(l,{class:"bt_font"},{default:i((()=>[u("IP")])),_:1}),o(k,{class:"input",type:"text",placeholder:"请配置你的网络",modelValue:t.IP,"onUpdate:modelValue":c[7]||(c[7]=s=>t.IP=s)},null,8,["modelValue"])])),_:1}),o(r,{class:"tet_font"},{default:i((()=>[o(d,{class:"blue-button",onClick:c[8]||(c[8]=s=>t.updateNetwork())},{default:i((()=>[u("保存")])),_:1})])),_:1}),o(T,{class:"close-btn",type:"closeempty",size:"20",onClick:t.closeMcPopup},null,8,["onClick"])])),_:1})])),_:1},8,["onClose"])],64)}}}),[["__scopeId","data-v-42be61d3"]]);export{G as default};
|