import{$ as C,aK as L}from"./index.17037962789732.js";import"./index.1703796278973305.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.170379627897335.js";import{q as V}from"./config.1703796278973.js";import{a as k}from"./dayjs.min.1703796278973.js";import{q as $}from"./log.17037962789732.js";import{d as g,s as B,k as p,v as H,p as M,o as t,x as a,z as d,b as I,a as j,A as n,B as o,u as i,F as x,c as A,G as W,H as z}from"./vue.1703796278973.js";import{u as F}from"./alarm.1703796278973.js";import{_ as E}from"./WarningHandler.vue_vue_type_script_setup_true_lang.1703796278973.js";import{_ as G}from"./_plugin-vue_export-helper.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"./system.1703796278973.js";import"./comm.1703796278973.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";import"./index.170379627897337.js";import"./index.170379627897318.js";import"./index.170379627897319.js";const w=m=>(W("data-v-3c83caea"),m=m(),z(),m),J={class:"warning-info"},K=w(()=>d("div",{class:"header"},[d("div",{class:"header-title"},"最新告警信息")],-1)),P={key:0},R={key:1,style:{width:"120px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},O={key:2,style:{width:"120px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"}},Q={key:3},U={key:4},X={key:5},Z=["onClick"],ee=w(()=>d("a",null,"忽略",-1)),te=g({name:"WarningInfo"}),ae=g({...te,props:{deviceId:{type:String,default:()=>null}},setup(m){const c=m,T=F(),{data:s}=B(T);(()=>{V().then(e=>{var v;e.status===200&&(s.value.defaultLevel=((v=e.result)==null?void 0:v.levels)||[])})})(),p([]),p(!1);const _=p([]),u=p({terms:[{column:"targetId",termType:"eq$not",value:c.deviceId,type:"and"}]}),S=H({columns:[{title:"序号",name:"orderNum",dataIndex:"orderNum",key:"orderNum"},{title:"级别",dataIndex:"level",key:"level",scopedSlots:!0},{title:"告警类型名称",dataIndex:"alarmName",key:"alarmName"},{title:"报警来源",dataIndex:"sourceName",key:"sourceName"},{title:"告警时间",dataIndex:"alarmTime",key:"alarmTime",scopedSlots:!0},{title:"处理状态",dataIndex:"state",key:"state"},{title:"最近处理时间",dataIndex:"handleTime",key:"handleTime"},{title:"操作",key:"action",fixed:"right",ellipsis:!0,scopedSlots:!0}]});M(()=>{c.deviceId?u.value={terms:[{column:"targetType",termType:"eq",value:"device",type:"and"},{column:"targetId",termType:"eq$not",value:c.deviceId,type:"and"}]}:u.value={terms:[{column:"targetId",termType:"eq$not",value:"********",type:"and"}]},y()});const N=e=>{s.value.current=e,s.value.solveVisible=!0},b=()=>{s.value.solveVisible=!1,y()},y=async()=>{const e=await $(u.value);return _.value=e.result.data,e};return(e,v)=>{const D=C,q=L;return t(),a(x,null,[d("div",J,[K,I(q,{columns:i(S).columns,"data-source":i(_),pagination:!1,size:"small",scroll:{y:203,x:800}},{bodyCell:j(({column:r,record:l,index:Y})=>{var f;return[r.key==="orderNum"?(t(),a("span",P,n(Y+1),1)):o("",!0),r.key==="desc"?(t(),a("span",R,n(l.desc),1)):o("",!0),r.key==="state"?(t(),a("span",O,n(l.state.text),1)):o("",!0),r.key==="alarmTime"?(t(),a("span",Q,n(i(k)(l.alarmTime).format("YYYY-MM-DD HH:mm:ss")),1)):o("",!0),r.key==="handleTime"?(t(),a("span",U,n(i(k)(l.handleTime).format("YYYY-MM-DD HH:mm:ss")),1)):o("",!0),r.key==="level"?(t(),a("span",X,n(((f=i(s).defaultLevel.find(h=>h.level===l.level))==null?void 0:f.title)||e.slotProps.level),1)):o("",!0),r.key==="action"&&l.state.value==="warning"?(t(),a(x,{key:6},[d("a",{onClick:h=>N(l)},"确认",8,Z),I(D,{type:"vertical"}),ee],64)):o("",!0)]}),_:1},8,["columns","data-source"])]),i(s).solveVisible?(t(),A(E,{key:0,data:i(s),onCloseSolve:b},null,8,["data"])):o("",!0)],64)}}});const We=G(ae,[["__scopeId","data-v-3c83caea"]]);export{We as default};
