From 3a44c4e7657216764d0299b0056b7da3002d8889 Mon Sep 17 00:00:00 2001 From: RuoYi Date: Wed, 14 Nov 2018 23:08:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=AF=A6=E7=BB=86=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/ruoyi/js/ry-ui.js | 20 ++++++++++++++----- .../templates/monitor/operlog/detail.html | 11 ++++++++-- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index b0e1e3146..b6846d12d 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -416,22 +416,32 @@ $.operate.submit(url, "post", "json", data); }, // 详细信息 - detail: function(id) { + detail: function(id, width, height) { var _url = $.common.isEmpty(id) ? $.table._option.detailUrl : $.table._option.detailUrl.replace("{id}", id); + var _width = $.common.isEmpty(width) ? "800" : width; + var _height = $.common.isEmpty(height) ? ($(window).height() - 50) : height; + //如果是移动端,就使用自适应大小弹窗 + if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { + _width = 'auto'; + _height = 'auto'; + } layer.open({ type: 2, - area: ['800px', ($(window).height() - 50) + 'px'], + area: [_width + 'px', _height + 'px'], fix: false, //不固定 maxmin: true, shade: 0.3, title: $.table._option.modalName + "详细", content: _url, - btn: [' 关闭'], + btn: '关闭', // 弹层外区域关闭 shadeClose: true, - cancel: function(index) { - return true; + success: function(layer) { + layer[0].childNodes[3].childNodes[0].attributes[0].value='layui-layer-btn1'; + }, + btn1: function(index) { + layer.close(index); } }); }, diff --git a/ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html b/ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html index b3bfc5cfb..844909dd9 100644 --- a/ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html +++ b/ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html @@ -28,8 +28,7 @@
-
-
+
@@ -44,5 +43,13 @@
+ + \ No newline at end of file