import{G as e,P as l,O as a,C as d,D as o,K as t,y as s,S as u,h as i}from"./element-plus-DSMJnpwa.js";import{d as n}from"./index-mv7arXuk.js";/* empty css                *//* empty css                     *//* empty css                       *//* empty css               *//* empty css               */import{_ as r}from"./index.vue_vue_type_style_index_0_lang-BYkH3_xK.js";import{_ as m}from"./index-9_f6rNAP.js";import{g as p,u as f,a as v}from"./index-DGf684Vy.js";import{B as c,aB as h,aE as _,H as g,L as j,M as y,P as V,O as b,Y as M,d as k}from"./vue-vendor-DZekML78.js";import"./utils-cPVb2Haz.js";/* empty css                  */const x={class:"ResidentMainBox p-2 w-full"},Y={class:"ResidentMainBody"},B={class:"addBuildingFormBody"},H={class:"formbox"},P=n(c({__name:"addHandleLog",setup(n){const c=h(),P=_(),q=k(),N=k({id:null,content:"",seekName:"",phone:"",handleTime:"",handlePosition:""}),D={content:[{required:!0,message:"请输入办事内容",trigger:"blur"}],seekName:[{required:!0,message:"请选择求助人",trigger:"blur"}],handlePosition:[{required:!0,message:"请输入办事地点",trigger:"blur"}],handleTime:[{required:!0,message:"请输入办事时间",trigger:"blur"}]},T=k();function U(e){N.value.content=e.trim()}c.query.id&&(T.value=c.query.id,p(T.value).then(e=>{N.value={...N.value,...e.data}}));const w=()=>{q.value?.validate(async e=>{e&&(T.value?f(N.value).then(()=>{i.success("编辑成功"),C()}):v(N.value).then(()=>{i.success("添加成功"),C()}))})};function C(){P.push({path:"/repair/handlelog"})}return(i,n)=>{const p=r,f=d,v=a,c=l,h=o,_=t,k=s,P=e,T=u;return g(),j("div",x,[y(m,{title:"办事编辑"}),V("div",Y,[y(T,null,{header:b(()=>[...n[4]||(n[4]=[V("div",{class:"title"},"基本信息",-1)])]),default:b(()=>[V("div",B,[V("div",H,[y(P,{ref_key:"formRef",ref:q,model:N.value,rules:D,"label-width":"120px"},{default:b(()=>[y(c,null,{default:b(()=>[y(v,null,{default:b(()=>[y(f,{label:"办事内容",prop:"content"},{default:b(()=>[y(p,{"onUpdate:modelValue":U,"model-value":N.value.content,height:500,"min-height":300,"read-only":!1,"file-size":5},null,8,["model-value"])]),_:1})]),_:1})]),_:1}),y(c,null,{default:b(()=>[y(v,{span:12},{default:b(()=>[y(f,{label:"求助人姓名",prop:"seekName"},{default:b(()=>[y(h,{modelValue:N.value.seekName,"onUpdate:modelValue":n[0]||(n[0]=e=>N.value.seekName=e),modelModifiers:{trim:!0},placeholder:"请输入求助人姓名"},null,8,["modelValue"])]),_:1})]),_:1}),y(v,{span:12},{default:b(()=>[y(f,{label:"联系方式",prop:"phone"},{default:b(()=>[y(h,{modelValue:N.value.phone,"onUpdate:modelValue":n[1]||(n[1]=e=>N.value.phone=e),modelModifiers:{trim:!0},placeholder:"请输入联系方式"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),y(c,null,{default:b(()=>[y(v,{span:12},{default:b(()=>[y(f,{label:"办事时间",prop:"handleTime"},{default:b(()=>[y(_,{format:"YYYY-MM-DD HH:mm","value-format":"YYYY-MM-DD HH:mm",modelValue:N.value.handleTime,"onUpdate:modelValue":n[2]||(n[2]=e=>N.value.handleTime=e),type:"datetime",placeholder:"请选择"},null,8,["modelValue"])]),_:1})]),_:1}),y(v,{span:12},{default:b(()=>[y(f,{label:"办事地点",prop:"handlePosition"},{default:b(()=>[y(h,{modelValue:N.value.handlePosition,"onUpdate:modelValue":n[3]||(n[3]=e=>N.value.handlePosition=e),modelModifiers:{trim:!0},placeholder:"请输入办事地点"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),y(f,null,{default:b(()=>[y(k,{type:"primary",onClick:w},{default:b(()=>[...n[5]||(n[5]=[M("提交",-1)])]),_:1}),y(k,{onClick:C},{default:b(()=>[...n[6]||(n[6]=[M("返回",-1)])]),_:1})]),_:1})]),_:1},8,["model"])])])]),_:1})])])}}}),[["__scopeId","data-v-7affdad7"]]);export{P as default};
