feat: SMSC短信内容显示,权限控制显示操作删除cdr:ne:remove

This commit is contained in:
TsMask
2024-12-23 19:39:06 +08:00
parent 44612081bc
commit 41e37766b7
6 changed files with 31 additions and 1 deletions

View File

@@ -522,6 +522,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0" :disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading" :loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')" @click.prevent="fnRecordDelete('0')"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }} {{ t('common.deleteText') }}
@@ -644,6 +645,7 @@ onBeforeUnmount(() => {
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordDelete(record.id)" @click.prevent="fnRecordDelete(record.id)"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon> <template #icon>
<DeleteOutlined /> <DeleteOutlined />

View File

@@ -639,6 +639,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0" :disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading" :loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')" @click.prevent="fnRecordDelete('0')"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }} {{ t('common.deleteText') }}
@@ -751,6 +752,7 @@ onBeforeUnmount(() => {
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordDelete(record.id)" @click.prevent="fnRecordDelete(record.id)"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon> <template #icon>
<DeleteOutlined /> <DeleteOutlined />

View File

@@ -572,6 +572,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0" :disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading" :loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')" @click.prevent="fnRecordDelete('0')"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }} {{ t('common.deleteText') }}
@@ -675,6 +676,7 @@ onBeforeUnmount(() => {
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordDelete(record.id)" @click.prevent="fnRecordDelete(record.id)"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon> <template #icon>
<DeleteOutlined /> <DeleteOutlined />

View File

@@ -598,6 +598,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0" :disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading" :loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')" @click.prevent="fnRecordDelete('0')"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }} {{ t('common.deleteText') }}
@@ -692,6 +693,7 @@ onBeforeUnmount(() => {
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordDelete(record.id)" @click.prevent="fnRecordDelete(record.id)"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon> <template #icon>
<DeleteOutlined /> <DeleteOutlined />

View File

@@ -614,6 +614,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0" :disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading" :loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')" @click.prevent="fnRecordDelete('0')"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }} {{ t('common.deleteText') }}
@@ -708,6 +709,7 @@ onBeforeUnmount(() => {
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordDelete(record.id)" @click.prevent="fnRecordDelete(record.id)"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon> <template #icon>
<DeleteOutlined /> <DeleteOutlined />

View File

@@ -22,6 +22,7 @@ import { OptionsType, WS } from '@/plugins/ws-websocket';
import saveAs from 'file-saver'; import saveAs from 'file-saver';
import PQueue from 'p-queue'; import PQueue from 'p-queue';
import { useClipboard } from '@vueuse/core'; import { useClipboard } from '@vueuse/core';
import { hasPermissions } from '@/plugins/auth-user';
const { copy } = useClipboard({ legacy: true }); const { copy } = useClipboard({ legacy: true });
const { getDict } = useDictStore(); const { getDict } = useDictStore();
const { t } = useI18n(); const { t } = useI18n();
@@ -609,6 +610,7 @@ onBeforeUnmount(() => {
:disabled="tableState.selectedRowKeys.length <= 0" :disabled="tableState.selectedRowKeys.length <= 0"
:loading="modalState.confirmLoading" :loading="modalState.confirmLoading"
@click.prevent="fnRecordDelete('0')" @click.prevent="fnRecordDelete('0')"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon><DeleteOutlined /></template> <template #icon><DeleteOutlined /></template>
{{ t('common.deleteText') }} {{ t('common.deleteText') }}
@@ -716,6 +718,7 @@ onBeforeUnmount(() => {
<a-button <a-button
type="link" type="link"
@click.prevent="fnRecordDelete(record.id)" @click.prevent="fnRecordDelete(record.id)"
v-perms:has="['cdr:ne:remove']"
> >
<template #icon> <template #icon>
<DeleteOutlined /> <DeleteOutlined />
@@ -727,7 +730,7 @@ onBeforeUnmount(() => {
</template> </template>
<template #expandedRowRender="{ record }"> <template #expandedRowRender="{ record }">
<a-row :gutter="16"> <a-row :gutter="16">
<a-col :lg="8" :md="12" :xs="24" :offset="2"> <a-col :lg="8" :md="12" :xs="22" :offset="2">
<a-divider orientation="left"> <a-divider orientation="left">
{{ t('views.dashboard.cdr.cdrInfo') }} {{ t('views.dashboard.cdr.cdrInfo') }}
</a-divider> </a-divider>
@@ -781,6 +784,23 @@ onBeforeUnmount(() => {
</span> </span>
</div> </div>
</a-col> </a-col>
<a-col
:lg="16"
:md="16"
:xs="22"
:offset="2"
v-if="
record.cdrJSON?.smsContent &&
hasPermissions(['cdr:smsc:content'])
"
>
<a-divider orientation="left"> Content </a-divider>
<a-typography-paragraph
copyable
:content="record.cdrJSON.smsContent"
>
</a-typography-paragraph>
</a-col>
</a-row> </a-row>
</template> </template>
</a-table> </a-table>