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
befe06b8
Commit
befe06b8
authored
Mar 16, 2018
by
ykb
Browse files
生成代码功能添加前端校验
parent
59e6416d
Changes
19
Hide whitespace changes
Inline
Side-by-side
admin-console/src/main/resources/static/js/admin/function/add.js
View file @
befe06b8
...
@@ -9,12 +9,13 @@ layui.define([ 'form', 'laydate', 'table','functionApi'], function(exports) {
...
@@ -9,12 +9,13 @@ layui.define([ 'form', 'laydate', 'table','functionApi'], function(exports) {
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#saveFunction
"
).
click
(
function
(){
$
(
"
#saveFunction
"
).
click
(
function
(){
functionApi
.
addFunction
(
function
(){
form
.
on
(
'
submit(form)
'
,
function
(){
Common
.
info
(
"
添加成功
"
);
functionApi
.
addFunction
(
function
(){
Lib
.
closeFrame
();
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
parent
.
window
.
dataReload
();
});
});
parent
.
window
.
dataReload
();
});
});
$
(
"
#saveFunction-cancel
"
).
click
(
function
(){
$
(
"
#saveFunction-cancel
"
).
click
(
function
(){
...
...
admin-console/src/main/resources/static/js/admin/function/edit.js
View file @
befe06b8
...
@@ -9,12 +9,13 @@ layui.define([ 'form', 'laydate', 'table','functionApi'], function(exports) {
...
@@ -9,12 +9,13 @@ layui.define([ 'form', 'laydate', 'table','functionApi'], function(exports) {
},
},
initSubmit
:
function
(){
initSubmit
:
function
(){
$
(
"
#saveFunction
"
).
click
(
function
(){
$
(
"
#saveFunction
"
).
click
(
function
(){
functionApi
.
updateFunction
(
function
(){
form
.
on
(
'
submit(form)
'
,
function
(){
Common
.
info
(
"
更新成功
"
);
functionApi
.
updateFunction
(
function
(){
Lib
.
closeFrame
();
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
parent
.
window
.
dataReload
();
});
});
parent
.
window
.
dataReload
();
});
});
$
(
"
#saveFunction-cancel
"
).
click
(
function
(){
$
(
"
#saveFunction-cancel
"
).
click
(
function
(){
...
...
admin-console/src/main/resources/templates/admin/function/add.html
View file @
befe06b8
...
@@ -5,14 +5,14 @@
...
@@ -5,14 +5,14 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能名
</label>
<label
class=
"layui-form-label"
>
功能名
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
autocomplete=
"off"
<input
type=
"text"
name=
"name"
autocomplete=
"off"
lay-verify=
"required"
placeholder=
"请输入名称"
class=
"layui-input"
value=
""
>
placeholder=
"请输入名称"
class=
"layui-input"
value=
""
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能代码
</label>
<label
class=
"layui-form-label"
>
功能代码
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"code"
lay-verify=
"required"
<input
type=
"text"
name=
"code"
lay-verify=
"required"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
placeholder=
"请输入"
autocomplete=
"off"
class=
"layui-input"
value=
""
>
value=
""
>
</div>
</div>
...
...
admin-console/src/main/resources/templates/admin/function/edit.html
View file @
befe06b8
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
功能名
</label>
<label
class=
"layui-form-label"
>
功能名
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"name"
autocomplete=
"off"
<input
type=
"text"
name=
"name"
autocomplete=
"off"
lay-verify=
"required"
placeholder=
"请输入标题"
class=
"layui-input"
value=
"${function.name}"
>
placeholder=
"请输入标题"
class=
"layui-input"
value=
"${function.name}"
>
</div>
</div>
</div>
</div>
...
...
admin-core/src/main/java/com/ibeetl/admin/core/gen/BaseTarget.java
View file @
befe06b8
...
@@ -8,6 +8,8 @@ import org.beetl.core.Function;
...
@@ -8,6 +8,8 @@ import org.beetl.core.Function;
import
org.beetl.core.GroupTemplate
;
import
org.beetl.core.GroupTemplate
;
import
org.beetl.core.resource.ClasspathResourceLoader
;
import
org.beetl.core.resource.ClasspathResourceLoader
;
import
com.ibeetl.admin.core.util.beetl.VerifyForamtFunction
;
public
abstract
class
BaseTarget
implements
Target
{
public
abstract
class
BaseTarget
implements
Target
{
protected
GroupTemplate
gt
=
null
;
protected
GroupTemplate
gt
=
null
;
...
@@ -36,6 +38,7 @@ public abstract class BaseTarget implements Target {
...
@@ -36,6 +38,7 @@ public abstract class BaseTarget implements Target {
cfg
.
setStatementEnd
(
null
);
cfg
.
setStatementEnd
(
null
);
cfg
.
setHtmlTagSupport
(
false
);
cfg
.
setHtmlTagSupport
(
false
);
gt
=
new
GroupTemplate
(
rs
,
cfg
);
gt
=
new
GroupTemplate
(
rs
,
cfg
);
gt
.
registerFunction
(
"verifyFormat"
,
new
VerifyForamtFunction
());
gt
.
registerFunction
(
"upperFirst"
,
new
Function
()
{
gt
.
registerFunction
(
"upperFirst"
,
new
Function
()
{
@Override
@Override
...
...
admin-core/src/main/java/com/ibeetl/admin/core/gen/model/Attribute.java
View file @
befe06b8
package
com.ibeetl.admin.core.gen.model
;
package
com.ibeetl.admin.core.gen.model
;
import
java.util.ArrayList
;
import
java.util.List
;
public
class
Attribute
{
public
class
Attribute
{
private
String
name
;
private
String
name
;
private
String
colName
;
private
String
colName
;
...
@@ -10,6 +13,8 @@ public class Attribute {
...
@@ -10,6 +13,8 @@ public class Attribute {
//数据字典
//数据字典
private
String
dictType
;
private
String
dictType
;
private
String
comment
;
private
String
comment
;
//校验对象
private
List
<
Verify
>
verifyList
=
new
ArrayList
<>();
public
Attribute
()
{
public
Attribute
()
{
...
@@ -66,5 +71,11 @@ public class Attribute {
...
@@ -66,5 +71,11 @@ public class Attribute {
public
void
setDictType
(
String
dictType
)
{
public
void
setDictType
(
String
dictType
)
{
this
.
dictType
=
dictType
;
this
.
dictType
=
dictType
;
}
}
public
List
<
Verify
>
getVerifyList
()
{
return
verifyList
;
}
public
void
setVerifyList
(
List
<
Verify
>
verifyList
)
{
this
.
verifyList
=
verifyList
;
}
}
}
admin-core/src/main/java/com/ibeetl/admin/core/gen/model/Entity.java
View file @
befe06b8
...
@@ -9,7 +9,6 @@ public class Entity {
...
@@ -9,7 +9,6 @@ public class Entity {
String
code
;
String
code
;
String
displayName
;
String
displayName
;
ArrayList
<
Attribute
>
list
=
new
ArrayList
<
Attribute
>();
ArrayList
<
Attribute
>
list
=
new
ArrayList
<
Attribute
>();
Attribute
[]
temp
=
null
;
Attribute
idAttribute
;
Attribute
idAttribute
;
Attribute
nameAttribute
;
Attribute
nameAttribute
;
String
comment
;
String
comment
;
...
@@ -76,13 +75,6 @@ public class Entity {
...
@@ -76,13 +75,6 @@ public class Entity {
this
.
comment
=
comment
;
this
.
comment
=
comment
;
}
}
public
Attribute
[]
getTemp
()
{
return
temp
;
}
public
void
setTemp
(
Attribute
[]
temp
)
{
this
.
temp
=
temp
;
}
public
List
<
Attribute
>
getGeneralList
(){
public
List
<
Attribute
>
getGeneralList
(){
List
<
Attribute
>
newList
=
new
ArrayList
<
Attribute
>();
List
<
Attribute
>
newList
=
new
ArrayList
<
Attribute
>();
for
(
Attribute
attr:
list
)
{
for
(
Attribute
attr:
list
)
{
...
...
admin-core/src/main/java/com/ibeetl/admin/core/gen/model/Verify.java
0 → 100644
View file @
befe06b8
package
com.ibeetl.admin.core.gen.model
;
/**
* 添加表单属性的校验
*/
public
class
Verify
{
private
String
name
;
//校验规则名称
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
admin-core/src/main/java/com/ibeetl/admin/core/util/beetl/VerifyForamtFunction.java
0 → 100644
View file @
befe06b8
package
com.ibeetl.admin.core.util.beetl
;
import
java.util.List
;
import
org.beetl.core.Context
;
import
org.beetl.core.Function
;
import
com.ibeetl.admin.core.gen.model.Verify
;
/**
* 格式化校验集合
*/
public
class
VerifyForamtFunction
implements
Function
{
@Override
public
String
call
(
Object
[]
arg0
,
Context
arg1
)
{
StringBuilder
sb
=
new
StringBuilder
(
""
);
if
(
arg0
[
0
]
instanceof
List
){
List
<
Verify
>
list
=
(
List
)
arg0
[
0
];
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
Verify
verify
=
list
.
get
(
i
);
if
(
i
<
list
.
size
()
-
1
){
sb
.
append
(
verify
.
getName
()+
"|"
);
}
else
{
sb
.
append
(
verify
.
getName
());
}
}
}
return
sb
.
toString
();
}
}
admin-core/src/main/java/com/ibeetl/admin/core/web/CoreCodeGenController.java
View file @
befe06b8
...
@@ -318,10 +318,12 @@ public class CoreCodeGenController {
...
@@ -318,10 +318,12 @@ public class CoreCodeGenController {
attr
.
setDisplayName
(
info
.
getList
().
get
(
i
).
getDisplayName
());
attr
.
setDisplayName
(
info
.
getList
().
get
(
i
).
getDisplayName
());
attr
.
setShowInQuery
(
info
.
getList
().
get
(
i
).
isShowInQuery
());
attr
.
setShowInQuery
(
info
.
getList
().
get
(
i
).
isShowInQuery
());
attr
.
setDictType
(
info
.
getList
().
get
(
i
).
getDictType
());
attr
.
setDictType
(
info
.
getList
().
get
(
i
).
getDictType
());
attr
.
setVerifyList
(
info
.
getList
().
get
(
i
).
getVerifyList
());
if
(
attr
.
getName
().
equals
(
data
.
getNameAttr
()))
{
if
(
attr
.
getName
().
equals
(
data
.
getNameAttr
()))
{
entity
.
setNameAttribute
(
attr
);
entity
.
setNameAttribute
(
attr
);
}
}
}
}
if
(
StringUtils
.
isEmpty
(
entity
.
getCode
())
||
StringUtils
.
isEmpty
(
entity
.
getSystem
()))
{
if
(
StringUtils
.
isEmpty
(
entity
.
getCode
())
||
StringUtils
.
isEmpty
(
entity
.
getSystem
()))
{
throw
new
PlatformException
(
"code,system不能为空"
);
throw
new
PlatformException
(
"code,system不能为空"
);
}
}
...
...
admin-core/src/main/resources/codeTemplate/html/add.html
View file @
befe06b8
...
@@ -17,10 +17,10 @@
...
@@ -17,10 +17,10 @@
<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"
>
@if(isEmpty(item.dictType)){
@if(isEmpty(item.dictType)){
<input
type=
"text"
name=
"${item.name}"
class=
"layui-input"
>
<input
type=
"text"
name=
"${item.name}"
class=
"layui-input"
${
isNotEmpty
(
item.verifyList
)?('
lay-verify=
"'+verifyFormat(item.verifyList)+'"
')
:
''}
>
@}else{
@}else{
<layui:simpleDictSelect
style=
'layui-input-inline'
type=
"${item.dictType}"
<layui:simpleDictSelect
style=
'layui-input-inline'
type=
"${item.dictType}"
layVerify=
"${verifyFormat(item.verifyList)}"
id=
"${item.name}"
name=
"${item.name}"
value=
""
/>
id=
"${item.name}"
name=
"${item.name}"
value=
""
/>
@}
@}
</div>
</div>
</div>
</div>
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
@if(entity.attachment){
@if(entity.attachment){
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<!-- 业务对象得有一个字段保存附件id,假设是attachmentId -->
<!-- 业务对象得有一个字段保存附件id,假设是attachmentId -->
<layui:attachment
name=
"attachmentId"
batchFileUUID=
"\${uuid()}"
bizType=
"entity.name"
isNew=
"true"
/>
<layui:attachment
name=
"attachmentId"
batchFileUUID=
"\${uuid()}"
bizType=
"entity.name"
isNew=
"true"
layVerify=
"${verifyFormat(item.verifyList)}"
/>
</div>
</div>
@}
@}
<layui:submitButtons
id=
"addButton"
/>
<layui:submitButtons
id=
"addButton"
/>
...
...
admin-core/src/main/resources/codeTemplate/html/edit.html
View file @
befe06b8
...
@@ -16,11 +16,10 @@
...
@@ -16,11 +16,10 @@
<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"
>
@if(isEmpty(item.dictType)){
@if(isEmpty(item.dictType)){
<input
type=
"text"
id=
"${item.name}"
name=
"${item.name}"
value=
"\${${entity.code}.${item.name}}"
<input
type=
"text"
id=
"${item.name}"
name=
"${item.name}"
value=
"\${${entity.code}.${item.name}}"
${
isNotEmpty
(
item.verifyList
)?('
lay-verify=
"'+verifyFormat(item.verifyList)+'"
')
:
''}
class=
"layui-input"
>
class=
"layui-input"
>
@}else{
@}else{
<layui:simpleDictSelect
style=
'layui-input-inline'
type=
"${item.dictType}"
<layui:simpleDictSelect
style=
'layui-input-inline'
type=
"${item.dictType}"
id=
"${item.name}"
name=
"${item.name}"
value=
"\${${entity.code}.${item.name}}"
/>
id=
"${item.name}"
name=
"${item.name}"
value=
"\${${entity.code}.${item.name}}"
layVerify=
"${verifyFormat(item.verifyList)}"
/>
@}
@}
</div>
</div>
</div>
</div>
...
@@ -34,7 +33,7 @@
...
@@ -34,7 +33,7 @@
<layui:attachment
name=
"attachmentId"
batchFileUUID=
"\${${entity.code}.attachmentId}"
isNew=
"false"
bizId=
"\${${entity.code}.${entity.idAttribute.name}}"
bizType=
"${entity.name}"
/>
<layui:attachment
name=
"attachmentId"
batchFileUUID=
"\${${entity.code}.attachmentId}"
isNew=
"false"
bizId=
"\${${entity.code}.${entity.idAttribute.name}}"
bizType=
"${entity.name}"
/>
</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}}
${
isNotEmpty
(
item.verifyList
)?('
lay-verify=
"'+verifyFormat(item.verifyList)+'"
')
:
''}
/>
<layui:submitButtons
id=
"updateButton"
/>
<layui:submitButtons
id=
"updateButton"
/>
</form>
</form>
<!--#} -->
<!--#} -->
...
...
admin-core/src/main/resources/codeTemplate/js/add.js
View file @
befe06b8
...
@@ -9,10 +9,12 @@ layui.define([ 'form', 'laydate', 'table','${entity.code}Api'], function(exports
...
@@ -9,10 +9,12 @@ 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
)}(
$
(
'
#addForm
'
),
function
(){
form
.
on
(
'
submit(form)
'
,
function
(){
parent
.
window
.
dataReload
();
$
{
entity
.
code
}
Api
.
add$
{
upperFirst
(
entity
.
code
)}(
$
(
'
#addForm
'
),
function
(){
Common
.
info
(
"
添加成功
"
);
parent
.
window
.
dataReload
();
Lib
.
closeFrame
();
Common
.
info
(
"
添加成功
"
);
Lib
.
closeFrame
();
});
});
});
});
});
...
...
admin-core/src/main/resources/codeTemplate/js/edit.js
View file @
befe06b8
...
@@ -9,16 +9,18 @@ layui.define([ 'form', 'laydate', 'table','${entity.code}Api'], function(exports
...
@@ -9,16 +9,18 @@ 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
)}(
$
(
'
#updateForm
'
),
function
(){
form
.
on
(
'
submit(form)
'
,
function
(){
parent
.
window
.
dataReload
();
$
{
entity
.
code
}
Api
.
update$
{
upperFirst
(
entity
.
code
)}(
$
(
'
#updateForm
'
),
function
(){
Common
.
info
(
"
更新成功
"
);
parent
.
window
.
dataReload
();
Lib
.
closeFrame
();
Common
.
info
(
"
更新成功
"
);
Lib
.
closeFrame
();
});
});
});
});
});
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
$
(
"
#updateButton-cancel
"
).
click
(
function
(){
Lib
.
closeFrame
();
Lib
.
closeFrame
();
});
});
}
}
}
exports
(
'
edit
'
,
view
);
exports
(
'
edit
'
,
view
);
...
...
admin-core/src/main/resources/static/js/core/codeGen/edit.js
View file @
befe06b8
...
@@ -49,6 +49,57 @@ layui.define([ 'form', 'laydate', 'table','codeApi'], function(exports) {
...
@@ -49,6 +49,57 @@ layui.define([ 'form', 'laydate', 'table','codeApi'], function(exports) {
toolbar
[
type
]
?
toolbar
[
type
].
call
(
this
)
:
''
;
toolbar
[
type
]
?
toolbar
[
type
].
call
(
this
)
:
''
;
});
});
$
(
"
.addVerify
"
).
click
(
function
(){
var
_this
=
$
(
this
),
verifyGroup
=
_this
.
parent
(
'
.verifyGroup
'
);
layer
.
open
({
title
:
'
添加校验类型
'
,
content
:
'
<div class="layui-form">
'
+
'
<div class="layui-form-item">
'
+
'
<input type="checkbox" class="verify" title="必填" value="required"/>
'
+
'
<input type="checkbox" class="verify" title="邮箱"value="email" />
'
+
'
<input type="checkbox" class="verify" title="手机" value="phone"/>
'
+
'
</div>
'
+
'
<div class="layui-form-item">
'
+
'
<input type="checkbox" class="verify" title="数字"value="number" />
'
+
'
<input type="checkbox" class="verify" title="日期" value="date"/>
'
+
'
<input type="checkbox" class="verify" title="网址" value="url"/>
'
+
'
</div>
'
+
'
<div class="layui-form-item">
'
+
'
<input type="checkbox" class="verify" title="身份证"value="identity" />
'
+
'
</div>
'
+
'
</div>
'
,
success
:
function
(
layero
,
index
){
//初始化赋值
var
inputs
=
verifyGroup
.
find
(
'
input
'
);
var
verifys
=
$
(
'
.verify
'
);
for
(
var
i
=
0
;
i
<
inputs
.
length
;
i
++
)
{
for
(
var
j
=
0
;
j
<
verifys
.
length
;
j
++
)
{
if
(
inputs
[
i
].
value
==
verifys
[
j
].
value
){
$
(
verifys
[
j
]).
attr
(
"
checked
"
,
true
);
}
}
}
form
.
render
();
},
yes
:
function
(
index
,
layero
){
var
verifys
=
$
(
'
.verify:checked
'
);
//清空并重新赋值
verifyGroup
.
find
(
'
.verifybtn
'
).
remove
();
for
(
var
i
=
0
;
i
<
verifys
.
length
;
i
++
)
{
var
name
=
'
entity.list[
'
+
verifyGroup
.
data
(
'
index
'
)
+
'
].verifyList
'
+
'
[
'
+
i
+
'
].name
'
;
var
btn
=
'
<button class="layui-btn layui-btn-xs verifybtn" type="button" >
'
+
$
(
verifys
[
i
]).
attr
(
'
title
'
)
+
'
<input type="text" name="
'
+
name
+
'
" value="
'
+
$
(
verifys
[
i
]).
val
()
+
'
" hidden>
'
+
'
</button>
'
verifyGroup
.
append
(
btn
);
}
layer
.
close
(
index
);
}
});
});
},
},
openCode
:
function
(
data
){
openCode
:
function
(
data
){
...
...
admin-core/src/main/resources/templates/common/tag/attachment.tag.html
View file @
befe06b8
...
@@ -9,7 +9,7 @@ var files = (isNew=="true")?[]:core.file(batchFileUUID);
...
@@ -9,7 +9,7 @@ var files = (isNew=="true")?[]:core.file(batchFileUUID);
-->
-->
<div
class=
"layui-upload"
>
<div
class=
"layui-upload"
>
<input
type=
"hidden"
name=
"${name}"
value=
"${batchFileUUID}"
/>
<input
type=
"hidden"
name=
"${name}"
value=
"${batchFileUUID}"
${
isNotEmpty
(
layVerify
)?('
lay-verify=
"'+layVerify+'"
')
:
''}
/>
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
<button
type=
"button"
class=
"layui-btn layui-btn-normal"
id=
"${chooseId}"
>
选择多文件
</button>
id=
"${chooseId}"
>
选择多文件
</button>
...
...
admin-core/src/main/resources/templates/common/tag/simpleDictSelect.tag.html
View file @
befe06b8
...
@@ -19,11 +19,10 @@ if(has(readonly)){
...
@@ -19,11 +19,10 @@ if(has(readonly)){
}
}
-->
-->
<input
type=
"text"
class=
"layui-input input-readonly"
value=
"${selectedDict.name}"
></input>
<input
type=
"text"
class=
"layui-input input-readonly"
value=
"${selectedDict.name}"
></input>
<input
type=
"hidden"
name=
"${name}"
<input
type=
"hidden"
name=
"${name}"
${
isNotEmpty
(
layVerify
)?('
lay-verify=
"'+layVerify+'"
')
:
''}
value=
"${expected}"
></input>
value=
"${expected}"
></input>
<!--#}else{ -->
<!--#}else{ -->
<select
data-group=
"${group!}"
name=
"${name}"
${
has
(
id
)?("
id=
"+id):''}>
<select
data-group=
"${group!}"
name=
"${name}"
${
has
(
id
)?("
id=
"+id):''}
${isNotEmpty(layVerify)?('lay-verify="
'+
layVerify
+'"')
:
''}
>
<option
value=
""
>
请选择
</option>
<option
value=
""
>
请选择
</option>
<!--#
<!--#
var dicts = [];
var dicts = [];
...
...
admin-core/src/main/resources/templates/common/tag/submitButtons.tag.html
View file @
befe06b8
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
style=
"position:absolute;right:10px;bottom:0px;"
>
<div
class=
"layui-form-item"
style=
"position:absolute;right:10px;bottom:0px;"
>
<button
class=
"layui-btn layui-btn-danger"
type=
"button"
id=
"${id}"
>
${text!"保存"}
</button>
<button
class=
"layui-btn layui-btn-danger"
type=
"button"
id=
"${id}"
lay-submit
lay-filter=
"form"
>
${text!"保存"}
</button>
<button
class=
"layui-btn"
type=
"button"
id=
"${id}-cancel"
>
取消
</button>
<button
class=
"layui-btn"
type=
"button"
id=
"${id}-cancel"
>
取消
</button>
</div>
</div>
</div>
</div>
\ No newline at end of file
admin-core/src/main/resources/templates/core/codeGen/edit.html
View file @
befe06b8
...
@@ -13,13 +13,13 @@
...
@@ -13,13 +13,13 @@
<fieldset
class=
"layui-elem-field layui-field-title"
<fieldset
class=
"layui-elem-field layui-field-title"
style=
"margin-top: 30px;"
>
style=
"margin-top: 30px;"
>
<legend>
主
健
字段
</legend>
<legend>
主
键
字段
</legend>
</fieldset>
</fieldset>
<div
class=
"layui-row"
>
<div
class=
"layui-row"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-inline"
>
<div
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
主
健
</label>
<label
class=
"layui-form-label"
>
主
键
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"entity.idAttribute.name"
disable
<input
type=
"text"
name=
"entity.idAttribute.name"
disable
value=
"${entity.idAttribute.name}"
class=
"layui-input"
>
value=
"${entity.idAttribute.name}"
class=
"layui-input"
>
...
@@ -163,6 +163,7 @@
...
@@ -163,6 +163,7 @@
<th>
显示名
</th>
<th>
显示名
</th>
<th>
查询
</th>
<th>
查询
</th>
<th>
字典类型(可选)
</th>
<th>
字典类型(可选)
</th>
<th>
字段校验(可选)
</th>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
@@ -182,6 +183,11 @@
...
@@ -182,6 +183,11 @@
lay-skin=
"primary"
value=
"true"
title=
"作为搜索"
></td>
lay-skin=
"primary"
value=
"true"
title=
"作为搜索"
></td>
<td><input
type=
"text"
name=
"entity.list[${attrLP.index-1}].dictType"
value=
""
<td><input
type=
"text"
name=
"entity.list[${attrLP.index-1}].dictType"
value=
""
class=
"layui-input"
></td>
class=
"layui-input"
></td>
<td>
<div
class=
"layui-btn-container verifyGroup"
data-index=
"${attrLP.index-1}"
>
<div
class=
"layui-btn layui-btn-xs addVerify"
><i
class=
"layui-icon"
>

</i></div>
</div>
</td>
</tr>
</tr>
<!--# } -->
<!--# } -->
</tbody>
</tbody>
...
...
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