From 0ced59c0848568fd30282febf84a73e28fc052cf Mon Sep 17 00:00:00 2001 From: qiaochuLei <124648559+qiaochuLei@users.noreply.github.com> Date: Mon, 21 Oct 2024 10:24:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=95=B0=E9=87=87=E8=AE=BE=E5=A4=87-?= =?UTF-8?q?=E6=95=B0=E9=87=87=E6=98=A0=E5=B0=84=E8=AE=BE=E5=A4=87=E7=A6=81?= =?UTF-8?q?=E7=94=A8=E6=97=B6=E4=BC=A0=E9=BB=98=E8=AE=A4=E7=8A=B6=E6=80=81?= =?UTF-8?q?disabled?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue | 1 + src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue | 1 + src/views/device/Instance/Detail/EdgeMap/index.vue | 7 ++++++- .../Instance/Detail/components/EditTable/PatchMapping.vue | 7 +++++-- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue index 4d155746..be4422da 100644 --- a/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue +++ b/src/views/device/Instance/Detail/ChildDevice/EdgeMap/PatchMapping.vue @@ -224,6 +224,7 @@ const handleClick = async () => { provider: treeList.value.find( (it: any) => it.id === item.parentId, ).provider, + state: _props.deviceData.state.value === 'notActive' ? 'disabled' : null, })); params.push(...array); }); diff --git a/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue b/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue index 4e667a4e..70b574ce 100644 --- a/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue +++ b/src/views/device/Instance/Detail/EdgeMap/PatchMapping.vue @@ -220,6 +220,7 @@ const handleClick = async () => { provider: treeList.value.find( (it: any) => it.id === item.parentId, )?.provider, + state: instanceStore.current.state.value === 'notActive' ? 'disabled' : null, })); params.push(...array); }); diff --git a/src/views/device/Instance/Detail/EdgeMap/index.vue b/src/views/device/Instance/Detail/EdgeMap/index.vue index be8caa67..abbf8b4b 100644 --- a/src/views/device/Instance/Detail/EdgeMap/index.vue +++ b/src/views/device/Instance/Detail/EdgeMap/index.vue @@ -374,7 +374,12 @@ const onSave = () => { formRef.value .validate() .then(async (_data: any) => { - const arr = toRaw(data.value).filter((i: any) => i.channelId); + const arr = toRaw(data.value).filter((i: any) => i.channelId).map(item => { + if (instanceStore.current.state?.value === 'notActive') { + item.state = 'disabled' + } + return item + }); if (arr && arr.length !== 0) { const submitData = { deviceId: instanceStore.current.id, diff --git a/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue b/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue index 788fa21c..1c1e3c1e 100644 --- a/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue +++ b/src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue @@ -57,6 +57,8 @@