import{Y as ee,L as te,aE as ae,aF as se,aB as oe,av as ne,aS as ie,aK as le,aw as re}from"./index.17037962789732.js";import"./index.170379627897319.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.1703796278973315.js";import"./index.170379627897327.js";import"./index.1703796278973308.js";import"./index.170379627897334.js";import"./index.1703796278973310.js";import"./index.170379627897333.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_name_PermissionButton_lang.1703796278973.js";import{_ as de}from"./input.vue_vue_type_script_setup_true_lang.1703796278973.js";import{_ as pe}from"./output.vue_vue_type_script_setup_true_lang.1703796278973.js";import{g as q}from"./config.1703796278973.js";import{a as me}from"./comm.1703796278973.js";import{m as k}from"./marked.esm.1703796278973.js";import{d as ue,k as I,a4 as R,r as _e,o as v,x as fe,b as e,a,z as t,u as l,t as M,A as V,c as E,B as H,G as ye,H as ge}from"./vue.1703796278973.js";import{_ as xe}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"./index.170379627897320.js";import"./index.170379627897321.js";import"./permission.1703796278973.js";import"./index.170379627897337.js";import"./index.170379627897318.js";import"./index.1703796278973312.js";import"./system.1703796278973.js";import"./default.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const c=f=>(ye("data-v-ac1f475e"),f=f(),ge(),f),he={class:"alarmFlow-left"},ke={class:"alarmTitle"},Ie=c(()=>t("span",null,"告警数据输出",-1)),ve={class:"alarmTitle"},be=c(()=>t("span",null,"告警处理结果输入",-1)),Te={class:"alarmFlow-right"},Ce={class:"doc"},Se=c(()=>t("h1",null,"功能图示",-1)),we={class:"image"},De=c(()=>t("h1",null,"功能说明",-1)),je=c(()=>t("div",null," 1、平台支持将告警数据输出到kafka，第三方系统可订阅kafka中的告警数据，进行业务处理。 ",-1)),Be=c(()=>t("h2",null,"输出参数",-1)),Ne=c(()=>t("h2",null,"示例",-1)),Oe=["innerHTML"],qe=c(()=>t("div",null," 2、平台支持订阅kafka中告警处理数据，并更新告警记录状态。 ",-1)),Re=c(()=>t("h2",null,"订阅参数",-1)),Me=c(()=>t("h2",null,"示例",-1)),Ve=["innerHTML"],Ee=ue({__name:"index",setup(f){let d=I(),p=I();const L=[{key:"alarmConfigName",name:"告警配置名称",type:"string",desc:"推送的告警配置名称",example:"烟感告警"},{key:"alarmConfigId",name:"告警配置ID",type:"string",desc:"推送的告警配置ID",example:"1605111722418597888"},{key:"Id",name:"告警数据ID",type:"string",desc:"告警唯一性标识",example:"1515992841393119232"},{key:"alarmRecordId",name:"告警记录ID",type:"string",desc:"告警记录的唯一标识，可根据此ID处理告警",example:"ba33a59ca5ebe3dccfcd75fd0575be4e"},{key:"targetType",name:"告警目标类型",type:"string",desc:"告警所属的业务类型，具体有产品、设备、部门、其他",example:"产品"},{key:"targetId",name:"告警目标ID",type:"string",desc:"告警目标唯一性标识",example:"1583300346713661440"},{key:"targetName",name:"告警目标名称",type:"string",desc:"告警目标实例名称",example:"海康烟感"},{key:"alarmTime",name:"告警时间",type:"long",desc:"告警触发时间",example:"1651233650840"},{key:"sourceType",name:"告警源类型",type:"string",desc:"触发告警的源类型。当前只有device",example:"device"},{key:"sourceId",name:"告警源ID",type:"string",desc:"触发告警的源Id。如设备Id",example:"1605138218826821632"},{key:"sourceName",name:"告警源名称",type:"string",desc:"触发告警的源名称。如设备名称",example:"1楼烟感S01"},{key:"level",name:"告警级别",type:"int",desc:"告警严重程度指标",example:1},{key:"description",name:"告警说明",type:"string",desc:"告警规则说明",example:"1楼烟感统一告警规则设置"}],A=[{key:"alarmRecordId",name:"告警记录ID",type:"string",require:"是",desc:"告警记录的唯一标识，可根据此ID处理告警",example:"ba33a59ca5ebe3dccfcd75fd0575be4e"},{key:"alarmConfigId",name:"告警配置ID",type:"string",require:"是",desc:"推送的告警配置ID",example:"1605111722418597888"},{key:"alarmTime",name:"告警时间",type:"long",require:"是",desc:"告警触发时间",example:"1651233650840"},{key:"handleTime",name:"处理时间",type:"long",require:"是",desc:"告警处理时间，不填是默认为消息处理时间",example:"1651233650840"},{key:"describe",name:"处理说明",type:"string",require:"是",desc:"告警处理内容详细描述说明",example:"已联系第三方人员进行告警处理，现告警已恢复"},{key:"type",name:"处理类型",type:"enum",require:"是",desc:"支持system、user",example:"user"},{key:"state",name:"处理后的状态",type:"enum",require:"是",desc:"warning、normal",example:"normal"}],b=[{title:"名称",dataIndex:"name",key:"name",ellipsis:!0},{title:"标识",dataIndex:"key",key:"key",ellipsis:!0},{title:"类型",dataIndex:"type",key:"type",ellipsis:!0},{title:"说明",dataIndex:"desc",key:"desc",width:100,ellipsis:!0},{title:"示例值",dataIndex:"example",key:"example",width:100,ellipsis:!0}],T=[...b];T.splice(3,0,{title:"必填",dataIndex:"require",key:"require",ellipsis:!0});const F=`
  ~~~json
  {
    "alarmRecordId": "ba33a59ca5ebe3dccfcd75fd0575be4e",
    "alarmConfigId": "1605111722418597888",
    "alarmTime": "1651233650840",
    "handleTime": "1651233650841",
    "describe": "已联系第三方人员进行告警处理，现告警已恢复",
    "type": "user",
    "state": "normal"
  }
  ~~~
  `,J=`
  ~~~json
  {
    "alarmConfigId": "1605111722418597888",
    "id": "1515992841393119232",
    "alarmConfigId": "1586989804257853441",
    "alarmConfigName": "烟感告警",
    "alarmRecordId": "ba33a59ca5ebe3dccfcd75fd0575be4e",
    "level": "3",
    "description": "设备温度过高",
    "alarmTime": "1667202964007",
    "sourceType": "device",
    "sourceId": "1605138218826821632",
    "sourceName": "1楼烟感S01",
    "targetType": "device",
    "targetName": "温度探测设备",
    "targetId": "1583300346713661440"
  }
  ~~~
  `,P=new k.Renderer,W=R(k(F)),$=R(k(J));let y=I(!1),g=I(!1);k.setOptions({renderer:P,gfm:!0,pedantic:!1});const C=()=>{q("producer").then(m=>{m.status===200&&(p.value=m.result)})},S=()=>{q("consume").then(m=>{m.status===200&&(d.value=m.result)})};S(),C();const Q=()=>{y.value=!0},z=()=>{y.value=!1},G=()=>{y.value=!1,S()},K=()=>{g.value=!0},Y=()=>{g.value=!1},U=()=>{g.value=!1,C()};return(m,He)=>{const x=_e("AIcon"),w=ee,D=ce,h=te,u=ae,j=se,B=oe,N=ne,X=ie,O=le,Z=re;return v(),fe("div",null,[e(Z,{gutter:24},{default:a(()=>[e(N,{span:14},{default:a(()=>[t("div",he,[e(B,{"head-style":{borderBottom:"none",height:"30px"},bordered:!1},{title:a(()=>[t("div",ke,[Ie,e(w,{title:"将告警数据输出到其他第三方系统"},{default:a(()=>[e(x,{type:"QuestionCircleOutlined",style:{"margin-left":"6px","line-height":"35px"}})]),_:1}),e(D,{type:"link",onClick:K,hasPermission:"device/Instance:update"},{icon:a(()=>[e(x,{type:"EditOutlined"})]),_:1})])]),default:a(()=>[e(j,{bordered:"",labelStyle:{width:112+"px"},contentStyle:{minWidth:100+"px"},column:2},{default:a(()=>[e(u,{label:"kafka地址","content-style":{minWidth:"200px"}},{default:a(()=>{var s,o,n,i,r;return[e(h,{status:(s=l(p))!=null&&s.running?"success":"error",text:((r=(i=(n=(o=l(p))==null?void 0:o.data)==null?void 0:n.config)==null?void 0:i.config)==null?void 0:r.address)||""},null,8,["status","text"])]}),_:1}),e(u,{label:"topic"},{default:a(()=>{var s,o,n,i;return[M(V(((i=(n=(o=(s=l(p))==null?void 0:s.data)==null?void 0:o.config)==null?void 0:n.config)==null?void 0:i.topic)||""),1)]}),_:1}),e(u,{label:"状态",span:2},{default:a(()=>{var s,o,n,i,r,_;return[e(h,{status:((n=(o=(s=l(p))==null?void 0:s.data)==null?void 0:o.state)==null?void 0:n.value)==="enabled"?"success":"error",text:((_=(r=(i=l(p))==null?void 0:i.data)==null?void 0:r.state)==null?void 0:_.text)||""},null,8,["status","text"])]}),_:1})]),_:1})]),_:1}),e(B,{"head-style":{borderBottom:"none",height:"30px"},bordered:!1},{title:a(()=>[t("div",ve,[be,e(w,{title:"接收第三方系统处理的告警结果"},{default:a(()=>[e(x,{type:"QuestionCircleOutlined",style:{"margin-left":"6px","line-height":"35px"}})]),_:1}),e(D,{type:"link",onClick:Q,hasPermission:"device/Instance:update"},{icon:a(()=>[e(x,{type:"EditOutlined"})]),_:1})])]),default:a(()=>[e(j,{bordered:"",labelStyle:{width:112+"px"},contentStyle:{minWidth:150+"px"},column:2},{default:a(()=>[e(u,{label:"kafka地址"},{default:a(()=>{var s,o,n,i,r;return[e(h,{status:(s=l(d))!=null&&s.running?"success":"error",text:((r=(i=(n=(o=l(d))==null?void 0:o.data)==null?void 0:n.config)==null?void 0:i.config)==null?void 0:r.address)||""},null,8,["status","text"])]}),_:1}),e(u,{label:"topic"},{default:a(()=>{var s,o,n,i;return[M(V(((i=(n=(o=(s=l(d))==null?void 0:s.data)==null?void 0:o.config)==null?void 0:n.config)==null?void 0:i.topic)||""),1)]}),_:1}),e(u,{label:"状态",span:2},{default:a(()=>{var s,o,n,i,r,_;return[e(h,{status:((n=(o=(s=l(d))==null?void 0:s.data)==null?void 0:o.state)==null?void 0:n.value)==="enabled"?"success":"error",text:((_=(r=(i=l(d))==null?void 0:i.data)==null?void 0:r.state)==null?void 0:_.text)||""},null,8,["status","text"])]}),_:1})]),_:1})]),_:1})])]),_:1}),e(N,{span:10},{default:a(()=>[t("div",Te,[t("div",Ce,[Se,t("div",we,[e(X,{width:"100%",src:l(me)("/alarm/io.png")},null,8,["src"])]),De,je,Be,t("div",null,[e(O,{dataSource:L,pagination:!1,columns:b})]),Ne,t("div",{innerHTML:l($),class:"code"},null,8,Oe),qe,Re,t("div",null,[e(O,{dataSource:A,pagination:!1,columns:T})]),Me,t("div",{class:"code",innerHTML:l(W)},null,8,Ve)])])]),_:1})]),_:1}),l(y)?(v(),E(de,{key:0,data:l(d),onCloseModel:z,onSaveSuc:G},null,8,["data"])):H("",!0),l(g)?(v(),E(pe,{key:1,data:l(p),onCloseModel:Y,onSaveSuc:U},null,8,["data"])):H("",!0)])}}});const Dt=xe(Ee,[["__scopeId","data-v-ac1f475e"]]);export{Dt as default};
