添加权限

This commit is contained in:
qq787203167
2022-06-08 18:04:47 +08:00
parent 134fcbf8d8
commit d4064d3d39
10 changed files with 77 additions and 41 deletions
+8 -4
View File
@@ -25,7 +25,7 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator add-flex">
<a-button @click="handleAdd" type="primary" icon="plus">{{$t('newRole')}}</a-button>
<a-button @click="handleAdd" v-has="'sys:role:add'" type="primary" icon="plus">{{$t('newRole')}}</a-button>
<!--<a-button @click="handleEdit(model1)" type="primary" icon="plus">角色编辑</a-button>-->
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
<!-- <a-button type="primary" icon="import">{{$t('import')}}</a-button>-->
@@ -52,10 +52,14 @@
:loading="loading"
@change="handleTableChange">
<span slot="action" slot-scope="text, record">
<a @click="handlePerssion(record.id)" class="text">{{$t('toGrantAuthorization')}}</a>
<a @click="handleEdit(record)" class="text">{{$t('edit')}}</a>
<a @click="handlePerssion(record.id)"
v-has="'sys:role:auth'"
class="text">{{$t('toGrantAuthorization')}}</a>
<a @click="handleEdit(record)"
v-has="'sys:role:edit'"
class="text">{{$t('edit')}}</a>
<a-popconfirm :title="$t('areYouSure')" @confirm="() => handleDelete1(record.id)">
<a class="text">{{$t('delete')}}</a>
<a class="text" v-has="'sys:role:del'">{{$t('delete')}}</a>
</a-popconfirm>
<!-- <a @click="handleOpen(record)">{{$t('user')}}</a>-->
<!-- <a-divider type="vertical"/>-->