import{d as j,Y as A,h as f,ai as I,r as o,aj as D,o as r,f as d,w as e,b as t,k as s,a7 as _,a2 as K,H as Y,l as i,_ as G}from"./index.e3896b23.js";import{_ as J}from"./add-or-update.vue_vue_type_script_setup_true_lang.52b8e47c.js";import{_ as M}from"./data-scope.vue_vue_type_script_setup_true_lang.7ad6a616.js";import{_ as P}from"./user.vue_vue_type_script_setup_true_name_SysMenuIndex_lang.feffb4c8.js";import"./role.44f4fe5e.js";import"./orgs.0a892ff5.js";const Q=i("\u67E5\u8BE2"),W=i("\u65B0\u589E"),X=i("\u5220\u9664"),Z=i("\u4FEE\u6539"),ee=i("\u5220\u9664"),te=i("\u66F4\u591A"),ne=i("\u6570\u636E\u6743\u9650"),oe=i("\u5206\u914D\u7528\u6237"),ae=j({__name:"index",setup(le){const l=A({dataListUrl:"/sys/role/page",deleteUrl:"/sys/role",queryForm:{name:""}}),h=f(),w=p=>{h.value.init(p)},k=f(),g=f(!1),b=f(),F=f(),V=(p,n)=>{p==="dataScope"?k.value.init(n.id):p==="user"&&(b.value=n.id,F.value="\u5206\u914D\u7528\u6237 - "+n.name,g.value=!0)},{getDataList:C,selectionChangeHandle:S,sizeChangeHandle:$,currentChangeHandle:E,deleteBatchHandle:x}=I(l);return(p,n)=>{const L=o("el-input"),y=o("el-form-item"),u=o("el-button"),U=o("el-form"),c=o("el-table-column"),z=o("el-dropdown-item"),B=o("el-dropdown-menu"),H=o("el-dropdown"),R=o("el-table"),q=o("el-pagination"),N=o("el-drawer"),O=o("el-card"),m=D("auth"),T=D("loading");return r(),d(O,null,{default:e(()=>[t(U,{inline:!0,model:l.queryForm,onKeyup:n[4]||(n[4]=K(a=>s(C)(),["enter"]))},{default:e(()=>[t(y,null,{default:e(()=>[t(L,{modelValue:l.queryForm.name,"onUpdate:modelValue":n[0]||(n[0]=a=>l.queryForm.name=a),placeholder:"\u540D\u79F0",clearable:""},null,8,["modelValue"])]),_:1}),t(y,null,{default:e(()=>[t(u,{onClick:n[1]||(n[1]=a=>s(C)())},{default:e(()=>[Q]),_:1})]),_:1}),t(y,null,{default:e(()=>[_((r(),d(u,{type:"primary",onClick:n[2]||(n[2]=a=>w())},{default:e(()=>[W]),_:1})),[[m,"sys:role:save"]])]),_:1}),t(y,null,{default:e(()=>[_((r(),d(u,{type:"danger",onClick:n[3]||(n[3]=a=>s(x)())},{default:e(()=>[X]),_:1})),[[m,"sys:role:delete"]])]),_:1})]),_:1},8,["model"]),_((r(),d(R,{data:l.dataList,border:"",style:{width:"100%"},onSelectionChange:s(S)},{default:e(()=>[t(c,{type:"selection","header-align":"center",align:"center",width:"50"}),t(c,{prop:"name",label:"\u540D\u79F0","header-align":"center",align:"center"}),t(c,{prop:"remark",label:"\u5907\u6CE8","header-align":"center",align:"center"}),t(c,{prop:"createTime",label:"\u521B\u5EFA\u65F6\u95F4","header-align":"center",align:"center",width:"180"}),t(c,{label:"\u64CD\u4F5C",fixed:"right","header-align":"center",align:"center",width:"200"},{default:e(a=>[_((r(),d(u,{type:"primary",link:"",onClick:v=>w(a.row.id)},{default:e(()=>[Z]),_:2},1032,["onClick"])),[[m,"sys:role:update"]]),_((r(),d(u,{type:"primary",link:"",onClick:v=>s(x)(a.row.id)},{default:e(()=>[ee]),_:2},1032,["onClick"])),[[m,"sys:role:delete"]]),_((r(),d(H,{onCommand:v=>V(v,a.row)},{dropdown:e(()=>[t(B,null,{default:e(()=>[t(z,{command:"dataScope"},{default:e(()=>[ne]),_:1}),t(z,{command:"user"},{default:e(()=>[oe]),_:1})]),_:1})]),default:e(()=>[t(u,{type:"primary",class:"el-dropdown-link",link:""},{default:e(()=>[te]),_:1})]),_:2},1032,["onCommand"])),[[m,"sys:role:update"]])]),_:1})]),_:1},8,["data","onSelectionChange"])),[[T,l.dataListLoading]]),t(q,{"current-page":l.page,"page-sizes":l.pageSizes,"page-size":l.limit,total:l.total,layout:"total, sizes, prev, pager, next, jumper",onSizeChange:s($),onCurrentChange:s(E)},null,8,["current-page","page-sizes","page-size","total","onSizeChange","onCurrentChange"]),t(J,{ref_key:"addOrUpdateRef",ref:h,onRefreshDataList:s(C)},null,8,["onRefreshDataList"]),t(M,{ref_key:"dataScopeRef",ref:k},null,512),g.value?(r(),d(N,{key:0,modelValue:g.value,"onUpdate:modelValue":n[5]||(n[5]=a=>g.value=a),title:F.value,size:1e3,"close-on-press-escape":!1},{default:e(()=>[t(P,{"role-id":b.value},null,8,["role-id"])]),_:1},8,["modelValue","title"])):Y("",!0)]),_:1})}}});const pe=G(ae,[["__scopeId","data-v-26b97e97"]]);export{pe as default};
