import{d,cC as m,cE as w,c2 as _,z as c,i as k,o as v,c as g,h,cG as y,cH as S,$}from"./index-D3rICic-.js";import{_ as x}from"./workflow.vue_vue_type_script_setup_true_lang-CDR_Hxib.js";import"./DescriptionsItem-LhWljJnV.js";import"./Grid-CRDcRyPk.js";import"./index-2ay5PpNs.js";const W=d({name:"workflow_form_edit",__name:"index",setup(C){const t=m(),u=w(),n=_(),s=c(!1),r=String(u.query.id),o=c({}),l=async()=>{s.value=!0;const{data:a,error:e}=await y(r);e||(o.value=a),s.value=!1};k(()=>{t.clear(),t.setType(0),t.setId(r),l()});const i=async()=>{var e;const{error:a}=await S(o.value);a||((e=window.$message)==null||e.info($("common.updateSuccess")),n.push({path:"/workflow/task"}))},f=()=>{n.push("/workflow/task")};return(a,e)=>(v(),g(h(x),{modelValue:o.value,"onUpdate:modelValue":e[0]||(e[0]=p=>o.value=p),spinning:s.value,onSave:i,onCancel:f},null,8,["modelValue","spinning"]))}});export{W as default};
