import{_ as g}from"./BaseForm.vue_vue_type_script_setup_true_lang-a5011ebc-1782729249161v=1.0.0.js";import{a as _}from"./violationTypeApi-9af45b17-1782729249161v=1.0.0.js";import{u as y}from"./useFormEdit-fb8b8504-1782729249161v=1.0.0.js";import{a as v}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{E as i}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as c,r as n,al as b,z as C,I as k,J as B,R as E,u as r,k as m}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";import"./keepAlive-20a782c5-1782729249161v=1.0.0.js";const T=c({name:"violationTypeAdd"}),P=c({...T,setup(w){const{closeCurrent:l}=y(),o=n({type:"",name:"",dictTypeSign:"",status:"",creatorOrganUnitType:""}),a=n(!1),f=()=>{l()};n("");const p=v(),d=async u=>{a.value=!0;try{let e=_,s="\u65B0\u589E\u6210\u529F",t=await e(u);t.code==0?(i({type:"success",message:`${s}!`}),l()):i.warning(t.msg),a.value=!1}catch{a.value=!1}};return(u,e)=>{const s=b("HZPageLayout");return C(),k(s,{isBack:!0,title:r(p).meta.title},{default:B(()=>[E(g,{value:r(o),"onUpdate:value":e[0]||(e[0]=t=>m(o)?o.value=t:null),loading:r(a),"onUpdate:loading":e[1]||(e[1]=t=>m(a)?a.value=t:null),onCancel:f,onSubmit:d},null,8,["value","loading"])]),_:1},8,["title"])}}});export{P as default};
