Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tjmdp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
other-project
tjmdp
Commits
cebace75
Commit
cebace75
authored
Apr 15, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7355188e
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
148 additions
and
14 deletions
+148
-14
UserController.java
src/main/java/com/qiankun/controller/UserController.java
+4
-3
BaseController.java
...main/java/com/qiankun/controller/base/BaseController.java
+3
-0
system.properties
src/main/resources/system.properties
+1
-1
main.jsp
src/main/webapp/WEB-INF/decorators/main.jsp
+1
-0
saveuser.jsp
src/main/webapp/WEB-INF/pages/user/saveuser.jsp
+0
-0
style.css
src/main/webapp/resources/css/style.css
+5
-0
user.js
src/main/webapp/resources/js/user/user.js
+134
-10
No files found.
src/main/java/com/qiankun/controller/UserController.java
View file @
cebace75
...
@@ -54,9 +54,10 @@ public class UserController extends BaseController<Object>{
...
@@ -54,9 +54,10 @@ public class UserController extends BaseController<Object>{
@RequestMapping
(
"/user/add"
)
@RequestMapping
(
"/user/add"
)
public
ModelAndView
index
()
throws
Exception
{
public
ModelAndView
index
()
throws
Exception
{
ModelAndView
t_view
=
new
ModelAndView
();
ModelAndView
view
=
new
ModelAndView
();
t_view
.
setViewName
(
"user/saveuser"
);
view
.
setViewName
(
"user/saveuser"
);
return
t_view
;
view
.
getModel
().
put
(
"dict"
,
dict
());
return
view
;
}
}
@Auth
(
verifyLogin
=
false
,
verifyURL
=
false
)
@Auth
(
verifyLogin
=
false
,
verifyURL
=
false
)
...
...
src/main/java/com/qiankun/controller/base/BaseController.java
View file @
cebace75
...
@@ -212,6 +212,8 @@ public class BaseController<Entity> extends MultiActionController {
...
@@ -212,6 +212,8 @@ public class BaseController<Entity> extends MultiActionController {
String
[]
relation
=
rb
.
getString
(
"relation"
).
split
(
","
);
//关系
String
[]
relation
=
rb
.
getString
(
"relation"
).
split
(
","
);
//关系
String
[]
education
=
rb
.
getString
(
"education"
).
split
(
","
);
//学历
String
[]
education
=
rb
.
getString
(
"education"
).
split
(
","
);
//学历
String
[]
paperType
=
rb
.
getString
(
"paperType"
).
split
(
","
);
//证件类型
String
[]
paperType
=
rb
.
getString
(
"paperType"
).
split
(
","
);
//证件类型
String
[]
nationality
=
rb
.
getString
(
"nationality"
).
split
(
","
);
//国籍
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"nation"
,
nation
);
map
.
put
(
"nation"
,
nation
);
...
@@ -221,6 +223,7 @@ public class BaseController<Entity> extends MultiActionController {
...
@@ -221,6 +223,7 @@ public class BaseController<Entity> extends MultiActionController {
map
.
put
(
"relation"
,
relation
);
map
.
put
(
"relation"
,
relation
);
map
.
put
(
"education"
,
education
);
map
.
put
(
"education"
,
education
);
map
.
put
(
"paperType"
,
paperType
);
map
.
put
(
"paperType"
,
paperType
);
map
.
put
(
"nationality"
,
nationality
);
return
map
;
return
map
;
...
...
src/main/resources/system.properties
View file @
cebace75
...
@@ -26,4 +26,4 @@ bloodType=\u672a\u77e5,A,B,O,AB,A:RH+,B:RH+,AB:RH+,O:RH+,A:RH-,B:RH-,AB:RH-,O:RH
...
@@ -26,4 +26,4 @@ bloodType=\u672a\u77e5,A,B,O,AB,A:RH+,B:RH+,AB:RH+,O:RH+,A:RH-,B:RH-,AB:RH-,O:RH
relation
=
\u7236\u
6bcd,
\u5144\u
59b9,
\u
914d
\u5076
,
\u
5b50
\u5973
,
\u
4eb2
\u
5c5e,
\u
670b
\u
53cb
relation
=
\u7236\u
6bcd,
\u5144\u
59b9,
\u
914d
\u5076
,
\u
5b50
\u5973
,
\u
4eb2
\u
5c5e,
\u
670b
\u
53cb
education
=
\u
521d
\u
4e2d,
\u
9ad8
\u
4e2d,
\u
4e13
\u
79d1,
\u
672c
\u
79d1,
\u7855\u
58eb,
\u
535a
\u
58eb
education
=
\u
521d
\u
4e2d,
\u
9ad8
\u
4e2d,
\u
4e13
\u
79d1,
\u
672c
\u
79d1,
\u7855\u
58eb,
\u
535a
\u
58eb
paperType
=
\u
8eab
\u
4efd
\u
8bc1,
\u
62a4
\u7167
,
\u
519b
\u
5b98
\u
8bc1
paperType
=
\u
8eab
\u
4efd
\u
8bc1,
\u
62a4
\u7167
,
\u
519b
\u
5b98
\u
8bc1
nationality
=
\u
4e2d
\u
56fd,
\u5176\u
4ed6
src/main/webapp/WEB-INF/decorators/main.jsp
View file @
cebace75
...
@@ -38,6 +38,7 @@
...
@@ -38,6 +38,7 @@
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/assets/css/hsCheckData/hsCheckData.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/assets/css/hsCheckData/hsCheckData.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/css/page.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/css/page.css"
/>
<link
rel=
"stylesheet"
href=
"<webpath:path/>/resources/css/style.css"
/>
<!--[if lte IE 8] >
<!--[if lte IE 8] >
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/>
<link rel="stylesheet" href="<webpath:path/>/resources/assets/css/ace-ie.min.css"/>
<![endif] -->
<![endif] -->
...
...
src/main/webapp/WEB-INF/pages/user/saveuser.jsp
View file @
cebace75
This diff is collapsed.
Click to expand it.
src/main/webapp/resources/css/style.css
View file @
cebace75
...
@@ -1047,4 +1047,8 @@ a.a15:active {
...
@@ -1047,4 +1047,8 @@ a.a15:active {
font-size
:
14px
;
font-size
:
14px
;
letter-spacing
:
0.47px
;
letter-spacing
:
0.47px
;
line-height
:
30px
;
line-height
:
30px
;
}
.form-group
{
margin-bottom
:
10px
;
}
}
\ No newline at end of file
src/main/webapp/resources/js/user/user.js
View file @
cebace75
$
(
document
).
ready
(
function
(){
$
(
document
).
ready
(
function
(){
if
(
$
(
'#userForm'
).
length
>
0
){
$
(
'#userForm'
).
validate
({
doNotHideMessage
:
true
,
//this option enables to show the error/success messages on tab switch.
errorElement
:
'span'
,
//default input error message container
errorClass
:
'validate-inline'
,
// default input error message class
focusInvalid
:
false
,
// do not focus the last invalid input
rules
:
{
"firstName"
:
{
required
:
true
},
"lastName"
:
{
required
:
true
},
"roleId"
:
{
required
:
true
},
"email"
:
{
required
:
true
,
email
:
true
},
"password"
:
{
required
:
"#changePassword:checked"
},
"confirm_password"
:
{
required
:
"#changePassword:checked"
,
equalTo
:
"#password"
},
"roleId"
:
{
required
:
true
},
"jobNumber"
:
{
required
:
"#isEmployee:checked"
},
"hireOnDateValue"
:
{
required
:
"#isEmployee:checked"
},
"clockId"
:
{
required
:
"#isEmployee:checked"
,
number
:
"#isEmployee:checked"
,
min
:
1
},
"payId"
:
{
required
:
"#isEmployee:checked"
},
"paygroupId"
:
{
required
:
"#isEmployee:checked"
},
"departmentValue"
:
{
required
:
true
}
},
errorPlacement
:
function
(
error
,
element
)
{
// render error placement for each input type
error
.
insertAfter
(
element
);
// for other inputs, just perform default behavoir
if
(
element
.
attr
(
"name"
)
==
"roleId"
)
{
$
(
"#roleId-controls div a"
).
attr
(
"style"
,
"border-color: #b94a48 !important"
);
}
},
invalidHandler
:
function
(
event
,
validator
)
{
//display error alert on form submit
parent
.
Loading
.
stop
();
},
highlight
:
function
(
element
)
{
// hightlight error inputs
$
(
element
).
closest
(
'.help-inline'
).
removeClass
(
'ok'
);
// display OK icon
$
(
element
).
closest
(
'.control-group'
).
removeClass
(
'success'
).
addClass
(
'error'
);
// set error class to the control group
},
unhighlight
:
function
(
element
)
{
// revert the change dony by hightlight
$
(
element
).
closest
(
'.control-group'
).
removeClass
(
'error'
);
// set error class to the control group
if
(
$
(
element
).
attr
(
"name"
)
==
"roleId"
)
{
$
(
"#roleId-controls div a"
).
attr
(
"style"
,
""
);
}
},
success
:
function
(
label
)
{
label
.
addClass
(
'valid'
).
closest
(
'.control-group'
).
removeClass
(
'error'
);
// set success class to the control group
label
.
remove
();
},
submitHandler
:
function
(
form
){
user
.
save
(
form
,
false
);
},
onfocusin
:
function
(
element
,
event
)
{
}
});
}
$
(
'#birthday'
).
datepicker
()
$
(
'#birthday'
).
datepicker
()
$
(
"#nation"
).
select2
({
$
(
"#nation"
).
select2
({
...
@@ -6,20 +108,43 @@ $(document).ready(function(){
...
@@ -6,20 +108,43 @@ $(document).ready(function(){
allowClear
:
true
allowClear
:
true
});
});
$
(
"#nati
onality
"
).
select2
({
$
(
"#nati
vePlace
"
).
select2
({
placeholder
:
"请选择"
,
placeholder
:
"请选择"
,
allowClear
:
true
allowClear
:
true
});
});
/* $("#domicilePlace").hsCheckData({
$
(
"#nativePlace"
).
hsCheckData
({
isShowCheckBox: false, //默认为false
isShowCheckBox: false, //默认为false
data: cityData
data: cityData
});
});
*/
$
(
"#domicilePlace"
).
hsCheckData
({
isShowCheckBox
:
false
,
//默认为false
data
:
cityData
});
})
})
\ No newline at end of file
var
user
=
{
save
:
function
(
form
){
}
}
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