← Back
Editing: index344.js
import{c as a,g as t,q as e,v as s,y as l,z as r,x as c,e as i,C as o,b4 as n}from"./base-lib.js?v=1765440387";import{e as v}from"./utils-lib.js?v=1765440387";import"./__commonjsHelpers__.js?v=1765440387";const u={class:"file-transfer-progress"},p={class:"transfer-content"},d={class:"transfer-paths"},m={class:"path-item"},f={class:"path-value"},g={class:"path-item"},_={class:"path-value"},h={class:"path-item"},D=["title"],x={class:"progress-section"},b={class:"progress-info"},w={class:"progress-percentage"},j={key:0,class:"text-[#999] text-[1.2rem] mt-[1rem]"},k={class:"transfer-stats"},y={class:"stat-left"},L={class:"stat-item total"},M={class:"stat-value"},F={class:"stat-right"},N={class:"stat-item success"},q={class:"stat-value"},z={class:"stat-item error"},C={class:"stat-value"},H={class:"stat-item remaining"},I={class:"stat-value"},O={key:1,class:"transfer-details"},S={class:"detail-item"},A=v(a({__name:"index",props:{compData:{default:()=>({target_path:"",target_node:{name:""},source_node:{name:""},file_count:0,file_complete:0,file_error:0,progress:0,fileList:[]})}},setup(a){const v=a,A=t(()=>{const a=v.compData.value.progress||0;if("number"!=typeof a||isNaN(a))return 0;if(0===a)return 0;const t=a.toString(),e=t.indexOf(".");if(-1===e||a%1==0)return a;const s=t.substring(e+1);let l=0;for(;l<s.length&&"0"===s[l];)l++;const r=l+2;return parseFloat(a.toFixed(r))}),B=t(()=>Math.max(0,v.compData.value.file_count-v.compData.value.file_complete-v.compData.value.file_error)),E=t(()=>{var a;for(let t=0;t<(null==(a=v.compData.value.fileList)?void 0:a.length);t++)if("pending"===v.compData.value.fileList[t].status)return v.compData.value.fileList[t].target_path;return""}),G=t(()=>0===v.compData.value.file_count?"waiting":0===B.value?"completed":v.compData.value.file_error>0&&0===B.value?"error":"transferring"),J=t(()=>"transferring"===G.value),K=t(()=>{switch(G.value){case"completed":return v.compData.value.file_error>0?"warning":"success";case"error":return"exception";default:return}}),P=t(()=>{if(!J.value||0===v.compData.value.file_complete)return"计算中...";const a=2*B.value;return a<60?"".concat(a,"秒"):a<3600?"".concat(Math.round(a/60),"分钟"):"".concat(Math.round(a/3600),"小时")});return(a,t)=>{var G,Q;const R=n;return e(),s("div",u,[l("div",p,[l("div",d,[l("div",m,[t[0]||(t[0]=l("div",{class:"path-label"},"源节点:",-1)),l("div",f,r((null==(G=v.compData.value.source_node)?void 0:G.name)||"未指定"),1)]),l("div",g,[t[1]||(t[1]=l("div",{class:"path-label"},"目标节点:",-1)),l("div",_,r((null==(Q=v.compData.value.target_node)?void 0:Q.name)||"未指定"),1)]),l("div",h,[t[2]||(t[2]=l("div",{class:"path-label"},"目标路径:",-1)),l("div",{class:"path-value",title:v.compData.value.target_path},r(v.compData.value.target_path||"未指定"),9,D)])]),l("div",x,[l("div",b,[t[3]||(t[3]=l("span",{class:"progress-text"},"传输进度",-1)),l("span",w,r(c(A))+"%",1)]),i(R,{percentage:c(A),status:c(K),"stroke-width":8,"show-text":!1,color:"#20a53a"},null,8,["percentage","status"])]),c(E)?(e(),s("div",j," 正在传输:"+r(c(E)),1)):o("",!0),l("div",k,[l("div",y,[l("div",L,[t[4]||(t[4]=l("div",{class:"stat-label"},"总计",-1)),l("div",M,r(v.compData.value.file_count),1)])]),l("div",F,[l("div",N,[t[5]||(t[5]=l("span",{class:"text-[#16a34a] mr-[0.5rem] svgtofont-el-circle-check"},null,-1)),t[6]||(t[6]=l("div",{class:"stat-label text-[#16a34a]"},"已完成",-1)),l("div",q,r(v.compData.value.file_complete),1)]),l("div",z,[t[7]||(t[7]=l("span",{class:"text-[#dc2626] mr-[0.5rem] svgtofont-el-circle-close"},null,-1)),t[8]||(t[8]=l("div",{class:"stat-label text-[#dc2626]"},"失败",-1)),l("div",C,r(v.compData.value.file_error),1)]),l("div",H,[t[9]||(t[9]=l("span",{class:"text-[#666] mr-[0.5rem] svgtofont-icon-login-time"},null,-1)),t[10]||(t[10]=l("div",{class:"stat-label text-[#666]"},"剩余",-1)),l("div",I,r(c(B)),1)])])]),c(J)?(e(),s("div",O,[l("div",S,[l("span",null,"预计剩余时间: "+r(c(P)),1)])])):o("",!0)])])}}}),[["__scopeId","data-v-323f171d"]]);export{A as default};
Save File
Cancel