import p from"./index.Dhtem-Pn.js";import g from"./index.DsqMYUly.js";import{r as f}from"./index.K_MFulpu.js";import{d as b,r as k,Z as w,ai as c,o as y,M as C,O as l,U as s,a as r,u as v}from"./vue.1RczIYhx.js";import{_ as I}from"./_plugin-vue_export-helper.DlAUqK2U.js";import"./index.DgOK3pPB.js";import"./api.B0_75WU1.js";import"./elementPlus.CSBdF9Zt.js";function D(m){return f({url:"/api/system/role/",method:"get",params:m})}function T(){return f({url:"/api/system/column/get_models/",method:"get"})}const R={class:"columns-box columns-left"},B={class:"columns-box columns-center"},M={class:"columns-box columns-right"},$=b({__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 y(),C(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(p,{title:"角色",type:"role",showPagination:"",onFetchData:_,onItemClick:i})])]),_:1}),s(a,{span:8},{default:l(()=>[r("div",B,[s(p,{title:"模型表",type:"model",label:"showText",value:"key",onFetchData:d,onItemClick:i})])]),_:1}),s(a,{span:10},{default:l(()=>[r("div",M,[s(g,{ref_key:"columnsTableRef",ref:u,currentInfo:v(o)},null,8,["currentInfo"])])]),_:1})]),_:1})]),_:1})}}}),U=I($,[["__scopeId","data-v-cdb3dd1a"]]);export{U as default};
