动态表单 基础功能完成

yun-zuoyi
wei.peng 7 years ago
parent 0d7e773a49
commit d9214fd746

@ -263,7 +263,7 @@ public class CommonEnumUtil {
// EXPIRE(5, "服务到期", "服务到期_EXPIRE"),
LOCKING(3, "fa cell-fa fa-lock", "锁定"),
ENABLE(1, "fa fa-success cell-fa fa-check", "启用"),
DISABLE(2, "fa fa-disabled cell-fa fa-times-circle", "禁");
DISABLE(2, "fa fa-disabled cell-fa fa-times-circle", "禁");
private int value;
private String code;

@ -747,4 +747,73 @@ public class ImppEnumUtil {
return tmp;
}
}
/**
*
* 1. String
* 2. Number
* 3. Date
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DYN_TABLE_CELL_TYPE {
STRING(1,"String","字符串类型"),
NUMBER(2,"Number","数字类型"),
DATE(3,"Date","时间类型");
private int value;
private String name;
private String description;
DYN_TABLE_CELL_TYPE() {
}
DYN_TABLE_CELL_TYPE(int value, String name, String description) {
this.value = value;
this.name = name;
this.description = description;
}
public int getValue() {
return value;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public static String valueOfCode(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].name;
}
}
return tmp;
}
public static String valueOfDescription(int val) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].description;
}
}
return tmp;
}
public static String codeOfDescription(String code) {
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].name.equals(code)) {
tmp = values()[i].description;
}
}
return tmp;
}
}
}

Loading…
Cancel
Save