/*子页面*/ function openIframe(id, title, content, width, height) { let layerIndex = layer.open({ id: id, type: 2, title: [ '
' + title + "
", "font-size:16px;background-color:#f0f0f0;display: flex;align-items: center;", ], content: content, shade: 0.3, shadeClose: false, area: [width, height], move: false, success: function () { let iframeWin = window["layui-layer-iframe" + layerIndex]; }, }); } /*新增页面*/ function openIframe2(id, title, content, width, height, params) { let layerIndex = layer.open({ id: id, type: 2, title: [ '
' + title + "
", "font-size:16px;background-color:#f0f0f0;display: flex;align-items: center;", ], content: content, shade: 0.3, shadeClose: false, area: [width, height], move: false, success: function () { let iframeWin = window["layui-layer-iframe" + layerIndex]; console.log(params); iframeWin.setParams(JSON.stringify(params)); }, cancel: function () { // 视频监控-历史回放关闭前回调 if (params.videoMonitor) { let iframeWin = window["layui-layer-iframe" + layerIndex]; iframeWin.clickLogout(); } }, }); } function openIframeByParamObj( id, title, content, width, height, paramsObj, type ) { let layerIndex = layer.open({ id: id, type: 2, title: false, content: content, shade: 0.3, anim: 2, skin: "my-skin child-skin", shadeClose: false, area: [width, height], move: false, success: function () { if (paramsObj) { let iframeWin = window["layui-layer-iframe" + layerIndex]; iframeWin.setParams(JSON.stringify(paramsObj)); } }, end: function () { if (type) { showPlugin(); } }, }); }