import{d as D,U as t,a2 as a,a3 as g,F as w,ae as v,ad as i,af as o,k as n,a4 as p,a5 as f,V as d,G as m,q as A,B as E,ag as V}from"./vue-vendor-CxLCUzY4.js";import"./index-CsJ9aAmV.js";import{c5 as B,_ as U}from"./index-Cy4uayzW.js";import{e as M,u as N,c as P}from"./useFileCell-hV9_hgVy.js";import{U as J}from"./JUpload-DSWoDwh2.js";import"./index-zKZnG1QC.js";import"./BasicModal-sKcs_9Ir.js";import"./ModalHeader-ByCVDoqO.js";import"./antd-vue-vendor-CahNzUUa.js";import"./useTimeout-gJpgadD6.js";import"./vxe-table-vendor-Cdi8WfTx.js";import"./index-Bdn0r8CG.js";import"./useWindowSizeFn-DDyhhqyw.js";import"./index-CYoRlduV.js";import"./index-DYB8Ashr.js";import"./index-CrdW4fN1.js";import"./useIntersectionObserver-FVRzwlSd.js";import"./index-B4vNk56t.js";const $=D({name:"JVxeFileCell",components:P,props:B(),setup(e){return N(e,J.file)},enhanced:M}),L={style:{"margin-left":"5px"}},R={style:{"margin-left":"5px"}};function T(e,l,I,O,S,q){const C=t("LoadingOutlined"),u=t("a-tooltip"),s=t("Icon"),c=t("a-menu-item"),k=t("a-menu"),F=t("Dropdown"),y=t("a-button"),_=t("a-upload"),h=t("JUploadModal");return a(),g("div",null,[e.hasFile?(a(!0),g(w,{key:0},v([e.innerFile||{}],(r,b)=>(a(),g("div",{key:b,style:{position:"relative"}},[r.status==="uploading"?(a(),i(u,{key:0,title:`上传中(${Math.floor(r.percent)}%)`},{default:o(()=>[n(C),l[0]||(l[0]=p("span",{style:{"margin-left":"5px"}},"上传中…",-1))]),_:2},1032,["title"])):r.status==="done"?(a(),i(u,{key:1,title:r.name},{default:o(()=>[n(s,{icon:"ant-design:paper-clip"}),p("span",L,f(e.ellipsisFileName),1)]),_:2},1032,["title"])):(a(),i(u,{key:2,title:r.message||"上传失败"},{default:o(()=>[n(s,{icon:"ant-design:exclamation-circle",style:{color:"red"}}),p("span",R,f(e.ellipsisFileName),1)]),_:2},1032,["title"])),n(F,{trigger:["click"],placement:"bottomRight",style:{"margin-left":"10px"}},{overlay:o(()=>[n(k,null,{default:o(()=>[e.originColumn.allowDownload!==!1?(a(),i(c,{key:0,onClick:e.handleClickDownloadFile},{default:o(()=>[p("span",null,[n(s,{icon:"ant-design:download"}),l[1]||(l[1]=m(" 下载"))])]),_:1},8,["onClick"])):d("",!0),e.originColumn.allowRemove!==!1?(a(),i(c,{key:1,disabled:e.cellProps.disabled,onClick:e.handleClickDeleteFile},{default:o(()=>[p("span",null,[n(s,{icon:"ant-design:delete"}),l[2]||(l[2]=m(" 删除"))])]),_:1},8,["disabled","onClick"])):d("",!0),n(c,{disabled:e.cellProps.disabled,onClick:e.handleMoreOperation},{default:o(()=>[p("span",null,[n(s,{icon:"ant-design:bars"}),l[3]||(l[3]=m(" 更多"))])]),_:1},8,["disabled","onClick"])]),_:1})]),default:o(()=>[n(u,{title:"操作"},{default:o(()=>[r.status!=="uploading"?(a(),i(s,{key:0,icon:"ant-design:setting",style:{cursor:"pointer"}})):d("",!0)]),_:2},1024)]),_:2},1024)]))),128)):d("",!0),e.cellProps.disabledTable?d("",!0):A((a(),i(_,V({key:1,name:"file",data:{isup:1},multiple:!1,action:e.uploadAction,headers:e.uploadHeaders,showUploadList:!1},e.cellProps,{onChange:e.handleChangeUpload}),{default:o(()=>[n(y,{preIcon:"ant-design:upload"},{default:o(()=>[m(f(e.originColumn.btnText||"点击上传"),1)]),_:1})]),_:1},16,["action","headers","onChange"])),[[E,!e.hasFile]]),n(h,{value:e.modalValue,onRegister:e.registerModel,onChange:e.onModalChange},null,8,["value","onRegister","onChange"])])}const se=U($,[["render",T]]);export{se as default};
