import{I as U,K as S,q as b,aA as w}from"./index.17037962789732.js";import{u as A,J as C}from"./system.1703796278973.js";import"./index.1703796278973303.js";import"./index.170379627897329.js";import"./index.170379627897315.js";import"./index.170379627897330.js";import"./index.170379627897314.js";import{T as d,L as F,o as K}from"./comm.1703796278973.js";import{F as L}from"./firmware.1703796278973.js";import{d as f,k as _,m as j,r as B,o as N,c as $,a as i,b as r,u as o,M as k,z as h,G as E,H as J}from"./vue.1703796278973.js";import{_ as M}from"./_plugin-vue_export-helper.1703796278973.js";import"./index.17037962789733.js";import"./dayjs.min.1703796278973.js";import"./isArray.1703796278973.js";import"./editor.api.1703796278973.js";import"./preload-helper.1703796278973.js";import"./monaco.contribution.1703796278973.js";import"./index.170379627897332.js";import"./index.170379627897333.js";import"./index.170379627897334.js";import"./default.1703796278973.js";import"./permission.1703796278973.js";import"./consts.1703796278973.js";import"./404.1703796278973.js";const O=t=>(E("data-v-5a799f95"),t=t(),J(),t),R=O(()=>h("span",{class:"upload-text"},"上传文件",-1)),T=f({name:"FileUpload"}),q=f({...T,props:{modelValue:{type:String,default:()=>""}},emits:["update:modelValue","update:extraValue","change"],setup(t,{emit:u}){var m;const c=t,v=(m=A().$state.configInfo.paths)==null?void 0:m["base-path"],a=_(c.modelValue),s=_(!1),g=async e=>{var p;if(s.value=!0,e.file.status==="done"){s.value=!1;const l=(p=e.file.response)==null?void 0:p.result,n=`${v||""}/file/${l.id}?accessKey=${l.others.accessKey}`;K("上传成功！","success"),a.value=n,u("update:modelValue",n),u("update:extraValue",l)}else e.file.error?(C.error({message:"系统提示",description:"系统未知错误，请反馈给管理员"}),s.value=!1):e.file.response&&(s.value=!1)};return j(()=>c.modelValue,e=>{a.value=e}),(e,p)=>{const l=U,n=B("AIcon"),y=S,x=b,I=w;return N(),$(I,{spinning:o(s)},{default:i(()=>[r(l,{placeholder:"请上传文件",value:o(a),"onUpdate:value":p[0]||(p[0]=V=>k(a)?a.value=V:null),style:{width:"calc(100% - 110px)"},disabled:!0},null,8,["value"]),r(x,{name:"file",multiple:!0,action:o(L),headers:{[o(d)]:o(F).get(o(d))},onChange:g,showUploadList:!1,class:"upload-box"},{default:i(()=>[r(y,{type:"primary"},{default:i(()=>[h("div",null,[r(n,{type:"UploadOutlined"}),R])]),_:1})]),_:1},8,["action","headers"])]),_:1},8,["spinning"])}}});const _e=M(q,[["__scopeId","data-v-5a799f95"]]);export{_e as default};
