diff --git a/common/src/main/resources/template/js/codeRule/codeRuleEdit.js b/common/src/main/resources/template/js/codeRule/codeRuleEdit.js index be4d9d5d6c911ab31b07557b3f92887d667f9ad9..f7d1c4cd3ca9f35e2877700145e0fce568b917cb 100644 --- a/common/src/main/resources/template/js/codeRule/codeRuleEdit.js +++ b/common/src/main/resources/template/js/codeRule/codeRuleEdit.js @@ -10,8 +10,7 @@ layui.config({ var index = parent.layer.getFrameIndex(window.name); var $ = layui.$, textool = layui.textool; - var selOption = getFileContent('tpl/template/select-option.tpl'); - + showGrid({ id: "showForm", url: reqBasePath + "queryCodeRuleMationById", diff --git a/web/src/main/resources/template/assets/lib/layui/custom.js b/web/src/main/resources/template/assets/lib/layui/custom.js index 408bf132d97a1948fd127bdc853ef238108bdd09..7f3acd3171f98aed45447867099298badec988c8 100644 --- a/web/src/main/resources/template/assets/lib/layui/custom.js +++ b/web/src/main/resources/template/assets/lib/layui/custom.js @@ -121,7 +121,7 @@ function setRequestHeaders(xmlhttp) { // 编辑加载自定义的js文件 layui.each(customerJS, function(key, jsPath){ - if(jsPath.lastIndexOf(".js") >=0){ + if (jsPath.lastIndexOf(".js") >= 0) { document.write(''); } else { document.write(''); diff --git a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js index 558065e792cd2b5cc0455cad8c530cc17ac2fe82..d0a4f6434a27cf8a300d1f33b62338aaf07fa782 100644 --- a/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js +++ b/web/src/main/resources/template/assets/lib/layui/customer/skyeye/dsFormUtil.js @@ -134,6 +134,9 @@ var dsFormUtil = { * @param content */ loadComponent: function (boxId, content) { + if (!dsFormUtil.checkLoadHandlebar) { + dsFormUtil.loadHandlebar(); + } var component = content.dsFormComponent; if (component.linkedData == 1) { // 关联数据 @@ -145,8 +148,6 @@ var dsFormUtil = { } var jsonStr = {bean: content}; - // 对象的传递转换,用于组件使用,组件中需要使用 {{{attrDefinitionJson}}} 接收 - jsonStr.bean.attrDefinitionJson = JSON.stringify(jsonStr.bean.attrDefinition); var html = getDataUseHandlebars('{{#bean}}' + component.htmlContent + '{{/bean}}', jsonStr); var html_js = getDataUseHandlebars('{{#bean}}' + component.jsContent + '{{/bean}}', jsonStr); var jsCon = ``; @@ -159,6 +160,15 @@ var dsFormUtil = { return content; }, + checkLoadHandlebar: false, + loadHandlebar: function () { + dsFormUtil.checkLoadHandlebar = true; + // 加载json对象 + Handlebars.registerHelper('json', function(context) { + return JSON.stringify(context); + }); + }, + getLable: function (content) { var attr = content.attrDefinition; if (!isNull(attr) && !$.isEmptyObject(attr)) { diff --git a/web/src/main/resources/template/assets/lib/layui/lay/modules/jQuery.upload.min.js b/web/src/main/resources/template/assets/lib/layui/lay/modules/jQuery.upload.min.js index 586908c24cde6b94c0fb4c16d4e1d604e50f908d..dfb595c5b2eb484fad3cb8d1af35debace7179f1 100644 --- a/web/src/main/resources/template/assets/lib/layui/lay/modules/jQuery.upload.min.js +++ b/web/src/main/resources/template/assets/lib/layui/lay/modules/jQuery.upload.min.js @@ -413,7 +413,7 @@ layui.define(["jquery"], function(exports) { if (["avi", "wmv", "mpeg", "mp4", "mov", "mkv", "flv", "f4v", "m4v", "rmvb", "rm", "3gp", "dat", "ts", "mts", "vob"].indexOf(i) >= 0) { return '' } - if (["gif", "jpg", "jpeg", "png", "bmp"].indexOf(i) >= 0) { + if (imageType.indexOf(i) >= 0) { return '' } return ''