后台管理系统【角色列表】

 

<template>
  <div>
    <!-- ????? -->
    <!-- A面包屑导航区域 -->
			<el-breadcrumb separator-class="el-icon-arrow-right">
				<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
				<el-breadcrumb-item>权限管理</el-breadcrumb-item>
				<el-breadcrumb-item>角色列表</el-breadcrumb-item>
			</el-breadcrumb>

      <!-- B卡片视图 -->
      <el-card>
          <!-- a添加角色按钮区域 -->
          <el-row>
              <el-col>
                  <el-button type="primary" @click="addDialogVisible = true">添加角色 
                  </el-button>
              </el-col>
          </el-row>
          <!-- b角色列表区域 -->
          <el-table :data="rolelist" border stripe>
             <!-- 1展开列 -->
             <el-table-column type="expand">
                   <template slot-scope="scope">
                     <!-- children:当前角色的所有权限 -->
                       <el-row :class="['bdbottom',i1===0?'bdtop':'','vcenter']" v-for=" 
                                      (item1,i1) in scope.row.children" :key="item1.id">
                         <!-- 渲染一级权限   这里用数组来放类名,不能用字符串类 
                                              名,:class会把后面当成js表达式解析 -->
                         <el-col :span="5">
                           <el-tag closable @close="removeRightById(scope.row,item1.id)"> 
                              {
  {item1.authName}}
                           </el-tag>
                           <i class="el-icon-caret-right"></i>
                         </el-col>
                         <!-- 渲染二级和三级权限 -->
                         <el-col :span="19" class="erji">
                           <!-- 通过for 循环 嵌套渲染二级菜单 -->
                           <el-row :class="[i2===0?'':'bdtop','vcenter']" v-for=" 
                                         (item2,i2) in item1.children" :key="item2.id">
                             <el-col :span="6">
                               <el-tag type="success" closable 
                          @close="removeRightById(scope.row,item2.id)">{
  {item2.authName}}
                               </el-tag>
                               <i class="el-icon-caret-right"></i>
                             </el-col>
                             <el-col :span="18">
                                <el-tag type="warning" v-for="(item3,i3) in item2.children" :key="item3.id" closab
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值