style: UDM数据显示创建时间列

This commit is contained in:
TsMask
2025-09-25 15:30:28 +08:00
parent 3026ac1dd8
commit 1eec47f410
4 changed files with 99 additions and 16 deletions

View File

@@ -26,6 +26,7 @@ import {
} from '@/api/neData/udm_auth'; } from '@/api/neData/udm_auth';
import { uploadFile } from '@/api/tool/file'; import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile'; import { getNeViewFile } from '@/api/tool/neFile';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n(); const { t } = useI18n();
const neListStore = useNeListStore(); const neListStore = useNeListStore();
/**网元参数 */ /**网元参数 */
@@ -117,6 +118,16 @@ let tableColumns = ref<ColumnsType>([
align: 'center', align: 'center',
width: 100, width: 100,
}, },
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{ {
title: t('common.operate'), title: t('common.operate'),
key: 'imsi', key: 'imsi',

View File

@@ -26,6 +26,7 @@ import {
} from '@/api/neData/udm_sub'; } from '@/api/neData/udm_sub';
import { uploadFile } from '@/api/tool/file'; import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile'; import { getNeViewFile } from '@/api/tool/neFile';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n(); const { t } = useI18n();
const neListStore = useNeListStore(); const neListStore = useNeListStore();
/**网元参数 */ /**网元参数 */
@@ -155,6 +156,16 @@ let tableColumns = ref<ColumnsType>([
minWidth: 150, minWidth: 150,
maxWidth: 500, maxWidth: 500,
}, },
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{ {
title: t('common.operate'), title: t('common.operate'),
key: 'imsi', key: 'imsi',
@@ -1220,7 +1231,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 --> <!-- 插槽-卡片左侧侧 -->
<template #title> <template #title>
<a-flex wrap="wrap" gap="small"> <a-flex wrap="wrap" gap="small">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neData:udm-sub:add']"> <a-button
type="primary"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['neData:udm-sub:add']"
>
<template #icon> <template #icon>
<PlusOutlined /> <PlusOutlined />
</template> </template>
@@ -1261,7 +1276,11 @@ onMounted(() => {
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-sub:import']"> <a-button
type="dashed"
@click.prevent="fnModalUploadImportOpen"
v-perms:has="['neData:udm-sub:import']"
>
<template #icon> <template #icon>
<ImportOutlined /> <ImportOutlined />
</template> </template>

View File

@@ -29,6 +29,7 @@ import { saveAs } from 'file-saver';
import { uploadFile } from '@/api/tool/file'; import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile'; import { getNeViewFile } from '@/api/tool/neFile';
import { hasPermissions } from '@/plugins/auth-user'; import { hasPermissions } from '@/plugins/auth-user';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n(); const { t } = useI18n();
const neListStore = useNeListStore(); const neListStore = useNeListStore();
/**网元参数 */ /**网元参数 */
@@ -51,9 +52,10 @@ let queryParams = reactive({
}); });
const hasAnyBatchPermission = computed(() => { const hasAnyBatchPermission = computed(() => {
return hasPermissions(['neData:udm-voip:add']) || return (
hasPermissions(['neData:udm-voip:delete']) ; hasPermissions(['neData:udm-voip:add']) ||
hasPermissions(['neData:udm-voip:delete'])
);
}); });
/**查询参数重置 */ /**查询参数重置 */
@@ -101,6 +103,16 @@ let tableColumns = ref<TableColumnsType>([
minWidth: 100, minWidth: 100,
maxWidth: 300, maxWidth: 300,
}, },
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{ {
title: t('common.operate'), title: t('common.operate'),
key: 'id', key: 'id',
@@ -668,7 +680,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 --> <!-- 插槽-卡片左侧侧 -->
<template #title> <template #title>
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neData:udm-voip:add']"> <a-button
type="primary"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['neData:udm-voip:add']"
>
<template #icon> <template #icon>
<PlusOutlined /> <PlusOutlined />
</template> </template>
@@ -694,11 +710,17 @@ onMounted(() => {
</a-button> </a-button>
<template #overlay> <template #overlay>
<a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)"> <a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)">
<a-menu-item key="add" v-if="hasPermissions(['neData:udm-voip:add'])"> <a-menu-item
key="add"
v-if="hasPermissions(['neData:udm-voip:add'])"
>
<PlusOutlined /> <PlusOutlined />
{{ t('views.neData.common.batchAddText') }} {{ t('views.neData.common.batchAddText') }}
</a-menu-item> </a-menu-item>
<a-menu-item key="delete" v-if="hasPermissions(['neData:udm-voip:delete'])"> <a-menu-item
key="delete"
v-if="hasPermissions(['neData:udm-voip:delete'])"
>
<DeleteOutlined /> <DeleteOutlined />
{{ t('views.neData.common.batchDelText') }} {{ t('views.neData.common.batchDelText') }}
</a-menu-item> </a-menu-item>
@@ -726,7 +748,11 @@ onMounted(() => {
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-voip:import']"> <a-button
type="dashed"
@click.prevent="fnModalUploadImportOpen"
v-perms:has="['neData:udm-voip:import']"
>
<template #icon><ImportOutlined /></template> <template #icon><ImportOutlined /></template>
{{ t('common.import') }} {{ t('common.import') }}
</a-button> </a-button>

View File

@@ -29,11 +29,14 @@ import {
resetUDMVolteIMS, resetUDMVolteIMS,
} from '@/api/neData/udm_volte_ims'; } from '@/api/neData/udm_volte_ims';
import { hasPermissions } from '@/plugins/auth-user'; import { hasPermissions } from '@/plugins/auth-user';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n(); const { t } = useI18n();
const neListStore = useNeListStore(); const neListStore = useNeListStore();
const hasAnyBatchPermission = computed(() => { const hasAnyBatchPermission = computed(() => {
return hasPermissions(['neData:udm-volte:add']) || return (
hasPermissions(['neData:udm-volte:delete']) ; hasPermissions(['neData:udm-volte:add']) ||
hasPermissions(['neData:udm-volte:delete'])
);
}); });
/**字典数据 */ /**字典数据 */
let dict: { let dict: {
@@ -150,6 +153,16 @@ let tableColumns = ref<TableColumnsType>([
minWidth: 250, minWidth: 250,
maxWidth: 400, maxWidth: 400,
}, },
{
title: 'Create Time',
dataIndex: 'createTime',
align: 'left',
width: 250,
customRender(opt) {
if (!opt.value) return '';
return parseDateToStr(+opt.value);
},
},
{ {
title: t('common.operate'), title: t('common.operate'),
key: 'id', key: 'id',
@@ -762,7 +775,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 --> <!-- 插槽-卡片左侧侧 -->
<template #title> <template #title>
<a-space :size="8" align="center"> <a-space :size="8" align="center">
<a-button type="primary" @click.prevent="fnModalVisibleByEdit()" v-perms:has="['neData:udm-volte:add']"> <a-button
type="primary"
@click.prevent="fnModalVisibleByEdit()"
v-perms:has="['neData:udm-volte:add']"
>
<template #icon> <template #icon>
<PlusOutlined /> <PlusOutlined />
</template> </template>
@@ -788,11 +805,17 @@ onMounted(() => {
</a-button> </a-button>
<template #overlay> <template #overlay>
<a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)"> <a-menu @click="({ key }:any) => fnModalVisibleByBatch(key)">
<a-menu-item key="add" v-if="hasPermissions(['neData:udm-volte:add'])"> <a-menu-item
key="add"
v-if="hasPermissions(['neData:udm-volte:add'])"
>
<PlusOutlined /> <PlusOutlined />
{{ t('views.neData.common.batchAddText') }} {{ t('views.neData.common.batchAddText') }}
</a-menu-item> </a-menu-item>
<a-menu-item key="delete" v-if="hasPermissions(['neData:udm-volte:delete'])"> <a-menu-item
key="delete"
v-if="hasPermissions(['neData:udm-volte:delete'])"
>
<DeleteOutlined /> <DeleteOutlined />
{{ t('views.neData.common.batchDelText') }} {{ t('views.neData.common.batchDelText') }}
</a-menu-item> </a-menu-item>
@@ -820,7 +843,11 @@ onMounted(() => {
</a-button> </a-button>
</a-popconfirm> </a-popconfirm>
<a-button type="dashed" @click.prevent="fnModalUploadImportOpen" v-perms:has="['neData:udm-volte:import']"> <a-button
type="dashed"
@click.prevent="fnModalUploadImportOpen"
v-perms:has="['neData:udm-volte:import']"
>
<template #icon><ImportOutlined /></template> <template #icon><ImportOutlined /></template>
{{ t('common.import') }} {{ t('common.import') }}
</a-button> </a-button>