| 123456789 |
- /**
- * 由 Fantastic-admin 提供技术支持
- * Powered by Fantastic-admin
- * Gitee https://gitee.com/hooray/fantastic-admin
- * Github https://github.com/hooray/fantastic-admin
- */
-
- import{_ as E}from"./index-ac700926.js";import{_ as N}from"./index-5f219f3f.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_name_SvgIcon_lang-9ad2d3e0.js";import D from"./Role-e651ebfe.js";import{g as L,d as M}from"./roleApi-2d409ad4.js";import{K as $}from"./index-cd68550b.js";import{aU as A}from"./index-5cddd228.js";import{j as g,J as S,r as V,o as H,a3 as n,ad as J,k as d,l as K,E as e,y as t,C as p,z as j,u as m,x as f,B as q,q as F,aJ as T,aK as U,m as G}from"./runtime-core.esm-bundler-5fc1c360.js";import{_ as O}from"./_plugin-vue_export-helper-c27b6911.js";import"./iconify-3d8b277a.js";import"./route-block-83d24a4e.js";import"./menu-2c9c5182.js";import"./settings-be8974ad.js";import"./pinia-7162f4ce.js";import"./_MapCache-1b613190.js";import"./vue-router-8a13d09b.js";import"./index-c228ae8f.js";import"./iframe-10768394.js";import"./runtime-dom.esm-bundler-e65f1c43.js";const P=l=>(T("data-v-59506cc6"),l=l(),U(),l),Q=P(()=>G("div",null," 系统支持基于角色的权限设定 ",-1)),W=g({name:"roleIndex"}),X=g({...W,setup(l){const a=S({loading:!1,tableAutoHeight:!1,search:{keywords:""},dataList:[]}),i=V(),r=async()=>{a.loading=!0;const{data:o}=await L({});a.dataList=o,a.loading=!1};H(()=>{r()});function h(){i.value.showAddModel()}function b(o){const u=o.roleId;i.value.showEditModel(u)}function v(o){$.confirm(`确认删除「${o.roleName}」吗?`,"确认信息").then(async()=>{await M(o.roleId),await r(),A.success({message:"删除成功",center:!0})}).catch(()=>{})}return(o,u)=>{const y=z,w=n("el-icon"),c=n("el-button"),x=n("el-button-group"),k=N,s=n("el-table-column"),C=n("el-table"),I=E,B=J("loading");return d(),K("div",{class:F({"absolute-container":m(a).tableAutoHeight})},[e(k,{title:"角色管理"},{content:t(()=>[Q]),default:t(()=>[e(x,null,{default:t(()=>[e(c,{type:"primary",size:"large",plain:"",onClick:h},{icon:t(()=>[e(w,null,{default:t(()=>[e(y,{name:"ep:plus"})]),_:1})]),default:t(()=>[p(" 新增 ")]),_:1})]),_:1})]),_:1}),e(I,null,{default:t(()=>[j((d(),f(C,{class:"list-table",data:m(a).dataList,border:"",stripe:"","highlight-current-row":"",height:"100%"},{default:t(()=>[e(s,{type:"index",label:"序号",width:"60","header-align":"center",align:"center"}),e(s,{prop:"roleName",label:"名称","header-align":"center",align:"center",width:"200"}),e(s,{prop:"roleDesc",label:"说明"}),e(s,{label:"操作",width:"250",align:"center",fixed:"right"},{default:t(_=>[e(c,{type:"primary",size:"small",plain:"",onClick:R=>b(_.row)},{default:t(()=>[p(" 编辑 ")]),_:2},1032,["onClick"]),_.row.isFixed?q("",!0):(d(),f(c,{key:0,type:"danger",size:"small",plain:"",onClick:R=>v(_.row)},{default:t(()=>[p(" 删除 ")]),_:2},1032,["onClick"]))]),_:1})]),_:1},8,["data"])),[[B,m(a).loading]])]),_:1}),e(D,{ref_key:"roleRef",ref:i,onSuccess:r},null,512)],2)}}});const he=O(X,[["__scopeId","data-v-59506cc6"]]);export{he as default};
|