代码优化 UTF-8
This commit is contained in:
@@ -10,6 +10,7 @@ import java.util.Objects;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
import com.jeesite.common.codec.EncodeUtils;
|
||||
import com.jeesite.common.io.FileUtils;
|
||||
import com.jeesite.common.io.IOUtils;
|
||||
import com.jeesite.common.lang.ExceptionUtils;
|
||||
@@ -111,7 +112,7 @@ public class FileTemplete implements Comparable<FileTemplete>, Serializable {
|
||||
return null;
|
||||
}
|
||||
try(InputStream is = resource.getInputStream()){
|
||||
return IOUtils.toString(is, "UTF-8");
|
||||
return IOUtils.toString(is, EncodeUtils.UTF_8);
|
||||
}catch (IOException e) {
|
||||
throw ExceptionUtils.unchecked(e);
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ $('#dataGrid').dataGrid({
|
||||
{header:'${text("展现方式")}', name:'showModes', index:'a.show_modes', width:150, fixed:true, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('cms_show_modes')}, val, '未知', true);
|
||||
}},
|
||||
{header:'${text("操作")}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:category:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/category/form?categoryCode='+row.categoryCode+'" class="btnList" title="${text("编辑栏目表")}"><i class="fa fa-pencil"></i></a> ');
|
||||
|
||||
@@ -55,29 +55,29 @@
|
||||
$('#dataGrid').dataGrid({
|
||||
searchForm: $("#searchForm"),
|
||||
columnModel: [
|
||||
{header:'${text('站点名称')}', name:'siteName', index:'a.site_name', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" data-title="${text('编辑站点')}">'+(val||row.id)+'</a>';
|
||||
{header:'${text("站点名称")}', name:'siteName', index:'a.site_name', width:150, align:"left", frozen:true, formatter: function(val, obj, row, act){
|
||||
return '<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" data-title="${text("编辑站点")}">'+(val||row.id)+'</a>';
|
||||
}},
|
||||
{header:'${text('站点标题')}', name:'title', index:'a.title', width:150, align:"left"},
|
||||
// {header:'${text('站点Logo')}', name:'logo', index:'a.logo', width:150, align:"left"},
|
||||
{header:'${text('站点域名')}', name:'domain', index:'a.domain', width:150, align:"center"},
|
||||
{header:'${text('描述')}', name:'description', index:'a.description', width:150, align:"left"},
|
||||
{header:'${text('主题')}', name:'theme', index:'a.theme', width:150, align:"center"},
|
||||
{header:'${text('状态')}', name:'status', index:'a.status', width:90, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text('未知')}', true);
|
||||
{header:'${text("站点标题")}', name:'title', index:'a.title', width:150, align:"left"},
|
||||
// {header:'${text("站点Logo")}', name:'logo', index:'a.logo', width:150, align:"left"},
|
||||
{header:'${text("站点域名")}', name:'domain', index:'a.domain', width:150, align:"center"},
|
||||
{header:'${text("描述")}', name:'description', index:'a.description', width:150, align:"left"},
|
||||
{header:'${text("主题")}', name:'theme', index:'a.theme', width:150, align:"center"},
|
||||
{header:'${text("状态")}', name:'status', index:'a.status', width:90, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel(${@DictUtils.getDictListJson('sys_search_status')}, val, '${text("未知")}', true);
|
||||
}},
|
||||
{header:'${text('创建时间')}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text('操作')}', name:'actions', width:120, formatter: function(val, obj, row, act){
|
||||
{header:'${text("创建时间")}', name:'createDate', index:'a.create_date', width:150, align:"center"},
|
||||
{header:'${text("操作")}', name:'actions', width:150, formatter: function(val, obj, row, act){
|
||||
var actions = [];
|
||||
<% if(hasPermi('cms:site:edit')){ %>
|
||||
actions.push('<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" title="${text('编辑站点')}"><i class="fa fa-pencil"></i></a> ');
|
||||
actions.push('<a href="${ctx}/cms/site/form?siteCode='+row.siteCode+'" class="btnList" title="${text("编辑站点")}"><i class="fa fa-pencil"></i></a> ');
|
||||
if (row.status == Global.STATUS_NORMAL){
|
||||
actions.push('<a href="${ctx}/cms/site/disable?siteCode='+row.siteCode+'" class="btnList" title="${text('停用站点')}" data-confirm="${text('确认要停用该站点吗?')}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/cms/site/disable?siteCode='+row.siteCode+'" class="btnList" title="${text("停用站点")}" data-confirm="${text("确认要停用该站点吗?")}"><i class="glyphicon glyphicon-ban-circle"></i></a> ');
|
||||
}
|
||||
if (row.status == Global.STATUS_DISABLE){
|
||||
actions.push('<a href="${ctx}/cms/site/enable?siteCode='+row.siteCode+'" class="btnList" title="${text('启用站点')}" data-confirm="${text('确认要启用该站点吗?')}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
actions.push('<a href="${ctx}/cms/site/enable?siteCode='+row.siteCode+'" class="btnList" title="${text("启用站点")}" data-confirm="${text("确认要启用该站点吗?")}"><i class="glyphicon glyphicon-ok-circle"></i></a> ');
|
||||
}
|
||||
actions.push('<a href="${ctx}/cms/site/delete?siteCode='+row.siteCode+'" class="btnList" title="${text('删除站点')}" data-confirm="${text('确认要删除该站点吗?')}"><i class="fa fa-trash-o"></i></a> ');
|
||||
actions.push('<a href="${ctx}/cms/site/delete?siteCode='+row.siteCode+'" class="btnList" title="${text("删除站点")}" data-confirm="${text("确认要删除该站点吗?")}"><i class="fa fa-trash-o"></i></a> ');
|
||||
<% } %>
|
||||
return actions.join('');
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user