import{a0 as F,d as R,Z as N,a2 as $,a3 as w,a6 as D,a4 as L,a5 as O,gF as k,b$ as A,gG as H,V as I,cq as j,r as q,h as b,o as C,j as i,i as l,w as a,aI as G,p as S,A as y,l as t,B as U,aa as Z,cO as K,fm as J,aH as Q,F as W,a9 as X,aE as Y,aF as ee,gH as se,N as te,bR as oe,R as ne,cZ as ae}from"./index-9PRMimni.js";import{c as re}from"./componentSetting-DVhNDBTO.js";const ie=F("a",`
 cursor: pointer;
 transition:
 color .3s var(--n-bezier),
 text-decoration-color .3s var(--n-bezier);
 text-decoration-color: var(--n-text-color);
 color: var(--n-text-color);
`),le=Object.assign({},w.props),ce=R({name:"A",props:le,setup(s){const{mergedClsPrefixRef:m,inlineThemeDisabled:c}=$(s),o=w("Typography","-a",ie,D,s,m),u=L(()=>{const{common:{cubicBezierEaseInOut:f},self:{aTextColor:g}}=o.value;return{"--n-text-color":g,"--n-bezier":f}}),n=c?O("a",void 0,u,s):void 0;return{mergedClsPrefix:m,cssVars:c?void 0:u,themeClass:n?.themeClass,onRender:n?.onRender}},render(){var s;return(s=this.onRender)===null||s===void 0||s.call(this),N("a",{class:[`${this.mergedClsPrefix}-a`,this.themeClass],style:this.cssVars},this.$slots)}}),ue={class:"flex items-center gap-x-2"},de={class:"relative"},me={class:"truncate w-full"},pe={class:"w-[300px]"},fe={class:"absolute top-1/2 right-[-30px] -translate-y-1/2"},he=R({__name:"index",props:{"file-list":{},"file-listModifiers":{}},emits:k(["finish","remove"],["update:file-list"]),setup(s,{emit:m}){const c=A(),o=H(s,"file-list"),u=m,{t:n}=I(),f=ae(),{urlPrefix:g}=j(),v=q(!1);let T=null;const E=()=>{clearTimeout(T),v.value=!0},B=()=>{T=setTimeout(()=>{v.value=!1},100)};function M({event:d}){try{const e=oe("("+d.target.response+")"),{infoField:h}=re.upload.apiSetting,{code:p}=e,_=e.msg||e.message||"上传失败",x=e[h];if(p!==ne.SUCCESS)return f.error(_);u("finish",x)}catch(e){console.log("上传失败：",e)}}function P(d){d.stopPropagation(),d.preventDefault(),u("remove",o.value),o.value=[]}return(d,e)=>{const h=U,p=G,_=Q,x=ce;return C(),b("div",ue,[i(_,Z(t(c),{action:`${t(g)}/files`,accept:".doc,.docx,.pdf,.xls,.xlsx",headers:{timestamp:new Date().getTime(),authorization:`${t(K).get(t(J))}`},max:1,"file-list":o.value,"onUpdate:fileList":e[0]||(e[0]=r=>o.value=r),onFinish:e[1]||(e[1]=({event:r})=>M({event:r})),class:"uploadStyle","file-list-style":{margin:0,flex:1},"show-file-list":!1}),{default:a(()=>[i(p,{trigger:"hover"},{trigger:a(()=>[i(h,{strong:"",secondary:"",class:"size-7"},{icon:a(()=>e[3]||(e[3]=[l("i",{class:"iconfont icon-upload1"},null,-1)])),_:1})]),default:a(()=>[S(" "+y(t(n)("hsqe.rs.uploadText")),1)]),_:1})]),_:1},16,["action","headers","file-list"]),l("div",de,[l("div",{class:"flex items-center p-1 gap-x-2 rounded-sm",onMouseenter:E,onMouseleave:B},[(C(!0),b(W,null,X(o.value,(r,z)=>(C(),b("div",{class:"hover:bg-[#f3f3f5] hover:text-[#18a058] duration-300 px-2 py-1 flex items-center w-[200px] relative",key:z},[i(p,{trigger:"hover",placement:"top-start"},{trigger:a(()=>[l("div",me,[i(x,{href:r.url,class:"text-[#18a058] border-b border-solid border-[#18a058]"},{default:a(()=>[S(y(r.name),1)]),_:2},1032,["href"])])]),default:a(()=>[l("div",pe,y(r.name),1)]),_:2},1024),l("div",fe,[Y(i(t(te),{size:"20",class:"cursor-pointer ml-2",onClick:e[2]||(e[2]=V=>P(V))},{default:a(()=>[i(t(se))]),_:1},512),[[ee,o.value.length>0&&t(v)&&!t(c).disabled]])])]))),128))],32)])])}}});export{he as _};
