diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.css b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.css new file mode 100644 index 00000000..e3cb8c5d --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.css @@ -0,0 +1,50 @@ +@charset "UTF-8"; +.jsonview { + font-family: monospace; + font-size: 1.1em; + white-space: pre-wrap; } + .jsonview .prop { + font-weight: bold; } + .jsonview .null { + color: red; } + .jsonview .bool { + color: blue; } + .jsonview .num { + color: blue; } + .jsonview .string { + color: green; + white-space: pre-wrap; } + .jsonview .string.multiline { + display: inline-block; + vertical-align: text-top; } + .jsonview .collapser { + position: absolute; + left: -1em; + cursor: pointer; } + .jsonview .collapsible { + transition: height 1.2s; + transition: width 1.2s; } + .jsonview .collapsible.collapsed { + height: .8em; + width: 1em; + display: inline-block; + overflow: hidden; + margin: 0; } + .jsonview .collapsible.collapsed:before { + content: "…"; + width: 1em; + margin-left: .2em; } + .jsonview .collapser.collapsed { + transform: rotate(0deg); } + .jsonview .q { + display: inline-block; + width: 0px; + color: transparent; } + .jsonview li { + position: relative; } + .jsonview ul { + list-style: none; + margin: 0 0 0 2em; + padding: 0; } + .jsonview h1 { + font-size: 1.2em; } diff --git a/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.js b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.js new file mode 100644 index 00000000..18738b44 --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/ajax/libs/jsonview/jquery.jsonview.js @@ -0,0 +1,250 @@ +(function(jQuery) { + var $, Collapser, JSONFormatter, JSONView; + JSONFormatter = (function() { + function JSONFormatter(options) { + if (options == null) { + options = {}; + } + this.options = options; + } + + JSONFormatter.prototype.htmlEncode = function(html) { + if (html !== null) { + return html.toString().replace(/&/g, "&").replace(/"/g, """).replace(//g, ">"); + } else { + return ''; + } + }; + + JSONFormatter.prototype.jsString = function(s) { + s = JSON.stringify(s).slice(1, -1); + return this.htmlEncode(s); + }; + + JSONFormatter.prototype.decorateWithSpan = function(value, className) { + return "" + (this.htmlEncode(value)) + ""; + }; + + JSONFormatter.prototype.valueToHTML = function(value, level) { + var valueType; + if (level == null) { + level = 0; + } + valueType = Object.prototype.toString.call(value).match(/\s(.+)]/)[1].toLowerCase(); + return this["" + valueType + "ToHTML"].call(this, value, level); + }; + + JSONFormatter.prototype.nullToHTML = function(value) { + return this.decorateWithSpan('null', 'null'); + }; + + JSONFormatter.prototype.numberToHTML = function(value) { + return this.decorateWithSpan(value, 'num'); + }; + + JSONFormatter.prototype.stringToHTML = function(value) { + var multilineClass, newLinePattern; + if (/^(http|https|file):\/\/[^\s]+$/i.test(value)) { + return "\"" + (this.jsString(value)) + "\""; + } else { + multilineClass = ''; + value = this.jsString(value); + if (this.options.nl2br) { + newLinePattern = /([^>\\r\\n]?)(\\r\\n|\\n\\r|\\r|\\n)/g; + if (newLinePattern.test(value)) { + multilineClass = ' multiline'; + value = (value + '').replace(newLinePattern, '$1' + '
'); + } + } + return "\"" + value + "\""; + } + }; + + JSONFormatter.prototype.booleanToHTML = function(value) { + return this.decorateWithSpan(value, 'bool'); + }; + + JSONFormatter.prototype.arrayToHTML = function(array, level) { + var collapsible, hasContents, index, numProps, output, value, _i, _len; + if (level == null) { + level = 0; + } + hasContents = false; + output = ''; + numProps = array.length; + for (index = _i = 0, _len = array.length; _i < _len; index = ++_i) { + value = array[index]; + hasContents = true; + output += '
  • ' + this.valueToHTML(value, level + 1); + if (numProps > 1) { + output += ','; + } + output += '
  • '; + numProps--; + } + if (hasContents) { + collapsible = level === 0 ? '' : ' collapsible'; + return "[]"; + } else { + return '[ ]'; + } + }; + + JSONFormatter.prototype.objectToHTML = function(object, level) { + var collapsible, hasContents, numProps, output, prop, value; + if (level == null) { + level = 0; + } + hasContents = false; + output = ''; + numProps = 0; + for (prop in object) { + numProps++; + } + for (prop in object) { + value = object[prop]; + hasContents = true; + output += "
  • \"" + (this.jsString(prop)) + "\": " + (this.valueToHTML(value, level + 1)); + if (numProps > 1) { + output += ','; + } + output += '
  • '; + numProps--; + } + if (hasContents) { + collapsible = level === 0 ? '' : ' collapsible'; + return "{}"; + } else { + return '{ }'; + } + }; + + JSONFormatter.prototype.jsonToHTML = function(json) { + return "
    " + (this.valueToHTML(json)) + "
    "; + }; + + return JSONFormatter; + + })(); + (typeof module !== "undefined" && module !== null) && (module.exports = JSONFormatter); + Collapser = { + bindEvent: function(item, collapsed) { + var collapser; + collapser = document.createElement('div'); + collapser.className = 'collapser'; + collapser.innerHTML = collapsed ? '+' : '-'; + collapser.addEventListener('click', (function(_this) { + return function(event) { + return _this.toggle(event.target); + }; + })(this)); + item.insertBefore(collapser, item.firstChild); + if (collapsed) { + return this.collapse(collapser); + } + }, + expand: function(collapser) { + var ellipsis, target; + target = this.collapseTarget(collapser); + ellipsis = target.parentNode.getElementsByClassName('ellipsis')[0]; + target.parentNode.removeChild(ellipsis); + target.style.display = ''; + return collapser.innerHTML = '-'; + }, + collapse: function(collapser) { + var ellipsis, target; + target = this.collapseTarget(collapser); + target.style.display = 'none'; + ellipsis = document.createElement('span'); + ellipsis.className = 'ellipsis'; + ellipsis.innerHTML = ' … '; + target.parentNode.insertBefore(ellipsis, target); + return collapser.innerHTML = '+'; + }, + toggle: function(collapser) { + var target; + target = this.collapseTarget(collapser); + if (target.style.display === 'none') { + return this.expand(collapser); + } else { + return this.collapse(collapser); + } + }, + collapseTarget: function(collapser) { + var target, targets; + targets = collapser.parentNode.getElementsByClassName('collapsible'); + if (!targets.length) { + return; + } + return target = targets[0]; + } + }; + $ = jQuery; + JSONView = { + collapse: function(el) { + if (el.innerHTML === '-') { + return Collapser.collapse(el); + } + }, + expand: function(el) { + if (el.innerHTML === '+') { + return Collapser.expand(el); + } + }, + toggle: function(el) { + return Collapser.toggle(el); + } + }; + return $.fn.JSONView = function() { + var args, defaultOptions, formatter, json, method, options, outputDoc; + args = arguments; + if (JSONView[args[0]] != null) { + method = args[0]; + return this.each(function() { + var $this, level; + $this = $(this); + if (args[1] != null) { + level = args[1]; + return $this.find(".jsonview .collapsible.level" + level).siblings('.collapser').each(function() { + return JSONView[method](this); + }); + } else { + return $this.find('.jsonview > ul > li > .collapsible').siblings('.collapser').each(function() { + return JSONView[method](this); + }); + } + }); + } else { + json = args[0]; + options = args[1] || {}; + defaultOptions = { + collapsed: false, + nl2br: false + }; + options = $.extend(defaultOptions, options); + formatter = new JSONFormatter({ + nl2br: options.nl2br + }); + if (Object.prototype.toString.call(json) === '[object String]') { + json = JSON.parse(json); + } + outputDoc = formatter.jsonToHTML(json); + return this.each(function() { + var $this, item, items, _i, _len, _results; + $this = $(this); + $this.html(outputDoc); + items = $this[0].getElementsByClassName('collapsible'); + _results = []; + for (_i = 0, _len = items.length; _i < _len; _i++) { + item = items[_i]; + if (item.parentNode.nodeName === 'LI') { + _results.push(Collapser.bindEvent(item.parentNode, options.collapsed)); + } else { + _results.push(void 0); + } + } + return _results; + }); + } + }; +})(jQuery); 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 5150143c..daf4c739 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 @@ -564,7 +564,7 @@ _width = 'auto'; _height = 'auto'; } - top.layer.open({ + layer.open({ type: 2, area: [_width + 'px', _height + 'px'], fix: false, @@ -573,7 +573,6 @@ shade: 0.3, title: $.table._option.modalName + "详细", content: _url, - zIndex: 9999999999, btn: ['关闭'], // 弹层外区域关闭 shadeClose: true, 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 844909dd..b6c059a4 100644 --- a/ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html +++ b/ruoyi-admin/src/main/resources/templates/monitor/operlog/detail.html @@ -3,6 +3,7 @@ xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> +
    @@ -43,12 +44,15 @@
    - + diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java index 19619ab1..252ccbd1 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/LogAspect.java @@ -151,7 +151,7 @@ public class LogAspect { Map map = ServletUtils.getRequest().getParameterMap(); String params = JSON.marshal(map); - operLog.setOperParam(StringUtils.substring(params, 0, 255)); + operLog.setOperParam(StringUtils.substring(params, 0, 2000)); } /** diff --git a/sql/ry_20190118.sql b/sql/ry_20190215.sql similarity index 100% rename from sql/ry_20190118.sql rename to sql/ry_20190215.sql