import{b as $,g as G}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{c as H}from"./contestAppealApi-946ca67c-1782572373740v=1.0.0.js";import{y as K,c as D,r as i,m as W,al as r,z as m,I as C,J as n,B as A,R as a,a8 as f,a9 as v,u,A as h,Q as I,a4 as w,M as F,O as P}from"./vendor-866bb149-1782572373740v=1.0.0.js";const X={appealFeedbackType:[{max:50,message:"\u6700\u591A 50 \u4E2A\u5B57\u7B26",trigger:"blur"}],content:[{max:5e3,message:"\u6700\u591A 5000 \u4E2A\u5B57\u7B26",trigger:"blur"}],evidence:[],replyContent:[{max:5e3,message:"\u6700\u591A 5000 \u4E2A\u5B57\u7B26",trigger:"blur"}],replyAttachments:[],isShowReply:[{required:!0,message:"\u8BF7\u9009\u62E9\u662F\u5426\u5BF9\u7533\u8BC9\u8005\u663E\u793A\u7B54\u590D",trigger:"change"}],appealFeedbackStatus:[],creatorName:[{max:200,message:"\u6700\u591A 200 \u4E2A\u5B57\u7B26",trigger:"blur"}],createPhone:[{max:32,message:"\u6700\u591A 32 \u4E2A\u5B57\u7B26",trigger:"blur"}],createTime:[],eventName:[{required:!0,message:"\u8BF7\u8F93\u5165\u6240\u5C5E\u8D5B\u4E8B",trigger:"blur"},{max:50,message:"\u6700\u591A 50 \u4E2A\u5B57\u7B26",trigger:"blur"}],appealFeedbackId:[{required:!0,message:"\u8BF7\u9009\u62E9\u7533\u8BC9\u7F16\u53F7",trigger:"change"}],eventId:[{required:!0,message:"\u8BF7\u9009\u62E9\u8D5B\u4E8B\u540D\u79F0",trigger:"change"}],dictId:[{required:!0,message:"\u8BF7\u9009\u62E9\u7533\u8BC9\u7C7B\u578B",trigger:"change"}],creatorOrganUnitId:[{required:!0,message:"\u8BF7\u9009\u62E9\u7533\u8BC9\u4EBA\u624B\u673A\u53F7\u7801",trigger:"change"}],handlerName:[{required:!0,message:"\u8BF7\u9009\u62E9\u5904\u7406\u4EBA",trigger:"change"}],dictIdName:[{required:!0,message:"\u8BF7\u9009\u62E9\u7533\u8BC9\u7C7B\u578B\u4E2D\u6587",trigger:"change"}]},Y={class:"pt20 mt30"},te=K({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(V,{emit:k}){$();let _=V;const p=k,o=D({get(){return q(_.value)},set(t){p("update:value",t)}}),S=D({get(){return _.loading},set(t){p("update:loading",t)}}),b=i(),c=i({xs:24,sm:22,md:20,lg:14,xl:13});i({xs:24,sm:24,md:12,lg:12,xl:12}),i({xs:24,sm:22,md:18,lg:16,xl:8});const y=i([]),L=()=>{},N=async()=>{const t=await H({page:1,size:1e4,eventStatus:1});t.code===0&&(y.value=t.data.listData.map(e=>({label:e.name,value:e.eventId})))},E=i([]),O=()=>{},R=async()=>{const t=await G({page:1,size:1e4,dictTypeSign:"appeal_type"});t.code===0&&(E.value=t.data.listData.map(e=>({label:e.name,value:e.dictId})))},q=t=>t,z=()=>JSON.parse(JSON.stringify(o.value)),T=t=>{t.validate(async(e,g)=>{if(e){let s=z();p("submit",s)}else{const s=Object.keys(g)[0];t.scrollToField(s)}})},j=()=>{p("cancel")};return W(()=>{N(),R()}),(t,e)=>{const g=r("el-option"),s=r("el-select"),d=r("el-form-item"),B=r("PaCol"),M=r("el-input"),U=r("DocumentMul"),J=r("PaRow"),x=r("el-button"),Q=r("el-form");return m(),C(Q,{model:u(o),ref_key:"formRef",ref:b,rules:u(X),"label-width":"160px"},{default:n(()=>[e[7]||(e[7]=A("div",{class:"divider mb30"},"\u57FA\u7840\u4FE1\u606F",-1)),a(J,null,{default:n(()=>[a(B,f(v(u(c))),{default:n(()=>[a(d,{label:"\u8D5B\u4E8B\u540D\u79F0",prop:"eventId"},{default:n(()=>[a(s,{modelValue:u(o).eventId,"onUpdate:modelValue":e[0]||(e[0]=l=>u(o).eventId=l),filterable:"",onChange:L,placeholder:"\u8BF7\u9009\u62E9\u8D5B\u4E8B\u540D\u79F0",style:{width:"100%"}},{default:n(()=>[(m(!0),h(I,null,w(u(y),l=>(m(),C(g,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),a(B,f(v(u(c))),{default:n(()=>[a(d,{label:"\u7533\u8BC9\u7C7B\u578B",prop:"dictId"},{default:n(()=>[a(s,{modelValue:u(o).dictId,"onUpdate:modelValue":e[1]||(e[1]=l=>u(o).dictId=l),filterable:"",onChange:O,placeholder:"\u8BF7\u9009\u62E9\u7533\u8BC9\u7C7B\u578B",style:{width:"100%"}},{default:n(()=>[(m(!0),h(I,null,w(u(E),l=>(m(),C(g,{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),a(B,f(v(u(c))),{default:n(()=>[a(d,{label:"\u7533\u8BC9\u5185\u5BB9",prop:"content"},{default:n(()=>[a(M,{modelValue:u(o).content,"onUpdate:modelValue":e[2]||(e[2]=l=>u(o).content=l),placeholder:"\u8BF7\u8F93\u5165\u7533\u8BC9\u5185\u5BB9"},null,8,["modelValue"])]),_:1})]),_:1},16),a(B,f(v(u(c))),{default:n(()=>[a(d,{label:"\u7533\u8BC9\u8BC1\u636E",prop:"evidence"},{default:n(()=>[a(U,{fileList:u(o).evidence,"onUpdate:fileList":e[3]||(e[3]=l=>u(o).evidence=l),showFileList:!1,uploadType:"file",accept:".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg,.zip",fileSize:5120,limit:999,mutiple:!1},null,8,["fileList"])]),_:1})]),_:1},16),F(` <PaCol v-bind="oneLine"
				><el-form-item label="\u5904\u7406\u7B54\u590D" prop="replyContent">
					<el-input v-model="form.replyContent" placeholder="\u8BF7\u8F93\u5165\u5904\u7406\u7B54\u590D" /> </el-form-item
			></PaCol> `),F(` <PaCol v-bind="oneLine"
				><el-form-item label="\u5904\u7406\u9644\u4EF6" prop="replyAttachments">
					<DocumentMul
						v-model:fileList="form.replyAttachments"
						:showFileList="false"
						uploadType="file"
						accept=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg,.zip"
						:fileSize="5120"
						:limit="999"
						:mutiple="false"
					>
					</DocumentMul> </el-form-item></PaCol
			> `),F(` <PaCol v-bind="oneLine"
				><el-form-item label="\u662F\u5426\u5BF9\u7533\u8BC9\u8005\u663E\u793A\u7B54\u590D" prop="isShowReply"> <el-switch v-model="form.isShowReply" /> </el-form-item
			></PaCol> `)]),_:1}),a(d,null,{default:n(()=>[A("div",Y,[a(x,{onClick:j},{default:n(()=>e[5]||(e[5]=[P("\u8FD4\u56DE",-1)])),_:1,__:[5]}),a(x,{type:"primary",loading:u(S),onClick:e[4]||(e[4]=l=>T(u(b)))},{default:n(()=>e[6]||(e[6]=[P("\u4FDD\u5B58",-1)])),_:1,__:[6]},8,["loading"])])]),_:1})]),_:1,__:[7]},8,["model","rules"])}}});export{te as _};
