@@ -88,12 +88,11 @@ export default {
mounted() {
this.getList()
// 每隔30秒请求一次数据
- window.setInterval(() => {
- setTimeout(() => {
- ///调取接口获取数据
- this.getList();
- }, 0)
+ // 每隔秒请求一次数据
+ setInterval(() => {
+ this.getList();
}, 10000)
+
},
methods: {
/** 查询dashboard抓取数据列表 */
@@ -48,13 +48,11 @@ export default {
this.initChart()
// 每隔秒请求一次数据
- this.initChart();
- }, 1000 * 10 * 6 * 60 * 6)
+ this.initChart();
+ }, 3600000)
beforeDestroy() {
if (!this.chart) {
@@ -44,12 +44,9 @@ export default {
@@ -41,12 +41,10 @@ export default {
this.initChart();
initChart() {
@@ -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],
- this.initChart()
- // 每隔30秒请求一次数据
- this.$nextTick(() => {
- })
-
- }, 20000)
+ console.log(this.dashboarddata);
+ }, 3600000);
// 基于准备好的dom,初始化echarts实例
@@ -398,12 +398,9 @@
}, 30000)
// 一天请求一次数据
- this.getMonthList();
- }, 1000 * 10 * 6 * 60 * 6);
+ this.getMonthList();
beforeDestroy(){
@@ -355,12 +355,9 @@
if(this.timer){