| 1 |
- import{v as t,_ as s,k as e,o as i,c as a,w as o,b as n,B as l,u as r,p as c,Q as h,x as d,i as u,s as p,r as m,n as g,l as f,d as y,t as k,F as b,m as C,C as A,e as T,S as w,I,f as R,A as S,R as E,T as M}from"./index-DMBEjVPC.js";let _=0;const B=[];function x(t){_=t,B.forEach((s=>s(t)))}function O(){return _}function P(t){return B.push(t),()=>{const s=B.indexOf(t);s>-1&&B.splice(s,1)}}const v={HEARTBEAT_REQ:"10001",HEARTBEAT_RESP:"10002",JOINT_ENABLE:"10020",SINGLE_AXIS_ANGLE:"10021",MULTI_AXIS_ANGLE:"10022",SET_SINGLE_AXIS_PARM:"10023",ZERO_CALI:"1002F",GET_MOTOR_INFO:"10031",GET_MOTOR_ALL_INFO:"10032",GET_SINGLE_PARM:"10033",FAULT_REPORT:"1003F",CAN2:"10052",BATTERY:"10043"};class N{constructor(t="ws://192.168.0.3:3001/jointadjustment"){if(N._instance)return N._instance;N._instance=this,this.url=t,this.socketTask=null,this.isConnected=!1,this.isManualClose=!1,this.maxRetry=10,this.retryDelayList=[1e3,3e3,5e3,1e4],this.currentRetry=0,this.heartbeatInterval=3e4,this.heartbeatTimeout=3,this.heartbeatMissCount=0,this.heartbeatTimer=null,this.onMessageCallback=null,this._listeners=[],this.armCalled=!1,this.onDisconnectOnce=null}buildRequest(t,s={}){return console.log(JSON.stringify({cmd:t,data:s,timestamp:Date.now()})),JSON.stringify({cmd:t,data:s,timestamp:Date.now()})}sendCmd(t,s={}){if(this.isConnected&&this.socketTask)try{this.socketTask.send({data:this.buildRequest(t,s)})}catch(e){console.log("[发送异常]",e)}else console.log("[发送失败] 未连接")}startHeartbeat(){this.stopHeartbeat(),this.heartbeatMissCount=0,this.heartbeatTimer=setInterval((()=>{this.heartbeatMissCount++,console.log("[心跳] 发送,丢失计数:",this.heartbeatMissCount),this.sendCmd(v.HEARTBEAT_REQ),this.heartbeatMissCount>=this.heartbeatTimeout&&(console.log("[心跳] 超时,重连"),this.close(),this.reconnect())}),this.heartbeatInterval)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}connect(){if(this.isConnected&&this.socketTask)console.log("[连接] 已连接,复用");else{if(this.isManualClose=!1,this.currentRetry=0,this.socketTask){try{this.socketTask.close()}catch{}this.socketTask=null}console.log("[连接] 连接中...",this.url),this.socketTask=t({url:this.url,success:()=>{},fail:t=>{console.log("[连接失败]",t),this.reconnect()}}),this.socketTask.onOpen((()=>{console.log("[连接成功]"),this.isConnected=!0,this.currentRetry=0,this.armCalled=!1,this.startHeartbeat()})),this.socketTask.onMessage((t=>{try{const s=JSON.parse(t.data);this.handleMessage(s)}catch(s){console.log("消息解析失败")}})),this.socketTask.onClose((()=>{console.log("[连接关闭]"),this.isConnected=!1,this.stopHeartbeat(),this.isManualClose||this.reconnect()})),this.socketTask.onError((t=>{console.log("[错误]",t),this._triggerDisconnectOnce(),this.isConnected=!1,this.isManualClose||this.reconnect()}))}}handleMessage(t){if(t.cmd!==v.HEARTBEAT_RESP){if(this._listeners.forEach((s=>{try{s(t)}catch(e){}})),this.onMessageCallback)try{this.onMessageCallback(t)}catch(s){}}else this.heartbeatMissCount=0}addMessageListener(t){return"function"!=typeof t||this._listeners.includes(t)||this._listeners.push(t),()=>this.removeMessageListener(t)}removeMessageListener(t){const s=this._listeners.indexOf(t);s>-1&&this._listeners.splice(s,1)}_triggerDisconnectOnce(){if(!this.armCalled&&(this.armCalled=!0,this.onDisconnectOnce))try{this.onDisconnectOnce()}catch(t){}}reconnect(){if(this.isManualClose||this.isConnected)return;if(this.currentRetry>=this.maxRetry)return void console.log("已达最大重连次数");this.currentRetry++;const t=Math.min(this.currentRetry-1,this.retryDelayList.length-1),s=this.retryDelayList[t];console.log(`[${this.currentRetry}/${this.maxRetry}] ${s}ms 后重连`),setTimeout((()=>{this.connect()}),s)}close(){if(this.isManualClose=!0,this.isConnected=!1,this.stopHeartbeat(),this.socketTask){try{this.socketTask.close()}catch{}this.socketTask=null}}}const U=[{title:"监控工作台",children:["首页总览","硬件配置","电池信息"]},{title:"地图管理",children:["新建地图","地图编辑","多地图列表"]},{title:"地图导航",children:["新建导航","导航记录"]},{title:"任务管理",children:["下发任务"]},{title:"手动遥控",children:["远程控制","速度调整","机械臂"]},{title:"运维日志",children:["查看日志","ROS2信息","OTA升级"]}],D={"首页总览":"/pages/index/index","硬件配置":"/pages/setting/sysView","电池信息":"/pages/index/motorInfo","新建地图":"/pages/map/add","地图编辑":"/pages/map/edit?type=1","多地图列表":"/pages/map/mapManagement","新建导航":"/pages/navigation/mapNavigation","导航记录":"/pages/navigation/navigationLog","远程控制":"/pages/map/remoteCtrl","速度调整":"/pages/setting/speedEdit","机械臂":"/pages/index/roboticArm","查看日志":"/pages/setting/logView","ROS2信息":"/pages/setting/rosView","OTA升级":"/pages/setting/ota","用户管理":"/pages/system/user","角色权限":"/pages/system/role","下发任务":"/pages/navigation/loopMapNavigation"};const L=s({name:"uniPopup",components:{keypress:{name:"Keypress",props:{disable:{type:Boolean,default:!1}},mounted(){const t={esc:["Esc","Escape"],tab:"Tab",enter:"Enter",space:[" ","Spacebar"],up:["Up","ArrowUp"],left:["Left","ArrowLeft"],right:["Right","ArrowRight"],down:["Down","ArrowDown"],delete:["Backspace","Delete","Del"]};document.addEventListener("keyup",(s=>{if(this.disable)return;const e=Object.keys(t).find((e=>{const i=s.key,a=t[e];return a===i||Array.isArray(a)&&a.includes(i)}));e&&setTimeout((()=>{this.$emit(e,{})}),0)}))},render:()=>{}}},emits:["change","maskClick"],props:{animation:{type:Boolean,default:!0},type:{type:String,default:"center"},isMaskClick:{type:Boolean,default:null},maskClick:{type:Boolean,default:null},backgroundColor:{type:String,default:"none"},safeArea:{type:Boolean,default:!0},maskBackgroundColor:{type:String,default:"rgba(0, 0, 0, 0.4)"},borderRadius:{type:String}},watch:{type:{handler:function(t){this.config[t]&&this[this.config[t]](!0)},immediate:!0},isDesktop:{handler:function(t){this.config[t]&&this[this.config[this.type]](!0)},immediate:!0},maskClick:{handler:function(t){this.mkclick=t},immediate:!0},isMaskClick:{handler:function(t){this.mkclick=t},immediate:!0},showPopup(t){document.getElementsByTagName("body")[0].style.overflow=t?"hidden":"visible"}},data(){return{duration:300,ani:[],showPopup:!1,showTrans:!1,popupWidth:0,popupHeight:0,config:{top:"top",bottom:"bottom",center:"center",left:"left",right:"right",message:"top",dialog:"center",share:"bottom"},maskClass:{position:"fixed",bottom:0,top:0,left:0,right:0,backgroundColor:"rgba(0, 0, 0, 0.4)"},transClass:{backgroundColor:"transparent",borderRadius:this.borderRadius||"0",position:"fixed",left:0,right:0},maskShow:!0,mkclick:!0,popupstyle:"top"}},computed:{getStyles(){let t={backgroundColor:this.bg};return this.borderRadius,t=Object.assign(t,{borderRadius:this.borderRadius}),t},isDesktop(){return this.popupWidth>=500&&this.popupHeight>=500},bg(){return""===this.backgroundColor||"none"===this.backgroundColor?"transparent":this.backgroundColor}},mounted(){(()=>{const{windowWidth:t,windowHeight:s,windowTop:e,safeArea:i,screenHeight:a,safeAreaInsets:o}=d();this.popupWidth=t,this.popupHeight=s+(e||0),i&&this.safeArea?this.safeAreaInsets=o.bottom:this.safeAreaInsets=0})()},unmounted(){this.setH5Visible()},activated(){this.setH5Visible(!this.showPopup)},deactivated(){this.setH5Visible(!0)},created(){null===this.isMaskClick&&null===this.maskClick?this.mkclick=!0:this.mkclick=null!==this.isMaskClick?this.isMaskClick:this.maskClick,this.animation?this.duration=300:this.duration=0,this.messageChild=null,this.clearPropagation=!1,this.maskClass.backgroundColor=this.maskBackgroundColor},methods:{setH5Visible(t=!0){document.getElementsByTagName("body")[0].style.overflow=t?"visible":"hidden"},closeMask(){this.maskShow=!1},disableMask(){this.mkclick=!1},clear(t){t.stopPropagation(),this.clearPropagation=!0},open(t){if(this.showPopup)return;t&&-1!==["top","center","bottom","left","right","message","dialog","share"].indexOf(t)||(t=this.type),this.config[t]?(this[this.config[t]](),this.$emit("change",{show:!0,type:t})):console.error("缺少类型:",t)},close(t){this.showTrans=!1,this.$emit("change",{show:!1,type:this.type}),clearTimeout(this.timer),this.timer=setTimeout((()=>{this.showPopup=!1}),300)},touchstart(){this.clearPropagation=!1},onTap(){this.clearPropagation?this.clearPropagation=!1:(this.$emit("maskClick"),this.mkclick&&this.close())},top(t){this.popupstyle=this.isDesktop?"fixforpc-top":"top",this.ani=["slide-top"],this.transClass={position:"fixed",left:0,right:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},t||(this.showPopup=!0,this.showTrans=!0,this.$nextTick((()=>{this.showPoptrans(),this.messageChild&&"message"===this.type&&this.messageChild.timerClose()})))},bottom(t){this.popupstyle="bottom",this.ani=["slide-bottom"],this.transClass={position:"fixed",left:0,right:0,bottom:0,paddingBottom:this.safeAreaInsets+"px",backgroundColor:this.bg,borderRadius:this.borderRadius||"0"},t||this.showPoptrans()},center(t){this.popupstyle="center",this.ani=["zoom-out","fade"],this.transClass={position:"fixed",display:"flex",flexDirection:"column",bottom:0,left:0,right:0,top:0,justifyContent:"center",alignItems:"center",borderRadius:this.borderRadius||"0"},t||this.showPoptrans()},left(t){this.popupstyle="left",this.ani=["slide-left"],this.transClass={position:"fixed",left:0,bottom:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},t||this.showPoptrans()},right(t){this.popupstyle="right",this.ani=["slide-right"],this.transClass={position:"fixed",bottom:0,right:0,top:0,backgroundColor:this.bg,borderRadius:this.borderRadius||"0",display:"flex",flexDirection:"column"},t||this.showPoptrans()},showPoptrans(){this.$nextTick((()=>{this.showPopup=!0,this.showTrans=!0}))}}},[["render",function(t,s,d,p,m,g){const f=e("uni-transition"),y=u,k=e("keypress");return m.showPopup?(i(),a(y,{key:0,class:r(["uni-popup",[m.popupstyle,g.isDesktop?"fixforpc-z-index":""]])},{default:o((()=>[n(y,{onTouchstart:g.touchstart},{default:o((()=>[m.maskShow?(i(),a(f,{key:"1",name:"mask","mode-class":"fade",styles:m.maskClass,duration:m.duration,show:m.showTrans,onClick:g.onTap},null,8,["styles","duration","show","onClick"])):l("",!0),n(f,{key:"2","mode-class":m.ani,name:"content",styles:m.transClass,duration:m.duration,show:m.showTrans,onClick:g.onTap},{default:o((()=>[n(y,{class:r(["uni-popup__wrapper",[m.popupstyle]]),style:c(g.getStyles),onClick:g.clear},{default:o((()=>[h(t.$slots,"default",{},void 0,!0)])),_:3},8,["style","class","onClick"])])),_:3},8,["mode-class","styles","duration","show","onClick"])])),_:3},8,["onTouchstart"]),m.maskShow?(i(),a(k,{key:0,onEsc:g.onTap},null,8,["onEsc"])):l("",!0)])),_:3},8,["class"])):l("",!0)}],["__scopeId","data-v-c57d8e96"]]);const Y=s({components:{UniPopup:L},props:{breadcrumb:{type:Array,default:()=>["监控工作台","电池信息"]},active:{type:String,default:"电池信息"},userName:{type:String,default:"skr"},role:{type:String,default:"系统管理员"},wsUrl:{type:String,default:""}},data:()=>({motorType:1,_armSent:!1,_offMsgBattery:null,timerMotor:null,timer:null,IP:"",now:"",openGroups:{},menu:U,routeMap:D,collapsed:!1,battery:O(),status:"未连接",chassisIp:"",chassisType:0,chassisTypeList:["全向轮通用智能底盘"]}),created(){this.IP=localStorage.getItem("ip"),localStorage.getItem("isLogin"),this.menu.forEach(((t,s)=>this.openGroups[s]=!0)),this.tick(),this.timer=setInterval((()=>this.tick()),1e3),this.IP&&this.connectWebSocket()},beforeDestroy(){this.timer&&clearInterval(this.timer),this.timerMotor&&clearInterval(this.timerMotor),this._offMsgBattery&&this._offMsgBattery()},methods:{openSwitchChassis(){this.chassisIp=this.IP||localStorage.getItem("ip")||"",this.$refs.switchPopup.open()},closeSwitchChassis(){this.$refs.switchPopup.close()},saveChassis(){this.chassisIp?(localStorage.setItem("ip",this.chassisIp),this.IP=this.chassisIp,this.closeSwitchChassis(),p({title:"已切换,正在连接...",icon:"none"}),setTimeout((()=>{window.location.reload()}),600)):p({title:"请输入底盘IP",icon:"none"})},connectWebSocket(){this.client=new N("ws://"+this.IP+":3001"),this._offMsgBattery&&this._offMsgBattery(),this._offMsgBattery=this.client.addMessageListener((t=>{this.status="在线",this.handleServerMessageBattery(t)})),this.client.connect(),setTimeout((()=>{this.getMotorAllInfo(),this.timerMotor=setInterval((()=>this.getMotorAllInfo()),1e5)}),2e3)},startArm(){this._armSent||(this._armSent=!0,m({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))},handleServerMessageBattery(t){const s=t.cmd,e=t.data||{};if("10052"==s)this.motorType=2,x(t.data.SOC),this.battery=t.data.SOC;else if(s===v.BATTERY){if(Object.keys(e||{}).length>0)for(const t in e)"BatLevel"==t&&(x(e[t]),this.battery=e[t]);return}},getMotorAllInfo(){if(1!=this.motorType)return;this.data=[];[4].forEach(((t,s)=>{setTimeout((()=>{this.client.sendCmd(v.BATTERY,{saddr:t})}),500*s)}))},tick(){const t=new Date,s=t=>String(t).padStart(2,"0");this.now=`${t.getFullYear()}/${s(t.getMonth()+1)}/${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}:${s(t.getSeconds())}`},toggleGroup(t){if(this.collapsed)return this.collapsed=!1,void this.$set(this.openGroups,t,!0);this.$set(this.openGroups,t,!this.openGroups[t])},onMenu(t){if(t===this.active)return;const s=this.routeMap[t];s&&g({url:s})}}},[["render",function(t,s,c,d,p,m){const g=u,_=A,B=T,x=w,O=I,P=R,v=S,N=e("uni-popup");return i(),f(b,null,[n(g,{class:"admin-layout"},{default:o((()=>[n(g,{class:"topbar"},{default:o((()=>[n(g,{class:"topbar-left"},{default:o((()=>[n(g,{class:"brand-cn-menu"},{default:o((()=>[y("Angellun安捷轮")])),_:1}),n(g,{class:"brand-sub-menu"},{default:o((()=>[y("轮式机器人通用智能底盘-控制台")])),_:1})])),_:1}),n(g,{class:"topbar-center"},{default:o((()=>[n(g,{class:"top-info-online"},{default:o((()=>[n(g,{class:"online-marker"}),y("底盘"+k(p.status)+" ",1),n(_,{class:"dl",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAAAuxJREFUaEPtmUFo01AYx/8vRSeedhFtkoKeRAR1N0EPm2NXDwXBXWWI4mVgmww8WEEYeYvoQQTBIp7cYaJeBd0EjyruspNQ0TYdevAgTEGbJxlb1ySvfUlsalLSY977vi+/7/+9l/e+EgzJjwwJBzKQpCmZKZIpElMGstKKKbGR3Q6xIrXZUYzsHgfDiUjpydmPcMCstW0/zeZx8E7T5auhVQL7ZuwZ1IUPovl+RazyRYDcFxlyxxlmoNCqa8zSHkCmM+5n5WWAjAeO0bInUDBXes3ngYQLsu2dYREKnfZAFAE8gUzdcayQIGArkBcmBgNCckeRn19rB6tV9mBk4z2AI8kAYbgRqAQU6q57SzMBXN209SoSZI0QXN+J2w9FAtSnD7ReOgNJetl+7gURZcYBTQSIpb0BcCrdIJZ2DcBNV9JTp8jXuTH8sR019sYC8qXk37K3tmXx9htmjTS05yA461sC/VLEAclJy7wk9Q+kUb4CQu5y13FqQNZLh9Air0FIId0gTb0Kxi503VVToci6fh42eyz6NHDGV0FyU8jPf/ONdfuOxLZGvldG8XPjFYCx0CCMTEMxFrl2Awdp6gYY08JDoArFcyLudDJQkIY2BYIXESA+w/49icLtj11tBwrS7S14deyaSy5BNnrfd1IAsgSZnhOqmGgQhl8grdOQb71LNwghOvIGFUI4E5KriPhi5ALsBeLNRCyHRicIb7Hb9iRU0/neBPsl4mLlBWEwoNC5YARbs5IHQtawi53EPvrj/4MEaT50Nh5cithFyOZTX/0Hoer7nV0Y1LOQt0EYHkKh7hNxU78Mxu4JXfomiDcL8cVKGJUDIklLmy1Xldbb5nVNRY68BWP7hS77BBKyZcoBITgM1XQfQ0R3ll50Aa7bfkV6NbElMG68PN1p4jml5e3TWloRDMfCKwEgchM7UrQOo7p+HKqx+q9uwtoP8f8jYVORkPmZIgkRov0amSKZIjFlICutmBIb2e1fy8AAUeM/mmcAAAAASUVORK5CYII="}),y(" "+k(p.battery)+"% ",1)])),_:1}),n(g,{class:"ip-row"},{default:o((()=>[n(B,{class:"top-info"},{default:o((()=>[y("底盘IP:"+k(p.IP),1)])),_:1}),n(g,{class:"switch-btn",onClick:m.openSwitchChassis},{default:o((()=>[y("切换底盘 ▶")])),_:1},8,["onClick"])])),_:1})])),_:1}),n(g,{class:"topbar-right"},{default:o((()=>[n(B,{class:"time"},{default:o((()=>[y(k(p.now),1)])),_:1}),n(g,{class:"user-box"},{default:o((()=>[n(_,{class:"ava-img",src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAAXNSR0IArs4c6QAABUZJREFUaEPdmmtsVEUUx3/TSim0SOny6BOrqDwExMZETQmvgJiCESmiWKImRoIokiilohBAECgBkoJQgx/USGMgQBBpU4gSfPABTSpCIBQVS6U8u23pE1rbMXOXhm3d7p07d4nS+bh7/v9z/nfumTlz5gpCNapkCpI0JKkIhiBJQTAASYzlQlCN5DKCUiSnERQjOEIfURqKEIQrkqtyMGHMQjANycNGXIJfkeyllS/pJ0qMOKznZDKuyDGEswCYbgIPgtlDC7n0F9875XUm5KJMoRurEGQ6deTIXpJPM0uI13/t9IV45WtIchH0cBSUqbGkEcECPOITHQo9IRUyD8FcHcKQ20g+pq943Y43uJDfZHdi2Q1MsSO6zf8XUEkGD4gbnfnpXIhPRCEw4TYHqUt/iErSOxPTuRCv3P8/mImOIgvwiKmBlAcWEsKciLhw3vLblJCk++SD23WSM/8WolYn2ObGa1TxUWIO7ifqeDER5WU+IYkDqR+ZSs34ydQ+NtoNvcLO6biatRfi2ydOmS6xYQ31xOVtJHbfzqCBVk+agjcjk8ahI8wEqaW5mWH++0x7IRVyu5vNbvhYZ4GdyS+gKWmgqZh8+orZbeBbQnxlx3dmrJC8Mpve36hFTn/UpI2nbPUmfUBHyxbGtpUzt4R4pdovjGqnHiUnGTTnBaOAyrM/oCr9WSMssAePyFBgnxBfFXvalM2zO5/4TWuN4FVTMyjPWm6EtUCtDFFVs0+IVyqmZaZsySuy6H2oyAjeMHwUZ7d8YYS9CVqBRyz3CamUx4zPE8DQqWmE19YYBdPaoyenio4aYS2QOs/EilECdbJr5U9zJrj/1eeI/N3szWyKS+DMjgNu3EMY9woqZSaS7W6Y4jfn4NllRlH7+BjO5Wxx417NymyBV24A3nbDFFO0j6Q17xtReGdkcnH+u0ZYP9BGNSMFSNLdMIXV1zFo7iy6lznvI5Ru2Ebdo0+4ca9mpFDNyElgmDsmiP7pCClZzs5eFTNf4tIbWW5dK/wpNSMVSDyhYOv/2Vb6f5qnRVUzegJlH+Zq2doaCbxqRv4Gwm2NNQ0iz54hPnctUcd+Dohoie6F2s1rxkzUZNQyawm5EOU27MZ17v7hW7qX/uHLGymt4vBGcgqNQx7i+n0PakXnwKglpK+WtT81NRF1opieJ4oDtM0kDSNSqR+RioyIcBCnjenNVyskya7yo+fxXywRSkywoUQoMQ0jH+HKK/NCIchKdlfLb7erl4n7aB29Dx80CujauCe59OYimvsNMMJboJvLr/GG2KdwL4k5S80D8EOWZ6+kKn2aKZe1IRqVKL2OHOae9+abOg6IO7d6M7Vp45xzWiWKQdEYdr2RwdMnEF5f59xpEERLVDQlew7RGumwK2sVjWo4LOOTVmYT4/BYq6u4emI655fm6Jr7lfEK4uBg1e3yBQbPnKzvyMCyZOcBmgck6CL9DlYOjrrRR38kZZFtT1k3iIB2pevyqNPtfbU76vpmRav50HfH58RtXe8qUDvwpXkLqXj+ZTsz9X+H5oP6SbMdZNL20YnI3+baxHT+0smTgO0gxaTRoEtcs4Q+RV85jc2RfdVTz1C+eFVwjLrVCtigUzCNlmns17tIWL/CUWBOjS8sXEbl0zM6h9m2TH25YtvEVuVI8rJ3nManZe/NeJGLby22s7VpYrfBNa4V7qqutMr0UI6muESa42yWXe1rhbbIusRFjxLTZa7ebom5wy9D/V9+jZwJZa604wrJ9bQ/Y5f4YKBNUJf4hMN/du74j2o6JsId/5lToMz+jz88+wdlEPUoD3fCKAAAAABJRU5ErkJggg=="}),n(g,{class:"user-info"},{default:o((()=>[n(B,{class:"user"},{default:o((()=>[y(k(c.userName),1)])),_:1}),n(B,{class:"role"},{default:o((()=>[y(k(c.role),1)])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),n(g,{class:"body"},{default:o((()=>[n(g,{class:r(["toggle-btn",p.collapsed?"toggle-btn-left":"toggle-btn-right"]),onClick:s[0]||(s[0]=t=>p.collapsed=!p.collapsed)},{default:o((()=>[n(B,null,{default:o((()=>[y(k(p.collapsed?"»":"«"),1)])),_:1})])),_:1},8,["class"]),n(x,{class:r(["sidebar",{collapsed:p.collapsed}]),"scroll-y":""},{default:o((()=>[(i(!0),f(b,null,C(p.menu,((t,s)=>(i(),a(g,{class:"menu-group",key:s},{default:o((()=>[n(g,{class:"group-title",onClick:t=>m.toggleGroup(s)},{default:o((()=>[n(_,{class:"menu",src:`/static/menu${s}.png`},null,8,["src"]),p.collapsed?l("",!0):(i(),a(B,{key:0,class:"group-text"},{default:o((()=>[y(k(t.title),1)])),_:2},1024)),n(B,{class:r(["group-arrow",{open:p.openGroups[s]}])},{default:o((()=>[y("▾")])),_:2},1032,["class"])])),_:2},1032,["onClick"]),E(n(g,{class:"group-children"},{default:o((()=>[(i(!0),f(b,null,C(t.children,(t=>(i(),a(g,{class:r(["menu-item",{active:c.active===t}]),key:t,onClick:s=>m.onMenu(t)},{default:o((()=>[n(g,{class:r(["menu-marker",{active:c.active===t}])},null,8,["class"]),y(k(t),1)])),_:2},1032,["class","onClick"])))),128))])),_:2},1536),[[M,!p.collapsed&&p.openGroups[s]]])])),_:2},1024)))),128))])),_:1},8,["class"]),n(g,{class:"main"},{default:o((()=>[n(g,{class:"breadcrumb"},{default:o((()=>[(i(!0),f(b,null,C(c.breadcrumb,((t,s)=>(i(),a(B,{class:"crumb",key:s},{default:o((()=>[y(k(t),1),s<c.breadcrumb.length-1?(i(),a(B,{key:0,class:"sep"},{default:o((()=>[y(" / ")])),_:1})):l("",!0)])),_:2},1024)))),128))])),_:1}),n(g,{class:"content"},{default:o((()=>[h(t.$slots,"default",{},void 0,!0)])),_:3})])),_:3})])),_:3})])),_:3}),n(N,{ref:"switchPopup",type:"center","background-color":"#10172b","border-radius":"12px"},{default:o((()=>[n(g,{class:"switch-modal"},{default:o((()=>[n(g,{class:"switch-title"},{default:o((()=>[n(B,null,{default:o((()=>[y("切换底盘")])),_:1}),n(B,{class:"switch-close",onClick:m.closeSwitchChassis},{default:o((()=>[y("✕")])),_:1},8,["onClick"])])),_:1}),n(g,{class:"switch-item"},{default:o((()=>[n(B,{class:"switch-label"},{default:o((()=>[y("底盘IP地址")])),_:1}),n(O,{class:"switch-input",type:"text",modelValue:p.chassisIp,"onUpdate:modelValue":s[1]||(s[1]=t=>p.chassisIp=t),placeholder:"请输入底盘IP"},null,8,["modelValue"])])),_:1}),n(g,{class:"switch-item"},{default:o((()=>[n(B,{class:"switch-label"},{default:o((()=>[y("底盘类型")])),_:1}),n(P,{range:p.chassisTypeList,onChange:s[2]||(s[2]=t=>p.chassisType=t.detail.value)},{default:o((()=>[n(g,{class:"switch-picker"},{default:o((()=>[y(k(p.chassisTypeList[p.chassisType])+" ﹀",1)])),_:1})])),_:1},8,["range"])])),_:1}),n(v,{class:"switch-save",onClick:m.saveChassis},{default:o((()=>[y("保存")])),_:1},8,["onClick"])])),_:1})])),_:1},512)],64)}],["__scopeId","data-v-7a1a3d03"]]);export{Y as A,v as C,N as J,D as R,L as U,O as g,P as o};
|