From 07d0cb89bd5c9e94622851e5670aa07a8aec3f9e Mon Sep 17 00:00:00 2001 From: chuguofei <1633295391@qq.com> Date: Fri, 26 May 2023 11:36:21 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=A7=BB=E5=8A=A8=E7=AB=AF=E7=BB=84?= =?UTF-8?q?=E6=80=81=E5=B7=A5=E5=85=B7=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/page/visual/show.html | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/webapp/page/visual/show.html b/src/main/webapp/page/visual/show.html index fc09c8c..d18e0ae 100644 --- a/src/main/webapp/page/visual/show.html +++ b/src/main/webapp/page/visual/show.html @@ -106,15 +106,17 @@ // 初始化设备状态 initDeviceStatus(); - let iframe = document.querySelector('iframe'); - let iframeDoc = iframe.contentDocument || iframe.contentWindow.document; + that.$nextTick(()=>{ + let iframe = document.querySelector('iframe'); + let iframeDoc = iframe.contentDocument || iframe.contentWindow.document; + iframeDoc.querySelector('.operateColumn').setAttribute("style","display:" + data.dis_type == 1 ? 'none;' : 'initial;') + }) if(data.dis_type == 1 ){ that.popwidth = '80%' ; - iframeDoc.querySelector('.operateColumn').setAttribute("style","display:none"); + }else{ that.popwidth = '30%' ; - iframeDoc.querySelector('.operateColumn').setAttribute("style","display:initial"); } } });