← Back
Editing: detect-history.js
import{u as t,cX as s,aj as e,fr as a,bu as n,R as r,l as i,L as o}from"./utils-lib.js?v=1765440387";import{_ as l}from"./index93.js?v=1765440387";import{gZ as p,g_ as m}from"./site.js?v=1765440387";import{c,r as _,q as d,M as u,A as b,e as g,x as h,J as f,B as j}from"./base-lib.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";const k=c({__name:"detect-history",props:{compData:{default:()=>({isPopup:!1,name:""})}},setup(c){const k=c,{mainHeight:x}=t(),w=_(k.compData.isPopup);k.compData;const D=t=>{i({title:"风险详情",area:[70,55],component:()=>o(()=>import("./risk-detail.js?v=1765440387"),__vite__mapDeps([]),import.meta.url),compData:t})},P=s({request:async t=>{const s=w.value?p({site_name:k.compData.name,...t}):m({...t}),{data:a}=await s;return{data:a.data||[],total:a.page?e(a.page):0}},columns:[{label:"网站列表",prop:"site_name",width:120},{label:"扫描URL总数",prop:"scans",width:100},{label:"扫描耗时",prop:"time",render:t=>[t.end_time<=1||t.end_time-t.start_time<=0?g("span",null,[j("0秒")]):g("span",null,[a(t.end_time-t.start_time)])]},{label:"风险次数",prop:"risks",render:t=>[0==t.risks?g("span",null,[j("无风险")]):g("span",{class:"bt-link !text-danger",onClick:()=>D(t)},[t.risks])]},{label:"状态",prop:"status",render:t=>[0===t.is_status&&0===t.end_time||1===t.end_time?g("span",{class:"text-red"},[j("扫描未完成")]):1===t.is_status&&0===t.end_time?g("span",{class:"text-[#fc6d26]"},[j("扫描中")]):g("span",null,[j("扫描完成")])]},{label:"扫描时间",prop:"start_time",width:200,render:t=>{const s=n(t.start_time,"number",0);return g("span",null,[r(s)])}},{label:"操作",align:"right",render:t=>[0===t.is_status&&0===t.end_time||1===t.end_time||1===t.is_status&&0===t.end_time?g("span",{class:"text-[#c8c9cc] cursor-not-allowed"},[j("扫描未完成")]):g("span",{class:"bt-link",onClick:()=>(t=>{window.open("/project/content/report/html?id="+t.testing_id,"_blank","noopener,noreferrer")})(t)},[j("查看报告")])]}]}),{BtTable:B,refresh:L}=P,R=P.BtPage;return(t,s)=>{const e=l;return d(),u(e,{class:f({"p-[2rem]":h(w)})},{content:b(()=>[g(h(B),{"max-height":h(w)?500:h(x)-240,description:"检测历史列表为空"},null,8,["max-height"])]),"footer-right":b(()=>[g(h(R))]),popup:b(()=>[...s[0]||(s[0]=[])]),_:1},8,["class"])}}});export{k as default}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel