1 |
- import{_ as J,__tla as L}from"./Dialog-7bb778a5.js";import{d as Q,r as o,x as P,o as W,C as E,A as r,f as l,a,D as y,B as m,a2 as g,d0 as G,d1 as H,Q as K,a9 as N,V as O,W as S,bj as T,J as X,_ as Y,__tla as Z}from"./index-54aa57d8.js";import{u as $,__tla as ee}from"./useMessage-f56cafbb.js";let k,ae=Promise.all([(()=>{try{return L}catch{}})(),(()=>{try{return Z}catch{}})(),(()=>{try{return ee}catch{}})()]).then(async()=>{let b,h;b=m("div",{class:"el-upload__text"},[y(" \u5C06\u6587\u4EF6\u62D6\u5230\u6B64\u5904\uFF0C\u6216 "),m("em",null,"\u70B9\u51FB\u4E0A\u4F20")],-1),h=m("div",{class:"el-upload__tip",style:{color:"red"}}," \u63D0\u793A\uFF1A\u4EC5\u5141\u8BB8\u5BFC\u5165\u201Cbpm\u201D\u6216\u201Cxml\u201D\u683C\u5F0F\u6587\u4EF6\uFF01 ",-1),k=Y(Q({name:"ModelImportForm",__name:"ModelImportForm",emits:["success"],setup(le,{expose:w,emit:F}){const i=$(),n=o(!1),d=o(!1),s=o({key:"",name:"",description:""}),U=P({key:[{required:!0,message:"\u6D41\u7A0B\u6807\u8BC6\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}],name:[{required:!0,message:"\u6D41\u7A0B\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",trigger:"blur"}]}),p=o(),_=o(),V=o(),c=o([]);w({open:async()=>{n.value=!0,q()}});const z=async()=>{p&&await p.value.validate()&&(c.value.length!=0?(V.value={Authorization:"Bearer "+G(),"tenant-id":H()},d.value=!0,_.value.submit()):i.error("\u8BF7\u4E0A\u4F20\u6587\u4EF6"))},C=F,I=async u=>{if(u.code!==0)return i.error(u.msg),void(d.value=!1);i.success("\u5BFC\u5165\u6D41\u7A0B\u6210\u529F\uFF01\u8BF7\u70B9\u51FB\u3010\u8BBE\u8BA1\u6D41\u7A0B\u3011\u6309\u94AE\uFF0C\u8FDB\u884C\u7F16\u8F91\u4FDD\u5B58\u540E\uFF0C\u624D\u53EF\u4EE5\u8FDB\u884C\u3010\u53D1\u5E03\u6D41\u7A0B\u3011"),C("success")},M=()=>{i.error("\u5BFC\u5165\u6D41\u7A0B\u5931\u8D25\uFF0C\u8BF7\u60A8\u91CD\u65B0\u4E0A\u4F20\uFF01"),d.value=!1},q=()=>{var u,e;d.value=!1,(u=_.value)==null||u.clearFiles(),s.value={key:"",name:"",description:""},(e=p.value)==null||e.resetFields()},A=()=>{i.error("\u6700\u591A\u53EA\u80FD\u4E0A\u4F20\u4E00\u4E2A\u6587\u4EF6\uFF01")};return(u,e)=>{const B=K,f=N,v=O,D=S,R=T,x=X,j=J;return W(),E(j,{modelValue:a(n),"onUpdate:modelValue":e[5]||(e[5]=t=>g(n)?n.value=t:null),title:"\u5BFC\u5165\u6D41\u7A0B",width:"400"},{footer:r(()=>[l(x,{disabled:a(d),type:"primary",onClick:z},{default:r(()=>[y("\u786E \u5B9A")]),_:1},8,["disabled"]),l(x,{onClick:e[4]||(e[4]=t=>n.value=!1)},{default:r(()=>[y("\u53D6 \u6D88")]),_:1})]),default:r(()=>[m("div",null,[l(R,{ref_key:"uploadRef",ref:_,"file-list":a(c),"onUpdate:fileList":e[3]||(e[3]=t=>g(c)?c.value=t:null),action:"https://zxpt.newfeifan.cn/admin-api/bpm/model/import","auto-upload":!1,data:a(s),disabled:a(d),headers:a(V),limit:1,"on-error":M,"on-exceed":A,"on-success":I,accept:".bpmn, .xml",drag:"",name:"bpmnFile"},{tip:r(()=>[h,m("div",null,[l(D,{ref_key:"formRef",ref:p,model:a(s),rules:a(U),"label-width":"120px"},{default:r(()=>[l(v,{label:"\u6D41\u7A0B\u6807\u8BC6",prop:"key"},{default:r(()=>[l(f,{modelValue:a(s).key,"onUpdate:modelValue":e[0]||(e[0]=t=>a(s).key=t),placeholder:"\u8BF7\u8F93\u5165\u6D41\u6807\u6807\u8BC6",style:{width:"250px"}},null,8,["modelValue"])]),_:1}),l(v,{label:"\u6D41\u7A0B\u540D\u79F0",prop:"name"},{default:r(()=>[l(f,{modelValue:a(s).name,"onUpdate:modelValue":e[1]||(e[1]=t=>a(s).name=t),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6D41\u7A0B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),l(v,{label:"\u6D41\u7A0B\u63CF\u8FF0",prop:"description"},{default:r(()=>[l(f,{modelValue:a(s).description,"onUpdate:modelValue":e[2]||(e[2]=t=>a(s).description=t),clearable:"",type:"textarea"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules"])])]),default:r(()=>[l(B,{class:"el-icon--upload",icon:"ep:upload-filled"}),b]),_:1},8,["file-list","data","disabled","headers"])])]),_:1},8,["modelValue"])}}}),[["__file","D:/zx/mall-newfeifan-zx-admin/src/views/bpm/model/ModelImportForm.vue"]])});export{ae as __tla,k as default};
|