|
|
@ -1,16 +1,22 @@
|
|
|
|
<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 {
|
|
|
|
|
|
|
|
originWidgetLinkageLogic,
|
|
|
|
|
|
|
|
targetWidgetLinkageLogic,
|
|
|
|
|
|
|
|
} from "@/views/bigscreenDesigner/designer/linkageLogic";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "WidgetPieNightingaleRoseArea", //南丁格尔玫瑰图面积模式 参考:https://echarts.apache.org/examples/zh/editor.html?c=pie-roseType-simple
|
|
|
|
name: "WidgetPieNightingaleRoseArea", //南丁格尔玫瑰图面积模式 参考:https://echarts.apache.org/examples/zh/editor.html?c=pie-roseType-simple
|
|
|
|
components: {},
|
|
|
|
components: {},
|
|
|
|
props: {
|
|
|
|
props: {
|
|
|
|
value: Object,
|
|
|
|
value: Object,
|
|
|
|
ispreview: Boolean,
|
|
|
|
ispreview: Boolean,
|
|
|
|
|
|
|
|
flagInter: null,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
@ -55,6 +61,9 @@ export default {
|
|
|
|
background: this.optionsSetup.background,
|
|
|
|
background: this.optionsSetup.background,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
allComponentLinkage() {
|
|
|
|
|
|
|
|
return this.$store.state.designer.allComponentLinkage;
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
watch: {
|
|
|
|
watch: {
|
|
|
|
value: {
|
|
|
|
value: {
|
|
|
@ -74,6 +83,8 @@ 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); // 联动-目标组件逻辑
|
|
|
|
|
|
|
|
originWidgetLinkageLogic(this); // 联动-源组件逻辑
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
// 修改图标options属性
|
|
|
|
// 修改图标options属性
|
|
|
@ -195,8 +206,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);
|
|
|
|