From 30b97ca3cb1266c683d5759f96b7e498377e205f Mon Sep 17 00:00:00 2001 From: jackhoo_98 Date: Wed, 15 Mar 2023 11:29:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=95=B0=E6=8D=AE=E9=87=87=E9=9B=86=20?= =?UTF-8?q?=E9=80=9A=E9=81=93=E7=AE=A1=E7=90=86=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/DataCollect/Channel/Save/index.vue | 45 ++++++++++++-------- 1 file changed, 28 insertions(+), 17 deletions(-) diff --git a/src/views/DataCollect/Channel/Save/index.vue b/src/views/DataCollect/Channel/Save/index.vue index 8e01b54e..e05b3974 100644 --- a/src/views/DataCollect/Channel/Save/index.vue +++ b/src/views/DataCollect/Channel/Save/index.vue @@ -109,10 +109,7 @@ /> { const changeAuthType = (value: Array) => { formData.value.configuration.authType = value[0]; }; +const isAuthType = computed(() => { + const { authType } = formData.value.configuration; + return isArray(authType) + ? authType[0] === 'username' + : authType === 'username'; +}); +const isSecurityMode = computed(() => { + const { securityMode } = formData.value.configuration; + return securityMode === 'SignAndEncrypt' || securityMode === 'Sign' + ? true + : false; +}); const filterOption = (input: string, option: any) => { return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0; @@ -251,18 +258,22 @@ const filterOption = (input: string, option: any) => { const getOptionsList = async () => { for (let key in Options.value) { const res: any = await queryOptionsList(key); - Options.value[key] = res.result.map((item: any) => ({ - label: item?.text || item, - value: item?.value || item, - })); + if (res.status === 200) { + Options.value[key] = res.result.map((item: any) => ({ + label: item?.text || item, + value: item?.value || item, + })); + } } }; const getCertificateList = async () => { const res: any = await queryCertificateList(); - certificateList.value = res.result.map((item: any) => ({ - value: item.id, - label: item.name, - })); + if (res.status === 200) { + certificateList.value = res.result.map((item: any) => ({ + label: item.name, + value: item.id, + })); + } }; const getProvidersList = async () => {