import{aE as T,Y as C,aF as D,W as S}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import"./index.1703796278973310.js";import{a as w}from"./dayjs.min.1703796278973.js";import{j as x}from"./index.1703796278973313.js";import{J}from"./vue-json-viewer.1703796278973.js";import{d as V,r as Y,o as m,c as f,a,b as t,t as i,A as d,B as y,u as c,z as u}from"./vue.1703796278973.js";const B={style:{"max-height":"500px","overflow-y":"auto"}},q=V({__name:"info",props:{data:Object,description:String},emits:["close"],setup(s,{emit:h}){const l=s,_=()=>{h("close")};return(I,M)=>{const o=T,v=Y("Ellipsis"),j=C,k=D,N=S;return m(),f(N,{visible:"",title:"详情",okText:"确定",cancelText:"取消",width:1e3,onOk:_,onCancel:_},{default:a(()=>[t(k,{bordered:"",column:2},{default:a(()=>[l.data.targetType==="device"?(m(),f(o,{key:0,label:"告警设备",span:1},{default:a(()=>{var e;return[i(d(((e=l.data)==null?void 0:e.targetName)||""),1)]}),_:1})):y("",!0),l.data.targetType==="device"?(m(),f(o,{key:1,label:"设备ID",span:1},{default:a(()=>{var e;return[i(d(((e=l.data)==null?void 0:e.targetId)||""),1)]}),_:1})):y("",!0),t(o,{label:"告警名称",span:1},{default:a(()=>{var e;return[i(d((e=l.data)==null?void 0:e.alarmConfigName),1)]}),_:1}),t(o,{label:"告警时间",span:1},{default:a(()=>{var e;return[i(d(c(w)((e=s.data)==null?void 0:e.alarmTime).format("YYYY-MM-DD HH:mm:ss")),1)]}),_:1}),t(o,{label:"告警级别",span:1},{default:a(()=>{var e,b;return[t(j,{placement:"topLeft",title:((e=(c(x.Store).get("default-level")||[]).find(n=>{var r;return(n==null?void 0:n.level)===((r=s.data)==null?void 0:r.level)}))==null?void 0:e.title)||((b=l.data)==null?void 0:b.level)},{default:a(()=>[t(v,null,{default:a(()=>{var n,r;return[u("span",null,d(((n=(c(x.Store).get("default-level")||[]).find(p=>{var g;return(p==null?void 0:p.level)===((g=s.data)==null?void 0:g.level)}))==null?void 0:n.title)||((r=l.data)==null?void 0:r.level)),1)]}),_:1})]),_:1},8,["title"])]}),_:1}),t(o,{label:"告警说明",span:1},{default:a(()=>[t(v,{style:{width:"calc(100% - 20px)"}},{default:a(()=>[u("span",null,d(s.description||""),1)]),_:1})]),_:1}),t(o,{label:"告警流水",span:2},{default:a(()=>{var e;return[u("div",B,[t(c(J),{value:JSON.parse(((e=s.data)==null?void 0:e.alarmInfo)||"{}"),"expand-depth":5},null,8,["value"])])]}),_:1})]),_:1})]),_:1})}}});export{q as _};
