增加日期快速选择示例,详见操作日志查询功能。

This commit is contained in:
thinkgem
2020-04-05 15:00:36 +08:00
parent 06c6f278ba
commit 82c0fa0620
2 changed files with 11 additions and 6 deletions

View File

@@ -213,7 +213,7 @@ public class ServletUtils {
return XmlMapper.toXml(resultMap); return XmlMapper.toXml(resultMap);
}else{ }else{
if (response != null){ if (response != null){
response.setContentType(MediaType.APPLICATION_JSON_VALUE); response.setContentType(MediaType.APPLICATION_JSON_VALUE+";charset=UTF-8");
} }
if (ObjectUtils.toBoolean(PropertiesUtils.getInstance().getProperty("web.jsonp.enabled"))) { if (ObjectUtils.toBoolean(PropertiesUtils.getInstance().getProperty("web.jsonp.enabled"))) {
String functionName = request.getParameter("__callback"); String functionName = request.getParameter("__callback");
@@ -225,7 +225,7 @@ public class ServletUtils {
} }
}else{ }else{
if (response != null){ if (response != null){
response.setContentType(MediaType.APPLICATION_JSON_VALUE); response.setContentType(MediaType.APPLICATION_JSON_VALUE+";charset=UTF-8");
} }
return JsonMapper.toJson(resultMap); return JsonMapper.toJson(resultMap);
} }
@@ -300,7 +300,7 @@ public class ServletUtils {
if (type == null && StringUtils.isBlank(response.getContentType())){ if (type == null && StringUtils.isBlank(response.getContentType())){
if ((StringUtils.startsWith(string, "{") && StringUtils.endsWith(string, "}")) if ((StringUtils.startsWith(string, "{") && StringUtils.endsWith(string, "}"))
|| (StringUtils.startsWith(string, "[") && StringUtils.endsWith(string, "]"))){ || (StringUtils.startsWith(string, "[") && StringUtils.endsWith(string, "]"))){
type = MediaType.APPLICATION_JSON_VALUE; type = MediaType.APPLICATION_JSON_VALUE+";charset=UTF-8";
}else if (StringUtils.startsWith(string, "<") && StringUtils.endsWith(string, ">")){ }else if (StringUtils.startsWith(string, "<") && StringUtils.endsWith(string, ">")){
if (StringUtils.startsWith(string, "<!DOCTYPE")){ if (StringUtils.startsWith(string, "<!DOCTYPE")){
type = MediaType.TEXT_HTML_VALUE+";charset=UTF-8"; type = MediaType.TEXT_HTML_VALUE+";charset=UTF-8";

View File

@@ -26,7 +26,7 @@
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label">日志类型:</label> <label class="control-label">日志类型:</label>
<div class="control-inline width-90"> <div class="control-inline Wdate-date nobg">
<#form:select path="logType" dictType="sys_log_type" blankOption="true" class="form-control required " /> <#form:select path="logType" dictType="sys_log_type" blankOption="true" class="form-control required " />
</div> </div>
</div> </div>
@@ -61,11 +61,16 @@
<label class="control-label">操作时间:</label> <label class="control-label">操作时间:</label>
<div class="control-inline"> <div class="control-inline">
<#form:input path="createDate_gte" readonly="readonly" maxlength="20" class="form-control Wdate-date" <#form:input path="createDate_gte" readonly="readonly" maxlength="20" class="form-control Wdate-date"
dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,onpicked:function(){createDate_lte.click()}});"/> dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true,onpicked:function(){createDate_lte.click()}});"/> -
&nbsp;--&nbsp;
<#form:input path="createDate_lte" readonly="readonly" maxlength="20" class="form-control Wdate-date" <#form:input path="createDate_lte" readonly="readonly" maxlength="20" class="form-control Wdate-date"
dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/> dataFormat="date" onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:true});"/>
</div> </div>
<div class="control-inline" style="width:75px;">
<select onchange="js.quickSelectDate(this.value, 'createDate_gte', 'createDate_lte');" class="form-control">
<option value="0">常用</option><option value="1">今日</option><option value="2">本周</option>
<option value="3">本月</option><option value="4">本季度</option><option value="5">上月</option>
</select>
</div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="control-label">客户端IP</label> <label class="control-label">客户端IP</label>