|
|
<template>
|
|
|
<div :style="styleObj">
|
|
|
<v-chart :options="options" autoresize/>
|
|
|
<v-chart v-if="hackReset" :options="options" autoresize/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
...
|
...
|
@@ -16,6 +16,7 @@ export default { |
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
hackReset:true,
|
|
|
options: {
|
|
|
grid: {},
|
|
|
/*legend: {
|
...
|
...
|
@@ -95,7 +96,8 @@ export default { |
|
|
handler(val){
|
|
|
if(this.optionsSetup.isVuex){
|
|
|
let optionsData=this.optionsData;
|
|
|
/* if(this.optionsData.dataType=="dynamicData"){
|
|
|
/* this.hackReset=false;
|
|
|
if(this.optionsData.dataType=="dynamicData"){
|
|
|
//改变参数值-月季度年,重新加载动态数据--待测
|
|
|
this.optionsData.dynamicData.contextData.dataScope=val;
|
|
|
// this.editorOptions();
|
...
|
...
|
@@ -362,6 +364,7 @@ export default { |
|
|
},
|
|
|
//静态数据
|
|
|
staticDataFn(val) {
|
|
|
this.hackReset=true;
|
|
|
this.setSeriesData(val)
|
|
|
|
|
|
},
|
...
|
...
|
@@ -492,11 +495,13 @@ export default { |
|
|
},
|
|
|
getEchartData(val, optionsSetup) {
|
|
|
const data = this.queryEchartsData(val);
|
|
|
this.hackReset=false;
|
|
|
data.then(res => {
|
|
|
this.renderingFn(optionsSetup, res);
|
|
|
});
|
|
|
},
|
|
|
renderingFn(optionsSetup, val) {
|
|
|
this.hackReset=true;
|
|
|
this.setSeriesData(val.series)
|
|
|
}
|
|
|
}
|
...
|
...
|
|