import b from"./BaseForm-191edff1-1782572373740v=1.0.0.js";import{i as _,j as L,k as w}from"./eventApplyMgmtApi-d35d9842-1782572373740v=1.0.0.js";import{u as S}from"./useFormEdit-e67d5b61-1782572373740v=1.0.0.js";import{a as E}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{E as i}from"./eleVendor-48a7d3b8-1782572373740v=1.0.0.js";import{y as c,r as u,m as C,al as k,z as B,I as F,J as M,R as P,u as l,k as d}from"./vendor-866bb149-1782572373740v=1.0.0.js";import"./eleValidate-aae13e4d-1782572373740v=1.0.0.js";import"./usePrint-d2511e6d-1782572373740v=1.0.0.js";import"./keepAlive-0ac97bbd-1782572373740v=1.0.0.js";const I=c({name:"agreementManageEdit"}),z=c({...I,setup(T){const{closeCurrent:m}=S(),f=u(null),n=u({applicableType:"",name:"",content:"",mobileSignatureStatus:"",status:"",agreementId:""}),a=u(!1),r=E(),p=()=>{m()},g=async s=>{a.value=!0;try{let e=_,t="\u66F4\u65B0\u6210\u529F",o=await e(s);o.code==0?i({type:"success",message:`${t}!`}):i.warning(o.msg),a.value=!1,m()}catch{a.value=!1}},v=async s=>{let e=await L(s);if(e.code!=0){i.warning(e.msg);return}e.data.eventTime=[e.data.eventStartTime,e.data.eventEndTime],e.data.auditLastSubmitList=await y(e.data.eventProposerId),n.value=e.data},y=async s=>{const e=await w(s);let t=[];return e.code==0&&e.data.length>0&&(t=e.data.slice(1)),t};return C(()=>{r.query.id&&(f.value=r.query.id,v(r.query.id))}),(s,e)=>{const t=k("HZPageLayout");return B(),F(t,{title:l(r).meta.title,isBack:!0},{default:M(()=>[P(b,{value:l(n),"onUpdate:value":e[0]||(e[0]=o=>d(n)?n.value=o:null),mode:"view",loading:l(a),"onUpdate:loading":e[1]||(e[1]=o=>d(a)?a.value=o:null),onCancel:p,onSubmit:g},null,8,["value","loading"])]),_:1},8,["title"])}}});export{z as default};
