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';
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
@@ -117,6 +118,16 @@ let tableColumns = ref<ColumnsType>([
align: 'center',
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'),
key: 'imsi',

View File

@@ -26,6 +26,7 @@ import {
} from '@/api/neData/udm_sub';
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
@@ -155,6 +156,16 @@ let tableColumns = ref<ColumnsType>([
minWidth: 150,
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'),
key: 'imsi',
@@ -1220,7 +1231,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 -->
<template #title>
<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>
<PlusOutlined />
</template>
@@ -1261,7 +1276,11 @@ onMounted(() => {
</a-button>
</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>
<ImportOutlined />
</template>

View File

@@ -29,6 +29,7 @@ import { saveAs } from 'file-saver';
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
import { hasPermissions } from '@/plugins/auth-user';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
/**网元参数 */
@@ -51,9 +52,10 @@ let queryParams = reactive({
});
const hasAnyBatchPermission = computed(() => {
return hasPermissions(['neData:udm-voip:add']) ||
hasPermissions(['neData:udm-voip:delete']) ;
return (
hasPermissions(['neData:udm-voip:add']) ||
hasPermissions(['neData:udm-voip:delete'])
);
});
/**查询参数重置 */
@@ -101,6 +103,16 @@ let tableColumns = ref<TableColumnsType>([
minWidth: 100,
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'),
key: 'id',
@@ -668,7 +680,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 -->
<template #title>
<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>
<PlusOutlined />
</template>
@@ -694,11 +710,17 @@ onMounted(() => {
</a-button>
<template #overlay>
<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 />
{{ t('views.neData.common.batchAddText') }}
</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 />
{{ t('views.neData.common.batchDelText') }}
</a-menu-item>
@@ -726,7 +748,11 @@ onMounted(() => {
</a-button>
</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>
{{ t('common.import') }}
</a-button>

View File

@@ -29,11 +29,14 @@ import {
resetUDMVolteIMS,
} from '@/api/neData/udm_volte_ims';
import { hasPermissions } from '@/plugins/auth-user';
import { parseDateToStr } from '@/utils/date-utils';
const { t } = useI18n();
const neListStore = useNeListStore();
const hasAnyBatchPermission = computed(() => {
return hasPermissions(['neData:udm-volte:add']) ||
hasPermissions(['neData:udm-volte:delete']) ;
return (
hasPermissions(['neData:udm-volte:add']) ||
hasPermissions(['neData:udm-volte:delete'])
);
});
/**字典数据 */
let dict: {
@@ -150,6 +153,16 @@ let tableColumns = ref<TableColumnsType>([
minWidth: 250,
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'),
key: 'id',
@@ -762,7 +775,11 @@ onMounted(() => {
<!-- 插槽-卡片左侧侧 -->
<template #title>
<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>
<PlusOutlined />
</template>
@@ -788,11 +805,17 @@ onMounted(() => {
</a-button>
<template #overlay>
<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 />
{{ t('views.neData.common.batchAddText') }}
</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 />
{{ t('views.neData.common.batchDelText') }}
</a-menu-item>
@@ -820,7 +843,11 @@ onMounted(() => {
</a-button>
</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>
{{ t('common.import') }}
</a-button>