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"); } } });