fix: 优化udm-voip/ims功能页面

This commit is contained in:
TsMask
2025-04-22 15:49:58 +08:00
parent 2b8e222f23
commit 6d7cde6058
4 changed files with 86 additions and 159 deletions

View File

@@ -23,7 +23,6 @@ import {
listIMSSub,
resetIMSSub,
} from '@/api/neData/ims_sub';
import { listTenant } from '@/api/system/tenant';
import { uploadFile } from '@/api/tool/file';
import { getNeViewFile } from '@/api/tool/neFile';
const { t } = useI18n();
@@ -41,7 +40,7 @@ let queryParams = reactive({
tenantName: '',
/**移动号 */
msisdn: '',
tag:undefined,
tag: undefined,
/**排序字段 */
sortField: 'imsi',
/**排序方式 */
@@ -97,8 +96,7 @@ let tableColumns = ref<ColumnsType>([
{
title: 'IMSI',
dataIndex: 'imsi',
align: 'center',
fixed: 'left',
align: 'left',
sorter: true,
resizable: true,
width: 150,
@@ -108,33 +106,33 @@ let tableColumns = ref<ColumnsType>([
{
title: 'MSISDN',
dataIndex: 'msisdn',
align: 'center',
fixed: 'left',
align: 'left',
sorter: true,
width: 150,
},
{
title: 'TAG',
dataIndex: 'tag',
align: 'center',
width: 150,
align: 'left',
width: 100,
key: 'tag',
customRender: ({ text }: { text: number }) => {
return text === 0 ? 'VoIP' : 'VoLTE';
}
},
},
{
title: 'VNI',
dataIndex: 'vni',
align: 'center',
width: 150,
align: 'left',
resizable: true,
width: 250,
minWidth: 150,
maxWidth: 400,
},
{
title: t('common.operate'),
key: 'imsi',
align: 'left',
fixed: 'right',
width: 100,
},
]);
@@ -294,16 +292,15 @@ const modalStateFrom = Form.useForm(
},
],
imsi: [
{ required: computed(() => modalState.from.tag === 1), message: 'IMSI' + t('common.unableNull') },
{
required: computed(() => modalState.from.tag === 1),
message: 'IMSI' + t('common.unableNull'),
},
{ min: 15, max: 15, message: t('views.neUser.auth.imsiConfirm') },
],
msisdn: [{ required: true, message: 'MSISDN' + t('common.unableNull') }],
tag: [
{ required: true, message: 'TAG' + t('common.unableNull') }
],
vni: [
{ required: true, message: 'vni' + t('common.unableNull') },
],
tag: [{ required: true, message: 'TAG' + t('common.unableNull') }],
vni: [{ required: true, message: 'vni' + t('common.unableNull') }],
// algoIndex: [
// { required: true, message: 'algoIndex' + t('common.unableNull') },
// ],
@@ -372,17 +369,14 @@ function fnModalVisibleByBatch() {
* 进行表达规则校验
*/
function fnModalOk() {
console.log(modalState.from)
modalStateFrom
.validate()
.then(e => {
const from = Object.assign({}, toRaw(modalState.from));
modalState.confirmLoading = true;
from.neId = queryParams.neId || '-';
console.log(from)
const result = from.num === 1
? addIMSSub(from)
: batchAddIMSSub(from, from.num);
const result =
from.num === 1 ? addIMSSub(from) : batchAddIMSSub(from, from.num);
const hide = message.loading(t('common.loading'), 0);
return result
@@ -593,7 +587,7 @@ function fnLoadData() {
resetIMSSub(neId).then(res => {
if (res.code === RESULT_CODE_SUCCESS) {
const num = res.data;
const timerS = Math.ceil(+num / 3000) + 3;
const timerS = Math.ceil(+num / 500) + 3;
notification.success({
message: t('views.neUser.auth.loadData'),
description: t('views.neUser.auth.loadDataTip', { num, timer: timerS }),
@@ -653,7 +647,7 @@ function fnGetList(pageNum?: number) {
tableState.data = res.rows;
if (
tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize &&
(queryParams.pageNum - 1) * tablePagination.pageSize &&
queryParams.pageNum !== 1
) {
tableState.loading = false;
@@ -840,8 +834,12 @@ onMounted(() => {
</a-col>
<a-col :lg="8" :md="12" :xs="24">
<a-form-item label="MSISDN" name="msisdn">
<a-input v-model:value="queryParams.msisdn" allow-clear :maxlength="32"
:placeholder="t('common.inputPlease')"></a-input>
<a-input
v-model:value="queryParams.msisdn"
allow-clear
:maxlength="32"
:placeholder="t('common.inputPlease')"
></a-input>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :xs="24">
@@ -850,7 +848,7 @@ onMounted(() => {
v-model:value="queryParams.tag"
:options="[
{ label: 'VoIP', value: 0 },
{ label: 'VoLTE', value: 1 }
{ label: 'VoLTE', value: 1 },
]"
:placeholder="t('common.selectPlease')"
>
@@ -1155,8 +1153,8 @@ onMounted(() => {
<a-select
v-model:value="modalState.from.tag"
:options="[
{ label: 'VoIP', value:0 },
{ label: 'VoLTE', value: 1 }
{ label: 'VoIP', value: 0 },
{ label: 'VoLTE', value: 1 },
]"
:placeholder="t('common.selectPlease')"
>