提交 84b10ba1 编写于 作者: sq3536's avatar sq3536

tmp

上级 2bd98e51
......@@ -18,9 +18,11 @@
"@fullcalendar/list": "^4.4.0",
"@fullcalendar/timegrid": "^4.4.0",
"@fullcalendar/vue": "^4.4.0",
"@json-editor/json-editor": "^2.5.1",
"@popperjs/core": "^2.4.3",
"async-validator": "^3.3.0",
"axios": "^0.19.1",
"bootstrap-vue": "^2.18.1",
"core-js": "^3.4.4",
"echarts": "^4.6.0",
"element-ui": "^2.13.0",
......
.btn-secondary {
color: black;
background-color: transparent;
border-color: transparent;
}
.form-control {
display: block;
height: calc(1.4em + 0.75rem + 2px);
padding: 0.375rem 0.75rem;
font-size: 13px;
font-weight: 400;
line-height: 1;
}
h3, .h3 {
font-size: 14px;
font-weight: 700;
margin-top: 5px;
}
//.bg-light {
// background-color: #fff!important;
//}
\ No newline at end of file
此差异已折叠。
import AvueComponent from './components/avue-component/avue-component.vue'
import AppAvueCrud from './components/app-avue-crud/app-avue-crud.vue'
import AppFormJson from './components/app-form-json/app-form-json.vue'
import AppTreeselectRefreshview from './components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
export const UserComponent = {
install(v: any, opt: any) {
v.component('avue-component', AvueComponent);
v.component('app-avue-crud', AppAvueCrud);
v.component('app-treeselect-refreshview', AppTreeselectRefreshview);
v.component('app-form-json', AppFormJson);
}
};
\ No newline at end of file
......@@ -35,8 +35,8 @@
</i-col>
<i-col v-show="detailsModel.modelcfg.visible" :style="{}" :sm="{ span: 24, offset: 0 }" :md="{ span: 24, offset: 0 }" :lg="{ span: 24, offset: 0 }" :xl="{ span: 24, offset: 0 }">
<app-form-item name='modelcfg' :itemRules="this.rules().modelcfg" class='' :caption="$t('entities.metamodel.main_form.details.modelcfg')" uiStyle="DEFAULT" :labelWidth="0" :isShowCaption="false" :error="detailsModel.modelcfg.error" :isEmptyCaption="false" labelPos="NONE">
<input-box v-model="data.modelcfg" :textareaId="this.$util.createUUID()" :disabled="detailsModel.modelcfg.disabled" type='textarea' textareaStyle="height:200px;" ></input-box>
<app-form-json v-model="data.modelcfg" data="data" formState="formState" ></app-form-json>
</app-form-item>
</i-col>
......
......@@ -10,6 +10,17 @@
"experimentalDecorators": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"allowJs": true,
"allowUnreachableCode": true,
"strictNullChecks":false,
"noImplicitAny": false,
// 不报告未使用的标签错误。
"allowUnusedLabels": true,
// 以严格模式解析并为每个源文件生成 "use strict"语句
"alwaysStrict": false,
"baseUrl": ".",
"types": [
"webpack-env"
......
package cn.ibizlab.core.lite.extensions.domain;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class DataModel {
private String id;
private String name;
private String factEntity;
private DataObjectModel model;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class DataObjectModel {
private String system;
private LinkedHashMap<String,PropertyModel> objProperties;
private LinkedHashMap<String,DataModel> nestedProperties;
private LinkedHashSet<LayerMapping> layerMappings;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class LayerMapping {
private String parentPropertyName;
private String parentPropertyEntity;
private String parentPropertyField;
private String selfPropertyName;
private String selfPropertyEntity;
private String selfPropertyField;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class PropertyModel {
private String propertyName;
private String system;
private String propertyEntity;
private LinkedHashSet<PropertyMapping> propertyMappings;
}
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class PropertyMapping {
private String joinPropertyName;
private String joinPropertyEntity;
private String joinPropertyField;
private String selfPropertyField;
}
}
package cn.ibizlab.core.lite.extensions.model;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.util.LinkedHashSet;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class DataModel {
@JsonIgnore
@JSONField(serialize = false)
private DataModel parentDataModel;
private String dataModelName;
public String getDataModelName()
{
if(StringUtils.isEmpty(dataModelName))
{
Property property = getFactPorperty();
if(property!=null)
return property.getPropertyName();
}
return dataModelName;
}
private LinkedHashSet<Property> objectProperties = new LinkedHashSet<>();
public void setObjectProperties(LinkedHashSet<Property> objectProperties) {
if(objectProperties!=null) {
objectProperties.forEach(objectPorperty -> objectPorperty.setOwnerDataModel(this));
this.objectProperties = objectProperties;
}
}
private LinkedHashSet<DataModel> nestedDataModels = new LinkedHashSet<>();
public void setNestedDataModels(LinkedHashSet<DataModel> nestedDataModels) {
if(nestedDataModels!=null) {
nestedDataModels.forEach(nestedDataModel -> nestedDataModel.setParentDataModel(this));
this.nestedDataModels = nestedDataModels;
}
}
private LinkedHashSet<LayerMapping> layerMappings = new LinkedHashSet<>();
public void setLayerMappings(LinkedHashSet<LayerMapping> layerMappings)
{
if(layerMappings!=null) {
layerMappings.forEach(layerMapping -> layerMapping.setSelfDataModel(this));
this.layerMappings = layerMappings;
}
}
@JsonIgnore
@JSONField(serialize = false)
public Property getFactPorperty()
{
if(!ObjectUtils.isEmpty(this.getObjectProperties()))
{
return (Property)this.getObjectProperties().toArray()[0];
}
return null;
}
public Property getObjectProperty(String propertyName)
{
if(this.getObjectProperties()!=null&&(!StringUtils.isEmpty(propertyName)))
{
for (Property property:this.getObjectProperties())
if(propertyName.equalsIgnoreCase(property.getPropertyName()))
return property;
}
return null;
}
public DataModel getNestedDataModel(String dataModelName)
{
if(this.getNestedDataModels()!=null&&(!StringUtils.isEmpty(dataModelName)))
{
for (DataModel dataModel:this.getNestedDataModels())
if(dataModelName.equalsIgnoreCase(dataModel.getDataModelName()))
return dataModel;
}
return null;
}
@Override
public String toString() {
return "DataModel{" +
"dataModelName='" + getDataModelName() + '\'' +
", objectProperties=" + getObjectProperties() +
", nestedDataModels=" + getNestedDataModels() +
", layerMappings=" + getLayerMappings() +
"}\r\n";
}
}
package cn.ibizlab.core.lite.extensions.model;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.util.LinkedHashSet;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class LayerMapping {
@JsonIgnore
@JSONField(serialize = false)
private DataModel selfDataModel;
@JsonIgnore
@JSONField(serialize = false)
public String getSelfPropertyName()
{
if(this.getSelfDataModel()!=null)
{
Property property=this.getSelfDataModel().getFactPorperty();
if(property!=null)
return property.getPropertyName();
}
return "";
}
@JsonIgnore
@JSONField(serialize = false)
public String getSelfPropertyEntity()
{
if(this.getSelfDataModel()!=null)
{
Property property=this.getSelfDataModel().getFactPorperty();
if(property!=null)
return property.getPropertyEntity();
}
return "";
}
private String selfPropertyColumn;
@JsonIgnore
@JSONField(serialize = false)
public DataModel getParentDataModel()
{
if(this.getSelfDataModel()!=null)
return this.getSelfDataModel().getParentDataModel();
return null;
}
@JsonIgnore
@JSONField(serialize = false)
public String getParentPropertyName()
{
if(this.getParentDataModel()!=null)
{
Property property=this.getParentDataModel().getFactPorperty();
if(property!=null)
return property.getPropertyName();
}
return "";
}
@JsonIgnore
@JSONField(serialize = false)
public String getParentPropertyEntity()
{
if(this.getParentDataModel()!=null)
{
Property property=this.getParentDataModel().getObjectProperty(this.getParentPropertyName());
if(property!=null)
return property.getPropertyEntity();
}
return "";
}
private String parentPropertyColumn;
@Override
public String toString() {
return "LayerMapping{" +
"selfPropertyName='" + getSelfPropertyName() + '\'' +
", selfPropertyEntity='" + getSelfPropertyEntity() + '\'' +
", selfPropertyColumn='" + getSelfPropertyColumn() + '\'' +
", parentPropertyName='" + getParentPropertyName() + '\'' +
", parentPropertyEntity='" + getParentPropertyEntity() + '\'' +
", parentPropertyColumn='" + getParentPropertyColumn() + '\'' +
"}\r\n";
}
}
package cn.ibizlab.core.lite.extensions.model;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.util.LinkedHashSet;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class Model {
private String id;
private String name;
private String system;
private String factEntity;
private DataModel model;
public static void main(String[] arg)
{
String jsonstr="{\"id\":\"sjmx1\",\"name\":\"一审公诉\",\"system\":\"tyyw2plus\",\"factEntity\":\"T_TYYW_XJ_YSGS_AJ\",\"model\":{\"dataModelName1\":\"案件\",\"objectProperties\":[{\"propertyName\":\"审查起诉表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_XJ_YSGS_AJ\",\"propertyMappings\":[]},{\"propertyName\":\"案情摘要表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_AQZY\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"案件运行表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"AJ_YX_AJ\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"侦查活动监督表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_ZCHDJD\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]},{\"propertyName\":\"审判活动监督表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_SPHDJD\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"审查起诉表\",\"joinPropertyColumn\":\"BMSAH\"}]}],\"nestedDataModels\":[{\"dataModelName\":\"嫌疑人\",\"objectProperties\":[{\"propertyName\":\"嫌疑人一审\",\"system\":\"tyywplus\",\"propertyEntity\":\"T_TYYW_XJ_YSGS_XYR\",\"propertyMappings\":[]},{\"propertyName\":\"自然人历史信息\",\"system\":\"tyywplus\",\"propertyEntity\":\"T_TYYW_GG_ZRRSJLS\",\"propertyMappings\":[{\"selfPropertyColumn\":\"BMSAH\",\"JoinPropertyName1\":\"嫌疑人一审\",\"joinPropertyColumn\":\"BMSAH\"},{\"selfPropertyColumn\":\"ZRRBM\",\"JoinPropertyName1\":\"嫌疑人一审\",\"joinPropertyColumn\":\"ZRRBM\"}]}],\"layerMappings\":[{\"selfPropertyName1\":\"嫌疑人一审\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}],\"nestedDataModels\":[{\"dataModelName\":\"强制措施\",\"objectProperties\":[{\"propertyName\":\"强制措施表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_QZCSQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"强制措施表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"BMSAH\"},{\"selfPropertyName1\":\"强制措施表\",\"selfPropertyColumn\":\"ZRRBM\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"ZRRBM\"}]},{\"dataModelName\":\"留置措施\",\"objectProperties\":[{\"propertyName\":\"留置措施表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_LZCSQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"留置措施表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"BMSAH\"},{\"selfPropertyName1\":\"留置措施表\",\"selfPropertyColumn\":\"ZRRBM\",\"parentPropertyName1\":\"嫌疑人一审\",\"parentPropertyColumn\":\"ZRRBM\"}]}]},{\"dataModelName\":\"受理日志\",\"objectProperties\":[{\"propertyName\":\"受理日志表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"AJ_YX_SLRZ\",\"propertyMappings\":[]}],\"layerMappings\":[{\"selfPropertyName1\":\"受理日志表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}]},{\"dataModelName\":\"线索移交\",\"objectProperties\":[{\"propertyName\":\"线索移交情况表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_XSYJQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"线索移交情况表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}]},{\"dataModelName\":\"检察建议\",\"objectProperties\":[{\"propertyName\":\"检察建议表\",\"system\":\"tyyw2plus\",\"propertyEntity\":\"T_TYYW_GG_JCJYQK\",\"propertyMappings\":[]}],\"nestedDataModels\":[],\"layerMappings\":[{\"selfPropertyName1\":\"检察建议表\",\"selfPropertyColumn\":\"BMSAH\",\"parentPropertyName1\":\"审查起诉表\",\"parentPropertyColumn\":\"BMSAH\"}]}]}}";
JSONObject jo= JSON.parseObject(jsonstr);
Model model=JSONObject.toJavaObject(jo, Model.class);
System.out.println(model.model.toString());
}
}
package cn.ibizlab.core.lite.extensions.model;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.util.LinkedHashSet;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class Property {
@JsonIgnore
@JSONField(serialize = false)
private DataModel ownerDataModel;
private String propertyName;
private String system;
private String propertyEntity;
private LinkedHashSet<PropertyMapping> propertyMappings = new LinkedHashSet<>();
public void setPropertyMappings(LinkedHashSet<PropertyMapping> propertyMappings)
{
if(propertyMappings!=null)
{
propertyMappings.forEach(propertyMapping -> propertyMapping.setSelfProperty(this));
this.propertyMappings=propertyMappings;
}
}
@Override
public String toString() {
return "Property{" +
"propertyName='" + getPropertyName() + '\'' +
", system='" + getSystem() + '\'' +
", propertyEntity='" + getPropertyEntity() + '\'' +
", propertyMappings=" + getPropertyMappings() +
"}\r\n";
}
}
package cn.ibizlab.core.lite.extensions.model;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import java.util.LinkedHashSet;
@Getter
@Setter
@NoArgsConstructor
@Accessors(chain = true)
public class PropertyMapping {
@JsonIgnore
@JSONField(serialize = false)
private Property selfProperty;
@JsonIgnore
@JSONField(serialize = false)
public DataModel getSelfDataModel()
{
if(this.getSelfProperty()!=null)
return this.getSelfProperty().getOwnerDataModel();
return null;
}
@JsonIgnore
@JSONField(serialize = false)
public String getSelfPropertyName()
{
if(this.getSelfProperty()!=null)
return this.getSelfProperty().getPropertyName();
return "";
}
@JsonIgnore
@JSONField(serialize = false)
public String getSelfPropertyEntity()
{
if(this.getSelfProperty()!=null)
return this.getSelfProperty().getPropertyEntity();
return "";
}
private String selfPropertyColumn;
private String joinPropertyName;
public String getJoinPropertyName()
{
if(StringUtils.isEmpty(joinPropertyName))
{
Property property=this.getSelfDataModel().getFactPorperty();
if(property!=null)
return property.getPropertyName();
}
return joinPropertyName;
}
@JsonIgnore
@JSONField(serialize = false)
public String getJoinPropertyEntity()
{
if(this.getSelfDataModel()!=null)
{
Property property=this.getSelfDataModel().getObjectProperty(this.getJoinPropertyName());
if(property!=null)
return property.getPropertyEntity();
}
return "";
}
private String joinPropertyColumn;
@Override
public String toString() {
return "PropertyMapping{" +
"selfPropertyName='" + getSelfPropertyName() + '\'' +
", selfPropertyEntity='" + getSelfPropertyEntity() + '\'' +
", selfPropertyColumn='" + getSelfPropertyColumn() + '\'' +
", joinPropertyName='" + getJoinPropertyName() + '\'' +
", joinPropertyEntity='" + getJoinPropertyEntity() + '\'' +
", joinPropertyColumn='" + getJoinPropertyColumn() + '\'' +
"}\r\n";
}
}
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册