|
@@ -22,35 +22,25 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import productProportion from "../dashboard/productProportion";
|
|
|
import resize from "@/views/dashboard/mixins/resize";
|
|
|
export default {
|
|
|
props: ['dashboarddata','transformdata'],
|
|
|
components: {
|
|
|
- productProportion
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
chart: null,
|
|
|
- // 查询参数
|
|
|
- queryParams: {
|
|
|
- },
|
|
|
};
|
|
|
},
|
|
|
mixins: [resize],
|
|
|
mounted() {
|
|
|
- this.initChart()
|
|
|
- // 每隔30秒请求一次数据
|
|
|
- window.setInterval(() => {
|
|
|
- setTimeout(() => {
|
|
|
- ///调取接口获取数据
|
|
|
- this.$nextTick(() => {
|
|
|
- this.initChart();
|
|
|
- })
|
|
|
-
|
|
|
- }, 0)
|
|
|
- }, 20000)
|
|
|
+ console.log(this.dashboarddata);
|
|
|
+ this.initChart();
|
|
|
+ setInterval(() => {
|
|
|
+ this.initChart();
|
|
|
+ }, 3600000);
|
|
|
},
|
|
|
+
|
|
|
methods: {
|
|
|
initChart() {
|
|
|
// 基于准备好的dom,初始化echarts实例
|