import C from"./BaseForm-73dd238d-1782572373740v=1.0.0.js";import{b,c as x}from"./scoreCertificateApi-e42b5e9e-1782572373740v=1.0.0.js";import{u as w}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import U from"./CertificatePreview-c0364b4d-1782572373740v=1.0.0.js";import{a as E,_ as F}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as u}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as p,r as c,m as S,al as B,z as I,A as k,R as i,J as m,u as l,k as f,M as q}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=1.0.0.js";const L={class:"outerContainer"},M=p({name:"scoreEdit"}),N=p({...M,setup(O){const{closeCurrent:d}=w(),_=c(null),a=c({type:"",name:"",dictTypeSign:"",status:"",creatorOrganUnitType:""}),s=c(!1),r=E(),v=()=>{d()},g=async n=>{s.value=!0;try{let e=b,o="\u66F4\u65B0\u6210\u529F",t=await e(n);t.code==0?u({type:"success",message:`${o}!`}):u.warning(t.msg),s.value=!1,d()}catch{s.value=!1}},y=async n=>{let e=await x(n);if(e.code!=0){u.warning(e.msg);return}const o=[];Object.keys(e.data).forEach(t=>{t.startsWith("is")&&e.data[t]==1&&o.push(t)}),e.data.content=o,e.data.certificateCoverUrl&&(e.data.certificateCoverUrl=JSON.stringify([{url:e.data.certificateCoverUrl}])),a.value=e.data};return S(()=>{r.query.certificateId&&(_.value=r.query.id,y(r.query.certificateId))}),(n,e)=>{const o=B("HZPageLayout");return I(),k("div",L,[i(o,{isBack:!0,title:l(r).meta.title,style:{flex:"4"}},{default:m(()=>[i(C,{value:l(a),"onUpdate:value":e[0]||(e[0]=t=>f(a)?a.value=t:null),loading:l(s),"onUpdate:loading":e[1]||(e[1]=t=>f(s)?s.value=t:null),onCancel:v,onSubmit:g},null,8,["value","loading"])]),_:1},8,["title"]),i(o,{title:"\u6548\u679C\u9884\u89C8",style:{flex:"2","min-width":"300px"}},{default:m(()=>[q(" {{ baseForm }} "),i(U,{value:l(a),"onUpdate:value":e[2]||(e[2]=t=>f(a)?a.value=t:null)},null,8,["value"])]),_:1})])}}});const j=F(N,[["__scopeId","data-v-bac07b77"]]);export{j as default};
