Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Springboot Plus
Commits
59e6416d
Commit
59e6416d
authored
Mar 14, 2018
by
李家智
Browse files
toobar button enable
parent
163be433
Changes
5
Hide whitespace changes
Inline
Side-by-side
admin-core/src/main/java/com/ibeetl/admin/core/util/DateUtil.java
View file @
59e6416d
package
com.ibeetl.admin.core.util
;
package
com.ibeetl.admin.core.util
;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.Date
;
public
class
DateUtil
{
public
class
DateUtil
{
public
static
Date
MAX_DATE
=
maxDate
();
public
static
String
now
()
{
public
static
String
now
()
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
new
Date
());
return
sdf
.
format
(
new
Date
());
...
@@ -13,4 +19,13 @@ public class DateUtil {
...
@@ -13,4 +19,13 @@ public class DateUtil {
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
format
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
format
);
return
sdf
.
format
(
new
Date
());
return
sdf
.
format
(
new
Date
());
}
}
private
static
Date
maxDate
()
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
try
{
return
sdf
.
parse
(
"9999-12-31 23:59:59"
);
}
catch
(
ParseException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
}
admin-core/src/main/resources/codeTemplate/js/index.js
View file @
59e6416d
...
@@ -44,6 +44,15 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -44,6 +44,15 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
]
]
]
]
});
});
table
.
on
(
'
checkbox(${entity.code}Table)
'
,
function
(
obj
){
var
$
{
entity
.
code
}
=
obj
.
data
;
if
(
obj
.
checked
){
//按钮逻辑Lib.buttonEnable()
}
else
{
}
})
},
},
initSearchForm
:
function
(){
initSearchForm
:
function
(){
...
...
admin-core/src/main/resources/static/js/lib.js
View file @
59e6416d
...
@@ -265,6 +265,18 @@ var Lib = {
...
@@ -265,6 +265,18 @@ var Lib = {
}
}
Common
.
post
(
url
,
formPara
,
callBack
);
Common
.
post
(
url
,
formPara
,
callBack
);
},
},
buttonEnable
:
function
(
buttonCode
,
enable
){
var
btn
=
$
(
"
#table-button-
"
+
buttonCode
);
debugger
;
if
(
enable
){
btn
.
attr
(
'
disabled
'
,
"
false
"
);
btn
.
removeClass
(
"
button-disabled
"
)
}
else
{
btn
.
attr
(
'
disabled
'
,
"
true
"
);
btn
.
addClass
(
'
button-disabled
'
);
}
},
getTableHeight
:
function
(
queryLine
)
{
getTableHeight
:
function
(
queryLine
)
{
// 表格相对高度
// 表格相对高度
if
(
queryLine
==
1
)
{
if
(
queryLine
==
1
)
{
...
...
admin-core/src/main/resources/templates/common/layout.html
View file @
59e6416d
...
@@ -48,6 +48,10 @@
...
@@ -48,6 +48,10 @@
.input-readonly
{
.input-readonly
{
background-color
:
#efefef
;
cursor
:
not-allowed
;
}
.button-disabled
{
background-color
:
#efefef
;
background-color
:
#efefef
;
cursor
:
not-allowed
;
cursor
:
not-allowed
;
}
}
...
...
admin-core/src/main/resources/templates/common/tag/accessButton.tag.html
View file @
59e6416d
<!--#if(canAccess(function)){ /*功能*/ -->
<!--#if(canAccess(function)){ /*功能*/ -->
<button
class=
"layui-btn layui-btn-primary ext-toolbar
"
data-type=
"${action}"
>
${tagBody}
</button>
<button
id=
"table-button-${action}"
class=
"layui-btn layui-btn-primary ext-toolbar
"
data-type=
"${action}"
>
${tagBody}
</button>
<!--#} -->
<!--#} -->
\ No newline at end of file
Write
Preview
Supports
Markdown
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