提交 bd829f52 authored 作者: ww1xhqc's avatar ww1xhqc

[数据模型] 业务对象不存xml

上级 86e7b200
......@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.servlet.mvc.support.DefaultHandlerExceptionResolver;
import java.sql.SQLSyntaxErrorException;
/**
* 错误处理类
......@@ -57,5 +59,12 @@ public class GlobalExceptionHandler {
return ResultUtil.failed("字段长度错误,请修改为合适的长度!");
}
@ExceptionHandler(SQLSyntaxErrorException.class)
public ResponseEntity handleSQl(InvalidFormatException invalidFormatException){
log.warn(invalidFormatException.toString());
return ResultUtil.failed("列名不合法,请修改列名!");
}
}
......@@ -153,11 +153,9 @@ public class ModelController {
@ApiOperation("编辑操作")
@PutMapping("/update")
public ResponseEntity updateTable(@RequestBody UpdateTableInfoVO updateTableInfoVO) {
long start = System.currentTimeMillis();
int i = modelService.updateTable(updateTableInfoVO);
if (i == 1) {
long end = System.currentTimeMillis();
log.warn("创建总用时为:{}秒", (end - start) / 1000.0);
return ResultUtil.success("", "修改成功!");
}
return ResultUtil.success("业务类型不支持修改!");
......
......@@ -25,7 +25,7 @@ import java.io.Serializable;
@Data
@NoArgsConstructor
@Entity
@Table(name = "workflow_column_info")
@Table
public class ColumnInfo extends BaseEntity {
/**
......
......@@ -22,7 +22,7 @@ import java.io.Serializable;
*/
@WorkFlowCoreNoScan
@Entity
@Table(name = "workflow_table_info")
@Table
@EntityListeners(AuditingEntityListener.class)
@Data
@SQLDelete(sql = "update table_info set deleted = 1 where id = ?")
......
......@@ -142,7 +142,7 @@ public class ModelImpl implements ModelService {
**/
@Override
public TableInfo newTable(TableVO tableVO) {
String xmlMapping = createTable(tableVO);
// String xmlMapping = createTable(tableVO);
Integer modelType = tableVO.getModelType();
String parentTable = null;
//扫描新建类型
......@@ -152,13 +152,13 @@ public class ModelImpl implements ModelService {
} else {
tableVO.setModelType(ModelType.BUSINESS);
}
sessionUtil.addXml(xmlMapping);
// sessionUtil.addXml(xmlMapping);
Session session = sessionUtil.getSession();
List<ColumnVO> dataList = tableVO.getDataList();
TableInfo tableInfo = new TableInfo();
tableInfo.setModelName(tableVO.getModelName());
tableInfo.setModelTitle(tableVO.getModelTitle());
tableInfo.setXml(xmlMapping);
// tableInfo.setXml(xmlMapping);
tableInfo.setModelType(tableVO.getModelType());
tableInfo.setDescription(tableVO.getDescription());
tableInfo.setParentTable(parentTable);
......@@ -175,6 +175,7 @@ public class ModelImpl implements ModelService {
columnInfo.setDescription(columnVO.getDescription());
columnInfo.setDbName(tableInfo.getModelName());
columnInfo.setDbId(tableInfo.getId());
columnInfo.setPrimaryKey(columnVO.getPrimaryKey());
columnInfoDao.save(columnInfo);
}
......@@ -321,7 +322,6 @@ public class ModelImpl implements ModelService {
java.lang.reflect.Type genericType;
List<ColumnVO> list = new ArrayList<>();
ColumnVO primaryColumn = new ColumnVO();
;
List<ColumnVO> otherColumns = new ArrayList<>();
for (Field declaredField : declaredFields) {
// ColumnVO columnVO = new ColumnVO();
......@@ -332,6 +332,7 @@ public class ModelImpl implements ModelService {
genericType = declaredField.getGenericType();
//是否主键
if (declaredField.isAnnotationPresent(javax.persistence.Id.class)) {
primaryColumn.setPrimaryKey(0);
primaryColumn.setFieldType(getTypeName(genericType.toString()));
primaryColumn.setFieldName(getClassName(declaredField.toString()));
......@@ -352,7 +353,9 @@ public class ModelImpl implements ModelService {
primaryColumn.setFieldTitle("(无描述)");
}
} else {
ColumnVO otherColumn = new ColumnVO();
otherColumn.setPrimaryKey(1);
otherColumn.setFieldType(getTypeName(genericType.toString()));
otherColumn.setFieldName(getClassName(declaredField.toString()));
otherColumn.setFieldLength(setLength(genericType.toString()));
......@@ -382,7 +385,7 @@ public class ModelImpl implements ModelService {
list.addAll(otherColumns);
tableVO.setDataList(list);
//扫描的xml
String xml = createTable(tableVO.getModelName(),tableName, primaryColumn, otherColumns);
String xml = createTable(tableVO.getModelName(), primaryColumn, otherColumns);
tableInfo.setModelName(tableVO.getModelName());
tableInfo.setModelTitle(tableVO.getModelTitle());
tableInfo.setXml(xml);
......@@ -479,9 +482,9 @@ public class ModelImpl implements ModelService {
tableInfo.setDescription(tableVO.getDescription());
tableInfo.setModelTitle(tableVO.getModelTitle());
tableInfo.setModelType(tableVO.getModelType());
String xml = createTable(tableVO);
// String xml = createTable(tableVO);
//重新存xml
tableInfo.setXml(xml);
// tableInfo.setXml(xml);
tableInfoDao.save(tableInfo);
//原来的字段信息
......@@ -518,6 +521,7 @@ public class ModelImpl implements ModelService {
for (ColumnInfo originColumnInfo : columnsFordDelete) {
columnInfoDao.delete(originColumnInfo);
}
return 1;
}
if (modelType.equals(ModelType.BASICS_EXTENSION)) {
......@@ -537,8 +541,9 @@ public class ModelImpl implements ModelService {
//重新存xml
// tableInfo.setXml(xml);
tableInfoDao.save(tableInfo);
return 1;
}
return 1;
return 0;
}
/**
......
......@@ -75,7 +75,7 @@ public class CreateTableUtil {
}
public static String createTable(String entityName,String tableName,ColumnVO primaryColumn,List<ColumnVO> dataList) {
public static String createTable(String entityName,ColumnVO primaryColumn,List<ColumnVO> dataList) {
// 1sql-type="text" string 转为text文本,2长度超过会自动转换
// List<ColumnVO> dataList = tableVO.getDataList();
String xmlMapping = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
......@@ -83,9 +83,9 @@ public class CreateTableUtil {
" \"-//Hibernate/Hibernate Mapping DTD 3.0//EN\"\n" +
" \"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd\">\n" +
"<hibernate-mapping>\n" +
" <class entity-name=\"" + entityName + "\" table=\"" + tableName + "\">\n";
" <class entity-name=\"" + entityName + "\" table=\"" + entityName + "\">\n";
xmlMapping += " <id name=\""+primaryColumn.getFieldName()+"\" type=\""+primaryColumn.getFieldType()+"\" length=\"" + primaryColumn.getFieldLength()+"\" unsaved-value=\"null\" >\n" +
xmlMapping += " <id name=\""+primaryColumn.getFieldName()+"\" type=\""+primaryColumn.getFieldType()+"\" unsaved-value=\"null\" >\n" +
" </id>";
......@@ -95,7 +95,6 @@ public class CreateTableUtil {
// "\n <property type=\"" + columnVO.getFieldType() + "\" name=\"" + columnVO.getFieldName() +
// "\" column=\"" + columnVO.getFieldName() + "\"/>\n";
xmlMapping +=
"\n <property type=\"" + columnVO.getFieldType() + "\" name=\"" + columnVO.getFieldName() + "\" length=\"" + columnVO.getFieldLength() +
"\" column=\"" + columnVO.getFieldName() + "\"/>\n";
......
package com.tykj.workflowcore.model_layer.utils;
import com.google.common.base.Strings;
import com.tykj.workflowcore.model_layer.dao.TableInfoDao;
import com.tykj.workflowcore.model_layer.entity.TableInfo;
import org.checkerframework.checker.units.qual.A;
......@@ -51,7 +52,9 @@ public class SessionUtil {
List<TableInfo> all = tableInfoDao.findAll();
for (TableInfo tableInfo : all) {
String xml = tableInfo.getXml();
addXml(xml);
if (!Strings.isNullOrEmpty(xml)){
addXml(xml);
}
}
}
......
.dataModelManage[data-v-14a5e2e0] .el-form-item__label{font-size:20px}.main[data-v-14a5e2e0]{height:calc(100% - 134px);background-color:#fff}.searchBar[data-v-14a5e2e0] .el-form-item{margin-bottom:0}.searchBar[data-v-14a5e2e0] .el-form-item__content{line-height:0}.searchBar[data-v-14a5e2e0] .el-input__inner,.searchBar[data-v-14a5e2e0] .el-select .el-input__inner{background:#f9fafd;border:2px solid #ebedf1;font-size:20px;color:#a1a8ba}.searchBar[data-v-14a5e2e0] .el-input__inner:focus{background-color:#fdfdfd;border:1px solid #a8b0e2;font-size:20px;color:#35435e}.searchBar[data-v-14a5e2e0]{background-color:#fff;width:100%;height:84px;-webkit-box-shadow:0 2px 4px rgba(42,61,179,.1);box-shadow:0 2px 4px rgba(42,61,179,.1);border-radius:4px;margin-bottom:20px;padding-left:34px;-webkit-box-sizing:border-box;box-sizing:border-box}.border-wrap[data-v-14a5e2e0],.searchBar[data-v-14a5e2e0]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.border-wrap[data-v-14a5e2e0]{margin-top:20px}.addProcessDialog[data-v-14a5e2e0] .el-input__inner,.addProcessDialog[data-v-14a5e2e0] .el-textarea__inner{font-size:20px;background-color:#f9fafd}.operation span[data-v-14a5e2e0]{font-size:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;width:50px;display:inline-block}.operation span[data-v-14a5e2e0]:first-child{color:#2a3db3}.operation span[data-v-14a5e2e0]:nth-child(2){margin:0 20px}.operation span[data-v-14a5e2e0]:nth-child(3){color:#f25742}.disableSpan[data-v-14a5e2e0]{color:#fe7001}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
.main[data-v-c6d7b26a]{background-color:#fff;height:100%}
\ No newline at end of file
.processManage[data-v-1177992f] .el-form-item__label{font-size:20px}.topDiv[data-v-1177992f]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;cursor:pointer}.title[data-v-1177992f]{font-size:22px;color:#35435e;font-weight:700;margin-bottom:20px}.addProcess[data-v-1177992f]{font-size:18px;color:#2a3db3;border:1px solid #2a3db3;width:136px;height:36px;border-radius:18px;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;background-color:#fff}.main[data-v-1177992f]{height:calc(100% - 134px);background-color:#fff}.searchBar[data-v-1177992f] .el-form-item{margin-bottom:0}.searchBar[data-v-1177992f] .el-form-item__content{line-height:0}.searchBar[data-v-1177992f] .el-input__inner,.searchBar[data-v-1177992f] .el-select .el-input__inner{background:#f9fafd;border:2px solid #ebedf1;font-size:20px;color:#a1a8ba}.searchBar[data-v-1177992f] .el-input__inner:focus{background-color:#fdfdfd;border:1px solid #a8b0e2;font-size:20px;color:#35435e}.searchBar[data-v-1177992f]{background-color:#fff;width:100%;height:84px;-webkit-box-shadow:0 2px 4px rgba(42,61,179,.1);box-shadow:0 2px 4px rgba(42,61,179,.1);border-radius:4px;margin-bottom:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-left:34px;-webkit-box-sizing:border-box;box-sizing:border-box}.searchBtn[data-v-1177992f]{width:120px;height:40px;font-size:20px;color:#fff;background-color:#2a3db3;border:none;cursor:pointer;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:4px}.searchBtn[data-v-1177992f]:nth-child(2){background-color:#f9fafd;color:#394b6b;border:2px solid #e8eaf0;cursor:pointer;margin-left:20px}.searchBtn[data-v-1177992f]:nth-child(2):hover{background-color:#eef1f9}.addBtn[data-v-1177992f]{width:120px;height:40px;font-size:20px;color:#fff;background-color:#2a3db3;border:none;cursor:pointer;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;margin-left:20px}.addBtn[data-v-1177992f]:first-child{background-color:#f9fafd;color:#394b6b;border:2px solid #e8eaf0;cursor:pointer}.addProcessDialog[data-v-1177992f] .el-input__inner,.addProcessDialog[data-v-1177992f] .el-textarea__inner{font-size:20px;background-color:#f9fafd}.operation span[data-v-1177992f]{font-size:20px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;width:50px;display:inline-block}.operation span[data-v-1177992f]:first-child{color:#2a3db3}.operation span[data-v-1177992f]:nth-child(2){margin:0 50px}.operation span[data-v-1177992f]:nth-child(3){color:#f25742}.disableSpan[data-v-1177992f]{color:#fe7001}
\ No newline at end of file
.searchBar[data-v-6e96ae30]{background-color:#fff;width:100%;height:84px;-webkit-box-shadow:0 2px 4px rgba(42,61,179,.1);box-shadow:0 2px 4px rgba(42,61,179,.1);border-radius:4px;padding-left:34px;-webkit-box-sizing:border-box;box-sizing:border-box}.addOutsideTableDialog[data-v-6e96ae30] .el-dialog__header,.searchBar[data-v-6e96ae30]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.addOutsideTableDialog[data-v-6e96ae30] .el-dialog__header{background:#e0e8ff;height:36px;padding:10px}.addOutsideTableDialog[data-v-6e96ae30] .el-dialog__header>.el-dialog__title{font-size:22px;color:#35435e;font-weight:700;margin-left:30px}.addOutsideTableDialog[data-v-6e96ae30] .el-dialog__header>.el-dialog__headerbtn>i{border-radius:50%;background:#2a3db3;color:#fff;font-size:22px}.addProcessDialog[data-v-6e96ae30] .el-input__inner,.addProcessDialog[data-v-6e96ae30] .el-textarea__inner{font-size:20px;background-color:#f9fafd}.ty_padding_left_right[data-v-6e96ae30]{padding:0 36px}.checkModel[data-v-6e96ae30]{width:100%;height:60px;display:-webkit-box;display:-ms-flexbox;display:flex}.ty_lable[data-v-6e96ae30]{font-size:20px;color:#606266;line-height:60px;white-space:nowrap}.checkModel_select[data-v-6e96ae30]{-webkit-box-flex:1;-ms-flex:1;flex:1;height:36px;margin-top:10px;padding-left:16px;padding-right:6px}.checkModel_select[data-v-6e96ae30] .el-select{width:100%;height:40px;background:#f9fafd;border:2px solid #ebedf1;font-size:20px;color:#a1a8ba;border-radius:3px}.checkModel_select[data-v-6e96ae30] .el-select .el-input__inner{border:0;font-size:20px}.check_byte[data-v-6e96ae30]{display:-webkit-box;display:-ms-flexbox;display:flex}.table_wrap[data-v-6e96ae30]{width:calc(100% - 40px);-webkit-box-flex:1;-ms-flex:1;flex:1;margin-top:0;padding-left:16px}.addDataModel[data-v-e207b756]{height:100%}.addDataModel[data-v-e207b756] .el-form-item__label{font-size:20px}.searchBar[data-v-e207b756] .el-col{margin:10px 0}.searchBar[data-v-e207b756] .el-form-item{margin-bottom:0}.searchBar[data-v-e207b756] .el-form-item__content{line-height:0}.searchBar[data-v-e207b756] .el-input__inner,.searchBar[data-v-e207b756] .el-select .el-input__inner{background:#f9fafd;border:2px solid #ebedf1;font-size:20px;color:#a1a8ba}.searchBar[data-v-e207b756] .el-input__inner:focus{background-color:#fdfdfd;border:1px solid #a8b0e2;font-size:20px;color:#35435e}.searchBar[data-v-e207b756]{background-color:#fff;width:100%;height:160px;-webkit-box-shadow:0 2px 4px rgba(42,61,179,.1);box-shadow:0 2px 4px rgba(42,61,179,.1);border-radius:4px;margin-bottom:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box}.basicObject[data-v-e207b756]{font-size:20px;color:#606266;line-height:40px;display:-webkit-box;display:-ms-flexbox;display:flex}.basicObject_input[data-v-e207b756]{position:relative;width:60%;margin-left:10px}.basicObject_input input[data-v-e207b756]{width:98%;background:#f9fafd;border:2px solid #ebedf1;font-size:20px;color:#a1a8ba;height:37px;line-height:37px;border-radius:3px;margin:0;padding-left:16px}.basicObject_input input.active.focus[data-v-e207b756],.basicObject_input input.active[data-v-e207b756]:focus,.basicObject_input input.focus[data-v-e207b756],.basicObject_input input:active.focus[data-v-e207b756],.basicObject_input input[data-v-e207b756]:active:focus,.basicObject_input input[data-v-e207b756]:focus{outline:none;border-color:#ebedf1;-webkit-box-shadow:none;box-shadow:none}.icon_more[data-v-e207b756]{background:#fff;right:-13px}.icon-circle-close[data-v-e207b756],.icon_more[data-v-e207b756]{font-size:20px;width:37px;height:36px;border:0;color:#606266;position:absolute;cursor:pointer;top:3px;border-radius:3px}.icon-circle-close[data-v-e207b756]{background:transparent;right:36px}.icon_more.active.focus[data-v-e207b756],.icon_more.active[data-v-e207b756]:focus,.icon_more.focus[data-v-e207b756],.icon_more:active.focus[data-v-e207b756],.icon_more[data-v-e207b756]:active:focus,.icon_more[data-v-e207b756]:focus{outline-color:#2a3db3;outline-width:1px;-webkit-box-shadow:none;box-shadow:none}.ty_span_name[data-v-e207b756]{font-size:20px;line-height:40px;color:#a1a8ba}
\ No newline at end of file
.homePage>.el-container[data-v-711b69ae],.homePage[data-v-711b69ae],.homePage[data-v-711b69ae] .el-aside{height:100%}.homePage[data-v-711b69ae] .menu{height:100%;width:100%;background-color:#2a3db3}.homePage .title[data-v-711b69ae]{width:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-bottom:34px}.homePage .title span[data-v-711b69ae]{font-size:35px;font-weight:700;color:#fff;text-align:center;margin:44px 0}.homePage .menuItem[data-v-711b69ae]{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.homePage .menuItem[data-v-711b69ae],.ItemDiv[data-v-711b69ae]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ItemDiv[data-v-711b69ae]{width:228px;height:56px;border-radius:8px;margin:0;margin-bottom:20px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.itemDivAct[data-v-711b69ae]{background-color:#fff}.itemDivAct .ItemSpanAct[data-v-711b69ae]{color:#35435e}.ItemImg[data-v-711b69ae]{margin-left:20px;margin-right:10px}.ItemSpan[data-v-711b69ae]{font-size:20px;color:#d7dbe3}.header[data-v-711b69ae]{width:100%;height:100px!important;padding:0!important;background-color:#f3f2f7}.header>div[data-v-711b69ae]{width:100%;height:56px;background-color:#fff;-webkit-box-shadow:0 2px 4px rgba(42,61,179,.1);box-shadow:0 2px 4px rgba(42,61,179,.1);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.ty_return[data-v-711b69ae]{display:inline-block;margin-right:40px;color:#2a3db3!important;cursor:pointer}.main[data-v-711b69ae]{background-color:#f3f2f7;padding:12px 32px 32px;height:100%;-webkit-box-sizing:border-box;box-sizing:border-box;height:94%;-webkit-box-shadow:0 2px 4px rgba(42,61,179,.1);box-shadow:0 2px 4px rgba(42,61,179,.1);border-radius:4px}.main[data-v-711b69ae] .el-table .cell{font-size:18px;color:#35435e;line-height:36px;text-align:center}.main[data-v-711b69ae] .el-table th{background-color:#dde1f3}.main[data-v-711b69ae] .el-table th>.cell{text-align:center;font-size:16px;background-color:#dde1f3;color:#65728a}.main[data-v-711b69ae] .el-dialog__header{background:#e0e8ff;height:36px;padding:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.main[data-v-711b69ae] .el-dialog__header>.el-dialog__title{font-size:22px;color:#35435e;font-weight:700;margin-left:30px}.main[data-v-711b69ae] .el-dialog__header>.el-dialog__headerbtn>i{border-radius:50%;background:#2a3db3;color:#fff;font-size:22px}.main[data-v-711b69ae] .el-table td{border-bottom:1px solid #e7ebfc}.main[data-v-711b69ae] .el-table tr:hover{background-color:#fcfcfd}.time[data-v-711b69ae]{height:80px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.time span[data-v-711b69ae]{font-size:18px;color:#65728a;margin-left:34px}
\ No newline at end of file
<!doctype html><html lang="zh"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=0,maximum-scale=0,user-scalable=yes,shrink-to-fit=no"><link rel="icon" href="favicon.ico"><title>form-generator</title><style>.pre-loader{position:absolute;top:calc(50% - 32px);left:calc(50% - 32px);width:64px;height:64px;border-radius:50%;perspective:800px}.pre-loader .inner{position:absolute;box-sizing:border-box;width:100%;height:100%;border-radius:50%}.pre-loader .inner.one{left:0;top:0;-webkit-animation:rotate-one 1s linear infinite;animation:rotate-one 1s linear infinite;border-bottom:3px solid #bc9048}.pre-loader .inner.two{right:0;top:0;-webkit-animation:rotate-two 1s linear infinite;animation:rotate-two 1s linear infinite;border-right:3px solid #74aeff}.pre-loader .inner.three{right:0;bottom:0;-webkit-animation:rotate-three 1s linear infinite;animation:rotate-three 1s linear infinite;border-top:3px solid #caef74}@keyframes rotate-one{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0);transform:rotateX(35deg) rotateY(-45deg) rotateZ(0)}100%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg);transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@keyframes rotate-two{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(0);transform:rotateX(50deg) rotateY(10deg) rotateZ(0)}100%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg);transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@keyframes rotate-three{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(0);transform:rotateX(35deg) rotateY(55deg) rotateZ(0)}100%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg);transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}</style><link href="https://lib.baomitu.com/element-ui/2.13.2/theme-chalk/index.css" rel="stylesheet"><link href="https://lib.baomitu.com/monaco-editor/0.19.3/min/vs/editor/editor.main.css" rel="stylesheet"><script src="https://lib.baomitu.com/vue/2.6.11/vue.min.js"></script><script src="https://lib.baomitu.com/vue-router/3.1.3/vue-router.min.js"></script><script src="https://lib.baomitu.com/element-ui/2.13.2/index.js"></script><link href="css/chunk-1cb74270.df914389.css" rel="prefetch"><link href="css/chunk-2073d156.c465d3db.css" rel="prefetch"><link href="css/chunk-7c2866c4.7b2248cd.css" rel="prefetch"><link href="css/chunk-7c52297c.61b80532.css" rel="prefetch"><link href="css/chunk-b5da06ba.7a6ae39b.css" rel="prefetch"><link href="css/chunk-cf704b6c.88ae3788.css" rel="prefetch"><link href="css/chunk-e449bc78.2eef857d.css" rel="prefetch"><link href="css/parser-home.53fe4753.css" rel="prefetch"><link href="css/tinymce-example.0e433876.css" rel="prefetch"><link href="js/chunk-1cb74270.2f2d988b.js" rel="prefetch"><link href="js/chunk-2073d156.841cd6cc.js" rel="prefetch"><link href="js/chunk-7c2866c4.dccd339b.js" rel="prefetch"><link href="js/chunk-7c52297c.c0a80b51.js" rel="prefetch"><link href="js/chunk-b5da06ba.6d3fd328.js" rel="prefetch"><link href="js/chunk-cf704b6c.61cc1cc8.js" rel="prefetch"><link href="js/chunk-e449bc78.f5c7b876.js" rel="prefetch"><link href="js/chunk-fec0be80.0583a8a1.js" rel="prefetch"><link href="js/parser-home.4f810414.js" rel="prefetch"><link href="js/tinymce-example.0cafa1e6.js" rel="prefetch"><link href="css/index.a25a2b8f.css" rel="preload" as="style"><link href="js/chunk-vendors.b6d9e7af.js" rel="preload" as="script"><link href="js/index.95019dd8.js" rel="preload" as="script"><link href="css/index.a25a2b8f.css" rel="stylesheet"></head><body><noscript><strong>抱歉,javascript被禁用,请开启后重试。</strong></noscript><div id="app"></div><div class="pre-loader" id="pre-loader"><div class="inner one"></div><div class="inner two"></div><div class="inner three"></div></div><script src="js/chunk-vendors.b6d9e7af.js"></script><script src="js/index.95019dd8.js"></script></body></html>
\ No newline at end of file
<!doctype html><html lang="zh"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=0,maximum-scale=0,user-scalable=yes,shrink-to-fit=no"><link rel="icon" href="favicon.ico"><title>workFlow</title><style>.pre-loader{position:absolute;top:calc(50% - 32px);left:calc(50% - 32px);width:64px;height:64px;border-radius:50%;perspective:800px}.pre-loader .inner{position:absolute;box-sizing:border-box;width:100%;height:100%;border-radius:50%}.pre-loader .inner.one{left:0;top:0;-webkit-animation:rotate-one 1s linear infinite;animation:rotate-one 1s linear infinite;border-bottom:3px solid #bc9048}.pre-loader .inner.two{right:0;top:0;-webkit-animation:rotate-two 1s linear infinite;animation:rotate-two 1s linear infinite;border-right:3px solid #74aeff}.pre-loader .inner.three{right:0;bottom:0;-webkit-animation:rotate-three 1s linear infinite;animation:rotate-three 1s linear infinite;border-top:3px solid #caef74}@keyframes rotate-one{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(0);transform:rotateX(35deg) rotateY(-45deg) rotateZ(0)}100%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg);transform:rotateX(35deg) rotateY(-45deg) rotateZ(360deg)}}@keyframes rotate-two{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(0);transform:rotateX(50deg) rotateY(10deg) rotateZ(0)}100%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg);transform:rotateX(50deg) rotateY(10deg) rotateZ(360deg)}}@keyframes rotate-three{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(0);transform:rotateX(35deg) rotateY(55deg) rotateZ(0)}100%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg);transform:rotateX(35deg) rotateY(55deg) rotateZ(360deg)}}</style><link href="https://lib.baomitu.com/element-ui/2.13.2/theme-chalk/index.css" rel="stylesheet"><link href="https://lib.baomitu.com/monaco-editor/0.19.3/min/vs/editor/editor.main.css" rel="stylesheet"><script src="https://lib.baomitu.com/vue/2.6.11/vue.min.js"></script><script src="https://lib.baomitu.com/vue-router/3.1.3/vue-router.min.js"></script><script src="https://lib.baomitu.com/element-ui/2.13.2/index.js"></script><link href="css/chunk-3490531b.f21179c2.css" rel="prefetch"><link href="css/chunk-61bf0148.dfa0bf94.css" rel="prefetch"><link href="css/chunk-79a2a6d4.f7ea5f40.css" rel="prefetch"><link href="css/chunk-7c52297c.61b80532.css" rel="prefetch"><link href="css/chunk-8214a130.1828ab11.css" rel="prefetch"><link href="css/chunk-b5da06ba.7a6ae39b.css" rel="prefetch"><link href="css/chunk-d7adda04.ef613c84.css" rel="prefetch"><link href="css/parser-home.137a6b9f.css" rel="prefetch"><link href="css/tinymce-example.0e433876.css" rel="prefetch"><link href="js/chunk-3490531b.dccf3627.js" rel="prefetch"><link href="js/chunk-61bf0148.806d1258.js" rel="prefetch"><link href="js/chunk-79a2a6d4.b1d5b12d.js" rel="prefetch"><link href="js/chunk-7c52297c.c0a80b51.js" rel="prefetch"><link href="js/chunk-8214a130.971aff55.js" rel="prefetch"><link href="js/chunk-b5da06ba.6d3fd328.js" rel="prefetch"><link href="js/chunk-d7adda04.cddad5a4.js" rel="prefetch"><link href="js/chunk-fec0be80.0583a8a1.js" rel="prefetch"><link href="js/parser-home.8d475fe7.js" rel="prefetch"><link href="js/tinymce-example.0cafa1e6.js" rel="prefetch"><link href="css/index.b75d9c3c.css" rel="preload" as="style"><link href="js/chunk-vendors.b6d9e7af.js" rel="preload" as="script"><link href="js/index.c1637e00.js" rel="preload" as="script"><link href="css/index.b75d9c3c.css" rel="stylesheet"></head><body><noscript><strong>抱歉,javascript被禁用,请开启后重试。</strong></noscript><div id="app"></div><div class="pre-loader" id="pre-loader"><div class="inner one"></div><div class="inner two"></div><div class="inner three"></div></div><script src="js/chunk-vendors.b6d9e7af.js"></script><script src="js/index.c1637e00.js"></script></body></html>
\ No newline at end of file
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1cb74270"],{"45e8":function(e,t,a){"use strict";a.r(t);var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"dataModelManage",staticStyle:{height:"100%"}},[a("div",{staticClass:"topDiv"},[a("span",{staticClass:"title"},[e._v("数据模型管理")]),a("button",{staticClass:"addProcess",on:{click:function(t){return e.$router.push({path:"addDataModel"})}}},[e._v(" 新建模型 ")])]),a("div",{staticClass:"searchBar"},[a("el-form",{ref:"form",staticStyle:{width:"100%"},attrs:{model:e.searchForm,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"标签"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:e.searchForm.modelTitle,callback:function(t){e.$set(e.searchForm,"modelTitle",t)},expression:"searchForm.modelTitle"}})],1)],1),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"名称"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入"},model:{value:e.searchForm.modelName,callback:function(t){e.$set(e.searchForm,"modelName",t)},expression:"searchForm.modelName"}})],1)],1),a("el-col",{attrs:{span:12}},[a("el-form-item",[a("button",{staticClass:"searchBtn button_ty",on:{click:e.searchData}},[e._v(" 查询 ")]),a("button",{staticClass:"button_ty",on:{click:e.reset}},[e._v("重置")])])],1)],1)],1)],1),a("div",{staticClass:"main"},[a("el-table",{staticStyle:{width:"100%",height:"calc(100% - 70px)"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{prop:"modelName",label:"名称"}}),a("el-table-column",{attrs:{prop:"modelTitle",label:"标签"}}),a("el-table-column",{attrs:{label:"类型",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",[0==t.row.modelType?a("span",{staticStyle:{color:"orange"}},[e._v("基础对象")]):e._e(),1==t.row.modelType?a("span",{staticStyle:{color:"#2a3bd3"}},[e._v("业务对象")]):e._e(),2==t.row.modelType?a("span",{staticStyle:{color:"yellowgreen"}},[e._v("基础对象(延伸)")]):e._e()])]}}])}),a("el-table-column",{attrs:{prop:"createdTime",label:"创建时间"}}),a("el-table-column",{attrs:{prop:"updatedTime",label:"最后修改时间"}}),a("el-table-column",{attrs:{prop:"description",label:"描述"}}),a("el-table-column",{attrs:{label:"操作",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("div",{staticClass:"operation"},[a("span",{on:{click:function(a){return e.editTable(t.row)}}},[e._v("编辑")]),a("span",{staticStyle:{color:"red"},on:{click:function(a){return e.deleteTable(t.row)}}},[e._v("删除")])])]}}])})],1),a("el-pagination",{staticStyle:{"text-align":"right","margin-right":"20px","margin-top":"30px"},attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.pageSize},on:{"current-change":e.pageChange}})],1)])},o=[],s=(a("a4d3"),a("e01a"),a("5530")),n={name:"dataModelManage",data:function(){return{addDialogVisible2:!1,updateDialogVisible:!1,searchForm:{modelTitle:"",modelName:""},addProcessDialog:!1,pageSize:9,total:0,nowPage:0,tableData:[],tableForm:{}}},created:function(){this.getAllModel()},methods:{getAllModel:function(){var e=this,t=Object(s["a"])(Object(s["a"])({page:this.nowPage,size:this.pageSize},this.searchForm),{},{orders:[{coulmn:"updatedTime",direction:"DESC"}]});this.$axios.getAllEntity(t).then((function(t){e.total=t.data.data.totalElements,e.tableData=t.data.data.content})).catch((function(e){console.log(e.response)}))},getDate:function(e){var t=new Date(e),a=t.getFullYear()+"-",l=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",o=t.getDate()<10?"0"+t.getDate():t.getDate(),s=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",n=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",i=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return a+l+o+" "+s+n+i},searchData:function(){this.getAllModel()},reset:function(){this.searchForm={tableCnName:"",tableName:""},this.getAllModel()},pageChange:function(e){this.nowPage=e-1,this.getAllModel()},editTable:function(e){var t=e.modelName,a=e.modelTitle,l=e.modelType,o=e.parentTable,s=e.description,n=e.id,i={id:n,modelName:t,modelTitle:a,modelType:l,parentTable:o,description:s};sessionStorage.setItem("ty_model",JSON.stringify(i)),this.$router.push({path:"addDataModel",query:{tableId:e.id}})},deleteTable:function(e){var t=this;this.$confirm("此操作将永久删除该模型, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(a){var l={id:e.id,dbName:e.modelName};t.$axios.deleteModel(l).then((function(e){console.log(e),t.getAllModel(),t.$message({message:e.data.message,type:"success"})})).catch((function(e){t.$message.error(e.response.data.data)}))})).catch((function(){t.$message({type:"info",message:"已取消删除"})}))}}},i=n,r=(a("7e1a"),a("2877")),c=Object(r["a"])(i,l,o,!1,null,"14a5e2e0",null);t["default"]=c.exports},"7e1a":function(e,t,a){"use strict";a("ce4c")},ce4c:function(e,t,a){}}]);
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论