<template>
  <div class="mod-demo-echarts">
    <el-breadcrumb class="divi2" separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item :to="{ path: '/visi-design'}">可视化设计</el-breadcrumb-item>
      <el-breadcrumb-item>实验设置</el-breadcrumb-item>
    </el-breadcrumb>
    <el-divider class="divi"></el-divider>
    <!-- <design-graph></design-graph> -->
    <design-graph-1 :visible.sync="designgraphvisi" v-if="designgraphvisi" ref="designgraph"></design-graph-1>
  </div>
</template>

<script>
// import DesignGraph from "./design-graph.vue"
import DesignGraph1 from "./design-graph1.vue";
export default {
  components: {
    // DesignGraph,
    DesignGraph1,
  },
  data() {
    return {
      // chartLine: null,
      // chartBar: null,
      // chartPie: null,
      // chartScatter: null,
      designgraphvisi: false,
    };
  },
  mounted() {
    
  },
  // watch: {    
	//     '$route' (to, from) {   
	//          this.$router.go(0);
	// 		 }
	// 	},
  activated() {
    //自动刷新一次
    // if (location.href.indexOf("#reloaded") == -1) {
    //   location.href = location.href + "#reloaded";
    //   location.reload();
    // }
    this.designgraphvisi = true;
    
    if(this.$route.query.update==true){
      this.init(this.$route.query.winfo);
    }
    
  },
  methods: {
    init(winfo){
      this.$nextTick(() => {
        this.$refs.designgraph.initGraph(winfo);
      })
    }
  },
};
</script>

<style lang="scss">
.mod-demo-echarts {
  > .el-alert {
    margin-bottom: 10px;
  }
  > .el-row {
    margin-top: -10px;
    margin-bottom: -10px;
    .el-col {
      padding-top: 10px;
      padding-bottom: 10px;
    }
  }
  .chart-box {
    min-height: 400px;
  }
}
.divi {
  display: block;
  height: 1px;
  width: 100%;
  margin: 24px 0;
  background-color: #dcdfe6;
  position: relative;
}
.divi2 {
  display: block;
  height: 1px;
  width: 100%;
  position: relative;
}
</style>

