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