|
@@ -31,7 +31,25 @@ export default {
|
|
|
this.myZhuEcharts(this.options);
|
|
|
},
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ window.addEventListener("resize", this.echartsAllSize);
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ window.removeEventListener("resize", this.echartsAllSize);
|
|
|
+ },
|
|
|
methods: {
|
|
|
+ echartsAllSize() {
|
|
|
+ let flag = false;
|
|
|
+ setTimeout(() => {
|
|
|
+ flag = true;
|
|
|
+ if (flag) {
|
|
|
+ //设置变化的大小
|
|
|
+ console.log("大小变化了---------------------");
|
|
|
+ let myChart = this.$echarts.init(document.getElementById(this.refCurrent));
|
|
|
+ myChart.resize();
|
|
|
+ }
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
myZhuEcharts(data) {
|
|
|
//修改测试计划
|
|
|
let myChart = this.$echarts.init(document.getElementById(this.refCurrent));
|
|
@@ -99,7 +117,7 @@ export default {
|
|
|
// },
|
|
|
},
|
|
|
yAxis: {
|
|
|
- max:100,
|
|
|
+ max: 100,
|
|
|
type: "value",
|
|
|
name: "分数",
|
|
|
},
|