From 2e2ec8097994f911acf86b14537dc28c7fddacf1 Mon Sep 17 00:00:00 2001 From: leiqiaochu Date: Thu, 31 Oct 2024 11:52:22 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20bug#17573=E3=80=90=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E3=80=91=E6=8F=92=E4=BB=B6=E8=AE=BE=E5=A4=87=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E6=98=A0=E5=B0=84=E6=97=B6=EF=BC=8C=E4=BC=A0=E5=8F=82ID?= =?UTF-8?q?=E9=94=99=E8=AF=AF=EF=BC=8C=E4=BC=A0=E5=85=A5=E4=BA=86=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E6=8E=A5=E5=85=A5=E7=BD=91=E5=85=B3ID=EF=BC=8C?= =?UTF-8?q?=E5=BA=94=E8=AF=A5=E4=B8=BA=E6=8F=92=E4=BB=B6ID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Info/components/InklingModal/index.vue | 4 +-- .../device/components/InklingDevice/index.vue | 29 ++++++++++--------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue b/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue index 45862242..ae243cd0 100644 --- a/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue +++ b/src/views/device/Instance/Detail/Info/components/InklingModal/index.vue @@ -53,7 +53,7 @@ const handleOk = async () => { loading.value = true const res = await savePluginData( 'device', - props.pluginId!, + props.accessId!, route.params.id as string, checkKey.value ).catch(() => ({ success: false })) @@ -71,7 +71,7 @@ const handleCancel = () => { } const getCheckedKeys = () => { - getPluginData( 'device', props.pluginId!, route.params.id as string,).then(res => { + getPluginData( 'device', props.accessId!, route.params.id as string,).then(res => { if (res.success) { checkKey.value = res.result?.externalId || '' } diff --git a/src/views/device/components/InklingDevice/index.vue b/src/views/device/components/InklingDevice/index.vue index 515da7a1..645d237f 100644 --- a/src/views/device/components/InklingDevice/index.vue +++ b/src/views/device/components/InklingDevice/index.vue @@ -145,12 +145,12 @@ const props = defineProps({ default: undefined, }, type: { - type: String, - default: 'device', + type: String, + default: 'device', }, internalId: { - type: String, - default: undefined, + type: String, + default: undefined, }, }); @@ -181,9 +181,10 @@ const queryInkingDevices = (data: string[]) => { return; } - const res = await getInkingDevices(data,props.accessId); + const res = await getInkingDevices(data, props.accessId); if (res) { - disabledKeys.value = res.result?.map((item) => item.externalId) || []; + disabledKeys.value = + res.result?.map((item) => item.externalId) || []; } resolve(true); @@ -250,15 +251,17 @@ const init = async () => { const resp = await getCommandsByAccess(props.accessId); if (resp.success && resp.result?.length) { // 获取分页查询条件 - const item = resp.result.find(item => item.id === 'QueryDevicePage'); + const item = resp.result.find( + (item) => item.id === 'QueryDevicePage', + ); if (item) { - showPage.value = true + showPage.value = true; columns.value = item.expands?.terms?.map((t) => ({ - title: t.name, - dataIndex: t.id, - search: { - type: t.valueType.type, - }, + title: t.name, + dataIndex: t.id, + search: { + type: t.valueType.type, + }, })); } }