IntelligentRecognition/ah-jjsp-web/.svn/pristine/ca/cacc27b73136dca432fccb1c251...

115 lines
4.2 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// layer 自定义右侧呼出(全屏)
layui.define(["layer"], function (exports) {
var layer = layui.layer;
var obj = {
rightPopupLayer: function (content, id) {
let layerIndex = layer.open({
type: 2,
title: "",
offset: ["0px", "100%"],
skin: "layui-anim layui-anim-rl layui-layer-adminRight",
closeBtn: 0,
content: content,
shadeClose: true,
area: ["100%", "100%"],
success: function (layero, index) {
let body = layer.getChildFrame('body', index);
let iframeWin = window[layero.find('iframe')[0]['name']];//获得iframe页的窗口对象执行iframe页的方法
iframeWin.setParams(id);//调用子页面的方法,页面锁定
}
});
let op_width = $(".layui-anim-rl").outerWidth();
$(".layui-layer-shade")
.off("click")
.on("click", function () {
$(".layui-anim-rl")
.animate(
{left: "+=" + op_width + "px"},
300,
"linear",
function () {
$(".layui-anim-rl").remove();
$(".layui-layer-shade").remove();
}
);
});
},
};
exports("rightPopup", obj);
});
layui.define(["layer"], function (exports) {
var layer = layui.layer;
var obj = {
rightPopupLayer: function (content, id) {
let layerIndex = layer.open({
type: 2,
title: false,
offset: ["0px", "100%"],
skin: "layui-anim layui-anim-rl layui-layer-adminRight",
closeBtn: 0,
content: content,
shadeClose: true,
area: ["42%", "100%"],
success: function (layero, index) {
let body = layer.getChildFrame('body', index);
let iframeWin = window[layero.find('iframe')[0]['name']];//获得iframe页的窗口对象执行iframe页的方法
iframeWin.setParams(id);//调用子页面的方法,页面锁定
}
});
let op_width = $(".layui-anim-rl").outerWidth();
$(".layui-layer-shade")
.off("click")
.on("click", function () {
$(".layui-anim-rl")
.animate(
{left: "+=" + op_width + "px"},
300,
"linear",
function () {
$(".layui-anim-rl").remove();
$(".layui-layer-shade").remove();
}
);
});
},
};
exports("rightPopup2", obj);
});
// layer 自定义右侧呼出(非全屏)
layui.define(["layer"], function (exports) {
var layer = layui.layer;
var obj = {
rightPopupLayer: function (content = "") {
layer.open({
type: 1,
title: "",
offset: ["10px", "100%"],
skin: "layui-anim layui-anim-rl layui-layer-adminRight",
closeBtn: 0,
content: content,
shadeClose: true,
area: ["30%", "96%"],
});
let op_width = $(".layui-anim-rl").outerWidth();
$(".layui-layer-shade")
.off("click")
.on("click", function () {
$(".layui-anim-rl").animate(
{left: "+=" + op_width + "px"},
300,
"linear",
function () {
$(".layui-anim-rl").remove();
$(".layui-layer-shade").remove();
}
);
});
},
};
exports("rightPopup3", obj);
});