← Back
Editing: index-legacy282.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 n};var r,n={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},l="function"==typeof Symbol?Symbol:{},c=l.iterator||"@@iterator",u=l.asyncIterator||"@@asyncIterator",s=l.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(r){f=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof b?e:b,i=Object.create(o.prototype),l=new N(n||[]);return a(i,"_invoke",{value:O(t,r,l)}),i}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}n.wrap=d;var v="suspendedStart",m="suspendedYield",p="executing",y="completed",g={};function b(){}function x(){}function w(){}var _={};f(_,c,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(A([])));L&&L!==o&&i.call(L,c)&&(_=L);var j=w.prototype=b.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function S(e,r){function n(o,a,l,c){var u=h(e[o],e,a);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==t(f)&&i.call(f,"__await")?r.resolve(f.__await).then((function(t){n("next",t,l,c)}),(function(t){n("throw",t,l,c)})):r.resolve(f).then((function(t){s.value=t,l(s)}),(function(t){return n("throw",t,l,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(t,e){function i(){return new r((function(r,o){n(t,e,r,o)}))}return o=o?o.then(i,i):i()}})}function O(t,e,n){var o=v;return function(i,a){if(o===p)throw Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:r,done:!0}}for(n.method=i,n.arg=a;;){var l=n.delegate;if(l){var c=P(l,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===v)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=p;var u=h(t,e,n);if("normal"===u.type){if(o=n.done?y:m,u.arg===g)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(o=y,n.method="throw",n.arg=u.arg)}}}function P(t,e){var n=e.method,o=t.iterator[n];if(o===r)return e.delegate=null,"throw"===n&&t.iterator.return&&(e.method="return",e.arg=r,P(t,e),"throw"===e.method)||"return"!==n&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=h(o,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,g;var a=i.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function T(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 F(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function A(e){if(e||""===e){var n=e[c];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function t(){for(;++o<e.length;)if(i.call(e,o))return t.value=e[o],t.done=!1,t;return t.value=r,t.done=!0,t};return a.next=a}}throw new TypeError(t(e)+" is not iterable")}return x.prototype=w,a(j,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:x,configurable:!0}),x.displayName=f(w,s,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===x||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,s,"GeneratorFunction")),t.prototype=Object.create(j),t},n.awrap=function(t){return{__await:t}},E(S.prototype),f(S.prototype,u,(function(){return this})),n.AsyncIterator=S,n.async=function(t,e,r,o,i){void 0===i&&(i=Promise);var a=new S(d(t,e,r,o),i);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},E(j),f(j,s,"Generator"),f(j,c,(function(){return this})),f(j,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},n.values=A,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(F),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},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 n(n,o){return l.type="throw",l.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],l=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),u=i.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(a)},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 r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),F(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;F(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:A(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),g}},n}function r(t,e,r,n,o,i,a){try{var l=t[i](a),c=l.value}catch(t){return void r(t)}l.done?e(c):Promise.resolve(c).then(n,o)}System.register(["./utils-lib-legacy.js?v=VERSION_NUMBER","./index-legacy103.js?v=VERSION_NUMBER","./base-lib-legacy.js?v=VERSION_NUMBER","./firewall-legacy.js?v=VERSION_NUMBER","./useMethod-legacy6.js?v=VERSION_NUMBER","./__commonjsHelpers__-legacy.js?v=VERSION_NUMBER","./column-legacy.js?v=VERSION_NUMBER","./index-legacy104.js?v=VERSION_NUMBER","./useStore-legacy5.js?v=VERSION_NUMBER","./validator-legacy.js?v=VERSION_NUMBER"],(function(t,n){"use strict";var o,i,a,l,c,u,s,f,d,h,v,m,p,y,g,b,x,w,_,k,L,j,E,S,O,P,T,F;return{setters:[function(t){o=t.K,i=t.bv,a=t.R,l=t.l,c=t.gK,u=t.fU},function(t){s=t._},function(t){f=t.c,d=t.r,h=t.p,v=t.q,m=t.v,p=t.y,y=t.F,g=t.a_,b=t.x,x=t.e,w=t.M,_=t.A,k=t.n,L=t.B,j=t.av,E=t.J,S=t.z},function(t){O=t.ac},function(t){P=t.i,T=t.m,F=t.o},null,null,null,null,null],execute:function(){var n={class:"flex"},N={class:"w-[60%] mr-4"},A={class:"flex ml-[0.2rem] mb-[1.6rem]"},G={class:"flex items-center mb-[1.2rem] text-[#999]"},I={class:"border-1 border-[#e9e9e9] rounded-[.4rem] p-[1.6rem]"},R={key:0,class:"w-full h-[32rem] flex items-center justify-center"},z={class:"border-1 border-[#e9e9e9] rounded-[.4rem] p-[1.6rem] mt-[1.6rem]"},C={key:0,class:"w-full h-[32rem] flex items-center justify-center"},M={class:"flex-1 ml-4"},W={class:"border-1 border-[#e9e9e9] rounded-[.4rem] p-[1.6rem]"},D={key:0,class:"w-full h-[24rem]"},q={key:1,class:"w-full h-[24rem] flex items-center justify-center"},K={class:"border-1 border-[#e9e9e9] rounded-[.4rem] p-[1.6rem] mt-[1.6rem]"},Y={class:"w-full h-[24rem]"},B={class:"border-1 border-[#e9e9e9] rounded-[.4rem] p-[1.6rem] mt-[1.6rem]"},H={key:0,class:"w-full h-[24rem]"},J={key:1,class:"w-full h-[24rem] flex items-center justify-center"};t("default",f({__name:"index",setup:function(t){var f=d(),U=d(),Q=d(),V=d(!1),X=d({}),Z=d([]),$=d([]),tt=d([]),et=d(),rt=d(),nt=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],r=[],n=[],o=0;o<t.length&&!(o>=5);o++){var i=t[o];r.push(i.site_name),e.push(i.end_time-i.start_time),n.push(i.scans)}return{legend:{left:"left",data:["耗时","检测页面"]},grid:{left:45,top:50,right:15,bottom:20,backgroundColor:"#888"},tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:function(t){return t.length?"检测网站: "+t[0].name+(2===t.length?"</br>耗时: "+u(t[0].value)+"</br>检测页面数量: "+t[1].value:t[0].seriesIndex?"</br>检测页面数量: "+t[0].value:"</br>耗时: "+u(t[0].value)):""}},xAxis:{type:"category",data:r,scale:!0,triggerEvent:!0,axisLabel:{formatter:function(t){return t.length>6?t.substr(0,6)+"...":t}}},yAxis:{type:"value"},series:[{type:"bar",name:"耗时",barWidth:24,data:e,itemStyle:{color:"#fcc858"}},{type:"bar",name:"检测页面",barWidth:24,data:n,itemStyle:{color:"#8dcf6e"}}]}},ot=function(){var t,e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{grid:{left:45,right:15,top:50,bottom:20,backgroundColor:"#888"},tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:function(t){return t[0].name+"</br>风险次数: "+Number(t[0].value||0)}},xAxis:{type:"category",boundaryGap:!1,data:null===(t=Object.keys(r))||void 0===t?void 0:t.map((function(t){return t})).sort((function(t,e){return new Date(t).getTime()<new Date(e).getTime()?-1:1})),axisLabel:{fontSize:10,color:"#666",formatter:function(t){return a(new Date(t).getTime()/1e3,"MM-dd")}}},axisLabel:{fontSize:10,color:"#666"},axisLine:{show:!1},axisTick:{show:!1},yAxis:{type:"value",splitNumber:5,name:"风险次数/次",min:0,axisLine:{show:!1},axisTick:{show:!1},axisLabel:{fontSize:10,color:"#666"}},series:[{type:"line",smooth:.6,data:null===(e=Object.values(r))||void 0===e?void 0:e.map((function(t){return t})),areaStyle:{normal:{}},itemStyle:{normal:{color:"#FF8585",lineStyle:{color:"#FF8585",type:"solid"}}}}]}},it=function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=[],r=[],n=0;n<t.length&&!(n>=6);n++){var o=t[n];e.push(o.words),r.push(o.count)}return{grid:{top:10,left:60,right:15,bottom:20,backgroundColor:"#888"},tooltip:{trigger:"axis",axisPointer:{type:"cross"},formatter:function(t){return"敏感词: "+t[0].name+"</br>次数: "+t[0].value}},xAxis:{type:"value"},yAxis:{type:"category",data:e,scale:!0,triggerEvent:!0,axisLabel:{formatter:function(t){return t.length>4?t.substr(0,4)+"...":t}}},series:[{type:"bar",data:r,barWidth:20,itemStyle:{color:function(t){return["#ffa688","#ffc87d","#98caa5","#acce9b","#cad48f"][t.dataIndex]}}}]}},at=function(){var t,n=(t=e().mark((function t(){var r,n,a;return e().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,o({loading:"正在获取数据,请稍后...",request:O()});case 2:a=t.sent,X.value=a.data,$.value=i(null==a||null===(r=a.data)||void 0===r?void 0:r.site_info,"array",[]),tt.value=i(null==a||null===(n=a.data)||void 0===n?void 0:n.risk_info,"array",[]),Z.value=[{title:"监控网站",value:X.value.site_count},{title:"总风险次数",value:X.value.risk_count},{title:"今日风险次数",value:X.value.day_risk},{title:"今日巡检次数",value:X.value.today_count}],k((function(){var t,e;et.value=null==a?void 0:a.data["7day_risk"],V.value=!(null!=a&&null!==(t=a.data)&&void 0!==t&&t.sensitive_word.length),rt.value=null==a||null===(e=a.data)||void 0===e?void 0:e.sensitive_word}));case 8:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(o,i){var a=t.apply(e,n);function l(t){r(a,o,i,l,c,"next",t)}function c(t){r(a,o,i,l,c,"throw",t)}l(void 0)}))});return function(){return n.apply(this,arguments)}}(),lt=[{label:"巡检时间",prop:"time",render:function(t){var e=i(t.time,"number",0);return x("span",null,[a(e)])}},{label:"检测域名",prop:"site_name"},{label:"检测方式",prop:"method",render:function(t){return T[t.method]}},{label:"检测页面数",prop:"scans"},{label:"巡检结果",render:function(t){return[0===t.risks?x("span",{class:"text-[#20a53a]"},[L("无风险 ")]):x("span",{class:"bt-link !text-danger",onClick:function(){return F(t)}},[t.risks])]}}],ct=P();return h(at),function(t,e){var r=j,o=l,i=s,a=c;return v(),m("div",n,[p("div",N,[p("div",A,[(v(!0),m(y,null,g(b(Z),(function(t,e){return v(),m("div",{key:e,class:E("block-bg "+(e>0?"ml-[5rem]":""))},[p("div",G,[p("span",null,S(t.title),1)]),p("div",{class:E("font-bold text-[2rem] leading-none "+(0!==e&&3!==e&&t.value>0?"text-[#fe7d2e]":"text-[#666]"))},S(t.value),3)],2)})),128))]),p("div",I,[e[0]||(e[0]=p("div",{class:"card_title flex items-center text-[#666] text-[1.4rem] mb-[1.2rem]"},"网站内容检测",-1)),0===b($).length?(v(),m("div",R,[x(r,{description:"网站内容检测为空"})])):(v(),w(i,{key:1},{content:_((function(){return[x(o,{"max-height":"320",column:lt,data:b($)},null,8,["data"])]})),_:1}))]),p("div",z,[e[1]||(e[1]=p("div",{class:"card_title flex items-center text-[#666] text-[1.4rem] mb-[1.2rem]"},"风险动态",-1)),0===b(tt).length?(v(),m("div",C,[x(r,{description:"风险动态为空"})])):(v(),w(i,{key:1},{content:_((function(){return[x(o,{"max-height":"320",column:b(ct),data:b(tt)},null,8,["column","data"])]})),_:1}))])]),p("div",M,[p("div",W,[e[2]||(e[2]=p("div",{class:"card_title flex items-center text-[#666] text-[1.4rem] mb-[1.2rem]"},"风险历史",-1)),b($).length?(v(),m("div",D,[x(a,{ref_key:"riskEchartRef",ref:f,options:nt(b($))},null,8,["options"])])):(v(),m("div",q,[x(r,{description:"风险历史数据为空"})]))]),p("div",K,[e[3]||(e[3]=p("div",{class:"card_title flex items-center text-[#666] text-[1.4rem] mb-[1.2rem]"},"近7日巡检情况",-1)),p("div",Y,[x(a,{ref_key:"dayRiskEchartRef",ref:U,options:ot(b(et))},null,8,["options"])])]),p("div",B,[e[4]||(e[4]=p("div",{class:"card_title flex items-center text-[#666] text-[1.4rem] mb-[1.2rem]"},"敏感词排行",-1)),b(V)?(v(),m("div",J,[x(r,{description:"敏感词排行数据为空"})])):(v(),m("div",H,[x(a,{ref_key:"sensitiveWordEchartRef",ref:Q,options:it(b(rt))},null,8,["options"])]))])])])}}}))}}}))}();
Save File
Cancel