添加分类字典的权限按钮控制

This commit is contained in:
zer0Black
2023-07-29 11:04:06 +08:00
parent f0e2f52050
commit a38c5a2c7d
2 changed files with 11 additions and 11 deletions
+11 -9
View File
@@ -3,12 +3,12 @@
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('分类字典')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-button @click="handleAdd" type="primary" icon="plus" v-has="'sys:category:add'">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('分类字典')" v-has="'sys:category:export'">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel" v-has="'sys:category:import'">
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-dropdown v-if="selectedRowKeys.length > 0" v-has="'sys:category:del'">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
</a-menu>
@@ -37,13 +37,15 @@
v-bind="tableProps">
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record)">
<a @click="handleEdit(record)" v-has="'sys:category:edit'">编辑</a>
<!-- 修改样式后,去除该分割线-->
<a-divider type="vertical" v-has="'sys:category:del'"/>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record)" v-has="'sys:category:del'">
<a>删除</a>
</a-popconfirm>
<a-divider type="vertical" />
<a @click="handleAddSub(record)">添加下级</a>
<!-- 修改样式后,去除该分割线-->
<a-divider type="vertical" v-has="'sys:category:add'"/>
<a @click="handleAddSub(record)" v-has="'sys:category:add'">添加下级</a>
</span>
</a-table>