From f1033f38ecebeb5b69f84d52c3c4cc2e254e76e8 Mon Sep 17 00:00:00 2001 From: zhujiyan <17812234322@163.com> Date: Tue, 22 Oct 2024 20:39:19 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=AE=A1=E7=90=86-=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=A1=B9=E7=9B=AE-=E5=B7=A5=E7=A8=8B=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E4=B8=8B=E6=8B=89=E6=A1=86=E6=A0=91=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mxgraph/graphList/components/popup.vue | 45 ++++++++++++++++++- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/src/views/govern/mxgraph/graphList/components/popup.vue b/src/views/govern/mxgraph/graphList/components/popup.vue index 6353577..3aeaf4f 100644 --- a/src/views/govern/mxgraph/graphList/components/popup.vue +++ b/src/views/govern/mxgraph/graphList/components/popup.vue @@ -89,6 +89,17 @@ const addFn = () => { } }) } +const handleTree = (data: any) => { + if (data && data.length != 0) { + data.map((item: any) => { + if (item.level != 2) { + item.disabled = true + } else { + item.disabled = false + } + }) + } +} const open = ref((row: any) => { formRef.value?.resetFields() // deviceTree({}).then((res: any) => { @@ -113,8 +124,38 @@ const open = ref((row: any) => { } }) }) - if (item.name == '治理设备') { - item.children = item.newList + item.disabled = true + if (item.children && item.children.length != 0) { + item.children.forEach((vv: any, vvs: any) => { + vv.disabled = true + if (item.name.includes('治理')) { + if (vv.level === 0) { + vv.disabled = true + } else { + vv.disabled = false + } + // item.children = item.newList + } + if (item.name.includes('便携式')) { + console.log(vv, 'bianxieshihshhsshh ') + if (vv.level === 1) { + vv.disabled = false + } else { + vv.disabled = true + } + } + if (vv.children && vv.children.length != 0) { + vv.children.forEach((kk: any, kks: any) => { + if (item.name.includes('便携式') && kk.level === 2) { + kk.disabled = true + vv.children.splice(kks, 1) + } + // else { + // kk.disabled = true + // } + }) + } + }) } }) Engineering.value = res.data