163 lines
6.3 KiB
JavaScript
163 lines
6.3 KiB
JavaScript
/*子页面*/
|
|
function openIframe(id, title, content, width, height) {
|
|
let layerIndex = layer.open({
|
|
id: id,
|
|
type: 2,
|
|
title: ['<div style="border-left: 3px solid #00377A;color:#00377A;font-size:18px;letter-spacing:1px;display: flex;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', '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: ['<div style="border-left: 3px solid #00377A;color:#00377A;font-size:18px;display: flex;letter-spacing:1px;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', '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 openIframe3(id, title, content, width, height, params) {
|
|
let layerIndex = layer.open({
|
|
id: id,
|
|
type: 2,
|
|
title: ['<div style="border-left: 3px solid #00377A;color:#00377A;font-size:18px;display: flex;letter-spacing:1px;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', 'font-size:16px;background-color:#f0f0f0;display: flex;align-items: center;'],
|
|
content: content,
|
|
shade: 0.3,
|
|
closeBtn: false,
|
|
shadeClose: false,
|
|
area: [width, height],
|
|
move: false,
|
|
success: function () {
|
|
let iframeWin = window["layui-layer-iframe" + layerIndex];
|
|
iframeWin.setParams(JSON.stringify(params));
|
|
}
|
|
});
|
|
}
|
|
|
|
// 楼宇管理区域 新增/修改页面
|
|
function openIframe4(id, title, content, width, height, params,$div) {
|
|
let layerIndex = layer.open({
|
|
id: id,
|
|
type: 2,
|
|
title: ['<div style="border-left: 3px solid #00377A;color:#00377A;font-size:18px;display: flex;letter-spacing:1px;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', '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));
|
|
},
|
|
end:function () {
|
|
if(jsonData){
|
|
if(params.id){
|
|
// 修改节点
|
|
areaTree.partialRefreshEdit($div, jsonData.title);
|
|
}else{
|
|
// 新增节点
|
|
areaTree.partialRefreshAdd($div, jsonData);
|
|
}
|
|
jsonData = null;
|
|
}
|
|
}
|
|
});
|
|
}
|
|
|
|
function openIframe5(id, title, content, width, height, params) {
|
|
let layerIndex = layer.open({
|
|
id: id,
|
|
type: 1,
|
|
title: ['<div style="border-left: 3px solid #00377A;color:#00377A;font-size:18px;display: flex;letter-spacing:1px;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', 'font-size:16px;background-color:#f0f0f0;display: flex;align-items: center;'],
|
|
content: content,
|
|
shade: 0.3,
|
|
closeBtn: 1,
|
|
shadeClose: false,
|
|
area: [width, height],
|
|
move: false,
|
|
success: function () {
|
|
$('input[name="auth"][value="'+params.areaAuth+'"]').prop('checked',true)
|
|
// let iframeWin = window["layui-layer-iframe" + layerIndex];
|
|
// iframeWin.setParams(JSON.stringify(params));
|
|
layui.form.render();
|
|
}
|
|
});
|
|
}
|
|
|
|
function openIframe6(id, title, content, width, height, params) {
|
|
let layerIndex = parent.layer.open({
|
|
id: id,
|
|
type: 2,
|
|
title: ['<div style="border-left: 3px solid #00377A;color:#00377A;font-size:18px;display: flex;letter-spacing:1px;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', '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 = parent.window["layui-layer-iframe" + layerIndex];
|
|
iframeWin.setParams(JSON.stringify(params));
|
|
},
|
|
});
|
|
}
|
|
|
|
|
|
|
|
/*新增页面*/
|
|
function openIframeMax(id, title, content, width, height, params) {
|
|
let layerIndex = layer.open({
|
|
id: id,
|
|
type: 2,
|
|
title: ['<div style="border-left: 3px solid #00377A;color:#00377A;font-size:18px;display: flex;letter-spacing:1px;align-items: center;height: 20px;padding: 0 10px;font-weight: bold;">' + title + '</div>', 'font-size:16px;background-color:#f0f0f0;display: flex;align-items: center;'],
|
|
content: content,
|
|
shade: 0.3,
|
|
shadeClose: false,
|
|
area: [width, height],
|
|
maxmin: true,
|
|
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();
|
|
}
|
|
}
|
|
});
|
|
// console.log(layer)
|
|
// layer.max(layerIndex)
|
|
|
|
// 弹窗打开后立即调用 layer.full
|
|
// layer.full(layerIndex);
|
|
} |