From ec3fc675c9fbbdf284cbc5f9170e1fea3fb3b61a Mon Sep 17 00:00:00 2001 From: weizhiqiang <598748873@qq.com> Date: Thu, 29 Nov 2018 17:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/webapp/assets/lib/layui/custom.js | 60 ++++++------------- .../assets/lib/winui/js/winui.window.js | 24 +++++--- .../main/webapp/js/syspersonal/syspersonal.js | 1 - 3 files changed, 33 insertions(+), 52 deletions(-) diff --git a/skyeye-web/src/main/webapp/assets/lib/layui/custom.js b/skyeye-web/src/main/webapp/assets/lib/layui/custom.js index 9f8275a83..4352a3f54 100644 --- a/skyeye-web/src/main/webapp/assets/lib/layui/custom.js +++ b/skyeye-web/src/main/webapp/assets/lib/layui/custom.js @@ -38,9 +38,6 @@ function _openNewWindows(mation){ if(isNull(mation.maxmin)){//是否最大化 mation.maxmin = false; } - if(isNull(mation.zIndex)){//是否在桌面打开 - mation.zIndex = false; - } if(isNull(mation.shade)){//遮罩层 mation.shade = 0.5; } @@ -52,47 +49,24 @@ function _openNewWindows(mation){ async: true, success: function (data) { layer.close(index); - var pageIndex; - //从桌面打开 - if(mation.zIndex){ - pageIndex = top.winui.window.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); - } - } - }); - }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); - } - } - }); - } + var 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, + zIndex: 20000000000, + end: function(){ + if(typeof(mation.callBack) == "function") { + mation.callBack(refreshCode); + } + } + }); if(mation.maxmin){ - if(mation.zIndex){ - top.winui.window.full(pageIndex); - }else{ - layer.full(pageIndex); - } + layer.full(pageIndex); } }, error: function (xml) { diff --git a/skyeye-web/src/main/webapp/assets/lib/winui/js/winui.window.js b/skyeye-web/src/main/webapp/assets/lib/winui/js/winui.window.js index af9514575..ccddbe972 100644 --- a/skyeye-web/src/main/webapp/assets/lib/winui/js/winui.window.js +++ b/skyeye-web/src/main/webapp/assets/lib/winui/js/winui.window.js @@ -57,6 +57,12 @@ layui.define(['layer', 'winui'], function (exports) { if(isNull(options.maxmin) && options.maxmin != false){ 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({ @@ -72,7 +78,7 @@ layui.define(['layer', 'winui'], function (exports) { maxmin: options.maxmin, //允许最大最小化 moveOut: true, //允许拖出窗外 skin: options.skin, //窗口皮肤 - zIndex: layer.zIndex, + zIndex: options.zIndex, shadeClose: options.shadeClose, //点击空白处关闭 scrollbar: false, closeBtn: options.closeBtn, @@ -82,7 +88,7 @@ layui.define(['layer', 'winui'], function (exports) { }, //打开回调 success: function (layero, index) { - common.setWindowBody(layero); + common.setWindowBody(layero); }, //关闭回调 cancel: function (index, windowDom) { @@ -201,12 +207,14 @@ layui.define(['layer', 'winui'], function (exports) { //去除最大化按钮 if (!(options.max === undefined ? this.settings.max : options.max)) $(windowDom).find('.layui-layer-max').remove(); - //增加任务项 - var taskItem = common.addTaskItem(options.id, options.title); - //选中任务项 - common.selectDom(taskItem); - //绑定任务项mouseup事件 - common.resetMouseUp(taskItem, call.taskItemMouseUp); + if(options.addToButtomMenu){ + //增加任务项 + var taskItem = common.addTaskItem(options.id, options.title); + //选中任务项 + common.selectDom(taskItem); + //绑定任务项mouseup事件 + common.resetMouseUp(taskItem, call.taskItemMouseUp); + } //双击窗口标题栏最大化(由于不明原因,标题栏的拖动好像阻碍了标题栏的双击事件,所以这里用mousedown模拟双击) var lastTime = 0; $(windowDom).find(MOVE).on('mousedown', function () { diff --git a/skyeye-web/src/main/webapp/js/syspersonal/syspersonal.js b/skyeye-web/src/main/webapp/js/syspersonal/syspersonal.js index b366c7f7d..7bac619e2 100644 --- a/skyeye-web/src/main/webapp/js/syspersonal/syspersonal.js +++ b/skyeye-web/src/main/webapp/js/syspersonal/syspersonal.js @@ -16,7 +16,6 @@ layui.config({ url: "../../tpl/syspersonal/editpassword.html", title: "修改密码", pageId: "editpassword", - zIndex: true, area: ['700px', '300px'], callBack: function(refreshCode){ if (refreshCode == '0') { -- GitLab