From 82ecee9941308cd30e0265cca2f4b29da4653f8c Mon Sep 17 00:00:00 2001 From: lai <371757574@qq.com> Date: Thu, 10 Oct 2024 19:40:48 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=91=98-smsc=20cdr=20?= =?UTF-8?q?=E7=A7=9F=E6=88=B7=E5=88=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dashboard/smscCDR/index.vue | 70 +++++++++++++++++++++------ 1 file changed, 55 insertions(+), 15 deletions(-) diff --git a/src/views/dashboard/smscCDR/index.vue b/src/views/dashboard/smscCDR/index.vue index 736269d3..7c87a117 100644 --- a/src/views/dashboard/smscCDR/index.vue +++ b/src/views/dashboard/smscCDR/index.vue @@ -21,6 +21,8 @@ import { parseDateToStr } from '@/utils/date-utils'; import { OptionsType, WS } from '@/plugins/ws-websocket'; import saveAs from 'file-saver'; import PQueue from 'p-queue'; +import { listTenant } from '@/api/system/tenant'; + const { getDict } = useDictStore(); const { t } = useI18n(); const ws = new WS(); @@ -42,12 +44,15 @@ let queryRangePicker = ref<[string, string]>(['', '']); /**查询参数 */ let queryParams = reactive({ + tenantNameArr: []>[], /**网元类型 */ neType: 'SMSC', neId: '001', recordType: '', callerParty: '', calledParty: '', + /** 租户名称*/ + tenantName: '', sortField: 'timestamp', sortOrder: 'desc', /**开始时间 */ @@ -67,6 +72,8 @@ function fnQueryReset() { recordType: '', callerParty: '', calledParty: '', + /** 租户名称*/ + tenantName: '', startTime: '', endTime: '', pageNum: 1, @@ -179,6 +186,13 @@ let tableColumns: ColumnsType = [ return parseDateToStr(+cdrJSON.updateTime * 1000); }, }, + { + title: 'Tenant Name', + dataIndex: 'tenantName', + align: 'center', + key: 'tenantName', + width: 150, + }, { title: t('common.operate'), key: 'id', @@ -463,6 +477,20 @@ onMounted(() => { .finally(() => { // 获取列表数据 fnGetList(); + //查询租户 + listTenant({ parentId: 0 }).then(res => { + if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) { + queryParams.tenantNameArr = []; //上面置为空数组时会报错 故在此 + res.data.forEach((item: any) => { + if (item.parentId === '0') { + queryParams.tenantNameArr.push({ + value: item.tenantName, + label: item.tenantName, + }); + } + }); + } + }); }); }); @@ -516,21 +544,7 @@ onBeforeUnmount(() => { > - - - - - - {{ t('common.search') }} - - - - {{ t('common.reset') }} - - - - - + { > + + + + + + + + + + + + {{ t('common.search') }} + + + + {{ t('common.reset') }} + + + +