import{l as j,a as g,e as b,d as z,ah as r,m as d,M as y,O as e,U as l,ab as _,ac as f,u as t,p as L,F as D,a7 as B,S as v,T as G,q as R}from"./vendor-98154105-1779868775780v=1.0.0.js";const H=R("div",{class:"divider mt20 mb30"},"\u57FA\u7840\u4FE1\u606F",-1),K=R("div",{class:"divider mt20 mb30"},"\u6388\u6743\u4FE1\u606F",-1),W=j({__name:"baseInfo",props:{value:Object,loading:{type:Boolean,default:!1}},emits:["update:value","update:loading","cancel","submit"],setup(S,{emit:N}){const C=g(),F=g({xs:24,sm:24,md:24,lg:18,xl:18}),I=g({xs:24,sm:24,md:24,lg:24,xl:24});let V=S;const p=N,u=b({get(){return V.value},set(o){p("update:value",o)}}),E=b({get(){return V.loading},set(o){p("update:loading",o)}});b(()=>!!u.value.roleId);const T={name:[{required:!0,message:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0",trigger:"change"}]},U=async o=>{},w=()=>{let o=JSON.parse(JSON.stringify(u.value)),a=[];return o.mpTypeRolesList.map(s=>{s.roleList&&s.roleList.length>0&&s.roleList.map(n=>{n.isSelect&&a.push({roleId:n.roleId,mpId:s.mpId})})}),o.roleList=a,delete o.mpTypeRolesList,o},O=async o=>{o.validate(async(a,s)=>{if(a){let n=w();p("submit",n)}})},A=()=>{p("cancel")};return z(()=>{}),(o,a)=>{const s=r("el-input"),n=r("el-form-item"),c=r("FormCol"),x=r("FormRow"),q=r("el-checkbox"),J=r("el-col"),k=r("el-button"),M=r("el-form");return d(),y(M,{model:t(u),rules:T,ref_key:"ruleFormRef",ref:C,"scroll-to-error":!0,"label-width":"240px",class:"default-form line_form"},{default:e(()=>[H,l(x,null,{default:e(()=>[l(c,_(f(t(F))),{default:e(()=>[l(n,{label:"\u540D\u79F0",prop:"name"},{default:e(()=>[l(s,{modelValue:t(u).name,"onUpdate:modelValue":a[0]||(a[0]=m=>t(u).name=m),placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u540D\u79F0"},null,8,["modelValue"])]),_:1})]),_:1},16),l(c,_(f(t(F))),{default:e(()=>[l(n,{label:"\u5907\u6CE8",prop:"remark"},{default:e(()=>[l(s,{modelValue:t(u).remark,"onUpdate:modelValue":a[1]||(a[1]=m=>t(u).remark=m),type:"textarea",placeholder:"\u8BF7\u8F93\u5165\u89D2\u8272\u63CF\u8FF0"},null,8,["modelValue"])]),_:1})]),_:1},16)]),_:1}),K,l(x,null,{default:e(()=>[l(c,_(f(t(I))),{default:e(()=>[(d(!0),L(D,null,B(t(u).mpTypeRolesList,(m,P)=>(d(),y(n,{key:P,label:m.mpName,prop:""},{default:e(()=>[(d(!0),L(D,null,B(m.roleList,(i,$)=>(d(),y(J,{key:$,span:6},{default:e(()=>[l(q,{modelValue:i.isSelect,"onUpdate:modelValue":h=>i.isSelect=h,onChange:h=>U(i)},{default:e(()=>[v(G(i.roleName),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]),_:2},1024))),128))]),_:2},1032,["label"]))),128))]),_:1},16)]),_:1}),l(c,_(f(t(F))),{default:e(()=>[l(n,null,{default:e(()=>[l(k,{type:"primary",loading:t(E),onClick:a[2]||(a[2]=m=>O(t(C)))},{default:e(()=>[v("\u63D0\u4EA4")]),_:1},8,["loading"]),l(k,{onClick:A},{default:e(()=>[v("\u53D6\u6D88")]),_:1})]),_:1})]),_:1},16)]),_:1},8,["model"])}}});export{W as _};
