feat--堆叠图可被联动

qianming 2 years ago
parent 0a0b79831c
commit a1f4d5712e

@ -1,16 +1,19 @@
<template>
<div :style="styleObj">
<v-chart :options="options" autoresize />
<v-chart ref="myVChart" :options="options" autoresize />
</div>
</template>
<script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default {
name: "WidgetBarStackchart",
components: {},
props: {
value: Object,
ispreview: Boolean,
flagInter: null,
},
data() {
return {
@ -70,6 +73,9 @@ export default {
background: this.optionsSetup.background,
};
},
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
},
watch: {
value: {
@ -89,6 +95,7 @@ export default {
this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup;
this.editorOptions();
targetWidgetLinkageLogic(this); // -
},
methods: {
// options
@ -272,10 +279,27 @@ export default {
}
},
//
setOptionsData() {
setOptionsData(e, paramsConfig) {
const optionsSetup = this.optionsSetup;
// or
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"
? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn(

@ -1,16 +1,19 @@
<template>
<div :style="styleObj">
<v-chart :options="options" autoresize />
<v-chart ref="myVChart" :options="options" autoresize />
</div>
</template>
<script>
import {targetWidgetLinkageLogic} from "@/views/bigscreenDesigner/designer/linkageLogic";
export default {
name: "WidgetBarStackchart",
components: {},
props: {
value: Object,
ispreview: Boolean,
flagInter: null,
},
data() {
return {
@ -70,6 +73,9 @@ export default {
background: this.optionsSetup.background,
};
},
allComponentLinkage() {
return this.$store.state.designer.allComponentLinkage;
},
},
watch: {
value: {
@ -89,6 +95,7 @@ export default {
this.optionsCollapse = this.value.setup;
this.optionsSetup = this.value.setup;
this.editorOptions();
targetWidgetLinkageLogic(this); // -
},
methods: {
// options
@ -299,10 +306,27 @@ export default {
this.options = Object.assign({}, this.options);
},
//
setOptionsData() {
setOptionsData(e, paramsConfig) {
const optionsSetup = this.optionsSetup;
// or
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"
? this.staticDataFn(optionsData.staticData, optionsSetup)
: this.dynamicDataFn(

Loading…
Cancel
Save