import{_ as C}from"./BaseForm.vue_vue_type_script_setup_true_lang-a7d95b1a-1782111760424v=1.0.0.js";import{b as v}from"./specialWorkPublicApi-04f6012b-1782111760424v=1.0.0.js";import{u as y}from"./useFormEdit-61a257a4-1782111760424v=1.0.0.js";import{C as F,E as m}from"./eleVendor-99a45232-1782111760424v=1.0.0.js";import{m as p,a as n,ai as P,p as k,M as x,O as T,U as E,u as c,D as f}from"./vendor-7f807b9d-1782111760424v=1.0.0.js";import"./index-996f931c-1782111760424v=1.0.0.js";import"./dataDictApi-d2fc600e-1782111760424v=1.0.0.js";import"./CustomFormTypeSelectDialog-56de3184-1782111760424v=1.0.0.js";import"./CustomForm-9586fd2f-1782111760424v=1.0.0.js";import"./tabs-cb939388-1782111760424v=1.0.0.js";const L=p({name:"specialWorkPublicAdd"}),h=p({...L,setup(R){const{closeCurrent:r}=y(),o=n({year:F().format("YYYY"),title:"",specialWorkType:"",pushTime:"",startTime:"",endTime:"",content:"",attachments:[],status:"",closeType:"",creatorName:"",customFieldConfList:[],filloutRequire:[]}),t=n(!1),d=()=>{r()};n("");const _=async e=>{t.value=!0;try{let a=v,l="\u65B0\u589E\u6210\u529F";e.attachments=e.fileStr,e.filloutRequire=e.filloutRequire.join(","),e.customFieldConfList=e.customFieldConfList.map((i,g)=>{var u;return{...i,selectValues:(u=i.selectValues)==null?void 0:u.join(","),fieldValue:`field${g+1}`}});let s=await a(e);s.code==0?(m({type:"success",message:`${l}!`}),r()):m.warning(s.msg),t.value=!1}catch{t.value=!1}};return(e,a)=>{const l=P("PaIndexPage");return k(),x(l,null,{default:T(()=>[E(C,{value:c(o),"onUpdate:value":a[0]||(a[0]=s=>f(o)?o.value=s:null),loading:c(t),"onUpdate:loading":a[1]||(a[1]=s=>f(t)?t.value=s:null),onCancel:d,onSubmit:_},null,8,["value","loading"])]),_:1})}}});export{h as default};
