"JeeSpringCloud/src/vscode:/vscode.git/clone" did not exist on "ea62439e5aa11dcc43da5588fe54bde6c70a9e7b"
Commit d10e72c0 authored by 李家智's avatar 李家智
Browse files

日期类型多种支持

parent ec708bba
...@@ -118,6 +118,15 @@ public class BeetlConf { ...@@ -118,6 +118,15 @@ public class BeetlConf {
}); });
groupTemplate.registerFunction("abcd", new Function() {
@Override
public Boolean call(Object[] paras, Context ctx) {
return true;
}
});
groupTemplate.registerFunction("env", new Function() { groupTemplate.registerFunction("env", new Function() {
@Override @Override
......
...@@ -4,6 +4,7 @@ import java.io.IOException; ...@@ -4,6 +4,7 @@ import java.io.IOException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import org.beetl.sql.core.engine.PageQuery; import org.beetl.sql.core.engine.PageQuery;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -19,6 +20,7 @@ import com.ibeetl.admin.core.web.JsonResult; ...@@ -19,6 +20,7 @@ import com.ibeetl.admin.core.web.JsonResult;
@Configuration @Configuration
public class JasonConfig { public class JasonConfig {
@Bean @Bean
@ConditionalOnMissingBean(ObjectMapper.class)
public ObjectMapper getObjectMapper() { public ObjectMapper getObjectMapper() {
ObjectMapper objectMapper = new ObjectMapper(); ObjectMapper objectMapper = new ObjectMapper();
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")); objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
...@@ -34,7 +36,7 @@ public class JasonConfig { ...@@ -34,7 +36,7 @@ public class JasonConfig {
* @author xiandafu * @author xiandafu
* *
*/ */
static class CustomJsonResultSerializer extends JsonSerializer<JsonResult> { public static class CustomJsonResultSerializer extends JsonSerializer<JsonResult> {
public CustomJsonResultSerializer() { public CustomJsonResultSerializer() {
} }
......
...@@ -92,6 +92,7 @@ public class MVCConf implements WebMvcConfigurer, InitializingBean { ...@@ -92,6 +92,7 @@ public class MVCConf implements WebMvcConfigurer, InitializingBean {
@Override @Override
public void addFormatters(FormatterRegistry registry) { public void addFormatters(FormatterRegistry registry) {
registry.addFormatter(new DateFormatter("yyyy-MM-dd HH:mm:ss")); registry.addFormatter(new DateFormatter("yyyy-MM-dd HH:mm:ss"));
registry.addFormatter(new DateFormatter("yyyy-MM-dd"));
} }
......
...@@ -185,6 +185,14 @@ var Lib = { ...@@ -185,6 +185,14 @@ var Lib = {
range : '' range : ''
}); });
}) })
$(form).find(".input-date").each(function() {
laydate = layui.laydate;
laydate.render({
elem : $(this)[0],
});
})
}, },
_dropdown : function(layuiForm, data, form, select, groupName) { _dropdown : function(layuiForm, data, form, select, groupName) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment