update--更多图表可被联动

qianming 2 years ago
parent a1f4d5712e
commit 21eeb2ee79

@ -1,10 +1,12 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "WidgetBarCompareChart", name: "WidgetBarCompareChart",
// https://www.makeapie.com/editor.html?c=xrJwcCF3NZ // https://www.makeapie.com/editor.html?c=xrJwcCF3NZ
@ -12,6 +14,7 @@ export default {
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -258,6 +261,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -277,6 +283,7 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -567,9 +574,26 @@ export default {
this.options.series[1].itemStyle = itemStyleRight; this.options.series[1].itemStyle = itemStyleRight;
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData, optionsSetup) ? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn( : this.dynamicDataFn(

@ -1,16 +1,19 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "WidgetBarDoubleYaxisChart", name: "WidgetBarDoubleYaxisChart",
components: {}, components: {},
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -108,6 +111,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -127,6 +133,7 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -426,8 +433,25 @@ export default {
this.options = Object.assign({}, this.options); this.options = Object.assign({}, this.options);
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

@ -1,16 +1,19 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "widgetBarLineStackChart", name: "widgetBarLineStackChart",
components: {}, components: {},
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -105,6 +108,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -124,6 +130,7 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -353,10 +360,27 @@ export default {
} }
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
// or // or
const optionsData = this.optionsData; const optionsData = this.optionsData;
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData, optionsSetup) ? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn( : this.dynamicDataFn(

@ -1,16 +1,19 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "WidgetBarlinechart", name: "WidgetBarlinechart",
components: {}, components: {},
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -108,6 +111,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -127,6 +133,7 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -426,8 +433,25 @@ export default {
this.options = Object.assign({}, this.options); this.options = Object.assign({}, this.options);
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

@ -1,10 +1,12 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
import echarts from "echarts"; import echarts from "echarts";
export default { export default {
name: "widgetMoreBarLineChart", name: "widgetMoreBarLineChart",
@ -12,6 +14,7 @@ export default {
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -167,6 +170,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -186,6 +192,7 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -414,8 +421,25 @@ export default {
} }
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

@ -1,16 +1,19 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "WidgetFunnel", name: "WidgetFunnel",
components: {}, components: {},
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -88,6 +91,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -107,6 +113,7 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -207,8 +214,25 @@ export default {
this.options.color = arrColor; this.options.color = arrColor;
this.options = Object.assign({}, this.options); this.options = Object.assign({}, this.options);
}, },
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

@ -1,16 +1,19 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "widgetHeatmap", name: "widgetHeatmap",
components: {}, components: {},
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -116,6 +119,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -135,6 +141,7 @@ export default {
this.optionsCollapse = this.value.collapse; this.optionsCollapse = this.value.collapse;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -303,8 +310,25 @@ export default {
visualMap.orient = optionsSetup.layoutFront; visualMap.orient = optionsSetup.layoutFront;
visualMap.itemWidth = optionsSetup.legendWidth; visualMap.itemWidth = optionsSetup.legendWidth;
}, },
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

@ -1,10 +1,12 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default { export default {
name: "WidgetBarCompareChart", name: "WidgetBarCompareChart",
// https://www.makeapie.com/editor.html?c=xOjLyozu2W // https://www.makeapie.com/editor.html?c=xOjLyozu2W
@ -12,6 +14,7 @@ export default {
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -259,6 +262,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -278,6 +284,7 @@ export default {
this.optionsCollapse = this.value.setup; this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup; this.optionsSetup = this.value.setup;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -617,9 +624,26 @@ export default {
} }
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData, optionsSetup) ? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn( : this.dynamicDataFn(

@ -1,9 +1,11 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
import echarts from "echarts"; import echarts from "echarts";
import "../../../../../../node_modules/echarts/map/js/china.js"; import "../../../../../../node_modules/echarts/map/js/china.js";
//https://www.makeapie.com/editor.html?c=x2yaz6dfRw //https://www.makeapie.com/editor.html?c=x2yaz6dfRw
@ -209,6 +211,7 @@ export default {
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -405,6 +408,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -432,6 +438,7 @@ export default {
this.getEchartData(dynamicData, optionsSetup); this.getEchartData(dynamicData, optionsSetup);
} }
); );
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
// options // options
@ -528,8 +535,25 @@ export default {
minSize4Pin = this.optionsSetup.fontminSize4Pin; minSize4Pin = this.optionsSetup.fontminSize4Pin;
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

@ -1,9 +1,11 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
import "echarts/map/js/china.js"; import "echarts/map/js/china.js";
import echarts from "echarts"; import echarts from "echarts";
import { conversionCity } from "@/utils/china"; import { conversionCity } from "@/utils/china";
@ -131,6 +133,7 @@ export default {
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -303,6 +306,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -322,6 +328,7 @@ export default {
}, },
mounted() { mounted() {
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
convertData(data) { convertData(data) {
@ -476,8 +483,25 @@ export default {
this.options.geo["itemStyle"] = itemStyle; this.options.geo["itemStyle"] = itemStyle;
}, },
// //
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

@ -1,9 +1,11 @@
<template> <template>
<div :style="styleObj"> <div :style="styleObj">
<v-chart :options="options" autoresize /> <v-chart ref="myVChart" :options="options" autoresize />
</div> </div>
</template> </template>
<script> <script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
import vue from "vue"; import vue from "vue";
import VueSuperSlide from "vue-superslide"; import VueSuperSlide from "vue-superslide";
vue.use(VueSuperSlide); vue.use(VueSuperSlide);
@ -11,6 +13,7 @@ export default {
props: { props: {
value: Object, value: Object,
ispreview: Boolean, ispreview: Boolean,
flagInter: null,
}, },
data() { data() {
return { return {
@ -40,6 +43,9 @@ export default {
background: this.optionsSetup.background, background: this.optionsSetup.background,
}; };
}, },
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
}, },
watch: { watch: {
value: { value: {
@ -57,6 +63,7 @@ export default {
this.optionsPosition = this.value.position; this.optionsPosition = this.value.position;
this.optionsData = this.value.data; this.optionsData = this.value.data;
this.editorOptions(); this.editorOptions();
targetWidgetLinkageLogic(this); // -
}, },
methods: { methods: {
editorOptions() { editorOptions() {
@ -173,8 +180,25 @@ export default {
setOptionsMargin() { setOptionsMargin() {
this.options.radar.radius = "70%"; this.options.radar.radius = "70%";
}, },
setOptionsData() { setOptionsData(e, paramsConfig) {
const optionsData = this.optionsData; // or const optionsData = this.optionsData; // or
//
optionsData.dynamicData = optionsData.dynamicData || {}; // dynamicData undefined
const myDynamicData = optionsData.dynamicData;
clearInterval(this.flagInter); //
if (
e &&
optionsData.dataType !== "staticData" &&
Object.keys(myDynamicData.contextData).length
) {
const keyArr = Object.keys(myDynamicData.contextData);
paramsConfig.forEach((conf) => {
if (keyArr.includes(conf.targetKey)) {
myDynamicData.contextData[conf.targetKey] = e[conf.originKey];
}
});
}
//
optionsData.dataType == "staticData" optionsData.dataType == "staticData"
? this.staticDataFn(optionsData.staticData) ? this.staticDataFn(optionsData.staticData)
: this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);

Loading…
Cancel
Save