← Back
Editing: index-legacy7.js
!function(){function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */e=function(){return r};var n,r={},o=Object.prototype,a=o.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(n){f=function(t,e,n){return t[e]=n}}function p(t,e,n,r){var o=e&&e.prototype instanceof w?e:w,a=Object.create(o.prototype),u=new V(r||[]);return i(a,"_invoke",{value:S(t,n,u)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}r.wrap=p;var h="suspendedStart",v="suspendedYield",m="executing",y="completed",g={};function w(){}function b(){}function x(){}var k={};f(k,c,(function(){return this}));var _=Object.getPrototypeOf,j=_&&_(_(I([])));j&&j!==o&&a.call(j,c)&&(k=j);var L=x.prototype=w.prototype=Object.create(k);function O(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(e,n){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==t(f)&&a.call(f,"__await")?n.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):n.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var o;i(this,"_invoke",{value:function(t,e){function a(){return new n((function(n,o){r(t,e,n,o)}))}return o=o?o.then(a,a):a()}})}function S(t,e,r){var o=h;return function(a,i){if(o===m)throw Error("Generator is already running");if(o===y){if("throw"===a)throw i;return{value:n,done:!0}}for(r.method=a,r.arg=i;;){var u=r.delegate;if(u){var c=P(u,r);if(c){if(c===g)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(o===h)throw o=y,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o=m;var l=d(t,e,r);if("normal"===l.type){if(o=r.done?y:v,l.arg===g)continue;return{value:l.arg,done:r.done}}"throw"===l.type&&(o=y,r.method="throw",r.arg=l.arg)}}}function P(t,e){var r=e.method,o=t.iterator[r];if(o===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=n,P(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),g;var a=d(o,t.iterator,e.arg);if("throw"===a.type)return e.method="throw",e.arg=a.arg,e.delegate=null,g;var i=a.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,g):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function V(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o<e.length;)if(a.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=n,t.done=!0,t};return i.next=i}}throw new TypeError(t(e)+" is not iterable")}return b.prototype=x,i(L,"constructor",{value:x,configurable:!0}),i(x,"constructor",{value:b,configurable:!0}),b.displayName=f(x,s,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,f(t,s,"GeneratorFunction")),t.prototype=Object.create(L),t},r.awrap=function(t){return{__await:t}},O(E.prototype),f(E.prototype,l,(function(){return this})),r.AsyncIterator=E,r.async=function(t,e,n,o,a){void 0===a&&(a=Promise);var i=new E(p(t,e,n,o),a);return r.isGeneratorFunction(e)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},O(L),f(L,s,"Generator"),f(L,c,(function(){return this})),f(L,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},r.values=I,V.prototype={constructor:V,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&a.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,o){return u.type="throw",u.arg=t,e.next=r,o&&(e.method="next",e.arg=n),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),A(n),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;A(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:I(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),g}},r}function n(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function r(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(e,n,r){return(n=function(e){var n=function(e,n){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,n||"default");if("object"!=t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==t(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function a(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}function i(t){return function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function u(t){a(i,r,o,u,c,"next",t)}function c(t){a(i,r,o,u,c,"throw",t)}u(void 0)}))}}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./config-legacy.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER","./useStore-legacy.js?v=VERSION_NUMBER","./useMethod-legacy.js?v=VERSION_NUMBER","./index-legacy112.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var o,a,u,c,l,s,f,p,d,h,v,m,y,g,w,b,x,k,_,j,L,O,E,S,P,C,A,V,I,N,T,G,D,F,M,q,H,U,z,R,W,B,J,Y,K,Q,X,Z,$,tt,et,nt,rt,ot;return{setters:[function(t){o=t.u,a=t.Z,u=t.n,c=t.L,l=t.K,s=t.P,f=t.p,p=t.$,d=t.J,h=t.l,v=t.a0,m=t.e,y=t.c,g=t.M,w=t.a1,b=t.S,x=t.a2},function(t){k=t.c,_=t.r,j=t.k,L=t.aB,O=t.aQ,E=t.e,S=t.p,P=t.G,C=t.q,A=t.v,V=t.A,I=t.B,N=t.x,T=t.y,G=t.H,D=t.D,F=t.J,M=t.z,q=t.t,H=t.C,U=t.g,z=t.F,R=t.w,W=t.M,B=t.a5},function(t){J=t._},function(t){Y=t.a,K=t.b,Q=t.u,X=t.c},function(t){Z=t.t,$=t.W,tt=t.X},function(t){et=t.s},function(t){nt=t.g},function(t){rt=t.a},function(t){ot=t._},null,null],execute:function(){var at={style:{"overflow-y":"hidden"}},it=k({__name:"index",setup:function(t,m){var y=m.expose,g=o(),w=g.mainHeight,b=g.push,x=g.getSenderAlarmListInfo,k=_(),F=_(!1),M=_([]),q=j({p:1,rows:10,status:"",keyword:""}),H=new Map([["wx_account","微信公众号"],["feishu","飞书"],["mail","邮箱"],["sms","短信通知"],["dingding","钉钉"],["weixin","企业微信"],["webhook","自定义消息通道"]]),U=function(t){var e=!a(t);u({title:"".concat(e?"编辑":"添加","告警任务"),component:function(){return c((function(){return n.import("./index-legacy113.js?v=VERSION_NUMBER")}),void 0,n.meta.url)},area:80,showFooter:!0,compData:{isEdit:e,row:t,onRefresh:z}})},z=function(){var t=i(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l({loading:F,request:s(r({},q)),success:function(t){var e=t.data;R(e.data)}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),R=function(t){M.value=null==t?void 0:t.map((function(t){var e=t.sender;return r(r({},t),{},{alarmAccounts:e.map((function(t){var e=b.value.config.find((function(e){return e.id===t}));return e?"sms"===e.sender_type?{id:t,type:e.sender_type,title:"短信"}:{id:t,type:e.sender_type,title:H.get(e.sender_type)||"",account:e.data.title}:null}))})}))},W=function(){var t=i(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f({title:"".concat(n.status?"禁用":"启用","【").concat(n.title,"】任务"),content:"您真的要".concat(n.status?"禁用":"启用","【").concat(n.title,"】这个任务吗?")});case 2:return t.next=4,l({loading:"正在修改告警任务状态,请稍候...",request:Z({task_id:n.id,status:Number(!n.status)}),message:!0,success:z});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),B=function(){var t=i(e().mark((function t(n){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,f({icon:"warning-filled",title:"删除告警任务",content:"删除后将不再告警此条任务,是否继续?"});case 2:return t.next=4,l({loading:"正在删除告警任务,请稍候...",request:$({task_id:n.id}),message:!0,success:z});case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),tt=function(){var t=i(e().mark((function t(n,r,o,a){var u,c,l;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return u=function(){var t=i(e().mark((function t(n,r){var o,a,i;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=n.id,n.status,a=new Map([["delete",$],["start",Z],["stop",Z]]),i=a.get(l),t.t0=l,t.next="start"===t.t0?6:"stop"===t.t0?11:"delete"===t.t0?16:21;break;case 6:if(!i){t.next=10;break}return t.next=9,i({task_id:o,status:1});case 9:case 14:case 19:return t.abrupt("return",t.sent);case 10:case 15:case 20:return t.abrupt("break",21);case 11:if(!i){t.next=15;break}return t.next=14,i({task_id:o,status:0});case 16:if(!i){t.next=20;break}return t.next=19,i({task_id:o});case 21:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),c=a.label,l=a.value,t.next=4,n({title:"批量".concat(c,"告警"),content:"即将批量".concat(c,"告警,是否继续操作?"),column:[{label:"告警名称",prop:"title"},X()],onConfirm:function(){var t=i(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,r(u);case 2:return z(),t.abrupt("return",!1);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}()});case 4:case"end":return t.stop()}}),t)})));return function(e,n,r,o){return t.apply(this,arguments)}}(),et=[Y(),{prop:"title",label:"标题",minWidth:140,width:300},K({minWidth:100,event:W,data:["停用","正常"]}),{label:"告警方式",width:260,render:function(t){return L(O,{content:t.alarmAccounts.filter((function(t){return null!==t})).map((function(t){return"sms"===(null==t?void 0:t.type)?"短信通知":"".concat((null==t?void 0:t.account)||"","(").concat((null==t?void 0:t.title)||"",")")})).join(","),placement:"top",openDelay:500},[L("span",[t.alarmAccounts.filter((function(t){return null!==t})).map((function(t){return"sms"===(null==t?void 0:t.type)?"短信通知":"".concat(null==t?void 0:t.account,"(").concat(t.title,")")})).join(",")])])}},{label:"告警条件",minWidth:180,render:function(t){return E("span",{innerHTML:t.view_msg},null)}},Q([{title:"告警记录",width:70,onClick:function(t){u({title:"【".concat(t.title,"】告警记录"),component:function(){return c((function(){return n.import("./record-legacy.js?v=VERSION_NUMBER")}),void 0,n.meta.url)},area:80,compData:t})}},{title:"编辑",onClick:function(t){return U(t)}},{title:"删除",onClick:B}])],nt=[{label:"启动",value:"start",event:tt},{label:"停止",value:"stop",event:tt},{label:"删除",value:"delete",event:tt}],rt=function(){var t=i(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,x(!0);case 2:return t.next=4,z();case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return S(rt),y({init:rt}),function(t,e){var n=D,r=p,o=d,a=h,i=v,u=J,c=P("bt-loading");return C(),A("div",at,[E(u,null,{"header-left":V((function(){return[E(n,{type:"primary",onClick:e[0]||(e[0]=function(t){return U(!1)})},{default:V((function(){return e[3]||(e[3]=[I("添加任务")])})),_:1})]})),"header-right":V((function(){return[E(r,{class:"alarm-custom-radio mr-[1rem]",type:"button",size:"default",modelValue:N(q).status,"onUpdate:modelValue":e[1]||(e[1]=function(t){return N(q).status=t}),options:[{label:"全部",value:""},{label:"运行中",value:!0},{label:"已停止",value:!1}],onChange:z},null,8,["modelValue"]),T("div",null,[E(o,{modelValue:N(q).keyword,"onUpdate:modelValue":e[2]||(e[2]=function(t){return N(q).keyword=t}),onSearch:z,placeholder:"请输入搜索关键词",class:"!w-24rem"},null,8,["modelValue"])])]})),content:V((function(){return[G(E(a,{ref_key:"alarmListRef",ref:k,data:N(M),column:et,"max-height":N(w)-300,description:"告警列表为空"},null,8,["data","max-height"]),[[c,N(F)],[c,"正在加载告警列表,请稍后...","title"]])]})),"footer-left":V((function(){return[E(i,{"table-ref":N(k),options:nt},null,8,["table-ref"])]})),_:1})])}}}),ut=m(it,[["__scopeId","data-v-5d926d59"]]),ct={class:"flex items-center"},lt={class:"flex-1 leading-[1.5]"},st={class:"flex"},ft=m(k({__name:"module-name",props:{row:{}},setup:function(t){return function(t,e){var n=y;return C(),A("div",ct,[T("div",{class:F(["icon",t.row.ps.indexOf("API")>-1?"webhook":t.row.name])},null,2),T("div",lt,[T("span",{class:"text-14px font-bold cursor-pointer",onClick:e[0]||(e[0]=function(e){t.row})},M(t.row.title),1),T("div",st,[T("span",null,M(t.row.ps),1),E(n,{href:t.row.help,target:"_blank"},{default:V((function(){return e[1]||(e[1]=[I(">>帮助文档")])})),_:1},8,["href"])])])])}}}),[["__scopeId","data-v-eacf7c0c"]]),pt={key:1,class:"c7"},dt={key:1},ht=k({__name:"module-content",props:{row:{}},setup:function(t){var n=o().getSenderAlarmListInfo,r=q(t).row,a=function(){var t=i(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,n(!0);case 2:g.success("刷新成功");case 3:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return function(t,e){return C(),A("div",null,[0===N(r).list.length?(C(),A("span",{key:0,class:"text-danger cursor-pointer",onClick:e[0]||(e[0]=function(t){return N(et)(N(r))})},"未配置")):N(r).list.length>0?(C(),A("span",pt,["sms"!==N(r).name?(C(),A("span",{key:0,class:"cursor-pointer",onClick:e[1]||(e[1]=function(t){return N(et)(N(r))})},"已绑定【"+M((n=N(r).list,n.map((function(t){return t.data.title})).join("、")))+"】,可继续配置绑定更多账号",1)):H("",!0),"sms"===N(r).name?(C(),A("span",dt,[I("今日剩余发送次数:"+M(N(r).list.at(0).data.count)+"( ",1),T("span",{class:"bt-link",onClick:a},"刷新次数"),e[2]||(e[2]=I(")"))])):H("",!0)])):H("",!0)]);var n}}}),vt=k({__name:"module-action",props:{row:{}},setup:function(t){var n=o().getSenderAlarmListInfo,a=nt().refs.isRefreshList,u=q(t).row,c=U((function(){return u.value.list.at(0).used})),l=function(){var t=i(e().mark((function t(){var r,o,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,f({title:"".concat(c.value?"禁用":"开启","短信通知"),content:"您真的要".concat(c.value?"禁用":"开启","短信通知吗?")});case 3:return o=null===(r=u.value.list)||void 0===r?void 0:r.at(0).id,t.next=6,w({sender_id:o});case 6:a=t.sent,g.request(a),u.value.list.at(0).used=!c.value,n(),t.next=14;break;case 12:t.prev=12,t.t0=t.catch(0);case 14:case"end":return t.stop()}}),t,null,[[0,12]])})));return function(){return t.apply(this,arguments)}}();return function(t,e){return C(),A("div",null,["sms"!==N(u).name?(C(),A("span",{key:0,class:"bt-link",onClick:e[0]||(e[0]=function(t){return et(r(r({},u.value),{},{callback:function(){a.value=!0}}))})},"配置")):(C(),A(z,{key:1},[N(c)?H("",!0):(C(),A("span",{key:0,class:"bt-link",onClick:l},"开启")),N(c)?(C(),A("span",{key:1,class:"bt-link",onClick:l},"禁用")):H("",!0)],64))])}}}),mt=k({__name:"index",setup:function(t,n){var r=n.expose,a=o(),u=a.push,c=a.getSenderAlarmListInfo,l=nt().refs.isRefreshList,s=_(!1),f=_([]),p=[{label:"告警模块",width:400,render:function(t){return E(ft,{row:t},null)}},{label:"配置情况",render:function(t){return E(ht,{row:t},null)}},{label:"操作",align:"right",width:100,render:function(t){return E(vt,{row:t},null)}}],d=function(){var t=i(e().mark((function t(){var n=arguments;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(!(n.length>0&&void 0!==n[0])||n[0])&&(s.value=!0),t.next=4,c();case 4:f.value=rt(u.value.config),s.value=!1;case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return R((function(){return l.value}),(function(t){l.value&&(d(!1),l.value=!1)}),{immediate:!0}),S(d),r({init:d}),function(t,e){var n=h,r=J,o=P("bt-loading");return C(),W(r,null,{content:V((function(){return[G(E(n,{data:N(f),column:p,description:"告警设置列表为空"},null,8,["data"]),[[o,N(s)],[o,"正在加载告警设置列表,请稍后...","title"]])]})),_:1})}}}),yt=k({__name:"index",setup:function(t,n){var r=n.expose,a=o().mainHeight,u=_([]),c=_(!1),s=_(0),f=j({p:1,limit:20,keyword:"",status:""}),v=function(){var t=i(e().mark((function t(){return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l({loading:c,request:tt(B(f)),data:{data:[Array,u],page:b(s)}});case 2:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),m=[{label:"标题",render:function(t){return E("span",{innerHTML:t.log},null)}},{prop:"addtime",label:"时间",width:150}];return S(v),r({init:v}),function(t,e){var n=p,r=d,o=h,i=ot,l=J,y=P("bt-loading");return C(),W(l,null,{"header-right":V((function(){return[E(n,{type:"button",modelValue:N(f).status,"onUpdate:modelValue":e[0]||(e[0]=function(t){return N(f).status=t}),options:[{label:"全部",value:""},{label:"发送成功",value:!0},{label:"发送失败",value:!1}],onChange:v,class:"mr-[1rem]"},null,8,["modelValue"]),T("div",null,[E(r,{modelValue:N(f).keyword,"onUpdate:modelValue":e[1]||(e[1]=function(t){return N(f).keyword=t}),onSearch:v,placeholder:"请输入搜索关键词",class:"!w-24rem"},null,8,["modelValue"])])]})),content:V((function(){return[G(E(o,{data:N(u),column:m,"max-height":N(a)-254,description:"告警日志列表为空"},null,8,["data","max-height"]),[[y,N(c)],[y,"正在加载告警日志列表,请稍后...","title"]])]})),"footer-right":V((function(){return[E(i,{total:N(s),page:N(f).p,"onUpdate:page":e[2]||(e[2]=function(t){return N(f).p=t}),row:N(f).limit,"onUpdate:row":e[3]||(e[3]=function(t){return N(f).limit=t}),onChange:v},null,8,["total","page","row"])]})),_:1})}}});t("default",k({__name:"index",setup:function(t){var e=x({type:"card",options:[{label:"告警列表",name:"list",lazy:!0,render:ut},{label:"告警设置",name:"set",lazy:!0,render:mt},{label:"告警日志",name:"log",lazy:!0,render:yt}]}).BtTabs;return function(t,n){return C(),W(N(e))}}}))}}}))}();
Save File
Cancel