提交 ec3fc675 编写于 作者: doc_wei's avatar doc_wei

更新

上级 97b18476
...@@ -38,9 +38,6 @@ function _openNewWindows(mation){ ...@@ -38,9 +38,6 @@ function _openNewWindows(mation){
if(isNull(mation.maxmin)){//是否最大化 if(isNull(mation.maxmin)){//是否最大化
mation.maxmin = false; mation.maxmin = false;
} }
if(isNull(mation.zIndex)){//是否在桌面打开
mation.zIndex = false;
}
if(isNull(mation.shade)){//遮罩层 if(isNull(mation.shade)){//遮罩层
mation.shade = 0.5; mation.shade = 0.5;
} }
...@@ -52,10 +49,7 @@ function _openNewWindows(mation){ ...@@ -52,10 +49,7 @@ function _openNewWindows(mation){
async: true, async: true,
success: function (data) { success: function (data) {
layer.close(index); layer.close(index);
var pageIndex; var pageIndex = layer.open({
//从桌面打开
if(mation.zIndex){
pageIndex = top.winui.window.open({
id: mation.pageId, id: mation.pageId,
type: 2, type: 2,
title: mation.title, title: mation.title,
...@@ -64,36 +58,16 @@ function _openNewWindows(mation){ ...@@ -64,36 +58,16 @@ function _openNewWindows(mation){
offset: mation.offset, offset: mation.offset,
maxmin: mation.maxmin, maxmin: mation.maxmin,
shade: mation.shade, shade: mation.shade,
zIndex: 20000000000,
end: function(){ end: function(){
if(typeof(mation.callBack) == "function") { if(typeof(mation.callBack) == "function") {
mation.callBack(refreshCode); mation.callBack(refreshCode);
} }
} }
}); });
}else{
pageIndex = layer.open({
id: mation.pageId,
type: 2,
title: mation.title,
content: mation.url,
area: mation.area,
offset: mation.offset,
maxmin: mation.maxmin,
shade: mation.shade,
end: function(){
if(typeof(mation.callBack) == "function") {
mation.callBack(refreshCode);
}
}
});
}
if(mation.maxmin){ if(mation.maxmin){
if(mation.zIndex){
top.winui.window.full(pageIndex);
}else{
layer.full(pageIndex); layer.full(pageIndex);
} }
}
}, },
error: function (xml) { error: function (xml) {
layer.close(index); layer.close(index);
......
...@@ -57,6 +57,12 @@ layui.define(['layer', 'winui'], function (exports) { ...@@ -57,6 +57,12 @@ layui.define(['layer', 'winui'], function (exports) {
if(isNull(options.maxmin) && options.maxmin != false){ if(isNull(options.maxmin) && options.maxmin != false){
options.maxmin = true; options.maxmin = true;
} }
if(isNull(options.zIndex)){
options.zIndex = layer.zIndex;
}
if(isNull(options.addToButtomMenu) && options.addToButtomMenu != false){
options.addToButtomMenu = true;
}
//打开窗口 //打开窗口
var windowIndex = layer.open({ var windowIndex = layer.open({
...@@ -72,7 +78,7 @@ layui.define(['layer', 'winui'], function (exports) { ...@@ -72,7 +78,7 @@ layui.define(['layer', 'winui'], function (exports) {
maxmin: options.maxmin, //允许最大最小化 maxmin: options.maxmin, //允许最大最小化
moveOut: true, //允许拖出窗外 moveOut: true, //允许拖出窗外
skin: options.skin, //窗口皮肤 skin: options.skin, //窗口皮肤
zIndex: layer.zIndex, zIndex: options.zIndex,
shadeClose: options.shadeClose, //点击空白处关闭 shadeClose: options.shadeClose, //点击空白处关闭
scrollbar: false, scrollbar: false,
closeBtn: options.closeBtn, closeBtn: options.closeBtn,
...@@ -201,12 +207,14 @@ layui.define(['layer', 'winui'], function (exports) { ...@@ -201,12 +207,14 @@ layui.define(['layer', 'winui'], function (exports) {
//去除最大化按钮 //去除最大化按钮
if (!(options.max === undefined ? this.settings.max : options.max)) if (!(options.max === undefined ? this.settings.max : options.max))
$(windowDom).find('.layui-layer-max').remove(); $(windowDom).find('.layui-layer-max').remove();
if(options.addToButtomMenu){
//增加任务项 //增加任务项
var taskItem = common.addTaskItem(options.id, options.title); var taskItem = common.addTaskItem(options.id, options.title);
//选中任务项 //选中任务项
common.selectDom(taskItem); common.selectDom(taskItem);
//绑定任务项mouseup事件 //绑定任务项mouseup事件
common.resetMouseUp(taskItem, call.taskItemMouseUp); common.resetMouseUp(taskItem, call.taskItemMouseUp);
}
//双击窗口标题栏最大化(由于不明原因,标题栏的拖动好像阻碍了标题栏的双击事件,所以这里用mousedown模拟双击) //双击窗口标题栏最大化(由于不明原因,标题栏的拖动好像阻碍了标题栏的双击事件,所以这里用mousedown模拟双击)
var lastTime = 0; var lastTime = 0;
$(windowDom).find(MOVE).on('mousedown', function () { $(windowDom).find(MOVE).on('mousedown', function () {
......
...@@ -16,7 +16,6 @@ layui.config({ ...@@ -16,7 +16,6 @@ layui.config({
url: "../../tpl/syspersonal/editpassword.html", url: "../../tpl/syspersonal/editpassword.html",
title: "修改密码", title: "修改密码",
pageId: "editpassword", pageId: "editpassword",
zIndex: true,
area: ['700px', '300px'], area: ['700px', '300px'],
callBack: function(refreshCode){ callBack: function(refreshCode){
if (refreshCode == '0') { if (refreshCode == '0') {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册