ADD:添加按钮权限

This commit is contained in:
贾同学
2025-08-20 08:51:01 +08:00
parent d761c0449b
commit a2db45cace
3 changed files with 263 additions and 226 deletions

View File

@@ -26,13 +26,31 @@
<ProTable ref="proTable" :columns="columns" :request-api="getTableList" type="selection">
<!-- 表格 header 按钮 -->
<template #tableHeader="scope">
<el-button type="primary" icon="CirclePlus" @click="addTab('add')" v-if="!isTabPlanFather">
<el-button
v-auth.plan="'add_subplan'"
type="primary"
icon="CirclePlus"
@click="addTab('add')"
v-if="!isTabPlanFather"
>
新增子计划
</el-button>
<el-button type="primary" icon="Edit" @click="addTab('edit')" v-if="isTabPlanFather">
<el-button
v-auth.plan="'add_subplan'"
type="primary"
icon="Edit"
@click="addTab('edit')"
v-if="isTabPlanFather"
>
编辑子计划
</el-button>
<el-button type="primary" icon="Download" @click="exportPlan" v-if="isTabPlanFather">
<el-button
type="primary"
v-auth.plan="'export_subplan'"
icon="Download"
@click="exportPlan"
v-if="isTabPlanFather"
>
导出子计划元信息
</el-button>
<el-button type="primary" icon="Upload">导入检测结果</el-button>
@@ -48,6 +66,7 @@
批量移除
</el-button>
<el-dropdown
v-auth.plan="'add_subplan'"
v-if="planFormContent && planFormContent?.children.length > 0"
trigger="hover"
placement="right-start"
@@ -75,6 +94,7 @@
</template>
</el-dropdown>
<el-dropdown
v-auth.plan="'add_subplan'"
v-if="planFormContent && planFormContent?.children.length > 0"
trigger="hover"
placement="right-start"

View File

@@ -32,7 +32,7 @@
</el-button> -->
<el-button
type="primary"
v-auth.plan="'import'"
v-auth.plan="'import_subplan'"
icon="Upload"
@click="importSubClick"
v-if="modeStore.currentMode === '比对式'"
@@ -82,9 +82,20 @@
:icon="List"
@click="openChildrenPlan(scope.row)"
v-if="modeStore.currentMode == '比对式' && scope.row.fatherPlanId == 0"
v-auth.plan="'add_subplan'"
>
子计划
</el-button>
<el-button
type="primary"
link
icon="View"
@click="openChildrenPlan(scope.row)"
v-if="modeStore.currentMode == '比对式' && scope.row.fatherPlanId == 0"
v-auth.plan="'import_subplan'"
>
查看
</el-button>
<!-- <el-button type='primary' link :icon='List' @click='showDeviceOpen(scope.row)'>设备绑定</el-button> -->
<el-button
type="primary"