← Back
Editing: risk.js
import{c as e,s as l,g as s,r as a,w as t,G as n,q as o,v as i,y as r,x as c,C as m,J as d,B as u,z as p,M as x,A as f,e as v,P as g,H as h,I as w,F as k,a$ as b,K as y,D as _,T as C,ce as V,bx as T,b4 as j,aw as S}from"./base-lib.js?v=1765440387";import{u as F,M as I,c as D,k as H,W as M,h as U,e as A}from"./utils-lib.js?v=1765440387";import{_ as P}from"./index394.js?v=1765440387";import{H as L}from"./index307.js?v=1765440387";import{p as B}from"./validator.js?v=1765440387";import{x as R}from"./store5.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";import"./index94.js?v=1765440387";import"./column.js?v=1765440387";const E={class:"h-full p-2rem"},q={class:"scan-header flex items-center"},z={class:"flex items-center w-full"},G={key:0,class:"w-[10rem] h-[10rem] relative flex-shrink-0"},J={key:1,class:"w-[10rem] h-[10rem] relative flex-shrink-0"},K={class:"w-full text-[#333] text-[2rem] flex flex-col ml-[3rem]"},N={class:"flex items-center w-full justify-between"},O=["innerHTML"],W={key:0},$={class:"mx-[4px] text-[2.4rem] mx-[4px] text-danger"},Q={class:"flex items-center"},X={key:0,class:"text-[1.4rem] text-[#666] mt-[1rem]"},Y={key:2,class:"text-[1.4rem] text-[#666] mt-[1rem]"},Z={key:4,class:"text-[1.4rem] mt-[12px] text-[#666] flex items-center"},ee={key:5,class:"text-[1.4rem] mt-[12px] text-[#F0AD4E] flex items-center"},le={key:0,class:"text-[1.4rem] w-full mt-[2rem] flex items-center justify-between"},se={class:"items-center flex"},ae={class:"flex items-center"},te=["v-bt-loading:title"],ne={class:"module-head flex items-center h-[5.4rem] justify-between border-b-1 pr-[0.8rem] w-full"},oe={class:"w-full flex items-center"},ie=["title"],re={key:0,class:"text-[#666] !text-[1.2rem] ml-[5rem] flex"},ce={class:"flex items-center text-[1.2rem]"},me=["onClick"],de=["onClick"],ue={class:"px-[3rem] py-[3.2rem] bg-[#F8F8F8]"},pe={class:"flex items-center"},xe={class:"text-[#333]"},fe=["innerHTML"],ve={class:"flex mt-[16px] items-center"},ge={key:0,class:"collapse-item flex-col !items-start"},he={key:1,class:"collapse-item"},we={class:"flex mt-[16px] items-center"},ke={class:"collapse-item"},be={class:"flex flex-col p-[20px]"},ye={class:"text-[1.6rem] mb-[20px]"},_e={class:"text-primary"},Ce={class:"text-danger"},Ve={class:"text-medium"},Te={class:"p-[12px] flex flex-col items-start"},je={class:"mt-4px"},Se={key:0,class:"scan-body p-[2rem]"},Fe={class:"module-list overflow-auto h-[38rem]"},Ie={class:"module-head flex items-center h-[5.4rem] justify-between border-b-1 pr-[0.8rem] w-full"},De={class:"w-full flex items-center"},He=["title"],Me={class:"flex items-center"},Ue={class:"px-[3rem] py-[3.2rem] bg-[#F8F8F8]"},Ae={class:"flex items-center"},Pe={class:"text-[#333]"},Le=["innerHTML"],Be={class:"flex mt-[16px] items-center"},Re={key:0,class:"collapse-item flex-col !items-start"},Ee={key:1,class:"collapse-item"},qe={class:"flex mt-[16px] items-center"},ze={class:"collapse-item"},Ge={class:"w-full bg-white flex items-center justify-between"},Je=A(e({__name:"risk",setup(e){const A=L(),{handleIgnore:Je,onToggle:Ke,vulnerabilityInvolvesSoftware:Ne}=A,{showAnimation:Oe,scanScore:We,scanTextClass:$e,scanOuterClass:Qe,animateFlag:Xe,scanPreText:Ye,riskNum:Ze,scanButtonType:el,repairAutoRiskButton:ll,cookieRepair:sl,scanItemText:al,processData:tl,lastScanTime:nl,scanSelectShow:ol,allSelect:il,allSelectionDis:rl,isFirst:cl,emptyDetail:ml,loading:dl,loadingText:ul,isShow:pl,isIgnoreAll:xl,ignoreData:fl,activeMent:vl,activeMentIgnore:gl,is_autofix:hl,levelData:wl,allData:kl,repairData:bl,resultConfirm:yl,resultItemLength:_l,resultTable:Cl,resultColumn:Vl}=l(A),{mainHeight:Tl,payment:jl}=F(),Sl=s(()=>kl.value.filter(e=>1==e.selection).map(e=>e.m_name).length),Fl=a(!1),Il=async()=>{if("ltd"===jl.value.authType)try{const e=await R();if(!e.data.status)return I.error(e.data.msg);window.open("/download?filename=".concat(e.data.path),"_blank","noopener,noreferrer")}catch(e){}else B({sourceId:68})};return t(Ze,e=>{e!==A.tootipTotal.risk&&A.getScanTotal()}),(e,l)=>{const s=_,a=D,t=P,F=C,I=V,L=T,B=H,R=M,Tl=U,jl=j,Dl=S,Hl=n("bt-loading");return o(),i("div",null,[l[46]||(l[46]=r("div",{class:"text-[1.8rem] mb-6"},"安全风险",-1)),r("div",E,[r("div",q,[r("div",z,[c(Oe)?m("",!0):(o(),i("div",G,[...l[13]||(l[13]=[r("span",{class:"inline-block scan-icon-img icon-img-safe"},null,-1),r("span",{class:"scan-icon-img-bg"},null,-1),r("span",{class:"text-[3.2rem] h-[4.4rem] w-[0.7rem] text-[#20a53a] font-bold absolute-center"},"i",-1)])])),c(Oe)?(o(),i("div",J,[r("p",{class:d("box-text w-[5.8rem] "+c($e))},[u(p(c(We))+" ",1),l[14]||(l[14]=r("span",null,"分",-1))],2),r("span",{class:d("scan-icon-img icon-img-"+c(Qe))},null,2),l[17]||(l[17]=r("span",{class:"circle-inner"},null,-1)),r("span",{class:d("circle-outer "+c(Qe))},null,2),r("div",{class:d("animate-box"+c(Xe))},[r("div",{class:d("animate-box-left linear-"+c(Qe))},null,2),l[15]||(l[15]=r("div",{class:"animate-box-right"},null,-1)),l[16]||(l[16]=r("div",{class:"animate-box-bottom"},null,-1))],2)])):m("",!0),r("div",K,[r("div",N,[r("span",null,[r("span",{innerHTML:c(Ye)},null,8,O),c(Ze)?(o(),i("span",W,[l[18]||(l[18]=u("已检测到",-1)),r("span",$,p(c(Ze)),1),l[19]||(l[19]=u("个风险",-1))])):m("",!0)]),r("div",Q,[c(ll)&&c(sl)?m("",!0):(o(),x(s,{key:0,class:d("w-[9rem] "+("info"==c(el)?"bg-[#CBCBCB]":"")),type:c(el),round:"",onClick:c(A).scanningProcess},{default:f(()=>[u(p("info"==c(el)?"停止扫描":"立即扫描"),1)]),_:1},8,["class","type","onClick"])),c(ll)&&c(sl)?(o(),i("span",{key:1,round:"",onClick:l[0]||(l[0]=(...e)=>c(A).scanningProcess&&c(A).scanningProcess(...e)),class:"!p-[0] bt-link text-[1.2rem] mr-4px"}," 重新扫描 ")):m("",!0),c(ll)&&c(sl)?(o(),x(s,{key:2,class:"w-[9rem]",round:"",type:c(el),onClick:c(A).handleRepairAutoRisk},{default:f(()=>[...l[20]||(l[20]=[u(" 一键修复 ",-1)])]),_:1},8,["type","onClick"])):m("",!0)])]),"info"===c(el)||c(ll)?m("",!0):(o(),i("span",X," 扫描后将自动修复所有可修复的风险项,并获取最新安全扫描报告 ")),"info"===c(el)||c(ll)?m("",!0):(o(),x(a,{key:1,class:"!p-0 !mt-[12px] w-[150px]",onClick:l[1]||(l[1]=e=>Fl.value=!0)},{default:f(()=>[...l[21]||(l[21]=[u(" >>查看当前安全扫描报告 ",-1)])]),_:1})),"info"==c(el)?(o(),i("span",Y,p(c(al)),1)):m("",!0),"info"==c(el)?(o(),x(t,{key:3,class:"mt-[1.6rem] h-[1rem]","process-color":c(tl).processColor,percentage:c(tl).processPercentage,"stroke-width":10,"show-text":!1},null,8,["process-color","percentage"])):m("",!0),c(ll)?(o(),i("span",Z," 上次扫描时间:"+p(c(nl)),1)):m("",!0),c(ll)&&c(sl)?(o(),i("span",ee," 若安装了【系统加固】,请先关闭再进行一键修复 ")):m("",!0)])])]),c(ol)?(o(),i("div",le,[r("div",se,[v(F,{onChange:c(A).handelAllSelection,class:"text-[#666] font-500 text-[12px]",modelValue:c(il),"onUpdate:modelValue":l[2]||(l[2]=e=>g(il)?il.value=e:null),disabled:c(rl)},{default:f(()=>[...l[22]||(l[22]=[u("全选",-1)])]),_:1},8,["onChange","modelValue","disabled"]),h(v(a,{onClick:l[3]||(l[3]=e=>c(A).handleRepair(!1,null)),link:"",class:d(c(Sl)?"ml-[20px] text-[1.4rem] mt-[1px]":"ml-[20px] text-[1.4rem] text-[#999] mt-[1px] cursor-not-allowed ")},{default:f(()=>[...l[23]||(l[23]=[u("修复选中项 ",-1)])]),_:1},8,["class"]),[[w,!c(cl)]])]),r("div",ae,[v(a,{onClick:l[4]||(l[4]=e=>xl.value=!0)},{default:f(()=>[...l[24]||(l[24]=[u("忽略扫描项",-1)])]),_:1}),l[26]||(l[26]=r("span",{class:"text-[#999] mx-[1.2rem]"},"|",-1)),v(s,{type:"primary",link:"",onClick:l[5]||(l[5]=e=>Fl.value=!0)},{default:f(()=>[...l[25]||(l[25]=[r("i",{class:"svgtofont-icon-safe-report text-[1.4rem] text-[#20a53a]"},null,-1),u(" 查看安全扫描报告",-1)])]),_:1})])])):m("",!0),c(ml)?m("",!0):h((o(),i("div",{key:1,"v-bt-loading:title":c(ul),class:d([c(pl)?"h-[24rem]":"h-[34rem]","scan-body my-[2rem]"])},[v(L,{modelValue:c(vl),"onUpdate:modelValue":l[7]||(l[7]=e=>g(vl)?vl.value=e:null),accordion:""},{default:f(()=>[r("div",{class:d(["module-list overflow-auto",c(pl)?"h-[24rem]":"h-[34rem]"])},[(o(!0),i(k,null,b(c(kl),(e,s)=>(o(),i("div",{class:"module-item text-[1.2rem]",key:"".concat(s)},[r("div",ne,[r("div",oe,[v(F,{modelValue:e.selection,"onUpdate:modelValue":l=>e.selection=l,onChange:l=>c(A).changeSelectValue(e.selection),disabled:c(cl)||!c(hl).includes(e.m_name)},null,8,["modelValue","onUpdate:modelValue","onChange","disabled"]),r("span",{class:"text-[1.2rem] h-[2.2rem] flex items-center px-[8px] rounded-[0.2rem] ml-[8px] mr-[1rem]",style:y({color:c(wl)[e.level].color,backgroundColor:c(wl)[e.level].bg})},p(c(wl)[e.level].text),5),r("div",{class:"w-[20rem] max-w-[20rem] truncate",style:y({color:c(wl)[e.level].color}),title:e.ps?e.ps:e.vuln_name},p(e.ps?e.ps:e.vuln_name),13,ie),c(hl).includes(e.m_name)?m("",!0):(o(),i("div",re,[l[28]||(l[28]=u("无法自动修复,请手动处理或",-1)),v(a,{onClick:l[6]||(l[6]=e=>c(A).onlineServiceDialog())},{default:f(()=>[...l[27]||(l[27]=[u("联系人工",-1)])]),_:1})]))]),r("div",ce,[h(r("span",{onClick:l=>c(A).handleRepair(!0,e),class:"w-[4.2rem] bt-link"},[...l[29]||(l[29]=[u(" 修复",-1),r("span",{class:"text-[#999] mx-[4px]"},"|",-1)])],8,me),[[w,!c(cl)&&!!c(hl).includes(e.m_name)]]),r("span",{underline:!1,onClick:l=>c(A).handleIgnore(e,!1),class:"w-[4.2rem] cursor-pointer text-[#999]"},[...l[30]||(l[30]=[u(" 忽略 ",-1),r("span",{class:"text-[#999] mx-4px"},"|",-1)])],8,de),v(a,{onClick:l=>c(A).onToggle(e,c(kl)),class:"w-[5.4rem] flex items-center"},{default:f(()=>[u(p(e.show?"折叠":"详情"),1),r("i",{class:d("text-[1.4rem] text-[#999] ml-[4px] svgtofont-el-arrow-"+(e.show?"up":"down"))},null,2)]),_:2},1032,["onClick"])])]),v(I,null,{default:f(()=>[h(r("div",ue,[r("div",pe,[r("div",xe,p(e.ps?"风险描述":"涉及软件\t"),1),h(r("div",{class:"collapse-item",innerHTML:e.msg},null,8,fe),[[w,e.msg]]),h(r("div",{class:"collapse-item"},p(e.soft_name?c(A).vulnerabilityInvolvesSoftware(e):""),513),[[w,e.soft_name]])]),r("div",ve,[l[31]||(l[31]=r("div",null,"解决方案",-1)),e.tips?(o(),i("div",ge,[(o(!0),i(k,null,b(e.tips,(e,l)=>(o(),i("p",{key:l,class:d(0==l?"":"mt-[4px]")},p(l+1)+"、"+p(e),3))),128))])):m("",!0),e.vuln_solution?(o(),i("div",he,p(e.vuln_solution),1)):m("",!0)]),h(r("div",we,[l[32]||(l[32]=r("div",null,"温馨提示",-1)),r("div",ke,p(e.remind),1)],512),[[w,e.remind]])],512),[[w,e.show]])]),_:2},1024)]))),128))],2)]),_:1},8,["modelValue"])],10,te)),[[Hl,c(dl)]]),c(ml)?(o(),i("div",{key:2,class:d([c(pl)?"h-[32rem]":"h-[40rem]","scan-body flex justify-center flex-col my-[4rem] relative"])},[l[33]||(l[33]=r("span",{class:"bg-[#f2f2f2] h-[3rem] w-[33%] mb-[12px]"},null,-1)),(o(),i(k,null,b(4,(e,l)=>r("span",{class:"bg-[#f2f2f2] h-[3rem] w-full mb-[12px]",key:l})),64)),l[34]||(l[34]=r("span",{class:"bg-[#f2f2f2] h-[3rem] w-[60%] mb-[12px]"},null,-1)),(o(),i(k,null,b(3,(e,l)=>r("span",{class:"bg-[#f2f2f2] h-[3rem] w-full mb-[12px]",key:l})),64)),l[35]||(l[35]=r("span",{class:"bg-[#f2f2f2] h-[3rem] w-[40%] mb-[12px]"},null,-1))],2)):m("",!0),v(Tl,{title:"结果确认","show-footer":!1,area:54,modelValue:c(yl),"onUpdate:modelValue":l[8]||(l[8]=e=>g(yl)?yl.value=e:null)},{default:f(()=>[r("div",be,[r("span",ye,[l[36]||(l[36]=u("修复结果:修复成功",-1)),r("span",_e,p(c(_l).success),1),l[37]||(l[37]=u("项,修复失败",-1)),r("span",Ce,p(c(_l).failed),1),l[38]||(l[38]=u("项,忽略",-1)),r("span",Ve,p(c(_l).cannot_automatically),1),l[39]||(l[39]=u("项",-1))]),v(B,{"max-height":400,data:c(Cl),column:c(Vl)},null,8,["data","column"]),v(R,{options:[{content:"如有修复失败项,请关闭当前窗口,根据解决方案手动进行修复"}],"list-style":"none",class:"ml-[8px] mt-[12px]"})])]),_:1},8,["modelValue"]),v(Tl,{title:!1,"show-footer":!1,area:54,modelValue:c(bl).repairProgress,"onUpdate:modelValue":l[9]||(l[9]=e=>c(bl).repairProgress=e),showClose:!1},{default:f(()=>[r("div",Te,[v(jl,{class:"!w-full",color:"#20a53a","text-inside":!0,"stroke-width":20,percentage:c(bl).progress},null,8,["percentage"]),r("span",je,p(c(bl).repairText),1)])]),_:1},8,["modelValue"]),v(Tl,{title:"忽略风险项",area:66,modelValue:c(xl),"onUpdate:modelValue":l[11]||(l[11]=e=>g(xl)?xl.value=e:null),"show-footer":!1},{default:f(()=>[c(ml)?m("",!0):(o(),i("div",Se,[v(L,{modelValue:c(gl),"onUpdate:modelValue":l[10]||(l[10]=e=>g(gl)?gl.value=e:null),accordion:"",class:d("".concat(c(fl).length?"":"!border-none"))},{default:f(()=>[r("div",Fe,[(o(!0),i(k,null,b(c(fl),(e,s)=>(o(),i("div",{class:"module-item text-[1.2rem]",key:"".concat(s)},[r("div",Ie,[r("div",De,[r("span",{class:"text-[1.2rem] h-[2.2rem] flex items-center px-[8px] rounded-[0.2rem] ml-[8px] mr-[1rem]",style:y({color:c(wl)[e.level].color,backgroundColor:c(wl)[e.level].bg})},p(c(wl)[e.level].text),5),r("div",{class:"w-[36rem] max-w-[36rem] truncate",style:y({color:c(wl)[e.level].color}),title:e.ps?e.ps:e.vuln_name},p(e.ps?e.ps:e.vuln_name),13,He)]),r("div",Me,[v(a,{onClick:l=>c(Je)(e,!0),class:"w-[6.6rem]"},{default:f(()=>[...l[40]||(l[40]=[u(" 移除忽略 ",-1),r("span",{class:"text-[#999] mx-[4px]"},"|",-1)])]),_:1},8,["onClick"]),v(a,{onClick:l=>c(Ke)(e,c(fl)),class:"w-[5.4rem] flex items-center"},{default:f(()=>[u(p(e.show?"折叠":"详情"),1),r("i",{class:d("text-[1.4rem] text-[#999] ml-[4px] svgtofont-el-arrow-"+(e.show?"up":"down"))},null,2)]),_:2},1032,["onClick"])])]),v(I,null,{default:f(()=>[h(r("div",Ue,[r("div",Ae,[r("div",Pe,p(e.ps?"风险描述":"涉及软件"),1),h(r("div",{class:"collapse-item",innerHTML:e.msg},null,8,Le),[[w,e.msg]]),h(r("div",{class:"collapse-item"},p(e.soft_name?c(Ne)(e):""),513),[[w,e.soft_name]])]),r("div",Be,[l[41]||(l[41]=r("div",null,"解决方案",-1)),e.tips?(o(),i("div",Re,[(o(!0),i(k,null,b(e.tips,(e,l)=>(o(),i("p",{key:l,class:d(0==l?"":"mt-[4px]")},p(l+1)+"、"+p(e),3))),128))])):m("",!0),e.vuln_solution?(o(),i("div",Ee,p(e.vuln_solution),1)):m("",!0)]),h(r("div",qe,[l[42]||(l[42]=r("div",null,"温馨提示",-1)),r("div",ze,p(e.remind),1)],512),[[w,e.remind]])],512),[[w,e.show]])]),_:2},1024)]))),128)),c(fl).length?m("",!0):(o(),x(Dl,{key:0,description:"暂无忽略的风险项"}))])]),_:1},8,["modelValue","class"])]))]),_:1},8,["modelValue"]),v(Tl,{title:"安全扫描报告","show-footer":!1,area:[100,80],modelValue:c(Fl),"onUpdate:modelValue":l[12]||(l[12]=e=>g(Fl)?Fl.value=e:null)},{default:f(()=>[l[45]||(l[45]=r("div",{class:"box"},[r("iframe",{src:"/project/security/report/html",frameborder:"0",width:"200%",height:"200%"})],-1)),r("div",Ge,[l[44]||(l[44]=r("span",null,null,-1)),v(a,{onClick:Il,class:"border border-solid border-[#20a53a] py-8px px-12px rounded-2px mr-20px my-8px"},{default:f(()=>[...l[43]||(l[43]=[r("i",{class:"svgtofont-icon-ltd text-[#A88E5F] mt-2px"},null,-1),u(" 下载报告",-1)])]),_:1})])]),_:1},8,["modelValue"])])])}}}),[["__scopeId","data-v-c70770e8"]]);export{Je as default};
Save File
Cancel