import{_ as v}from"./BaseForm.vue_vue_type_script_setup_true_lang-51c9d898-1778929502341v=1.0.0.js";import{u as y,b as w}from"./processReleaseApi-51d788e8-1778929502341v=1.0.0.js";import{u as b}from"./useFormEdit-1c6a5713-1778929502341v=1.0.0.js";import{d as m,r,G as C,b as P,e as x,o as R,f as F,w as S,g as q,h as f,H as d,K as i}from"./index-17740f03-1778929502341v=1.0.0.js";import"./index-ea94a5ac-1778929502341v=1.0.0.js";import"./processTypeApi-5bf19841-1778929502341v=1.0.0.js";import"./tabs-07c00c0d-1778929502341v=1.0.0.js";const B=m({name:"processReleaseEdit"}),$=m({...B,setup(E){const{closeCurrent:u}=b(),c=r(null),o=r({title:"",publish_time:"",content:"",file:[]}),t=r(!1),p=()=>{u()},_=async a=>{t.value=!0;try{let e=y,l="\u66F4\u65B0\u6210\u529F";a.file=JSON.stringify(a.file||[]);let s=await e(a);s.code==200?i({type:"success",message:`${l}!`}):i.warning(s.msg),t.value=!1,u()}catch{t.value=!1}},n=C(),g=async a=>{let e=await w({administration_standard_flow_id:a});if(e.code!=200){i.warning(e.msg);return}e.data.file&&(e.data.file=JSON.parse(e.data.file||"[]")),e.data.releaseTime=[e.data.effective_start_time,e.data.effective_end_time],o.value=e.data};return P(()=>{n.query.id&&(c.value=n.query.id,g(n.query.id))}),(a,e)=>{const l=x("PaIndexPage");return R(),F(l,null,{default:S(()=>[q(v,{value:f(o),"onUpdate:value":e[0]||(e[0]=s=>d(o)?o.value=s:null),loading:f(t),"onUpdate:loading":e[1]||(e[1]=s=>d(t)?t.value=s:null),onCancel:p,onSubmit:_},null,8,["value","loading"])]),_:1})}}});export{$ as default};
