import{R as F,c as M}from"./api.bxrrZdQM.js";import{R as w,a as $}from"./RoleMenuFieldStores.DM9AuVhQ.js";import{E as y}from"./index.CL7yl-Wb.js";import{a as S,aj as h,c as l,M as N,u as r,o as a,b as t,S as m,P as k,K as v,R as p,a9 as _,Q as R}from"./vue.D1BjjNmv.js";import{_ as U}from"./_plugin-vue_export-helper.DlAUqK2U.js";const B={key:0,class:"pccm-item"},D={class:"menu-form-alert"},E={class:"columns-list"},H={class:"columns-head"},I={class:"columns-content"},j={class:"width-txt"},z=S({__name:"RoleMenuField",setup(K){const d=w(),f=$(),V=F(),b=(c,s,u)=>{for(const n of d.$state)n[s]=n[u]?n[s]:c},g=async()=>{const c=await M(V.$state.roleId,d.$state);y({message:c.msg,type:"success"})};return(c,s)=>{const u=h("el-button"),n=h("el-checkbox");return r(d).$state.length>0?(a(),l("div",B,[t("div",D,[m(u,{size:"small",onClick:g},{default:v(()=>s[0]||(s[0]=[k("保存 ")])),_:1}),s[1]||(s[1]=k(" 配置数据列字段权限 "))]),t("ul",E,[t("li",H,[s[2]||(s[2]=t("div",{class:"width-txt"},[t("span",null,"字段")],-1)),(a(!0),l(p,null,_(r(f).$state,(e,i)=>(a(),l("div",{key:i,class:"width-check"},[m(n,{modelValue:e.checked,"onUpdate:modelValue":o=>e.checked=o,onChange:o=>b(o,e.value,e.disabled)},{default:v(()=>[t("span",null,R(e.label),1)]),_:2},1032,["modelValue","onUpdate:modelValue","onChange"])]))),128))]),t("div",I,[(a(!0),l(p,null,_(r(d).$state,(e,i)=>(a(),l("li",{key:i,class:"columns-item"},[t("div",j,R(e.title),1),(a(!0),l(p,null,_(r(f).$state,(o,x)=>(a(),l("div",{key:x,class:"width-check"},[m(n,{modelValue:e[o.value],"onUpdate:modelValue":C=>e[o.value]=C,class:"ci-checkout",disabled:e[o.disabled]},null,8,["modelValue","onUpdate:modelValue","disabled"])]))),128))]))),128))])])])):N("",!0)}}}),G=U(z,[["__scopeId","data-v-a964fc36"]]);export{G as default};
