import{_ as t}from"./index105.js?v=1761009159";import{_ as e}from"./index114.js?v=1761009159";import{u as s,bF as a,V as r,P as o,W as i,l}from"./utils-lib.js?v=1761009159";import{getRiskList as n}from"./site.js?v=1761009159";import{c as p,V as m,r as c,b7 as u,q as d,H as _,v as j,N as f,B as h,I as w,y as b,e as x,K as g}from"./base-lib.js?v=1761009159";import{u as k}from"./column.js?v=1761009159";import{k as y}from"./useController12.js?v=1761009159";import{aT as v}from"./store.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./index106.js?v=1761009159";import"./validator.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController6.js?v=1761009159";import"./files.js?v=1761009159";import"./store2.js?v=1761009159";import"./index103.js?v=1761009159";const C=p({__name:"risk-list",props:{compData:{default:()=>({isPopup:!1})}},setup(p){const C=p,{mainHeight:H}=s(),P=m(!1),U=c([]),q=c(0),D=c(C.compData.isPopup),M=(t,e)=>{v({path:t})},V=t=>{var e;let s="/www/server/panel/class/projectModel/content/source/",a=s+t.source_file;(null==(e=t.risk_type)?void 0:e.indexOf("_update"))>-1?((t,e)=>{"title_hash_update"!==t.risk_type&&"tail_hash_update"!==t.risk_type||(e="/www/server/panel/class/projectModel/content/hash/"+t.site_name+"/"),t.source_content_file;let s=e+t.new_content_file;M(s)})(t,s):M(a,t.content)},A=u({p:1,limit:20}),B=async()=>{await o({loading:P,request:n({...A}),data:{data:[Array,U],page:i(q)}})},F=[{label:"巡检时间",width:"150px",render:t=>{const e=a(t.time,"number",0);return x("span",null,[r(e)])}},{label:"URL",render:t=>x("span",{class:"bt-link",title:t.url,onClick:()=>window.open(t.url,"_blank","noopener,noreferrer")},[t.url])},{label:"关键词",prop:"content",width:"200px"},{label:"类型",prop:"risk_content",width:"200px"},{label:"风险位置",width:"150px",render:t=>y[t.risk_type]},k([{onClick:V,title:"详情"}])];return d(()=>B()),(s,a)=>{const r=l,o=e,i=t,n=_("bt-loading");return j(),f(i,{class:g({"p-[2rem]":b(D)})},{content:h(()=>[w(x(r,{ref:"table",column:b(F),data:b(U),description:"风险列表为空","max-height":b(D)?500:b(H)-300},null,8,["column","data","max-height"]),[[n,b(P)],[n,"正在加载风险列表，请稍后...","title"]])]),"footer-right":h(()=>[x(o,{total:b(q),page:b(A).p,"onUpdate:page":a[0]||(a[0]=t=>b(A).p=t),row:b(A).limit,"onUpdate:row":a[1]||(a[1]=t=>b(A).limit=t),onChange:B},null,8,["total","page","row"])]),_:1},8,["class"])}}});export{C as default};
