import{b as J,g as H}from"./index-b309bf9f-1782729249161v=1.0.0.js";import{g as Z}from"./eventListApi-caa95bfe-1782729249161v=1.0.0.js";import{E as y}from"./eleVendor-5008d1ec-1782729249161v=1.0.0.js";import{y as Q,c as x,r as d,m as $,al as s,z as C,I as h,J as n,M as g,R as l,a8 as B,a9 as f,u,A as G,Q as K,a4 as W,B as X,O as D}from"./vendor-1e24e3ad-1782729249161v=1.0.0.js";const Y={appealFeedbackType:[{max:50,message:"\u6700\u591A 50 \u4E2A\u5B57\u7B26",trigger:"blur"}],content:[{required:!0,message:"\u8BF7\u8F93\u5165\u7533\u8BC9\u5185\u5BB9",trigger:"blur"},{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"}]},ee={class:"pt20 mt30"},ne=Q({__name:"BaseForm",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(A,{emit:I}){J();let F=A;const p=I,r=x({get(){return V(F.value)},set(t){p("update:value",t)}}),w=x({get(){return F.loading},set(t){p("update:loading",t)}}),_=d(),c=d({xs:24,sm:22,md:20,lg:14,xl:13});d({xs:24,sm:24,md:12,lg:12,xl:12}),d({xs:24,sm:22,md:18,lg:16,xl:8}),d([]);const v=d({}),S=t=>{},P=async(t,e,m)=>{try{const a=await Z({page:e.page,size:10,name:t,eventId:m,notAuditStatusList:["audit_success","auditing","wait","suspend"]});if(a.code==0)return v.value=a.data.listData.map(i=>({label:i.name,value:i.eventId})),[v.value,a.data.total];v.value=[],y.warning(a.msg)}catch{y.warning("\u83B7\u53D6\u8D5B\u4E8B\u5217\u8868\u5931\u8D25")}},b=d([]),L=()=>{},k=async()=>{const t=await H({page:1,size:1e4,dictTypeSign:"appeal_type",isEnable:1});t.code===0&&(b.value=t.data.listData.map(e=>({label:e.name,value:e.dictId})))},V=t=>t,N=()=>JSON.parse(JSON.stringify(r.value)),R=t=>{t.validate(async(e,m)=>{if(e){let a=N();p("submit",a)}else{const a=Object.keys(m)[0];t.scrollToField(a)}})},q=()=>{p("cancel")};return $(()=>{k()}),(t,e)=>{const m=s("PageSelect"),a=s("el-form-item"),i=s("PaCol"),O=s("el-option"),M=s("el-select"),j=s("el-input"),z=s("DocumentMul"),T=s("PaRow"),E=s("el-button"),U=s("el-form");return C(),h(U,{model:u(r),ref_key:"formRef",ref:_,rules:u(Y),"label-width":"160px"},{default:n(()=>[g(` <div class="divider mb30">\u57FA\u7840\u4FE1\u606F</div>\r
		<HZStepItem title="\u57FA\u7840\u4FE1\u606F"></HZStepItem> `),l(T,null,{default:n(()=>[l(i,B(f(u(c))),{default:n(()=>[l(a,{label:"\u8D5B\u4E8B\u540D\u79F0",prop:"eventId"},{default:n(()=>[l(m,{ref:"pageSelectRef",onChange:S,value:u(r).eventId,"onUpdate:value":e[0]||(e[0]=o=>u(r).eventId=o),"remote-method":P},null,8,["value"])]),_:1})]),_:1},16),l(i,B(f(u(c))),{default:n(()=>[l(a,{label:"\u7533\u8BC9\u7C7B\u578B",prop:"dictId"},{default:n(()=>[l(M,{modelValue:u(r).dictId,"onUpdate:modelValue":e[1]||(e[1]=o=>u(r).dictId=o),filterable:"",onChange:L,placeholder:"\u8BF7\u9009\u62E9\u7533\u8BC9\u7C7B\u578B",style:{width:"100%"}},{default:n(()=>[(C(!0),G(K,null,W(u(b),o=>(C(),h(O,{key:o.value,label:o.label,value:o.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},16),l(i,B(f(u(c))),{default:n(()=>[l(a,{label:"\u7533\u8BC9\u5185\u5BB9",prop:"content"},{default:n(()=>[l(j,{modelValue:u(r).content,"onUpdate:modelValue":e[2]||(e[2]=o=>u(r).content=o),type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u7533\u8BC9\u5185\u5BB9"},null,8,["modelValue"])]),_:1})]),_:1},16),l(i,B(f(u(c))),{default:n(()=>[l(a,{label:"\u7533\u8BC9\u8BC1\u636E",prop:"evidence"},{default:n(()=>[l(z,{fileList:u(r).evidence,"onUpdate:fileList":e[3]||(e[3]=o=>u(r).evidence=o),accept:".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg",width:"180px",height:"180px",showFileEdit:!1},null,8,["fileList"])]),_:1})]),_:1},16),g(` <PaCol v-bind="oneLine"\r
				><el-form-item label="\u5904\u7406\u7B54\u590D" prop="replyContent">\r
					<el-input v-model="form.replyContent" placeholder="\u8BF7\u8F93\u5165\u5904\u7406\u7B54\u590D" /> </el-form-item\r
			></PaCol> `),g(` <PaCol v-bind="oneLine"\r
				><el-form-item label="\u5904\u7406\u9644\u4EF6" prop="replyAttachments">\r
					<DocumentMul\r
						v-model:fileList="form.replyAttachments"\r
						:showFileList="false"\r
						uploadType="file"\r
						accept=".pdf,.doc,.docx,.xls,.xlsx,.ppt,.jpg,.png,.jpeg,.zip"\r
						:fileSize="5120"\r
						:limit="999"\r
						:mutiple="false"\r
					>\r
					</DocumentMul> </el-form-item></PaCol\r
			> `),g(` <PaCol v-bind="oneLine"\r
				><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\r
			></PaCol> `)]),_:1}),l(a,null,{default:n(()=>[X("div",ee,[l(E,{onClick:q},{default:n(()=>e[5]||(e[5]=[D("\u8FD4\u56DE",-1)])),_:1,__:[5]}),l(E,{type:"primary",loading:u(w),onClick:e[4]||(e[4]=o=>R(u(_)))},{default:n(()=>e[6]||(e[6]=[D("\u4FDD\u5B58",-1)])),_:1,__:[6]},8,["loading"])])]),_:1})]),_:1},8,["model","rules"])}}});export{ne as _};
