← Back
Editing: detect-history.js
import{u as t,cY as e,aj as s,fU as a,bv as n,R as r,n as i,L as o}from"./utils-lib.js?v=VERSION_NUMBER";import{_ as l}from"./index103.js?v=VERSION_NUMBER";import{getSingleSiteRisk as p,getRisk as m}from"./site.js?v=VERSION_NUMBER";import{c,r as _,q as d,M as u,A as b,e as h,x as f,J as g,B as j}from"./base-lib.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";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=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url),compData:t})},P=e({request:async t=>{const e=w.value?p({site_name:k.compData.name,...t}):m({...t}),{data:a}=await e;return{data:a.data||[],total:a.page?s(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?h("span",null,[j("0秒")]):h("span",null,[a(t.end_time-t.start_time)])]},{label:"风险次数",prop:"risks",render:t=>[0==t.risks?h("span",null,[j("无风险")]):h("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?h("span",{class:"text-red"},[j("扫描未完成")]):1===t.is_status&&0===t.end_time?h("span",{class:"text-[#fc6d26]"},[j("扫描中")]):h("span",null,[j("扫描完成")])]},{label:"扫描时间",prop:"start_time",width:200,render:t=>{const e=n(t.start_time,"number",0);return h("span",null,[r(e)])}},{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?h("span",{class:"text-[#c8c9cc] cursor-not-allowed"},[j("扫描未完成")]):h("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,e)=>{const s=l;return d(),u(s,{class:g({"p-[2rem]":f(w)})},{content:b((()=>[h(f(B),{"max-height":f(w)?500:f(x)-240,description:"检测历史列表为空"},null,8,["max-height"])])),"footer-right":b((()=>[h(f(R))])),popup:b((()=>e[0]||(e[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