diff --git a/bin/run.bat b/bin/run.bat index a49052e9f..90073a828 100644 --- a/bin/run.bat +++ b/bin/run.bat @@ -3,7 +3,6 @@ echo. echo [信息] 运行Web工程。 echo. -%~d0 cd %~dp0 cd ../ruoyi-admin/target 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 1d3493c19..9162edd1a 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 @@ -99,10 +99,10 @@ tooltip: function (value, length) { var _length = $.common.isEmpty(length) ? 20 : length; var _text = ""; - if (value.length > _length) { + if ($.common.isNotEmpty(value) && value.length > _length) { _text = value.substr(0, _length) + "..."; } else { - _text = value; + _text = $.common.nullToStr(value); } return '' + _text +''; }, @@ -396,7 +396,7 @@ }); }, // 寮瑰嚭灞傛寚瀹氬搴 - open: function (title, url, width, height) { + open: function (title, url, width, height, callback) { //濡傛灉鏄Щ鍔ㄧ锛屽氨浣跨敤鑷傚簲澶у皬寮圭獥 if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { width = 'auto'; @@ -414,6 +414,12 @@ if ($.common.isEmpty(height)) { height = ($(window).height() - 50); }; + if ($.common.isEmpty(callback)) { + callback = function(index, layero) { + var iframeWin = layero.find('iframe')[0]; + iframeWin.contentWindow.submitHandler(); + } + } layer.open({ type: 2, area: [width + 'px', height + 'px'], @@ -426,10 +432,7 @@ btn: ['纭畾', '鍏抽棴'], // 寮瑰眰澶栧尯鍩熷叧闂 shadeClose: true, - yes: function(index, layero) { - var iframeWin = layero.find('iframe')[0]; - iframeWin.contentWindow.submitHandler(); - }, + yes: callback, cancel: function(index) { return true; } @@ -912,6 +915,13 @@ isNotEmpty: function (value) { return !$.common.isEmpty(value); }, + // 绌哄璞¤浆瀛楃涓 + nullToStr: function(value) { + if ($.common.isEmpty(value)) { + return '-' + } + return value; + }, // 鏄惁鏄剧ず鏁版嵁 涓虹┖榛樿涓烘樉绀 visible: function (value) { if ($.common.isEmpty(value) || value == true) {