|
|
|
|
@@ -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,
|
|
|
|
|
@@ -15,6 +16,7 @@ import { delIMSDataCDR, listIMSDataCDR } from '@/api/neData/ims';
|
|
|
|
|
import { parseDateToStr, parseDuration } from '@/utils/date-utils';
|
|
|
|
|
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();
|
|
|
|
|
@@ -39,6 +41,7 @@ let queryParams = reactive({
|
|
|
|
|
recordType: 'MOC',
|
|
|
|
|
callerParty: '',
|
|
|
|
|
calledParty: '',
|
|
|
|
|
tenantName: '',
|
|
|
|
|
sortField: 'timestamp',
|
|
|
|
|
sortOrder: 'desc',
|
|
|
|
|
/**当前页数 */
|
|
|
|
|
@@ -54,6 +57,7 @@ function fnQueryReset() {
|
|
|
|
|
recordType: 'MOC',
|
|
|
|
|
callerParty: '',
|
|
|
|
|
calledParty: '',
|
|
|
|
|
tenantName: '',
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
pageSize: 20,
|
|
|
|
|
});
|
|
|
|
|
@@ -162,6 +166,13 @@ let tableColumns: ColumnsType = [
|
|
|
|
|
align: 'left',
|
|
|
|
|
width: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: t('views.dashboard.cdr.tenantName'),
|
|
|
|
|
dataIndex: 'tenantName',
|
|
|
|
|
align: 'center',
|
|
|
|
|
key: 'tenantName',
|
|
|
|
|
width: 150,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: t('views.dashboard.cdr.time'),
|
|
|
|
|
dataIndex: 'cdrJSON',
|
|
|
|
|
@@ -179,6 +190,9 @@ let tableColumns: ColumnsType = [
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
/**表格字段列排序 */
|
|
|
|
|
let tableColumnsDnd = ref<ColumnsType>([]);
|
|
|
|
|
|
|
|
|
|
/**表格分页器参数 */
|
|
|
|
|
let tablePagination = reactive({
|
|
|
|
|
/**当前页数 */
|
|
|
|
|
@@ -309,6 +323,7 @@ function fnGetList(pageNum?: number) {
|
|
|
|
|
modalState.maxId = Number(res.rows[0].id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tableState.loading = false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@@ -394,6 +409,19 @@ onMounted(() => {
|
|
|
|
|
})
|
|
|
|
|
.finally(() => {
|
|
|
|
|
// 获取列表数据
|
|
|
|
|
console.log(useUserStore().roles);
|
|
|
|
|
if (useUserStore().roles.includes('tenant')) {
|
|
|
|
|
const operateColumnIndex = tableColumns.findIndex(
|
|
|
|
|
column => column.key === 'tenantName'
|
|
|
|
|
);
|
|
|
|
|
console.log(operateColumnIndex);
|
|
|
|
|
|
|
|
|
|
if (operateColumnIndex !== -1) {
|
|
|
|
|
tableColumns.splice(operateColumnIndex, 1);
|
|
|
|
|
}
|
|
|
|
|
console.log(tableColumns);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fnGetList();
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
@@ -431,7 +459,19 @@ onBeforeUnmount(() => {
|
|
|
|
|
></a-select>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :lg="4" :md="12" :xs="24">
|
|
|
|
|
|
|
|
|
|
<a-col :lg="8" :md="12" :xs="24" v-roles:has="['administrator']">
|
|
|
|
|
<a-form-item
|
|
|
|
|
:label="t('views.neUser.sub.tenantName')"
|
|
|
|
|
name="tenantName "
|
|
|
|
|
>
|
|
|
|
|
<a-input
|
|
|
|
|
allow-clear
|
|
|
|
|
v-model:value="queryParams.tenantName"
|
|
|
|
|
></a-input>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :lg="8" :md="12" :xs="24">
|
|
|
|
|
<a-form-item
|
|
|
|
|
:label="t('views.dashboard.cdr.called')"
|
|
|
|
|
name="calledParty "
|
|
|
|
|
@@ -443,7 +483,7 @@ onBeforeUnmount(() => {
|
|
|
|
|
></a-input>
|
|
|
|
|
</a-form-item>
|
|
|
|
|
</a-col>
|
|
|
|
|
<a-col :lg="4" :md="12" :xs="24">
|
|
|
|
|
<a-col :lg="8" :md="12" :xs="24">
|
|
|
|
|
<a-form-item
|
|
|
|
|
:label="t('views.dashboard.cdr.caller')"
|
|
|
|
|
name="callerParty "
|
|
|
|
|
@@ -488,7 +528,11 @@ onBeforeUnmount(() => {
|
|
|
|
|
cancel-text="No"
|
|
|
|
|
@confirm="fnRealTime()"
|
|
|
|
|
>
|
|
|
|
|
<a-button type="primary" :danger="realTimeData">
|
|
|
|
|
<a-button
|
|
|
|
|
type="primary"
|
|
|
|
|
:danger="realTimeData"
|
|
|
|
|
v-roles:has="['administrator']"
|
|
|
|
|
>
|
|
|
|
|
<template #icon><FundOutlined /> </template>
|
|
|
|
|
{{
|
|
|
|
|
!realTimeData
|
|
|
|
|
@@ -497,17 +541,6 @@ onBeforeUnmount(() => {
|
|
|
|
|
}}
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-popconfirm>
|
|
|
|
|
|
|
|
|
|
<a-button
|
|
|
|
|
type="default"
|
|
|
|
|
danger
|
|
|
|
|
:disabled="tableState.selectedRowKeys.length <= 0"
|
|
|
|
|
:loading="modalState.confirmLoading"
|
|
|
|
|
@click.prevent="fnRecordDelete('0')"
|
|
|
|
|
>
|
|
|
|
|
<template #icon><DeleteOutlined /></template>
|
|
|
|
|
{{ t('common.deleteText') }}
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-space>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
@@ -529,6 +562,11 @@ onBeforeUnmount(() => {
|
|
|
|
|
<template #icon><ReloadOutlined /></template>
|
|
|
|
|
</a-button>
|
|
|
|
|
</a-tooltip>
|
|
|
|
|
<TableColumnsDnd
|
|
|
|
|
cache-id="udmSubData"
|
|
|
|
|
:columns="tableColumns"
|
|
|
|
|
v-model:columns-dnd="tableColumnsDnd"
|
|
|
|
|
></TableColumnsDnd>
|
|
|
|
|
<a-tooltip>
|
|
|
|
|
<template #title>{{ t('common.sizeText') }}</template>
|
|
|
|
|
<a-dropdown trigger="click" placement="bottomRight">
|
|
|
|
|
@@ -560,7 +598,7 @@ onBeforeUnmount(() => {
|
|
|
|
|
<a-table
|
|
|
|
|
class="table"
|
|
|
|
|
row-key="id"
|
|
|
|
|
:columns="tableColumns"
|
|
|
|
|
:columns="tableColumnsDnd"
|
|
|
|
|
:loading="tableState.loading"
|
|
|
|
|
:data-source="tableState.data"
|
|
|
|
|
:size="tableState.size"
|
|
|
|
|
|