import i from"./index.Ddz7Z1mn.js";import w from"./index.qh0IKpc2.js";import{r as p,m as _}from"./index.lP_uh0LI.js";import{d as b,a as k,r as y,b as c,h as C,f as v,w as l,g as a,s as r,u as D}from"./vue.BxlDVA1H.js";import{_ as I}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./index.BxXbAEbc.js";import"./api.yjAhi7Po.js";function T(m){return p({url:`${_.system}role/`,method:"get",params:m})}function $(){return p({url:`${_.system}column/get_models/`,method:"get"})}const R={class:"columns-box columns-left"},B={class:"columns-box columns-center"},L={class:"columns-box columns-right"},q=b({__name:"index",setup(m){const u=k(null);let o=y({role:"",model:"",app:"",menu:""});const d=async(e,t)=>{const s=await T(e);t(s)},h=async(e,t)=>{const s=await $();s.data.forEach(n=>{n.showText=`${n.app}-${n.title}(${n.key})`}),t(s)},g=()=>{var e;if(o.role&&o.model&&o.app){(e=u.value)==null||e.fetchData(o);return}},f=(e,t)=>{e==="role"&&(o.role=t.id),e==="menu"&&(o.menu=t.id),e==="model"&&(o.model=t.key,o.app=t.app),g()};return(e,t)=>{const s=c("el-col"),n=c("el-row"),x=c("fs-page");return v(),C(x,{class:"columns"},{default:l(()=>[a(n,{class:"columns-el-row",gutter:10},{default:l(()=>[a(s,{span:6},{default:l(()=>[r("div",R,[a(i,{title:"角色",type:"role",showPagination:"",onFetchData:d,onItemClick:f})])]),_:1}),a(s,{span:8},{default:l(()=>[r("div",B,[a(i,{title:"模型表",type:"model",label:"showText",value:"key",onFetchData:h,onItemClick:f})])]),_:1}),a(s,{span:10},{default:l(()=>[r("div",L,[a(w,{ref_key:"columnsTableRef",ref:u,currentInfo:D(o)},null,8,["currentInfo"])])]),_:1})]),_:1})]),_:1})}}}),j=I(q,[["__scopeId","data-v-affa42ed"]]);export{j as default};
