提交 96e457ba 编写于 作者: sq3536's avatar sq3536

配置完成

上级 e388ace6
<script lang='tsx'>
import { Component, Vue, Prop, Model, Watch } from "vue-property-decorator";
import { VNode, CreateElement } from "vue";
import { interval, Subject, Subscription } from "rxjs";
import { Http, Util } from "@/utils";
import JSONEditor from "@json-editor/json-editor";
import BootstrapVue from "bootstrap-vue";
import "bootstrap/dist/css/bootstrap.css";
import "bootstrap-vue/dist/bootstrap-vue.css";
import CodeListService from "@/codelist/codelist-service";
import AppFormJson from "./app-form-json.vue";
@Component({
components: {},
})
export default class AppFormJsonMetric extends AppFormJson {
public codeListService: CodeListService = new CodeListService({
$store: this.$store,
});
public async getSchema(): Promise<any> {
let _schema = {
title: "指标",
type: "object",
format: "grid",
id: "arr_columnDefs",
$ref: "#/definitions/fieldDefs",
definitions: {
fieldDefs: {
type: "object",
title: "指标",
required: [
"metricentity",
"metricfield",
"timeentity",
"timefield",
"domainsentity",
"domainsfield",
"modelid",
],
properties: {
modelid: {
type: "string",
title: "模型",
options: {
grid_columns: 12,
hidden: true,
select2_options: {
width: 350,
},
},
enumSource: [
{
source: [
{ id: this.data.modelid, text: this.data.modelname },
],
title: "{{item.text}}",
value: "{{item.id}}",
},
],
propertyOrder: 21,
},
metricentity: {
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: 4,
},
metricfield: {
type: "selectnew",
title: "指标属性",
watch: {
modelid: "arr_columnDefs.modelid",
entity: "arr_columnDefs.metricentity",
},
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: 5,
},
timeentity: {
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: 6,
},
timefield: {
type: "selectnew",
title: "时间属性",
watch: {
modelid: "arr_columnDefs.modelid",
entity: "arr_columnDefs.timeentity",
},
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: 7,
},
domainsentity: {
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: 8,
},
domainsfield: {
type: "selectnew",
title: "分区属性",
watch: {
modelid: "arr_columnDefs.modelid",
entity: "arr_columnDefs.domainsentity",
},
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: 9,
},
keyvalueentity: {
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: {
select2_options: {
width: 350,
value: "",
},
},
propertyOrder: 10,
},
keyvaluefield: {
type: "selectnew",
title: "标示属性",
watch: {
modelid: "arr_columnDefs.modelid",
entity: "arr_columnDefs.keyvalueentity",
},
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,
},
ext1entity: {
type: "selectnew",
title: "附加实体1",
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: 12,
},
ext1field: {
type: "selectnew",
title: "附加属性1",
watch: {
modelid: "arr_columnDefs.modelid",
entity: "arr_columnDefs.ext1entity",
},
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: 13,
},
ext2entity: {
type: "selectnew",
title: "附加实体2",
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: 14,
},
ext2field: {
type: "selectnew",
title: "附加属性2",
watch: {
modelid: "arr_columnDefs.modelid",
entity: "arr_columnDefs.ext2entity",
},
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: 15,
},
},
},
},
};
return _schema;
}
}
</script>
\ No newline at end of file
...@@ -6,6 +6,7 @@ import AppFormJsonDaReport from './components/app-form-json/app-form-json-da-re ...@@ -6,6 +6,7 @@ import AppFormJsonDaReport from './components/app-form-json/app-form-json-da-re
import AppFormJsonLogic from './components/app-form-json/app-form-json-logic.vue' import AppFormJsonLogic from './components/app-form-json/app-form-json-logic.vue'
import AppFormJsonFieldSet from './components/app-form-json/app-form-json-field-set.vue' import AppFormJsonFieldSet from './components/app-form-json/app-form-json-field-set.vue'
import AppFormJsonDim from './components/app-form-json/app-form-json-dim.vue' import AppFormJsonDim from './components/app-form-json/app-form-json-dim.vue'
import AppFormJsonMetric from './components/app-form-json/app-form-json-metric.vue'
import AppTreeselectRefreshview from './components/app-treeselect-refreshview/app-treeselect-refreshview.vue' import AppTreeselectRefreshview from './components/app-treeselect-refreshview/app-treeselect-refreshview.vue'
import 'jquery/dist/jquery.min.js' import 'jquery/dist/jquery.min.js'
import $ from 'jquery' import $ from 'jquery'
...@@ -22,5 +23,6 @@ export const UserComponent = { ...@@ -22,5 +23,6 @@ export const UserComponent = {
v.component('app-form-json-logic', AppFormJsonLogic); v.component('app-form-json-logic', AppFormJsonLogic);
v.component('app-form-json-field-set', AppFormJsonFieldSet); v.component('app-form-json-field-set', AppFormJsonFieldSet);
v.component('app-form-json-dim', AppFormJsonDim); v.component('app-form-json-dim', AppFormJsonDim);
v.component('app-form-json-metric', AppFormJsonMetric);
} }
}; };
\ No newline at end of file
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册