Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenjunxiong
guns-vip
Commits
d4c20cc1
Commit
d4c20cc1
authored
Apr 18, 2017
by
fsn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
显示日期的格式化
parent
1de4c998
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
4 deletions
+23
-4
src/main/java/com/stylefeng/guns/core/util/ToolUtil.java
+14
-0
src/main/java/project/config/web/beetl/BeetlConfiguration.java
+2
-0
src/main/webapp/WEB-INF/view/common/tags/input.tag
+4
-1
src/main/webapp/WEB-INF/view/system/user/user_edit.html
+2
-2
src/main/webapp/WEB-INF/view/system/user/user_view.html
+1
-1
No files found.
src/main/java/com/stylefeng/guns/core/util/ToolUtil.java
View file @
d4c20cc1
...
...
@@ -28,6 +28,20 @@ import java.util.Map.Entry;
* 高频方法集合类
*/
public
class
ToolUtil
{
/**
* 判断一个对象是否是时间类型
*
* @author stylefeng
* @Date 2017/4/18 12:55
*/
public
static
String
dateType
(
Object
o
){
if
(
o
instanceof
Date
){
return
DateUtil
.
getDay
((
Date
)
o
);
}
else
{
return
o
.
toString
();
}
}
/**
* 获取异常的具体信息
...
...
src/main/java/project/config/web/beetl/BeetlConfiguration.java
View file @
d4c20cc1
package
project
.
config
.
web
.
beetl
;
import
com.stylefeng.guns.core.beetl.ShiroExt
;
import
com.stylefeng.guns.core.util.ToolUtil
;
import
org.beetl.ext.spring.BeetlGroupUtilConfiguration
;
public
class
BeetlConfiguration
extends
BeetlGroupUtilConfiguration
{
...
...
@@ -9,6 +10,7 @@ public class BeetlConfiguration extends BeetlGroupUtilConfiguration {
public
void
initOther
()
{
groupTemplate
.
registerFunctionPackage
(
"shiro"
,
new
ShiroExt
());
groupTemplate
.
registerFunctionPackage
(
"tool"
,
new
ToolUtil
());
}
...
...
src/main/webapp/WEB-INF/view/common/tags/input.tag
View file @
d4c20cc1
...
...
@@ -11,7 +11,10 @@
<div class="form-group">
<label class="col-sm-3 control-label">${name}</label>
<div class="col-sm-9">
<input class="form-control" id="${id}" value="${value!}"
<input class="form-control" id="${id}"
@if(isNotEmpty(value)){
value="${tool.dateType(value)}"
@}
@if(isNotEmpty(type)){
type="${type}"
@}else{
...
...
src/main/webapp/WEB-INF/view/system/user/user_edit.html
View file @
d4c20cc1
...
...
@@ -23,8 +23,8 @@
<
#
input
id=
"name"
name=
"姓名"
underline=
"true"
value=
"${user.name}"
/>
<
#
input
id=
"birthday"
name=
"出生日期"
underline=
"true"
type=
"date"
value=
"${user.birthday
,dateFormat="
yyyy-MM-dd
"
}"
clickFun=
"laydate({istime: false, format: 'YYYY-MM-DD'})"
/>
value=
"${user.birthday}"
clickFun=
"laydate({istime: false, format: 'YYYY-MM-DD'})"
/>
<
#
input
id=
"citySel"
name=
"部门"
underline=
"true"
readonly=
"readonly"
hidden=
"deptid"
hiddenValue=
"${user.deptid}"
value=
"${deptName}"
clickFun=
"UserInfoDlg.showDeptSelectTree(); return false;"
...
...
src/main/webapp/WEB-INF/view/system/user/user_view.html
View file @
d4c20cc1
...
...
@@ -32,7 +32,7 @@
<
#
input
id=
"name"
name=
"姓名"
underline=
"true"
value=
"${user.name}"
/>
<
#
input
id=
"birthday"
name=
"出生日期"
underline=
"true"
type=
"date"
value=
"${user.birthday
,dateFormat="
yyyy-MM-dd
"
}"
value=
"${user.birthday}"
clickFun=
"laydate({istime: false, format: 'YYYY-MM-DD'})"
/>
<
#
input
id=
"citySel"
name=
"部门"
underline=
"true"
readonly=
"readonly"
value=
"${deptName}"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment