import{av as y,aw as h,W as N}from"./index.17037962789732.js";import"./index.170379627897337.js";import"./index.170379627897315.js";import"./index.170379627897319.js";import"./index.170379627897327.js";import{s as D}from"./index.1703796278973307.js";import{q as J}from"./config.1703796278973.js";import{h as L}from"./moment.1703796278973.js";import{d as k,k as C,l as V,o as v,c as g,a,u as o,b as l,t as s,A as p,B}from"./vue.1703796278973.js";import{_ as I}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./system.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897332.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./permission.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const Y=k({__name:"ViewDialog",props:{visible:{type:Boolean},data:null},emits:["update:visible"],setup(b,{emit:c}){const m=b,u=C([]),i=V(()=>{var r;return m.data.detailJson?JSON.parse(m.data.detailJson):((r=m.data)==null?void 0:r.detail)||m.data});(()=>{J().then(r=>{r.status===200&&(u.value=r.result.levels)})})();const x=r=>{if(u.value.length<1||!r)return"";const n=u.value.find(t=>t.level===r);return n==null?void 0:n.title};return(r,n)=>{const t=y,f=h,w=N;return v(),g(w,{visible:"",title:"详情",width:"1000px",onOk:n[0]||(n[0]=d=>c("update:visible",!1)),onCancel:n[1]||(n[1]=d=>c("update:visible",!1)),class:"view-dialog-container"},{default:a(()=>{var d;return[((d=o(i))==null?void 0:d.targetType)==="device"?(v(),g(f,{key:0},{default:a(()=>[l(t,{span:4,class:"label"},{default:a(()=>[s("告警设备")]),_:1}),l(t,{span:8,class:"value"},{default:a(()=>{var e;return[s(p(((e=o(i))==null?void 0:e.targetName)||""),1)]}),_:1}),l(t,{span:4,class:"label"},{default:a(()=>[s("设备ID")]),_:1}),l(t,{span:8,class:"value"},{default:a(()=>{var e;return[s(p(((e=o(i))==null?void 0:e.targetId)||""),1)]}),_:1})]),_:1})):B("",!0),l(f,null,{default:a(()=>[l(t,{span:4,class:"label"},{default:a(()=>[s("告警名称")]),_:1}),l(t,{span:8,class:"value"},{default:a(()=>{var e,_;return[s(p(((e=o(i))==null?void 0:e.alarmName)||((_=o(i))==null?void 0:_.alarmConfigName)||""),1)]}),_:1}),l(t,{span:4,class:"label"},{default:a(()=>[s("告警时间")]),_:1}),l(t,{span:8,class:"value"},{default:a(()=>{var e;return[s(p(o(L)((e=o(i))==null?void 0:e.alarmTime).format("YYYY-MM-DD HH:mm:ss")),1)]}),_:1}),l(t,{span:4,class:"label"},{default:a(()=>[s("告警级别")]),_:1}),l(t,{span:8,class:"value"},{default:a(()=>[s(p(o(u).length>0&&x(o(i).level)||""),1)]),_:1}),l(t,{span:4,class:"label"},{default:a(()=>[s("告警说明")]),_:1}),l(t,{span:8,class:"value"},{default:a(()=>{var e;return[s(p(((e=o(i))==null?void 0:e.description)||""),1)]}),_:1}),l(t,{span:4,class:"label",style:{display:"flex",height:"440px","align-items":"center"}},{default:a(()=>[s("告警流水")]),_:1}),l(t,{span:20,class:"value",style:{"max-height":"440px",overflow:"auto"}},{default:a(()=>{var e;return[l(o(D),{value:JSON.parse(((e=o(i))==null?void 0:e.alarmInfo)||"{}")},null,8,["value"])]}),_:1})]),_:1})]}),_:1})}}});const oe=I(Y,[["__scopeId","data-v-c024fe16"]]);export{oe as default};
