Files
Migu2.0/MiGu.Server/wwwroot/assets/MonitorMapView-CClr5C8k.js
T
zhaowei.huangandCursor 42978930ca feat: 迁入 MiGu.Server、平台前端与车辆列表 reflection 回退
从 Simple-FR 拆出 Platform.Server 并重命名为 MiGu.Server;frontends 源码与构建脚本迁入本仓库。地图监控在 projection/cars 失败或为空时回退 reflection 车辆列表;Simple 仓库已移除旧 Platform.Server。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 18:16:34 +08:00

3 lines
4.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{aG as A,bo as G,b1 as L,aC as d,aF as a,bB as o,bb as r,E as j,a2 as H,b3 as i,aE as u,bj as _,bm as c,x as Y,az as f,u as Z,a1 as q,a0 as J,a4 as K,ai as b,bd as I,aA as S,F as Q,G as X,ag as ee,R as te,aR as ae,aB as oe,av as le,_ as ne,s as se,Y as g,Z as re,al as ie}from"./index-DrvLDslf.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 *//* empty css */import{W as ue}from"./Workspace3D-D7MYl2zT.js";import{W as ce}from"./WorkspaceCanvasToolbar-1mCqpdq_.js";import{O as pe}from"./ops-BCeFEEjY.js";import{l as me,a as de}from"./projection-CizY2UtH.js";import{e as _e}from"./ops-CZkWvMAR.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./reflection-Dr3WM5Rz.js";const fe={class:"monitor-map-page"},ve={class:"canvas-with-toolbar"},be={class:"ops-grid"},ge=A({__name:"MonitorMapView",setup(ye){const y=G(),E="localhost:8223",p=r("car"),s=r(""),w=r([]),k=r([]),m=r(null),v=r([]),$=le(()=>p.value==="car"?w.value:k.value);function M(t){return t.target===p.value||t.target==="note"}async function B(t){if(!s.value&&t.target!=="note"){g.warning("请先选择目标");return}if(t.needConfirm)try{await re.confirm(`确认执行 [${t.label}]
目标:${s.value}`,"二次确认",{type:"warning"})}catch{return}try{const e=await _e({opCode:t.code,targetId:s.value,reason:""});g.success(`已执行 ${t.label}auditId=${e.auditId}`)}catch(e){g.error(`执行失败:${e instanceof Error?e.message:String(e)}`)}}function O(t){m.value=t}function R(t){v.value=t,t.length===1&&t[0].startsWith("UICar-")&&(p.value="car",s.value=t[0].replace("UICar-",""))}return L(async()=>{const t=await me();w.value=t.map(n=>({label:`${n.name} (${n.id})`,value:n.id}));const e=await de();k.value=e.map(n=>({label:`${n.name} (${n.id})`,value:n.id}))}),(t,e)=>{const n=j,x=Y,C=J,T=q,W=ne,D=K,h=X,F=Q,V=Z,z=te,N=ee,P=se,U=H;return i(),d("div",fe,[a(n,{type:"info",closable:!1,"show-icon":"",style:{"margin-bottom":"12px"}},{default:o(()=>[u(" RCSMonitor 只读视图:iframe 嵌入 SimpleLite webVRender"+_(c(E))+"),右侧可执行白名单运维动作。 ",1)]),_:1}),a(U,{gutter:12,class:"main-row"},{default:o(()=>[a(x,{span:17},{default:o(()=>[f("div",ve,[a(ue,{host:c(E),scope:"RCSMonitor",token:c(y).token??"","read-only":!0,"embed-ui":!0,onPick:O,onSelect:R},null,8,["host","token"]),a(ce)])]),_:1}),a(x,{span:7},{default:o(()=>[a(V,{shadow:"never"},{header:o(()=>[...e[2]||(e[2]=[f("span",null,"选中目标",-1)])]),default:o(()=>[a(T,{modelValue:p.value,"onUpdate:modelValue":e[0]||(e[0]=l=>p.value=l),size:"small"},{default:o(()=>[a(C,{label:"car"},{default:o(()=>[...e[3]||(e[3]=[u("车辆",-1)])]),_:1}),a(C,{label:"task"},{default:o(()=>[...e[4]||(e[4]=[u("任务",-1)])]),_:1})]),_:1},8,["modelValue"]),a(D,{modelValue:s.value,"onUpdate:modelValue":e[1]||(e[1]=l=>s.value=l),placeholder:"选择目标 ID",filterable:"",style:{width:"100%","margin-top":"8px"}},{default:o(()=>[(i(!0),d(b,null,I($.value,l=>(i(),S(W,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),a(F,{column:1,border:"",size:"small",style:{"margin-top":"8px"}},{default:o(()=>[a(h,{label:"最近 Pick"},{default:o(()=>[u(_(m.value?`(${m.value.x.toFixed(0)}, ${m.value.y.toFixed(0)})`:"—"),1)]),_:1}),a(h,{label:"最近 Select"},{default:o(()=>[u(_(v.value.length?v.value.join(", "):"—"),1)]),_:1})]),_:1})]),_:1}),a(V,{shadow:"never",style:{"margin-top":"12px"}},{header:o(()=>[...e[5]||(e[5]=[f("span",null,"运维白名单(按权限隐藏)",-1)])]),default:o(()=>[f("div",be,[(i(!0),d(b,null,I(c(pe),l=>(i(),d(b,{key:l.code},[c(y).hasOp(l.code)&&M(l)?(i(),S(P,{key:0,type:l.needConfirm?"warning":"primary",size:"small",plain:"",onClick:Ee=>B(l)},{default:o(()=>[u(_(l.label)+" ",1),a(N,{content:l.description},{default:o(()=>[a(z,{style:{"margin-left":"4px"}},{default:o(()=>[a(c(ae))]),_:1})]),_:1},8,["content"])]),_:2},1032,["type","onClick"])):oe("",!0)],64))),128))])]),_:1})]),_:1})]),_:1})])}}}),He=ie(ge,[["__scopeId","data-v-96c491ac"]]);export{He as default};