From 80a41dd5593b98777200559743ea71f13120c5bb Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Mon, 17 Jun 2024 19:47:38 +0800 Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=96=B0=E5=A2=9E=E7=A7=9F?= =?UTF-8?q?=E6=88=B7=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/amfUE/index.vue | 50 +++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/src/views/dashboard/amfUE/index.vue b/src/views/dashboard/amfUE/index.vue index 0a4f77aa..43cfbeca 100644 --- a/src/views/dashboard/amfUE/index.vue +++ b/src/views/dashboard/amfUE/index.vue @@ -5,6 +5,7 @@ import { message, Modal } from 'ant-design-vue/lib'; import { SizeType } from 'ant-design-vue/lib/config-provider'; import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface'; import { ColumnsType } from 'ant-design-vue/lib/table'; +import TableColumnsDnd from '@/components/TableColumnsDnd/index.vue'; import useI18n from '@/hooks/useI18n'; import { RESULT_CODE_ERROR, @@ -14,6 +15,7 @@ import useDictStore from '@/store/modules/dict'; import { listAMFDataUE, delAMFDataUE } from '@/api/neData/amf'; import { OptionsType, WS } from '@/plugins/ws-websocket'; import PQueue from 'p-queue'; +import useUserStore from '@/store/modules/user'; const { t } = useI18n(); const { getDict } = useDictStore(); const ws = new WS(); @@ -40,6 +42,7 @@ let queryParams = reactive({ neId: '001', eventType: 'auth-result', imsi: '', + tenantName: '', sortField: 'timestamp', sortOrder: 'desc', /**当前页数 */ @@ -54,6 +57,7 @@ function fnQueryReset() { queryParams = Object.assign(queryParams, { eventType: 'auth-result', imsi: '', + tenantName: '', pageNum: 1, pageSize: 20, }); @@ -95,6 +99,9 @@ let tableState: TabeStateType = reactive({ selectedRowKeys: [], }); +/**表格字段列排序 */ +let tableColumnsDnd = ref([]); + /**表格字段列 */ let tableColumns: ColumnsType = [ { @@ -134,6 +141,13 @@ let tableColumns: ColumnsType = [ align: 'left', width: 150, }, + { + title: t('views.dashboard.cdr.tenantName'), + dataIndex: 'tenantName', + align: 'center', + key: 'tenantName', + width: 150, + }, { title: t('common.operate'), key: 'id', @@ -364,6 +378,16 @@ onMounted(() => { }) .finally(() => { // 获取列表数据 + if (useUserStore().roles.includes('tenant')) { + const operateColumnIndex = tableColumns.findIndex( + column => column.key === 'tenantName' + ); + + if (operateColumnIndex !== -1) { + tableColumns.splice(operateColumnIndex, 1); + } + } + fnGetList(); }); }); @@ -408,6 +432,17 @@ onBeforeUnmount(() => { > + + + + + @@ -441,7 +476,11 @@ onBeforeUnmount(() => { cancel-text="No" @confirm="fnRealTime()" > - + {{ !realTimeData @@ -457,6 +496,7 @@ onBeforeUnmount(() => { :disabled="tableState.selectedRowKeys.length <= 0" :loading="modalState.confirmLoading" @click.prevent="fnRecordDelete('0')" + v-roles:has="['administrator']" > {{ t('common.deleteText') }} @@ -482,6 +522,11 @@ onBeforeUnmount(() => { + @@ -513,7 +558,7 @@ onBeforeUnmount(() => { {