From d0bd515ed4a312ea8a7a51f8d2dbb6ffcc0c3789 Mon Sep 17 00:00:00 2001 From: xiexiangrui Date: Sat, 4 Jul 2020 15:43:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=8C=E6=96=87=E6=9C=AC=E4=B8=AD=E6=96=87?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/static/ruoyi/js/ry-ui.js | 3 +- .../src/main/resources/vm/html/add.html.vm | 6 ++-- .../src/main/resources/vm/html/edit.html.vm | 31 +++++++++---------- 3 files changed, 19 insertions(+), 21 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 e8136c82b..7b81d1ce3 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 @@ -1233,8 +1233,7 @@ var table = { seeSummernoteDetail: function(index,fild) { table.set(); var row = $("#" + table.options.id).bootstrapTable('getData')[index]; - console.log(row) - var content =window.atob(row[fild]); + var content = decodeURI(window.atob(row[fild])); var htmlcontent = [ "
", content, diff --git a/ruoyi-generator/src/main/resources/vm/html/add.html.vm b/ruoyi-generator/src/main/resources/vm/html/add.html.vm index 400cc6443..ffffae77e 100644 --- a/ruoyi-generator/src/main/resources/vm/html/add.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/add.html.vm @@ -156,10 +156,10 @@
+
- + type="file" >
@@ -261,7 +261,7 @@ callbacks: { onChange: function (contents, $edittable) { // Xss 过滤掉了html 内容 ,所以用base64 保存 - $("input[name='" + this.id + "']").val(window.btoa(contents)) + $("input[name='" + this.id + "']").val(window.btoa(encodeURI(contents))); } } diff --git a/ruoyi-generator/src/main/resources/vm/html/edit.html.vm b/ruoyi-generator/src/main/resources/vm/html/edit.html.vm index 4eb1ef1a1..5c3a4255f 100644 --- a/ruoyi-generator/src/main/resources/vm/html/edit.html.vm +++ b/ruoyi-generator/src/main/resources/vm/html/edit.html.vm @@ -157,15 +157,14 @@ required#end>[[*{${field}}]]
-#elseif($column.htmlType == "upload" || $column.htmlType == "uploads") +#elseif($column.htmlType == "upload")
+
- + type="file">
@@ -182,18 +181,18 @@ #end #end #if($table.sub) -

${subTable.functionName}信息

-
-
- - -
-
-
+

${subTable.functionName}信息

+
+
+ + +
+
+
#end
@@ -267,14 +266,14 @@ $(function () { $('.summernote').each(function (i) { var content = $("input[name='" + this.id + "']").val() - content = window.atob(content); + content = decodeURI(window.atob(content)); this.innerHTML = content; $(this).summernote({ height: 100, lang: 'zh-CN', callbacks: { onChange: function (contents, $edittable) { - $("input[name='" + this.id + "']").val(window.btoa(contents)) + $("input[name='" + this.id + "']").val(window.btoa(encodeURI(contents))); } } });