fix: 学生禁止操作删除日志CDR/Event

This commit is contained in:
TsMask
2024-07-27 16:11:59 +08:00
parent 0819fbdb44
commit b0b844f0f6
4 changed files with 12 additions and 4 deletions

View File

@@ -19,6 +19,7 @@ import { parseDateToStr } from '@/utils/date-utils';
import { OptionsType, WS } from '@/plugins/ws-websocket';
import PQueue from 'p-queue';
import saveAs from 'file-saver';
import { hasRoles } from '@/plugins/auth-user';
const { t } = useI18n();
const ws = new WS();
const queue = new PQueue({ concurrency: 1, autoStart: true });
@@ -550,6 +551,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')"
v-if="!hasRoles(['student'])"
>
<template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }}
@@ -611,7 +613,7 @@ onBeforeUnmount(() => {
<a-table
class="table"
row-key="id"
:columns="tableColumns"
:columns="hasRoles(['student']) ? tableColumns.filter((s:any)=>s.key !== 'id'): tableColumns"
:loading="tableState.loading"
:data-source="tableState.data"
:size="tableState.size"