1 |
- import{l as h}from"./index-8118450a.js";import{e as C,A as g}from"./index-4a8d9d3e.js";import{u as I}from"./base-4e75754a.js";/* empty css */import{a as s,U as y,V as r,W as m,j as _,X as u,G as f,u as o,a4 as D,a7 as v,p as w,o as N,a3 as S,a1 as B,F as T,$ as V}from"./vue-676ffbd1.js";import"./vue-router-dd0356f0.js";import"./index.vue_vue_type_style_index_0_scoped_f6f545f0_lang-dc16872f.js";import"./_plugin-vue_export-helper-c27b6911.js";const L={__name:"History",props:["tableData"],setup(k){const n=s(!1);s(),s({content:{},id:20230721113801});let t=[{title:"时间",dataIndex:"eventtime"},{title:"告警级别",dataIndex:"level"},{title:"告警内容",dataIndex:"paramvalues"}];const l=()=>{n.value=!0},i=()=>{n.value=!1};return(x,c)=>{const d=y("a-button"),p=y("a-table"),e=y("a-drawer");return r(),m("div",null,[_(d,{type:"link",onClick:l},{default:u(()=>[f("告警日志")]),_:1}),_(e,{visible:n.value,"onUpdate:visible":c[0]||(c[0]=a=>n.value=a),class:"custom-class",title:"告警日志",placement:"right",width:"1000",closable:!1,onClose:i},{default:u(()=>[_(p,{"row-class-name":(a,b)=>b%2===1?"table-striped":null,dataSource:k.tableData,columns:o(t),pagination:!1,bordered:"",scroll:{x:"max-content"}},{bodyCell:u(({column:a,record:b})=>[D("div",null,v(b[a.dataIndex]),1)]),_:1},8,["row-class-name","dataSource","columns"])]),_:1},8,["visible"])])}}},G={__name:"index",props:{},emits:[],setup(k,{emit:n}){I();let t=s([]),l=s([]),i=s([{label:"搜索",key:"condition",type:"input"},{label:"告警类型",key:"buildtype",type:"select",dataSource:t.value},{label:"告警级别",key:"level",type:"select",dataSource:[{value:0,remarks:"停用"},{value:1,remarks:"启用"}]},{label:"创建时间",key:"dateRange",type:"datepickerRange",objKeys:["begindate","enddate"]}]);w("buildTypeList",t),w("eventlevelList",l);let x=s({id:20230816095802,content:{pageNumber:1,pageSize:20,where:{condition:"",buildtype:"",level:"",begindate:"",enddate:""}}}),c=async()=>{const d=await g.optionstype("eventbuildtype");t.value=d.data,i.value[1].dataSource=t.value,console.log("触发类型",t.value);const p=await g.optionstype("eventlevel");l.value=p.data,i.value[2].dataSource=l.value,console.log("警告等级",l.value)};return N(async()=>{c()}),(d,p)=>(r(),S(h,{ref:"list",param:o(x),tableName:"warningSetTable",searchType:o(i),detailPage:{}},{operation:u(()=>[]),tb_cell:u(({data:e})=>[e.column.dataIndex==="operation"?(r(),S(L,{key:0,tableData:e.record.lasteventparamvalues},null,8,["tableData"])):e.column.dataIndex==="isused"?(r(),m("span",{key:1,style:B({color:o(C).statusAndColor(e.record.isused?"启用":"停用")})},v(e.record.isused?"启用":"停用"),5)):e.column.dataIndex==="buildtype"?(r(),m(T,{key:2},[f(v(o(t).filter(a=>a.value==e.record.buildtype)[0]?o(t).filter(a=>a.value==e.record.buildtype)[0].remarks:""),1)],64)):e.column.dataIndex==="lasteventlevel"?(r(),m(T,{key:3},[f(v(o(l).filter(a=>a.value==e.record.lasteventlevel)[0]?o(l).filter(a=>a.value==e.record.lasteventlevel)[0].remarks:""),1)],64)):V("",!0)]),_:1},8,["param","searchType"]))}};export{G as default};
|