import{a0 as Y,ax as $}from"./index.17037962789732.js";import"./index.1703796278973300.js";import"./index.170379627897315.js";import"./index.170379627897317.js";import"./index.1703796278973301.js";import"./index.1703796278973302.js";import"./index.170379627897332.js";import"./index.1703796278973303.js";import"./index.170379627897339.js";import"./index.170379627897316.js";import"./index.170379627897314.js";import"./index.1703796278973304.js";import"./index.1703796278973305.js";import"./index.1703796278973306.js";import"./index.170379627897336.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import{d as D,c as E}from"./log.17037962789732.js";import{d as H}from"./configuration.1703796278973.js";import{d as J,O as R,k as s,w as C,r as p,o as c,c as y,a as o,b as i,u as n,t as V,A as j,x as M,F as O,h as G,B as K}from"./vue.1703796278973.js";import{a as Q}from"./dayjs.min.1703796278973.js";import{u as U}from"./alarm.1703796278973.js";import{_ as W}from"./info.vue_vue_type_script_setup_true_lang.1703796278973.js";import{u as X}from"./useParams.1703796278973.js";import"./index.17037962789733.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897320.js";import"./index.170379627897321.js";import"./permission.1703796278973.js";import"./system.1703796278973.js";import"./comm.1703796278973.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./_plugin-vue_export-helper.1703796278973.js";import"./default.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";import"./index.170379627897337.js";import"./index.1703796278973310.js";import"./index.1703796278973313.js";import"./vue-json-viewer.1703796278973.js";const jt=J({__name:"index",setup(Z){var v;const g=(v=R().params)==null?void 0:v.id,{params:h}=X();let l=s(!1),k=s();const u=[{title:"告警时间",dataIndex:"alarmTime",key:"alarmTime",scopedSlots:!0,search:{type:"date"}},{title:"告警名称",dataIndex:"alarmConfigName",key:"alarmConfigName"},{title:"说明",dataIndex:"description",key:"description"},{title:"操作",dataIndex:"action",key:"action",scopedSlots:!0}],I=(e,t)=>e?[{key:"view",text:"查看",tooltip:{title:"查看"},icon:"SearchOutlined",onClick:()=>{d.value=e,l.value=!0}}]:[],S=[{column:"alarmRecordId",termType:"eq$not",value:g,type:"and"}];let x=s({});const T=U(),{data:P}=T;let d=s(),f=s();const b=async e=>{const t=await E({...e});return t.status===200?(f.value=t.result.data[0],{code:t.message,result:{data:t.result.data,pageIndex:t.result.pageIndex,pageSize:t.result.pageSize,total:t.result.total},status:t.status}):{code:200,result:{data:[],pageIndex:0,pageSize:0,total:0},status:200}};C(async()=>{var t;const e=await D(g);e.status===200&&(P.current=e.result,e.result.targetType==="device"&&u.splice(2,0,{dataIndex:"targetName",title:"告警设备",key:"targetName"}),H((t=e.result)==null?void 0:t.alarmConfigId).then(r=>{var m;r.status===200&&(k.value=(m=r.result)==null?void 0:m.description)}))});const N=e=>{x.value=e},w=()=>{l.value=!1};return C(()=>{d.value=f.value,h.value.detail&&f.value&&(l.value=!0)}),(e,t)=>{const r=p("pro-search"),m=p("AIcon"),A=z,B=Y,q=$,F=p("FullPage"),L=p("page-container");return c(),y(L,null,{default:o(()=>[i(r,{columns:u,target:"alarm-log-detail",onSearch:N}),i(F,null,{default:o(()=>[i(q,{columns:u,model:"TABLE",request:b,params:n(x),defaultParams:{terms:S,sorts:[{name:"alarmTime",order:"desc"}]}},{alarmTime:o(_=>[V(j(n(Q)(_.alarmTime).format("YYYY-MM-DD HH:mm:ss")),1)]),action:o(_=>[i(B,null,{default:o(()=>[(c(!0),M(O,null,G(I(_,"table"),a=>(c(),y(A,{key:a.key,disabled:a.disabled,popConfirm:a.popConfirm,tooltip:{...a.tooltip},onClick:a.onClick,type:"link",style:{padding:"0px"}},{icon:o(()=>[i(m,{type:a.icon},null,8,["type"])]),_:2},1032,["disabled","popConfirm","tooltip","onClick"]))),128))]),_:2},1024)]),_:1},8,["params","defaultParams"])]),_:1}),n(l)?(c(),y(W,{key:0,data:n(d),onClose:w,description:n(k)},null,8,["data","description"])):K("",!0)]),_:1})}}});export{jt as default};
