import{b as i,d as s,T as m,a as c}from"./index-CgMrKa77.js";import p from"./popupForm-DxNqT5jV.js";import{x as d,a7 as f}from"./index-fNs72j9w.js";import{B as b,a8 as _,o as h,I as g,C as o,D as k,u as a,O as v,W as w,H as l,au as y}from"./vue-DweYBrEc.js";import"./index-DMA3A9_B.js";import"./index-BlEwok4a.js";import"./validate-CEOscgyN.js";const T={class:"default-main ba-table-box"},S=b({name:"user/rule",__name:"index",setup(x){const{t:e}=d.useI18n(),n=_("tableRef"),t=new i(new f("/admin/user.Rule/"),{expandAll:!1,column:[{type:"selection",align:"center",operator:!1},{label:e("auth.rule.title"),prop:"title",align:"left",width:"200"},{label:e("auth.rule.Icon"),prop:"icon",align:"center",width:"60",render:"icon",default:"fa fa-circle-o"},{label:e("auth.rule.name"),prop:"name",align:"center",showOverflowTooltip:!0},{label:e("auth.rule.type"),prop:"type",align:"center",render:"tag",custom:{menu:"danger",menu_dir:"success",route:"info"},replaceValue:{menu:e("user.rule.Member center menu items"),menu_dir:e("user.rule.Member center menu contents"),route:e("user.rule.Normal routing"),nav:e("user.rule.Top bar menu items"),button:e("user.rule.Page button"),nav_user_menu:e("user.rule.Top bar user dropdown")}},{label:e("State"),prop:"status",align:"center",width:"80",render:"switch"},{label:e("Update time"),prop:"update_time",align:"center",width:"160",render:"datetime"},{label:e("Create time"),prop:"create_time",align:"center",width:"160",render:"datetime"},{label:e("Operate"),align:"center",width:"130",render:"buttons",buttons:s()}],dblClickNotEditColumn:[void 0,"status"]},{defaultItems:{type:"route",menu_type:"tab",extend:"none",no_login_valid:"0",keepalive:0,status:1,icon:"fa fa-circle-o"}});return t.before.onSubmit=()=>{t.form.items.type=="route"?t.form.items.menu_type="tab":["menu","menu_dir","nav_user_menu"].includes(t.form.items.type)&&(t.form.items.no_login_valid="0")},t.after.getEditData=()=>{t.form.items&&!t.form.items.icon&&(t.form.items.icon="fa fa-circle-o")},y("baTable",t),h(()=>{var r;t.table.ref=n.value,t.mount(),(r=t.getData())==null||r.then(()=>{t.dragSort()})}),(r,C)=>{const u=g("el-alert");return o(),k("div",T,[a(t).table.remark?(o(),v(u,{key:0,class:"ba-table-alert",title:a(t).table.remark,type:"info","show-icon":""},null,8,["title"])):w("",!0),l(m,{buttons:["refresh","add","edit","delete","unfold","quickSearch","columnDisplay"],"quick-search-placeholder":a(e)("Quick search placeholder",{fields:a(e)("auth.rule.Rule title")})},null,8,["quick-search-placeholder"]),l(c,{ref_key:"tableRef",ref:n,pagination:!1},null,512),l(p)])}}});export{S as default};
