fix: PCF批量删除表单校验提示异常问题
This commit is contained in:
@@ -253,26 +253,11 @@ function fnModalOk() {
|
|||||||
from.neId = queryParams.neId || '-';
|
from.neId = queryParams.neId || '-';
|
||||||
from.rfsp = Number(from.rfsp) || 0;
|
from.rfsp = Number(from.rfsp) || 0;
|
||||||
|
|
||||||
// 根据类型选择函数
|
|
||||||
let result: any = null;
|
|
||||||
let validateArr = ['imsi', 'msisdn'];
|
let validateArr = ['imsi', 'msisdn'];
|
||||||
if (modalState.isBatch) {
|
if (modalState.isBatch) {
|
||||||
validateArr.push('num');
|
validateArr.push('num');
|
||||||
if (modalState.type === 'add') {
|
|
||||||
result = batchAddRule(from);
|
|
||||||
}
|
|
||||||
if (modalState.type === 'update') {
|
|
||||||
result = batchUpdateRule(from);
|
|
||||||
}
|
|
||||||
if (modalState.type === 'delete') {
|
if (modalState.type === 'delete') {
|
||||||
result = batchDelRule(from);
|
validateArr = ['num', 'imsi'];
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (modalState.type === 'add') {
|
|
||||||
result = addRule(from);
|
|
||||||
}
|
|
||||||
if (modalState.type === 'update') {
|
|
||||||
result = updateRule(from);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -280,8 +265,29 @@ function fnModalOk() {
|
|||||||
.validate(validateArr)
|
.validate(validateArr)
|
||||||
.then(e => {
|
.then(e => {
|
||||||
modalState.confirmLoading = true;
|
modalState.confirmLoading = true;
|
||||||
|
|
||||||
const hide = message.loading({ content: t('common.loading') });
|
const hide = message.loading({ content: t('common.loading') });
|
||||||
|
|
||||||
|
// 根据类型选择函数
|
||||||
|
let result: any = null;
|
||||||
|
if (modalState.isBatch) {
|
||||||
|
if (modalState.type === 'add') {
|
||||||
|
result = batchAddRule(from);
|
||||||
|
}
|
||||||
|
if (modalState.type === 'update') {
|
||||||
|
result = batchUpdateRule(from);
|
||||||
|
}
|
||||||
|
if (modalState.type === 'delete') {
|
||||||
|
result = batchDelRule(from);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (modalState.type === 'add') {
|
||||||
|
result = addRule(from);
|
||||||
|
}
|
||||||
|
if (modalState.type === 'update') {
|
||||||
|
result = updateRule(from);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
result
|
result
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.code === RESULT_CODE_SUCCESS) {
|
if (res.code === RESULT_CODE_SUCCESS) {
|
||||||
@@ -775,7 +781,11 @@ onMounted(() => {
|
|||||||
name="imsi"
|
name="imsi"
|
||||||
v-bind="modalStateFrom.validateInfos.imsi"
|
v-bind="modalStateFrom.validateInfos.imsi"
|
||||||
>
|
>
|
||||||
<a-input v-model:value="modalState.from.imsi" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.imsi"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<a-tooltip placement="topLeft">
|
<a-tooltip placement="topLeft">
|
||||||
<template #title>
|
<template #title>
|
||||||
@@ -823,6 +833,7 @@ onMounted(() => {
|
|||||||
<a-input
|
<a-input
|
||||||
v-model:value="modalState.from.imsi"
|
v-model:value="modalState.from.imsi"
|
||||||
allow-clear
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
:disabled="
|
:disabled="
|
||||||
!modalState.isBatch && modalState.type === 'update'
|
!modalState.isBatch && modalState.type === 'update'
|
||||||
"
|
"
|
||||||
@@ -850,6 +861,7 @@ onMounted(() => {
|
|||||||
<a-input
|
<a-input
|
||||||
v-model:value="modalState.from.msisdn"
|
v-model:value="modalState.from.msisdn"
|
||||||
allow-clear
|
allow-clear
|
||||||
|
:maxlength="16"
|
||||||
:disabled="
|
:disabled="
|
||||||
!modalState.isBatch && modalState.type === 'update'
|
!modalState.isBatch && modalState.type === 'update'
|
||||||
"
|
"
|
||||||
@@ -862,13 +874,21 @@ onMounted(() => {
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="PCC Rules" name="pccRules">
|
<a-form-item label="PCC Rules" name="pccRules">
|
||||||
<a-input v-model:value="modalState.from.pccRules" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.pccRules"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="SESS Rules" name="sessRules">
|
<a-form-item label="SESS Rules" name="sessRules">
|
||||||
<a-input v-model:value="modalState.from.sessRules" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.sessRules"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -877,13 +897,21 @@ onMounted(() => {
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="QOS Audio" name="qosAudio">
|
<a-form-item label="QOS Audio" name="qosAudio">
|
||||||
<a-input v-model:value="modalState.from.qosAudio" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.qosAudio"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="QOS Video" name="qosVideo">
|
<a-form-item label="QOS Video" name="qosVideo">
|
||||||
<a-input v-model:value="modalState.from.qosVideo" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.qosVideo"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -892,13 +920,21 @@ onMounted(() => {
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="HDR Enrich" name="hdrEnrich">
|
<a-form-item label="HDR Enrich" name="hdrEnrich">
|
||||||
<a-input v-model:value="modalState.from.hdrEnrich" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.hdrEnrich"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="UE Policy" name="uePolicy">
|
<a-form-item label="UE Policy" name="uePolicy">
|
||||||
<a-input v-model:value="modalState.from.uePolicy" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.uePolicy"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -907,14 +943,23 @@ onMounted(() => {
|
|||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="Sar" name="sar">
|
<a-form-item label="Sar" name="sar">
|
||||||
<a-input v-model:value="modalState.from.sar" allow-clear>
|
<a-input
|
||||||
|
v-model:value="modalState.from.sar"
|
||||||
|
allow-clear
|
||||||
|
:maxlength="64"
|
||||||
|
>
|
||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item label="RFSP" name="rfsp">
|
<a-form-item label="RFSP" name="rfsp">
|
||||||
<a-input v-model:value="modalState.from.rfsp" allow-clear>
|
<a-input-number
|
||||||
</a-input>
|
v-model:value="modalState.from.rfsp"
|
||||||
|
style="width: 100%"
|
||||||
|
:min="0"
|
||||||
|
:max="255"
|
||||||
|
placeholder="0~255"
|
||||||
|
></a-input-number>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|||||||
Reference in New Issue
Block a user