提交 3c559ea6 编写于 作者: sq3536's avatar sq3536

配置完成

上级 71b3262d
...@@ -128,12 +128,7 @@ export default class AppFormJsonDim extends AppFormJson { ...@@ -128,12 +128,7 @@ export default class AppFormJsonDim extends AppFormJson {
value: "{{item.id}}", value: "{{item.id}}",
}, },
], ],
links: [
{
rel: "查看",
href: "/dstweb/app/codelist/dst/fielddict/{{self}}",
},
],
options: { options: {
select2_options: { select2_options: {
......
...@@ -36,6 +36,8 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -36,6 +36,8 @@ export default class AppFormJsonFieldSet extends AppFormJson {
"timefield", "timefield",
"domainsentity", "domainsentity",
"domainsfield", "domainsfield",
"dimentity",
"dimfield",
"modelid", "modelid",
], ],
properties: { properties: {
...@@ -70,7 +72,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -70,7 +72,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
{ {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
url: "/dst/datamodels/${p0}/propertys", url: "/dst/datamodels/${p0}/allpropertys",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -96,7 +98,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -96,7 +98,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
p1: "entity", p1: "entity",
url: "/dst/datamodels/${p0}/propertys/${p1}/fields", url: "/dst/datamodels/${p0}/allpropertys/${p1}/fields",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -122,7 +124,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -122,7 +124,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
{ {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
url: "/dst/datamodels/${p0}/propertys", url: "/dst/datamodels/${p0}/allpropertys",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -148,7 +150,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -148,7 +150,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
p1: "entity", p1: "entity",
url: "/dst/datamodels/${p0}/propertys/${p1}/fields", url: "/dst/datamodels/${p0}/allpropertys/${p1}/fields",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -174,7 +176,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -174,7 +176,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
{ {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
url: "/dst/datamodels/${p0}/propertys", url: "/dst/datamodels/${p0}/allpropertys",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -200,7 +202,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -200,7 +202,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
p1: "entity", p1: "entity",
url: "/dst/datamodels/${p0}/propertys/${p1}/fields", url: "/dst/datamodels/${p0}/allpropertys/${p1}/fields",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -216,6 +218,58 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -216,6 +218,58 @@ export default class AppFormJsonFieldSet extends AppFormJson {
propertyOrder: 9, propertyOrder: 9,
}, },
dimentity: {
type: "selectnew",
title: "维度实体",
watch: {
modelid: "arr_columnDefs.modelid",
},
enumSource: [
{
source: [...[{ label: "--", id: "" }]],
p0: "modelid",
url: "/dst/datamodels/${p0}/allpropertys",
title: "{{item.label}}",
value: "{{item.id}}",
},
],
options: {
grid_columns: 6,
select2_options: {
width: 350,
value: "",
},
},
propertyOrder: 10,
},
dimfield: {
type: "selectnew",
title: "维度属性",
watch: {
modelid: "arr_columnDefs.modelid",
entity: "arr_columnDefs.dimentity",
},
enumSource: [
{
source: [...[{ label: "--", id: "" }]],
p0: "modelid",
p1: "entity",
url: "/dst/datamodels/${p0}/allpropertys/${p1}/fields",
title: "{{item.label}}",
value: "{{item.id}}",
},
],
options: {
grid_columns: 6,
select2_options: {
width: 250,
value: "",
},
},
propertyOrder: 11,
},
keyvalueentity: { keyvalueentity: {
type: "selectnew", type: "selectnew",
title: "标示实体", title: "标示实体",
...@@ -226,7 +280,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -226,7 +280,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
{ {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
url: "/dst/datamodels/${p0}/propertys", url: "/dst/datamodels/${p0}/allpropertys",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -237,7 +291,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -237,7 +291,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
value: "", value: "",
}, },
}, },
propertyOrder: 10, propertyOrder: 12,
}, },
keyvaluefield: { keyvaluefield: {
type: "selectnew", type: "selectnew",
...@@ -251,7 +305,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -251,7 +305,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
p1: "entity", p1: "entity",
url: "/dst/datamodels/${p0}/propertys/${p1}/fields", url: "/dst/datamodels/${p0}/allpropertys/${p1}/fields",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -264,7 +318,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -264,7 +318,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
value: "", value: "",
}, },
}, },
propertyOrder: 11, propertyOrder: 13,
}, },
ext1entity: { ext1entity: {
...@@ -277,7 +331,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -277,7 +331,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
{ {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
url: "/dst/datamodels/${p0}/propertys", url: "/dst/datamodels/${p0}/allpropertys",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -289,7 +343,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -289,7 +343,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
value: "", value: "",
}, },
}, },
propertyOrder: 12, propertyOrder: 14,
}, },
ext1field: { ext1field: {
type: "selectnew", type: "selectnew",
...@@ -303,7 +357,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -303,7 +357,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
p1: "entity", p1: "entity",
url: "/dst/datamodels/${p0}/propertys/${p1}/fields", url: "/dst/datamodels/${p0}/allpropertys/${p1}/fields",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -316,7 +370,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -316,7 +370,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
value: "", value: "",
}, },
}, },
propertyOrder: 13, propertyOrder: 15,
}, },
ext2entity: { ext2entity: {
...@@ -329,7 +383,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -329,7 +383,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
{ {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
url: "/dst/datamodels/${p0}/propertys", url: "/dst/datamodels/${p0}/allpropertys",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -341,7 +395,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -341,7 +395,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
value: "", value: "",
}, },
}, },
propertyOrder: 14, propertyOrder: 16,
}, },
ext2field: { ext2field: {
type: "selectnew", type: "selectnew",
...@@ -355,7 +409,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -355,7 +409,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
source: [...[{ label: "--", id: "" }]], source: [...[{ label: "--", id: "" }]],
p0: "modelid", p0: "modelid",
p1: "entity", p1: "entity",
url: "/dst/datamodels/${p0}/propertys/${p1}/fields", url: "/dst/datamodels/${p0}/allpropertys/${p1}/fields",
title: "{{item.label}}", title: "{{item.label}}",
value: "{{item.id}}", value: "{{item.id}}",
}, },
...@@ -368,7 +422,7 @@ export default class AppFormJsonFieldSet extends AppFormJson { ...@@ -368,7 +422,7 @@ export default class AppFormJsonFieldSet extends AppFormJson {
value: "", value: "",
}, },
}, },
propertyOrder: 15, propertyOrder: 17,
}, },
}, },
}, },
......
...@@ -23,7 +23,7 @@ export default class AvueCustomForm extends Vue { ...@@ -23,7 +23,7 @@ export default class AvueCustomForm extends Vue {
* @type {*} * @type {*}
* @memberof AvueCustomForm * @memberof AvueCustomForm
*/ */
public options: any; @Prop() public options?: any;
/** /**
* 是否需要转换为string类型 * 是否需要转换为string类型
......
...@@ -26,8 +26,6 @@ import java.util.HashMap; ...@@ -26,8 +26,6 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static cn.ibizlab.core.lite.extensions.util.LiteStorage.parseDatasource;
/** /**
* 实体[数据源] 自定义服务对象 * 实体[数据源] 自定义服务对象
*/ */
......
...@@ -332,4 +332,18 @@ public class DataModel { ...@@ -332,4 +332,18 @@ public class DataModel {
return properties; return properties;
} }
@JsonIgnore
@JSONField(serialize = false)
public LinkedHashSet<Property> getAllProperty()
{
LinkedHashSet<Property> properties=this.getObjectProperties();
if (this.getNestedDataModels() != null) {
for (DataModel dm : this.getNestedDataModels()) {
properties.addAll(dm.getAllProperty());
}
}
return properties;
}
} }
...@@ -88,14 +88,4 @@ public class LiteStorage { ...@@ -88,14 +88,4 @@ public class LiteStorage {
} }
} }
} }
public static Map parseDatasource (String json) {
JSONArray tableData = JSONArray.parseArray(json);
Map map = new HashMap();
for (int i = 0; i < tableData.size(); i++) {
JSONObject jsonObject = tableData.getJSONObject(i);
map.put(jsonObject.get("param"), jsonObject.get("value"));
}
return map;
}
} }
...@@ -80,6 +80,8 @@ public class DstCoreResource { ...@@ -80,6 +80,8 @@ public class DstCoreResource {
return ResponseEntity.ok(list); return ResponseEntity.ok(list);
} }
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/propertys/{propertyname}/fields","/dst/datamodels/{modelid}/name/{modelname}/propertys/{propertyname}/fields"}) @RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/propertys/{propertyname}/fields","/dst/datamodels/{modelid}/name/{modelname}/propertys/{propertyname}/fields"})
public ResponseEntity<List<Option>> getDataModelParentField(@PathVariable(name="modelid",required = false) String modelid, public ResponseEntity<List<Option>> getDataModelParentField(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="modelname",required = false) String modelname, @PathVariable(name="modelname",required = false) String modelname,
...@@ -94,6 +96,31 @@ public class DstCoreResource { ...@@ -94,6 +96,31 @@ public class DstCoreResource {
return ResponseEntity.ok(list); return ResponseEntity.ok(list);
} }
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/allpropertys"})
public ResponseEntity<List<Option>> getDataModelParentProperty(@PathVariable(name="modelid",required = false) String modelid)
{
List<Option> list = new ArrayList<>();
liteModelService.getDataModel(modelid).getAllProperty().forEach(property -> {
Option option = new Option().setId(property.getPropertyName()).setLabel(property.getEntityModel().getLogicName()+"["+property.getPropertyName()+"]");
list.add(option);
});
return ResponseEntity.ok(list);
}
@RequestMapping(method = RequestMethod.GET, value = {"/dst/datamodels/{modelid}/allpropertys/{propertyname}/fields"})
public ResponseEntity<List<Option>> getDataModelField(@PathVariable(name="modelid",required = false) String modelid,
@PathVariable(name="propertyname",required = false) String propertyname,
@PathVariable(name="fieldname",required = false) String fieldname)
{
List<Option> list = new ArrayList<>();
Property property=liteModelService.getDataModel(modelid).findObjectProperty(propertyname,"ALL");
property.getEntityModel().getFields().forEach(field -> {
Option option = new Option().setId(property.getPropertyName()+"."+field.getColumnName()).setLabel(field.getComment()+"["+field.getColumnName()+"]");
list.add(option);
});
return ResponseEntity.ok(list);
}
@Autowired @Autowired
private IBZDictFeignClient dictFeignClient; private IBZDictFeignClient dictFeignClient;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册