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
30e90259
Commit
30e90259
authored
Feb 28, 2018
by
李家智
Browse files
bug fix
parent
28497287
Changes
68
Hide whitespace changes
Inline
Side-by-side
admin-console/src/main/resources/static/js/admin/console/del.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
table
'
,
'
consoleApi
'
],
function
(
exports
)
{
var
consoleApi
=
layui
.
consoleApi
;
var
table
=
layui
.
table
;
var
view
=
{
init
:
function
(){
},
delBatch
:
function
(){
var
data
=
Common
.
getMoreDataFromTable
(
table
,
"
consoleTable
"
);
if
(
data
==
null
){
return
;
}
Common
.
openConfirm
(
"
确认要删除这些CmsBlog?
"
,
function
(){
var
ids
=
Common
.
concatBatchId
(
data
);
consoleApi
.
del
(
ids
,
function
(){
Common
.
info
(
"
删除成功
"
);
dataReload
();
})
})
}
}
exports
(
'
del
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/console/edit.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
consoleApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
consoleApi
=
layui
.
consoleApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#updateForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
consoleApi
.
updateConsole
(
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
edit
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/console/index.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
consoleTable
=
null
;
var
view
=
{
init
:
function
(){
this
.
initTable
();
this
.
initSearchForm
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
roleTable
,
form
)
}
},
initTable
:
function
(){
consoleTable
=
table
.
render
({
elem
:
'
#consoleTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/console/list.json
'
//数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
cols
:
[
[
//表头
{
type
:
'
checkbox
'
,
fixed
:
'
left
'
,
},
{
field
:
'
id
'
,
title
:
'
id
'
,
fixed
:
'
left
'
,
width
:
100
,
},
{
field
:
'
title
'
,
title
:
'
title
'
,
width
:
100
,
},
{
field
:
'
content
'
,
title
:
'
content
'
,
width
:
100
,
},
{
field
:
'
createTime
'
,
title
:
'
createTime
'
,
width
:
100
,
},
{
field
:
'
createUserId
'
,
title
:
'
createUserId
'
,
width
:
100
,
},
{
field
:
'
type
'
,
title
:
'
type
'
,
width
:
100
,
}
]
]
});
},
initSearchForm
:
function
(){
Lib
.
initSearchForm
(
$
(
"
#searchForm
"
),
consoleTable
,
form
);
},
initToolBar
:
function
(){
toolbar
=
{
add
:
function
()
{
//获取选中数据
var
url
=
"
/admin/console/add.do
"
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>新增
"
);
},
edit
:
function
()
{
//获取选中数目
var
data
=
Common
.
getOneFromTable
(
table
,
"
consoleTable
"
);
if
(
data
==
null
){
return
;
}
var
url
=
"
/admin/console/edit.do?id=
"
+
data
.
id
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>
"
+
data
.
CmsBlog
+
"
>编辑
"
);
},
del
:
function
()
{
layui
.
use
([
'
del
'
],
function
(){
var
delView
=
layui
.
del
delView
.
delBatch
();
});
}
};
$
(
'
.ext-toolbar
'
).
on
(
'
click
'
,
function
()
{
var
type
=
$
(
this
).
data
(
'
type
'
);
toolbar
[
type
]
?
toolbar
[
type
].
call
(
this
)
:
''
;
});
}
}
exports
(
'
index
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/dict/add.js
View file @
30e90259
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table','dictApi'], function(exports) {
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table','dictApi'], function(exports) {
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
dictApi
.
addDict
(
function
(){
dictApi
.
addDict
(
$
(
"
#addForm
"
),
function
(){
parent
.
window
.
dataReload
();
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
Lib
.
closeFrame
();
...
...
admin-console/src/main/resources/static/js/admin/dict/del.js
View file @
30e90259
...
@@ -11,7 +11,7 @@ layui.define(['table', 'dictApi'], function(exports) {
...
@@ -11,7 +11,7 @@ layui.define(['table', 'dictApi'], function(exports) {
return
;
return
;
}
}
Common
.
openConfirm
(
"
确认要删除这些数据字典?
"
,
function
(){
Common
.
openConfirm
(
"
确认要删除这些数据字典?
"
,
function
(){
var
ids
=
Common
.
concatBatchId
(
data
,
"
value
"
);
var
ids
=
Common
.
concatBatchId
(
data
,
"
id
"
);
dictApi
.
del
(
ids
,
function
(){
dictApi
.
del
(
ids
,
function
(){
Common
.
info
(
"
删除成功
"
);
Common
.
info
(
"
删除成功
"
);
dataReload
();
dataReload
();
...
...
admin-console/src/main/resources/static/js/admin/dict/dictApi.js
View file @
30e90259
/*访问后台的代码*/
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
var
api
=
{
updateDict
:
function
(
callback
){
updateDict
:
function
(
form
,
callback
){
Lib
.
submitForm
(
$
(
'
#updateF
orm
'
)
,{},
callback
)
Lib
.
submitForm
(
"
/admin/dict/update.json
"
,
f
orm
,{},
callback
)
},
},
addDict
:
function
(
callback
){
addDict
:
function
(
form
,
callback
){
Lib
.
submitForm
(
$
(
'
#addF
orm
'
)
,{},
callback
)
Lib
.
submitForm
(
"
/admin/dict/add.json
"
,
f
orm
,{},
callback
)
},
},
del
:
function
(
ids
,
callback
){
del
:
function
(
ids
,
callback
){
Common
.
post
(
"
/admin/dict/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
Common
.
post
(
"
/admin/dict/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
...
...
admin-console/src/main/resources/static/js/admin/dict/edit.js
View file @
30e90259
...
@@ -9,24 +9,17 @@ layui.define([ 'form', 'laydate', 'table','dictApi'], function(exports) {
...
@@ -9,24 +9,17 @@ layui.define([ 'form', 'laydate', 'table','dictApi'], function(exports) {
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
dictApi
.
updateDict
(
function
(){
dictApi
.
updateDict
(
$
(
"
#updateForm
"
),
function
(){
parent
.
window
.
dataReload
();
parent
.
window
.
dataReload
();
Common
.
info
(
"
更新成功
"
);
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
Lib
.
closeFrame
();
});
});
});
});
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
Lib
.
closeFrame
();
});
});
}
}
}
}
exports
(
'
edit
'
,
view
);
exports
(
'
edit
'
,
view
);
});
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/dict/index.js
View file @
30e90259
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this
.
initSearchForm
();
this
.
initSearchForm
();
this
.
initToolBar
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
dictTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
dictTable
)
}
}
...
@@ -24,14 +24,19 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -24,14 +24,19 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
,
page
:
Lib
.
tablePage
//开启分页
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//表头
{
{
type
:
'
checkbox
'
,
type
:
'
checkbox
'
,
fixed
:
'
left
'
,
fixed
:
'
left
'
,
},
},
{
field
:
'
id
'
,
title
:
'
id
'
,
width
:
80
,
fixed
:
'
left
'
,
sort
:
true
},
{
{
field
:
'
value
'
,
field
:
'
value
'
,
title
:
'
字典值
'
,
title
:
'
字典值1
'
,
fixed
:
'
left
'
,
fixed
:
'
left
'
,
width
:
120
,
width
:
120
,
},
},
...
@@ -94,7 +99,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -94,7 +99,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
if
(
data
==
null
){
if
(
data
==
null
){
return
;
return
;
}
}
var
url
=
"
/admin/dict/edit.do?id=
"
+
data
.
value
;
var
url
=
"
/admin/dict/edit.do?id=
"
+
data
.
id
;
Common
.
openDlg
(
url
,
"
字典数据管理>
"
+
data
.
value
+
"
>编辑
"
);
Common
.
openDlg
(
url
,
"
字典数据管理>
"
+
data
.
value
+
"
>编辑
"
);
},
},
...
...
admin-console/src/main/resources/static/js/admin/entity/add.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
entityApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
entityApi
=
layui
.
entityApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#addForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
entityApi
.
addEntity
(
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#addButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
add
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/entity/del.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
table
'
,
'
entityApi
'
],
function
(
exports
)
{
var
entityApi
=
layui
.
entityApi
;
var
table
=
layui
.
table
;
var
view
=
{
init
:
function
(){
},
delBatch
:
function
(){
var
data
=
Common
.
getMoreDataFromTable
(
table
,
"
entityTable
"
);
if
(
data
==
null
){
return
;
}
Common
.
openConfirm
(
"
确认要删除这些CmsBlog?
"
,
function
(){
var
ids
=
Common
.
concatBatchId
(
data
);
entityApi
.
del
(
ids
,
function
(){
Common
.
info
(
"
删除成功
"
);
dataReload
();
})
})
}
}
exports
(
'
del
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/entity/edit.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
entityApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
entityApi
=
layui
.
entityApi
;
var
index
=
layui
.
index
;
var
view
=
{
init
:
function
(){
Lib
.
initGenrealForm
(
$
(
"
#updateForm
"
),
form
);
this
.
initSubmit
();
},
initSubmit
:
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
entityApi
.
updateEntity
(
function
(){
parent
.
window
.
dataReload
();
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
});
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
});
}
}
exports
(
'
edit
'
,
view
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/entity/entityApi.js
deleted
100644 → 0
View file @
28497287
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
updateEntity
:
function
(
callback
){
Lib
.
submitForm
(
$
(
'
#updateForm
'
),{},
callback
)
},
addEntity
:
function
(
callback
){
Lib
.
submitForm
(
$
(
'
#addForm
'
),{},
callback
)
},
del
:
function
(
ids
,
callback
){
Common
.
post
(
"
/admin/entity/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
callback
();
})
}
};
exports
(
'
entityApi
'
,
api
);
});
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/entity/index.js
deleted
100644 → 0
View file @
28497287
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
entityTable
=
null
;
var
view
=
{
init
:
function
(){
this
.
initTable
();
this
.
initSearchForm
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
roleTable
,
form
)
}
},
initTable
:
function
(){
entityTable
=
table
.
render
({
elem
:
'
#entityTable
'
,
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/admin/entity/list.json
'
//数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
limit
:
10
,
cols
:
[
[
//表头
{
type
:
'
checkbox
'
,
fixed
:
'
left
'
,
},
]
]
});
},
initSearchForm
:
function
(){
Lib
.
initSearchForm
(
$
(
"
#searchForm
"
),
entityTable
,
form
);
},
initToolBar
:
function
(){
toolbar
=
{
add
:
function
()
{
//获取选中数据
var
url
=
"
/admin/entity/add.do
"
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>新增
"
);
},
edit
:
function
()
{
//获取选中数目
var
data
=
Common
.
getOneFromTable
(
table
,
"
entityTable
"
);
if
(
data
==
null
){
return
;
}
var
url
=
"
/admin/entity/edit.do?id=
"
+
data
.
id
;
Common
.
openDlg
(
url
,
"
CmsBlog管理>
"
+
data
.
\ No newline at end of file
admin-console/src/main/resources/static/js/admin/function/index.js
View file @
30e90259
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this
.
initSearchForm
();
this
.
initSearchForm
();
this
.
initToolBar
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#functionSearchForm
"
),
functionTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#functionSearchForm
"
),
functionTable
)
}
}
...
...
admin-console/src/main/resources/static/js/admin/menu/index.js
View file @
30e90259
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this
.
initSearchForm
();
this
.
initSearchForm
();
this
.
initToolBar
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#menuSearchForm
"
),
menuTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#menuSearchForm
"
),
menuTable
)
}
}
...
...
admin-console/src/main/resources/static/js/admin/org/index.js
View file @
30e90259
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this
.
initSearchForm
();
this
.
initSearchForm
();
this
.
initToolBar
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#orgSearchForm
"
),
userTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#orgSearchForm
"
),
userTable
)
}
}
...
...
admin-console/src/main/resources/static/js/admin/role/index.js
View file @
30e90259
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -10,7 +10,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
this
.
initSearchForm
();
this
.
initSearchForm
();
this
.
initToolBar
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
roleTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
roleTable
)
}
}
...
...
admin-console/src/main/resources/static/js/admin/user/index.js
View file @
30e90259
...
@@ -12,7 +12,7 @@ layui.define([ 'form', 'laydate', 'table','userApi' ], function(exports) {
...
@@ -12,7 +12,7 @@ layui.define([ 'form', 'laydate', 'table','userApi' ], function(exports) {
this
.
initSearchForm
();
this
.
initSearchForm
();
this
.
initToolBar
();
this
.
initToolBar
();
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
userTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
userTable
)
}
}
...
...
admin-console/src/main/resources/static/js/admin/user/userRole.js
View file @
30e90259
...
@@ -16,7 +16,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -16,7 +16,7 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
Lib
.
closeFrame
();
Lib
.
closeFrame
();
});
});
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#userRoleSearchForm
"
),
userRoleTable
,
form
)
Lib
.
doSearchForm
(
$
(
"
#userRoleSearchForm
"
),
userRoleTable
)
}
}
},
},
...
...
admin-console/src/main/resources/templates/admin/blog/add.html
deleted
100644 → 0
View file @
28497287
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/blog/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
action=
"/admin/blog/save.json"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
title
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"title"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
content
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"content"
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
createTime
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"createTime"
class=
"layui-input"
>
</div>
</div>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
createUserId
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"createUserId"
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
type
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"type"
class=
"layui-input"
>
</div>
</div>
</div>
</div>
<layui:submitButtons
id=
"addButton"
/>
</form>
<!--#} -->
<script>
layui
.
use
([
'
add
'
],
function
(){
var
blogAdd
=
layui
.
add
blogAdd
.
init
();
});
</script>
Prev
1
2
3
4
Next
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