权限相关调整
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<el-tab-pane label="上传资料类型" name="materials">
|
||||
<div class="tab-card-wrapper material-tab-wrapper">
|
||||
<div class="toolbar">
|
||||
<el-button type="primary" icon="Plus" @click="openMaterialCreate">
|
||||
<el-button v-auth="'onboardingEntryConfigAdd'" type="primary" icon="Plus" @click="openMaterialCreate">
|
||||
新增资料类型
|
||||
</el-button>
|
||||
</div>
|
||||
@@ -35,11 +35,27 @@
|
||||
|
||||
<el-table-column label="操作" width="150" fixed="right" align="center">
|
||||
<template #default="scope">
|
||||
<el-button link type="primary" icon="Edit" @click="openMaterialEdit(scope.row)">
|
||||
<el-button
|
||||
v-auth="'onboardingEntryConfigEdit'"
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
:disabled="!canManage(scope.row)"
|
||||
:title="disabledReason(scope.row)"
|
||||
@click="openMaterialEdit(scope.row)"
|
||||
>
|
||||
编辑
|
||||
</el-button>
|
||||
|
||||
<el-button link type="danger" icon="Delete" @click="removeMaterial(scope.row)">
|
||||
<el-button
|
||||
v-auth="'onboardingEntryConfigDelete'"
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
:disabled="!canManage(scope.row)"
|
||||
:title="disabledReason(scope.row)"
|
||||
@click="removeMaterial(scope.row)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
@@ -104,6 +120,9 @@ import {
|
||||
import { isMessageBoxConfirmed } from "@/utils/messageBox";
|
||||
import OnboardingTemplatePanel from "./components/OnboardingTemplatePanel.vue";
|
||||
import VariableDefinitionPanel from "./components/VariableDefinitionPanel.vue";
|
||||
import { useOnboardingPermission } from "@/utils/onboardingPermission";
|
||||
|
||||
const { canManage, disabledReason } = useOnboardingPermission("onboardingEntryConfigManageAll");
|
||||
|
||||
const activeTab = ref("variables");
|
||||
const materialTypes = ref<OnboardingMaterialType[]>([]);
|
||||
@@ -225,4 +244,4 @@ onMounted(() => {
|
||||
.toolbar {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user