From 5e8f65f11b1bfc111b76501e6d7332a6bc403881 Mon Sep 17 00:00:00 2001 From: TsMask <340112800@qq.com> Date: Wed, 27 Dec 2023 17:32:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20PCF=E6=89=B9=E9=87=8F=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E6=A0=A1=E9=AA=8C=E6=8F=90=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/neUser/pcf/index.vue | 99 ++++++++++++++++++++++++---------- 1 file changed, 72 insertions(+), 27 deletions(-) diff --git a/src/views/neUser/pcf/index.vue b/src/views/neUser/pcf/index.vue index ad16c73f..cae378e7 100644 --- a/src/views/neUser/pcf/index.vue +++ b/src/views/neUser/pcf/index.vue @@ -253,26 +253,11 @@ function fnModalOk() { from.neId = queryParams.neId || '-'; from.rfsp = Number(from.rfsp) || 0; - // 根据类型选择函数 - let result: any = null; let validateArr = ['imsi', 'msisdn']; if (modalState.isBatch) { validateArr.push('num'); - 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); + validateArr = ['num', 'imsi']; } } @@ -280,8 +265,29 @@ function fnModalOk() { .validate(validateArr) .then(e => { modalState.confirmLoading = true; - 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 .then((res: any) => { if (res.code === RESULT_CODE_SUCCESS) { @@ -775,7 +781,11 @@ onMounted(() => { name="imsi" v-bind="modalStateFrom.validateInfos.imsi" > - +