import{Y as b,aE as j,aF as S}from"./index.17037962789732.js";import"./index.1703796278973310.js";import{_ as N}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import{u as $}from"./instance.17037962789732.js";import{_ as g}from"./Save.vue_vue_type_script_setup_true_lang.17037962789734.js";import{d as h,k as u,w,r as d,o as r,x as f,b as o,a as t,t as l,F as A,h as D,u as m,c as v,A as k,B as F}from"./vue.1703796278973.js";const V={style:{"margin-top":"20px"}},q=h({__name:"index",setup(O){const s=$(),c=u([]),a=u(!1);w(()=>{var n;const i=(((n=s.current)==null?void 0:n.relations)||[]).reverse();c.value=i});const x=()=>{a.value=!1,s.current.id&&s.refresh(s.current.id)};return(i,n)=>{const p=d("AIcon"),y=b,C=N,_=d("Ellipsis"),B=j,E=S;return r(),f("div",V,[o(E,{bordered:""},{title:t(()=>[l(" 关系信息 "),o(C,{type:"link",onClick:n[0]||(n[0]=e=>a.value=!0),hasPermission:"device/Instance:update"},{default:t(()=>[o(p,{type:"EditOutlined"}),l("编辑"),o(y,{title:"管理设备与其他业务的关联关系，关系来源于关系配置"},{default:t(()=>[o(p,{type:"QuestionCircleOutlined"})]),_:1})]),_:1})]),default:t(()=>[(r(!0),f(A,null,D(m(c),e=>(r(),v(B,{span:1,key:e.objectId},{label:t(()=>[o(_,null,{default:t(()=>[l(k(e.relationName),1)]),_:2},1024)]),default:t(()=>[o(_,null,{default:t(()=>[l(k(e!=null&&e.related?((e==null?void 0:e.related)||[]).map(I=>I.name).join(","):""),1)]),_:2},1024)]),_:2},1024))),128))]),_:1}),m(a)?(r(),v(g,{key:0,onSave:x,onClose:n[1]||(n[1]=e=>a.value=!1)})):F("",!0)])}}});export{q as _};
