Index: ssts-web/src/main/webapp/js/commonUtils.js =================================================================== diff -u -r41269 -r41272 --- ssts-web/src/main/webapp/js/commonUtils.js (.../commonUtils.js) (revision 41269) +++ ssts-web/src/main/webapp/js/commonUtils.js (.../commonUtils.js) (revision 41272) @@ -27,6 +27,10 @@ } } +function getContentWindowId(id) { + return top.document.getElementById('iframeForm').contentWindow.document.getElementById(id) +} + //ZSRY-60:form表单显示在iframe(可以通用) function getFormByIframeUtil(params, callBack) { var title = params.title; @@ -58,8 +62,7 @@ render: function (v) { if (callBack) { var timeout = setInterval(function () { - var iframe = top.document.getElementById('iframeForm').contentWindow.document.getElementById('addQualityMonitoringForm'); - if (iframe) { + if (getContentWindowId('addQualityMonitoringForm') || getContentWindowId('addRoutineMonitoringForm')) { clearInterval(timeout); callBack(top.document.getElementById('iframeForm').contentWindow); }