import{_ as a}from"./index105.js?v=1761009159";import{_ as t}from"./index114.js?v=1761009159";import{u as e,gn as s,bF as n,V as r,P as o,W as i,l}from"./utils-lib.js?v=1761009159";import{ag as p,ah as m}from"./firewall.js?v=1761009159";import{o as d}from"./useMethod6.js?v=1761009159";import{c as u,V as c,r as _,b7 as b,q as g,H as j,v as f,N as h,B as w,I as x,y as k,e as v,K as y,C}from"./base-lib.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./useStore5.js?v=1761009159";import"./validator.js?v=1761009159";const D=u({__name:"index",props:{compData:{default:()=>({isPopup:!1,name:""})}},setup(u){const D=u;e();const P=c(!1),U=_([]),q=_(0),H=_(D.compData.isPopup);D.compData;const V=b({p:1,limit:20}),A=[{label:"网站列表",prop:"site_name",showOverflowTooltip:!0},{label:"扫描URL总数",prop:"scans",width:100},{label:"扫描耗时",prop:"time",render:a=>[a.end_time<=1||a.end_time-a.start_time<=0?v("span",null,[C("0秒")]):v("span",null,[s(a.end_time-a.start_time)])]},{label:"风险次数",render:a=>[0==a.risks?v("span",null,[C("无风险")]):v("span",{class:"bt-link !text-danger",onClick:()=>d(a)},[a.risks])]},{label:"状态",render:a=>[0===a.is_status&&0===a.end_time||1===a.end_time?v("span",{class:"text-red"},[C("扫描未完成")]):1===a.is_status&&0===a.end_time?v("span",{class:"text-warning"},[C("扫描中")]):v("span",null,[C("扫描完成")])]},{label:"扫描时间",width:150,render:a=>{const t=n(a.start_time,"number",0);return v("span",null,[r(t)])}},{label:"操作",align:"right",render:a=>[0===a.is_status&&0===a.end_time||1===a.end_time||1===a.is_status&&0===a.end_time?v("span",{class:"text-disabled cursor-not-allowed"},[C("扫描未完成")]):v("span",{class:"bt-link",onClick:()=>(a=>{window.open("/project/content/report/html?id="+a.testing_id,"_blank","noopener,noreferrer")})(a)},[C("查看报告")])]}],B=async(a=1)=>{await o({loading:P,request:H.value?p({site_name:D.compData.name,...V}):m({...V}),data:{data:[Array,U],page:i(q)}})};return g(B),(e,s)=>{const n=l,r=t,o=a,i=j("bt-loading");return f(),h(o,{class:y({"p-[2rem]":k(H)})},{content:w(()=>[x(v(n,{ref:"table",column:A,data:k(U),"max-height":k(H)?500:null,description:"检测历史列表为空"},null,8,["data","max-height"]),[[i,k(P)],[i,"正在加载检测历史列表，请稍后...","title"]])]),"footer-right":w(()=>[v(r,{total:k(q),page:k(V).p,"onUpdate:page":s[0]||(s[0]=a=>k(V).p=a),row:k(V).limit,"onUpdate:row":s[1]||(s[1]=a=>k(V).limit=a),onChange:B,layout:"prev, pager, next, total, jumper"},null,8,["total","page","row"])]),popup:w(()=>s[2]||(s[2]=[])),_:1},8,["class"])}}});export{D as default};
