import{aI as k,b7 as M,aE as T,aH as t,bJ as e,bh as p,a2 as V,b9 as z,w as B,a6 as D,aB as d,bq as c,t as I,aa as N,ab as S,ad as P,aG as v,$ as q,ax as _,ak as A}from"./index-Dg4NaXsE.js";/* empty css             *//* empty css                *//* empty css                     *//* empty css                  */import"./el-tooltip-l0sNRNKZ.js";/* empty css                    *//* empty css                        *//* empty css                    *//* empty css               *//* empty css               *//* empty css                     */import{l as G,a as H}from"./projection-BMms551H.js";import{l as J}from"./ops-CsVl7GhE.js";import"./reflection-B_glb6eT.js";const R={class:"muted"},$=k({__name:"MonitorDashboardView",setup(j){const n=p([]),m=p([]),i=p([]),b=_(()=>n.value.filter(l=>l.state!=="offline").length),x=_(()=>m.value.filter(l=>l.status==="running").length),C=_(()=>n.value.filter(l=>l.state==="fault").length);function E(l){switch(l){case"running":return"success";case"idle":return"info";case"charging":return"warning";case"paused":return"warning";case"fault":return"danger";case"offline":return"info";default:return"info"}}return M(async()=>{[n.value,m.value,i.value]=await Promise.all([G(),H(),J()])}),(l,r)=>{const u=D,o=B,f=V,a=S,g=P,y=q,h=N,w=I;return z(),T("div",null,[t(f,{gutter:14,class:"kpi-row"},{default:e(()=>[t(o,{span:6},{default:e(()=>[t(u,{title:"车辆在线",value:b.value},{suffix:e(()=>[d("span",R,"/ "+c(n.value.length),1)]),_:1},8,["value"])]),_:1}),t(o,{span:6},{default:e(()=>[t(u,{title:"任务进行中",value:x.value},null,8,["value"])]),_:1}),t(o,{span:6},{default:e(()=>[t(u,{title:"故障车辆",value:C.value},null,8,["value"])]),_:1}),t(o,{span:6},{default:e(()=>[t(u,{title:"今日运维动作",value:i.value.length},null,8,["value"])]),_:1})]),_:1}),t(f,{gutter:14,style:{"margin-top":"14px"}},{default:e(()=>[t(o,{span:14},{default:e(()=>[t(w,{shadow:"never"},{header:e(()=>[...r[0]||(r[0]=[d("span",null,"实时车辆",-1)])]),default:e(()=>[t(h,{data:n.value,size:"small","max-height":"360",stripe:""},{default:e(()=>[t(a,{prop:"name",label:"名称",width:"100"}),t(a,{prop:"state",label:"状态",width:"90"},{default:e(s=>[t(g,{size:"small",type:E(s.row.state)},{default:e(()=>[v(c(s.row.state),1)]),_:2},1032,["type"])]),_:1}),t(a,{prop:"group",label:"分组",width:"100"}),t(a,{label:"电量",width:"160"},{default:e(s=>[t(y,{percentage:Math.round(s.row.batterySoc*100),"stroke-width":8},null,8,["percentage"])]),_:1}),t(a,{prop:"missionId",label:"当前任务"})]),_:1},8,["data"])]),_:1})]),_:1}),t(o,{span:10},{default:e(()=>[t(w,{shadow:"never"},{header:e(()=>[...r[1]||(r[1]=[d("span",null,"最近运维动作",-1)])]),default:e(()=>[t(h,{data:i.value,size:"small","max-height":"360",stripe:""},{default:e(()=>[t(a,{prop:"ts",label:"时间",width:"180"}),t(a,{prop:"opCode",label:"动作"}),t(a,{prop:"target",label:"目标",width:"100"}),t(a,{prop:"result",label:"结果",width:"80"},{default:e(s=>[t(g,{size:"small",type:s.row.result==="ok"?"success":"danger"},{default:e(()=>[v(c(s.row.result),1)]),_:2},1032,["type"])]),_:1})]),_:1},8,["data"])]),_:1})]),_:1})]),_:1})])}}}),ot=A($,[["__scopeId","data-v-53088435"]]);export{ot as default};
