import{p as T}from"./personConfRules-c58d8b37-1785478469326v=1.0.0.js";import{a as w,u as P}from"./personConfApi-08ede61b-1785478469326v=1.0.0.js";import{c as N,u as H,_ as I}from"./index-5a47c360-1785478469326v=1.0.0.js";import{E as y}from"./eleVendor-bc05bc4d-1785478469326v=1.0.0.js";import{x as h,r as B,k as M,al as n,y as o,H as F,I as c,Q as i,u as a,A as m,M as D,L as x,z as g,P as C,a4 as k}from"./vendor-46662d77-1785478469326v=1.0.0.js";const S={class:"pt20 mt30"},q=h({name:"personConfIndex"}),z=h({...q,setup(O){N();const R=H(),A=B(null),u=B({schoolUserType:[],userTypes:[],listData:[]}),v=[{label:"\u4F53\u80B2\u8BFE\u7A0B\u6210\u7EE9",value:"courseGrade"},{label:"\u4F53\u8D28\u5065\u5EB7\u6D4B\u8BD5",value:"healthRecord"},{label:"\u8BFE\u5916\u953B\u70BC\u8BB0\u5F55",value:"exerciseRecord"},{label:"\u8D5B\u4E8B\u6D3B\u52A8\u8BB0\u5F55",value:"eventRecord"},{label:"\u573A\u9986\u4F7F\u7528\u8BB0\u5F55",value:"venueRecord"}];B(R.getEnumListByKey("schoolUserType"));const V=async()=>{let d=await w({page:1,size:10});if(d.code!=0){y.warning(d.msg);return}u.value.listData=d.data.listData},p=B(!1),U=async d=>{p.value=!0;try{for(let r=0;r<u.value.listData.length;r++){const s=u.value.listData[r];if(s.status==1){let _=!1;for(let f=0;f<v.length;f++){const E=v[f];if(s[E.value]==1){_=!0;break}}if(!_){y.error(`\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A${s.schoolUserTypeCn}\u4F53\u80B2\u4FE1\u606F\u6570\u636E`);return}}}(await P({synSchTsConfUpReqVOList:u.value.listData})).code==0&&(y.success("\u4FDD\u5B58\u6210\u529F"),V())}catch{}finally{p.value=!1}p.value=!1};return M(async()=>{V()}),(d,l)=>{const r=n("el-checkbox"),s=n("el-form-item"),_=n("el-empty"),f=n("el-button"),E=n("el-form"),L=n("HZPageLayout");return o(),F(L,{title:"\u4E2A\u4EBA\u4F53\u80B2\u4FE1\u606F\u914D\u7F6E"},{default:c(()=>[i(E,{model:a(u),ref_key:"formRef",ref:A,rules:a(T),"label-width":"160px"},{default:c(()=>[l[2]||(l[2]=m("div",{class:"topLabel"},[m("span",{style:{color:"rgb(245, 108, 108)"}},"*"),D("\u4E2A\u4EBA\u4F53\u80B2\u4FE1\u606F\u6A21\u5757\u7528\u6237\u7C7B\u578B\uFF1A")],-1)),i(s,null,{default:c(()=>[x(" {{ form.listData }} "),(o(!0),g(C,null,k(a(u).listData,(e,t)=>(o(),F(r,{modelValue:a(u).listData[t].status,"onUpdate:modelValue":b=>a(u).listData[t].status=b,key:e.value,label:e.schoolUserTypeCn,"true-value":1,"false-value":0,value:e.status},null,8,["modelValue","onUpdate:modelValue","label","value"]))),128))]),_:1}),l[3]||(l[3]=m("div",{class:"topLabel"},[m("span",{style:{color:"rgb(245, 108, 108)"}},"*"),D("\u4E0D\u540C\u7528\u6237\u7C7B\u578B\u4E2A\u4EBA\u4F53\u80B2\u4FE1\u606F\u6570\u636E\uFF1A")],-1)),a(u).listData.filter(e=>e.status==1).length>0?(o(!0),g(C,{key:0},k(a(u).listData.filter(e=>e.status==1),e=>(o(),F(s,{key:e.value,label:e.schoolUserTypeCn,rules:{required:!0,message:"\u8BF7\u9009\u62E9\u4F53\u80B2\u4FE1\u606F\u6570\u636E",trigger:"change"}},{default:c(()=>[(o(),g(C,null,k(v,t=>i(r,{modelValue:e[t.value],"onUpdate:modelValue":b=>e[t.value]=b,key:t.value,label:t.label,"true-value":1,"false-value":0,value:t.value},null,8,["modelValue","onUpdate:modelValue","label","value"])),64))]),_:2},1032,["label"]))),128)):(o(),F(_,{key:1,description:"\u6682\u65E0\u6570\u636E"})),i(s,null,{default:c(()=>[m("div",S,[x(' <el-button @click="handleBack">\u8FD4\u56DE</el-button> '),i(f,{type:"primary",loading:a(p),onClick:l[0]||(l[0]=e=>U(a(A)))},{default:c(()=>l[1]||(l[1]=[D("\u4FDD\u5B58",-1)])),_:1,__:[1]},8,["loading"])])]),_:1})]),_:1,__:[2,3]},8,["model","rules"])]),_:1})}}});const Q=I(z,[["__scopeId","data-v-d1b4b30b"]]);export{Q as default};
