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
af7608e0
Commit
af7608e0
authored
Feb 23, 2018
by
李家智
Browse files
js api
parent
5cc03b91
Changes
20
Show whitespace changes
Inline
Side-by-side
admin-console/src/main/resources/static/js/admin/user/add.js
View file @
af7608e0
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table','userApi'], function(exports) {
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table','userApi'], function(exports) {
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#saveUser
"
).
click
(
function
(){
$
(
"
#saveUser
"
).
click
(
function
(){
userApi
.
addUser
(
function
(){
userApi
.
addUser
(
$
(
'
#addForm
'
),
function
(){
parent
.
window
.
dataReload
();
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
Lib
.
closeFrame
();
...
...
admin-console/src/main/resources/static/js/admin/user/changePassword.js
View file @
af7608e0
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'table','userApi'], function(exports) {
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'table','userApi'], function(exports) {
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#savePassword
"
).
click
(
function
(){
$
(
"
#savePassword
"
).
click
(
function
(){
userApi
.
changePassword
(
function
(){
userApi
.
changePassword
(
$
(
'
#changePasswordForm
'
),
function
(){
Common
.
info
(
"
密码更改成功
"
);
Common
.
info
(
"
密码更改成功
"
);
Lib
.
closeFrame
();
Lib
.
closeFrame
();
});
});
...
...
admin-console/src/main/resources/static/js/admin/user/edit.js
View file @
af7608e0
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table','userApi'], function(exports) {
...
@@ -9,7 +9,7 @@ layui.define([ 'form', 'laydate', 'table','userApi'], function(exports) {
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#saveUser
"
).
click
(
function
(){
$
(
"
#saveUser
"
).
click
(
function
(){
userApi
.
updateUser
(
function
(){
userApi
.
updateUser
(
$
(
'
#updateForm
'
),
function
(){
parent
.
window
.
dataReload
();
parent
.
window
.
dataReload
();
Common
.
info
(
"
更新成功
"
);
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
Lib
.
closeFrame
();
...
...
admin-console/src/main/resources/static/js/admin/user/index.js
View file @
af7608e0
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
],
function
(
exports
)
{
layui
.
define
([
'
form
'
,
'
laydate
'
,
'
table
'
,
'
userApi
'
],
function
(
exports
)
{
var
form
=
layui
.
form
;
var
form
=
layui
.
form
;
var
laydate
=
layui
.
laydate
;
var
laydate
=
layui
.
laydate
;
var
table
=
layui
.
table
;
var
table
=
layui
.
table
;
var
userApi
=
layui
.
userApi
;
var
userTable
=
null
;
var
userTable
=
null
;
var
view
=
{
var
view
=
{
init
:
function
(){
init
:
function
(){
...
...
admin-console/src/main/resources/static/js/admin/user/userApi.js
View file @
af7608e0
/*访问后台的代码*/
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
var
api
=
{
updateUser
:
function
(
callback
){
updateUser
:
function
(
form
,
callback
)
{
Lib
.
submitForm
(
$
(
'
#updateForm
'
),
{},
callback
)
Lib
.
submitForm
(
"
/admin/user/update.json
"
,
form
,
{},
callback
)
},
},
addUser
:
function
(
callback
){
addUser
:
function
(
form
,
callback
)
{
Lib
.
submitForm
(
$
(
'
#addForm
'
),
{},
callback
)
Lib
.
submitForm
(
"
/admin/user/add.json
"
,
form
,
{},
callback
)
},
},
del
:
function
(
ids
,
callback
){
del
:
function
(
ids
,
callback
)
{
Common
.
post
(
"
/admin/user/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
Common
.
post
(
"
/admin/user/delete.json
"
,
{
"
ids
"
:
ids
},
function
()
{
callback
();
callback
();
})
})
},
},
changePassword
:
function
(
callback
){
changePassword
:
function
(
form
,
callback
)
{
Lib
.
submitForm
(
$
(
'
#changePasswordForm
'
),{},
callback
)
Lib
.
submitForm
(
"
/admin/user/changePassword.json
"
,
form
,
{},
callback
)
},
},
addUserRole
:
function
(
form
,
callback
){
addUserRole
:
function
(
form
,
callback
)
{
Lib
.
submitForm
(
form
,{},
callback
)
Lib
.
submitForm
(
"
/admin/user/role/add.json
"
,
form
,
{},
callback
)
},
},
delUserRole
:
function
(
ids
,
callback
){
delUserRole
:
function
(
ids
,
callback
)
{
Common
.
post
(
"
/admin/user/role/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
Common
.
post
(
"
/admin/user/role/delete.json
"
,
{
"
ids
"
:
ids
},
function
()
{
callback
();
callback
();
})
})
},
},
};
};
exports
(
'
userApi
'
,
api
);
exports
(
'
userApi
'
,
api
);
});
});
\ No newline at end of file
admin-console/src/main/resources/templates/admin/user/add.html
View file @
af7608e0
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
action=
"/admin/user/add.json"
>
>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
用户姓名
</label>
<label
class=
"layui-form-label"
>
用户姓名
</label>
...
...
admin-console/src/main/resources/templates/admin/user/changePassword.html
View file @
af7608e0
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"changePasswordForm"
<form
class=
"layui-form layui-form-pane"
id=
"changePasswordForm"
action=
"/admin/user/changePassword.json"
>
>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
用户姓名
</label>
<label
class=
"layui-form-label"
>
用户姓名
</label>
...
...
admin-console/src/main/resources/templates/admin/user/edit.html
View file @
af7608e0
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
action=
"/admin/user/update.json"
>
>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
用户姓名
</label>
<label
class=
"layui-form-label"
>
用户姓名
</label>
...
...
admin-console/src/main/resources/templates/admin/user/userRoleAdd.html
View file @
af7608e0
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<!--# layout("/common/layout.html",{"jsBase":"/js/admin/user/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"userRoleAddForm"
<form
class=
"layui-form layui-form-pane"
id=
"userRoleAddForm"
action=
"/admin/user/role/add.json"
>
>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
...
...
admin-core/src/main/resources/codeTemplate/html/add.html
View file @
af7608e0
<!--# layout("/common/layout.html",{"jsBase":"/js/${target.urlBase}/${entity.code}/"}){ -->
<!--# layout("/common/layout.html",{"jsBase":"/js/${target.urlBase}/${entity.code}/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
<form
class=
"layui-form layui-form-pane"
id=
"addForm"
>
action=
"/${target.urlBase}/${entity.code}/add.json"
>
@ var list = entity.generalList;
@ var list = entity.generalList;
@ var size = list.~size; /*一行显示俩个,生成后在根据显示要求调整*/
@ var size = list.~size; /*一行显示俩个,生成后在根据显示要求调整*/
@ for(var i=0;i
<size
;
i
++){
@ for(var i=0;i
<size
;
i
++){
...
...
admin-core/src/main/resources/codeTemplate/html/edit.html
View file @
af7608e0
<!--# layout("/common/layout.html",{"jsBase":"/js/${target.urlBase}/${entity.code}/"}){ -->
<!--# layout("/common/layout.html",{"jsBase":"/js/${target.urlBase}/${entity.code}/"}){ -->
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
<form
class=
"layui-form layui-form-pane"
id=
"updateForm"
>
action=
"/${target.urlBase}/${entity.code}/update.json"
>
@ var list = entity.generalList;
@ var list = entity.generalList;
@ var size = list.~size; /*一行显示俩个,生成后在根据显示要求调整*/
@ var size = list.~size; /*一行显示俩个,生成后在根据显示要求调整*/
@ for(var i=0;i
<size
;
i
++){
@ for(var i=0;i
<size
;
i
++){
...
@@ -13,7 +12,6 @@
...
@@ -13,7 +12,6 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
@for(item in array){
@for(item in array){
@if(item==null){continue;}
@if(item==null){continue;}
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
${item.displayName}
</label>
<label
class=
"layui-form-label"
>
${item.displayName}
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
...
@@ -21,10 +19,8 @@
...
@@ -21,10 +19,8 @@
class=
"layui-input"
>
class=
"layui-input"
>
</div>
</div>
</div>
</div>
@}
@}
</div>
</div>
</div>
</div>
@}
@}
<input
type=
"hidden"
name=
"${entity.idAttribute.name}"
value=
\${${entity.code}.${entity.idAttribute.name}}
/>
<input
type=
"hidden"
name=
"${entity.idAttribute.name}"
value=
\${${entity.code}.${entity.idAttribute.name}}
/>
...
@@ -37,5 +33,4 @@ layui.use(['edit'], function(){
...
@@ -37,5 +33,4 @@ layui.use(['edit'], function(){
var
$
{
entity
.
code
}
Edit
=
layui
.
edit
var
$
{
entity
.
code
}
Edit
=
layui
.
edit
$
{
entity
.
code
}
Edit
.
init
();
$
{
entity
.
code
}
Edit
.
init
();
});
});
</script>
</script>
admin-core/src/main/resources/codeTemplate/js/add.js
View file @
af7608e0
...
@@ -9,13 +9,11 @@ layui.define([ 'form', 'laydate', 'table','${entity.code}Api'], function(exports
...
@@ -9,13 +9,11 @@ layui.define([ 'form', 'laydate', 'table','${entity.code}Api'], function(exports
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
$
(
"
#addButton
"
).
click
(
function
(){
$
{
entity
.
code
}
Api
.
add$
{
upperFirst
(
entity
.
code
)}(
function
(){
$
{
entity
.
code
}
Api
.
add$
{
upperFirst
(
entity
.
code
)}(
$
(
'
#addForm
'
),
function
(){
parent
.
window
.
dataReload
();
parent
.
window
.
dataReload
();
Common
.
info
(
"
添加成功
"
);
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
Lib
.
closeFrame
();
});
});
});
});
$
(
"
#addButton-cancel
"
).
click
(
function
(){
$
(
"
#addButton-cancel
"
).
click
(
function
(){
...
...
admin-core/src/main/resources/codeTemplate/js/del.js
View file @
af7608e0
...
@@ -3,7 +3,6 @@ layui.define(['table', '${entity.code}Api'], function(exports) {
...
@@ -3,7 +3,6 @@ layui.define(['table', '${entity.code}Api'], function(exports) {
var
table
=
layui
.
table
;
var
table
=
layui
.
table
;
var
view
=
{
var
view
=
{
init
:
function
(){
init
:
function
(){
},
},
delBatch
:
function
(){
delBatch
:
function
(){
var
data
=
Common
.
getMoreDataFromTable
(
table
,
"
${entity.code}Table
"
);
var
data
=
Common
.
getMoreDataFromTable
(
table
,
"
${entity.code}Table
"
);
...
@@ -17,9 +16,7 @@ layui.define(['table', '${entity.code}Api'], function(exports) {
...
@@ -17,9 +16,7 @@ layui.define(['table', '${entity.code}Api'], function(exports) {
dataReload
();
dataReload
();
})
})
})
})
}
}
}
}
exports
(
'
del
'
,
view
);
exports
(
'
del
'
,
view
);
...
...
admin-core/src/main/resources/codeTemplate/js/edit.js
View file @
af7608e0
...
@@ -9,24 +9,17 @@ layui.define([ 'form', 'laydate', 'table','${entity.code}Api'], function(exports
...
@@ -9,24 +9,17 @@ layui.define([ 'form', 'laydate', 'table','${entity.code}Api'], function(exports
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
$
(
"
#updateButton
"
).
click
(
function
(){
$
{
entity
.
code
}
Api
.
update$
{
upperFirst
(
entity
.
code
)}(
function
(){
$
{
entity
.
code
}
Api
.
update$
{
upperFirst
(
entity
.
code
)}(
$
(
'
#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-core/src/main/resources/codeTemplate/js/entityApi.js
View file @
af7608e0
/*访问后台的代码*/
/*访问后台的代码*/
layui
.
define
([],
function
(
exports
)
{
layui
.
define
([],
function
(
exports
)
{
var
api
=
{
var
api
=
{
update$
{
upperFirst
(
entity
.
code
)}:
function
(
callback
){
update$
{
upperFirst
(
entity
.
code
)}:
function
(
form
,
callback
){
Lib
.
submitForm
(
$
(
'
#updateF
orm
'
)
,{},
callback
)
Lib
.
submitForm
(
"
/${target.urlBase}/${entity.code}/update.json
"
,
f
orm
,{},
callback
)
},
},
add$
{
upperFirst
(
entity
.
code
)}:
function
(
callback
){
add$
{
upperFirst
(
entity
.
code
)}:
function
(
form
,
callback
){
Lib
.
submitForm
(
$
(
'
#addF
orm
'
)
,{},
callback
)
Lib
.
submitForm
(
"
/${target.urlBase}/${entity.code}/add.json
"
,
f
orm
,{},
callback
)
},
},
del
:
function
(
ids
,
callback
){
del
:
function
(
ids
,
callback
){
Common
.
post
(
"
/${target.urlBase}/${entity.code}/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
Common
.
post
(
"
/${target.urlBase}/${entity.code}/delete.json
"
,{
"
ids
"
:
ids
},
function
(){
...
@@ -14,7 +14,5 @@ layui.define([], function(exports) {
...
@@ -14,7 +14,5 @@ layui.define([], function(exports) {
}
}
};
};
exports
(
'
${entity.code}Api
'
,
api
);
exports
(
'
${entity.code}Api
'
,
api
);
});
});
\ No newline at end of file
admin-core/src/main/resources/codeTemplate/js/index.js
View file @
af7608e0
...
@@ -4,7 +4,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -4,7 +4,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
var
table
=
layui
.
table
;
var
table
=
layui
.
table
;
var
$
{
entity
.
code
}
Table
=
null
;
var
$
{
entity
.
code
}
Table
=
null
;
var
view
=
{
var
view
=
{
init
:
function
(){
init
:
function
(){
this
.
initTable
();
this
.
initTable
();
this
.
initSearchForm
();
this
.
initSearchForm
();
...
@@ -12,18 +11,16 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -12,18 +11,16 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
window
.
dataReload
=
function
(){
window
.
dataReload
=
function
(){
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
$
{
entity
.
code
}
Table
,
form
)
Lib
.
doSearchForm
(
$
(
"
#searchForm
"
),
$
{
entity
.
code
}
Table
,
form
)
}
}
},
},
initTable
:
function
(){
initTable
:
function
(){
$
{
entity
.
code
}
Table
=
table
.
render
({
$
{
entity
.
code
}
Table
=
table
.
render
({
elem
:
'
#${entity.code}Table
'
,
elem
:
'
#${entity.code}Table
'
,
height
:
Lib
.
getTableHeight
(
1
),
height
:
Lib
.
getTableHeight
(
1
),
method
:
'
post
'
,
method
:
'
post
'
,
url
:
Common
.
CTX
+
'
/${target.urlBase}/${entity.code}/list.json
'
//数据接口
url
:
Common
.
CTX
+
'
/${target.urlBase}/${entity.code}/list.json
'
//
数据接口
,
page
:
Lib
.
tablePage
//开启分页
,
page
:
Lib
.
tablePage
//
开启分页
,
limit
:
10
,
,
limit
:
10
,
cols
:
[
[
//表头
cols
:
[
[
//
表头
{
{
type
:
'
checkbox
'
,
type
:
'
checkbox
'
,
fixed
:
'
left
'
,
fixed
:
'
left
'
,
...
@@ -32,7 +29,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -32,7 +29,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
{
{
field
:
'
${attr.name}
'
,
field
:
'
${attr.name}
'
,
title
:
'
${attr.displayName}
'
,
title
:
'
${attr.displayName}
'
,
@
if
(
attrLP
.
first
){
@
if
(
attrLP
.
first
){
fixed
:
'
left
'
,
fixed
:
'
left
'
,
@}
@}
...
@@ -55,18 +51,17 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -55,18 +51,17 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
},
},
initToolBar
:
function
(){
initToolBar
:
function
(){
toolbar
=
{
toolbar
=
{
add
:
function
()
{
//获取选中数据
add
:
function
()
{
//
获取选中数据
var
url
=
"
/${target.urlBase}/${entity.code}/add.do
"
;
var
url
=
"
/${target.urlBase}/${entity.code}/add.do
"
;
Common
.
openDlg
(
url
,
"
${entity.displayName}管理>新增
"
);
Common
.
openDlg
(
url
,
"
${entity.displayName}管理>新增
"
);
},
},
edit
:
function
()
{
//获取选中数目
edit
:
function
()
{
//
获取选中数目
var
data
=
Common
.
getOneFromTable
(
table
,
"
${entity.code}Table
"
);
var
data
=
Common
.
getOneFromTable
(
table
,
"
${entity.code}Table
"
);
if
(
data
==
null
){
if
(
data
==
null
){
return
;
return
;
}
}
var
url
=
"
/${target.urlBase}/${entity.code}/edit.do?${entity.idAttribute.name}=
"
+
data
.
$
{
entity
.
idAttribute
.
name
};
var
url
=
"
/${target.urlBase}/${entity.code}/edit.do?${entity.idAttribute.name}=
"
+
data
.
$
{
entity
.
idAttribute
.
name
};
Common
.
openDlg
(
url
,
"
${entity.displayName}管理>
"
+
data
.
$
{
entity
.
nameAttribute
.
name
}
+
"
>编辑
"
);
Common
.
openDlg
(
url
,
"
${entity.displayName}管理>
"
+
data
.
$
{
entity
.
nameAttribute
.
name
}
+
"
>编辑
"
);
},
},
del
:
function
()
{
del
:
function
()
{
layui
.
use
([
'
del
'
],
function
(){
layui
.
use
([
'
del
'
],
function
(){
...
@@ -74,8 +69,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -74,8 +69,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
delView
.
delBatch
();
delView
.
delBatch
();
});
});
}
}
};
};
$
(
'
.ext-toolbar
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.ext-toolbar
'
).
on
(
'
click
'
,
function
()
{
var
type
=
$
(
this
).
data
(
'
type
'
);
var
type
=
$
(
this
).
data
(
'
type
'
);
...
@@ -83,7 +76,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
...
@@ -83,7 +76,6 @@ layui.define([ 'form', 'laydate', 'table' ], function(exports) {
});
});
}
}
}
}
exports
(
'
index
'
,
view
);
exports
(
'
index
'
,
view
);
});
});
\ No newline at end of file
admin-core/src/main/resources/static/js/lib.js
View file @
af7608e0
...
@@ -192,11 +192,18 @@ var Lib = {
...
@@ -192,11 +192,18 @@ var Lib = {
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
// 先得到当前iframe层的索引
var
index
=
parent
.
layer
.
getFrameIndex
(
window
.
name
);
// 先得到当前iframe层的索引
parent
.
layer
.
close
(
index
);
// 再执行关闭
parent
.
layer
.
close
(
index
);
// 再执行关闭
},
},
/*不再使用,因为没有提供url*/
submitForm
:
function
(
form
,
paras
,
callBack
)
{
submitForm
:
function
(
form
,
paras
,
callBack
)
{
var
url
=
form
.
attr
(
"
action
"
);
var
url
=
form
.
attr
(
"
action
"
);
var
formPara
=
form
.
serializeJson
();
var
formPara
=
form
.
serializeJson
();
Common
.
post
(
url
,
formPara
,
callBack
);
Common
.
post
(
url
,
formPara
,
callBack
);
},
submitForm
:
function
(
url
,
form
,
paras
,
callBack
)
{
var
formPara
=
form
.
serializeJson
();
Common
.
post
(
url
,
formPara
,
callBack
);
},
},
getTableHeight
:
function
(
queryLine
)
{
getTableHeight
:
function
(
queryLine
)
{
// 表格相对高度
// 表格相对高度
...
...
admin-core/src/main/resources/templates/core/codeGen/edit.html
View file @
af7608e0
<!--# layout("/common/layout.html",{"jsBase":"/js/core/codeGen/"}){ -->
<!--# layout("/common/layout.html",{"jsBase":"/js/core/codeGen/"}){ -->
<div
class=
"layui-btn-group"
>
<div
class=
"layui-btn-group"
>
<button
class=
"layui-btn ext-toolbar"
data-type=
"html"
>
预览HTML
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"js"
>
预览JS
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"js"
>
预览JS
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"java"
>
预览Java
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"java"
>
预览Java
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"sql"
>
预览SQL
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"sql"
>
预览SQL
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"html"
>
预览HTML
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"gen"
>
立即生成
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"gen"
>
立即生成
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"cancel"
>
取消
</button>
<button
class=
"layui-btn ext-toolbar"
data-type=
"cancel"
>
取消
</button>
</div>
</div>
...
...
doc/readme/codegen.png
View replaced file @
5cc03b91
View file @
af7608e0
356 KB
|
W:
|
H:
79.3 KB
|
W:
|
H:
2-up
Swipe
Onion skin
doc/readme/codegen2.png
View replaced file @
5cc03b91
View file @
af7608e0
334 KB
|
W:
|
H:
94.8 KB
|
W:
|
H:
2-up
Swipe
Onion skin
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