|
@@ -64,39 +64,39 @@
|
|
<div style="display: flex;">
|
|
<div style="display: flex;">
|
|
<div style="width:1920px;display: flex;">
|
|
<div style="width:1920px;display: flex;">
|
|
<div>
|
|
<div>
|
|
- <material-balance />
|
|
|
|
|
|
+ <material-balance :dashboarddata = 'dashboarddata'/>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
<chart-right/>
|
|
<chart-right/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="right" style="width: 1270px">
|
|
<div class="right" style="width: 1270px">
|
|
- <steam-balance/>
|
|
|
|
|
|
+ <steam-balance :dashboarddata = 'dashboarddata'/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="three-bototm-box">
|
|
<div class="three-bototm-box">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
- <nap-tank />
|
|
|
|
|
|
+ <nap-tank :dashboarddata = 'dashboarddata'/>
|
|
<!--<bottom-left />-->
|
|
<!--<bottom-left />-->
|
|
</dv-border-box-12>
|
|
</dv-border-box-12>
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
- <ethylene-tank />
|
|
|
|
|
|
+ <ethylene-tank :dashboarddata = 'dashboarddata' />
|
|
</dv-border-box-12>
|
|
</dv-border-box-12>
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
- <acrylic-tank />
|
|
|
|
|
|
+ <acrylic-tank :dashboarddata = 'dashboarddata'/>
|
|
</dv-border-box-12>
|
|
</dv-border-box-12>
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
- <product-tank />
|
|
|
|
|
|
+ <product-tank :dashboarddata = 'dashboarddata'/>
|
|
</dv-border-box-12>
|
|
</dv-border-box-12>
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
- <bottom-left />
|
|
|
|
|
|
+ <bottom-left :dashboarddata = 'dashboarddata'/>
|
|
</dv-border-box-12>
|
|
</dv-border-box-12>
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
- <bottom-energy />
|
|
|
|
|
|
+ <bottom-energy :dashboarddata = 'dashboarddata'/>
|
|
</dv-border-box-12>
|
|
</dv-border-box-12>
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
<dv-border-box-12 style="width: 438px;height: 260px;">
|
|
- <bottom-right />
|
|
|
|
|
|
+ <bottom-right :dashboarddata = 'dashboarddata'/>
|
|
</dv-border-box-12>
|
|
</dv-border-box-12>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -165,6 +165,7 @@
|
|
import dayjs from "dayjs";
|
|
import dayjs from "dayjs";
|
|
import '@/common/flexible.js';
|
|
import '@/common/flexible.js';
|
|
import dataV from '@jiaminghi/data-view';
|
|
import dataV from '@jiaminghi/data-view';
|
|
|
|
+ import {selectLast} from "@/api/aspen/dashboarddata";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
@@ -175,7 +176,8 @@
|
|
dateYear: null,
|
|
dateYear: null,
|
|
dateWeek: null,
|
|
dateWeek: null,
|
|
weekday: [this.$t('周日'),this.$t('周一'),this.$t('周二'),this.$t('周三'),this.$t('周四'),this.$t('周五'),this.$t('周六')],
|
|
weekday: [this.$t('周日'),this.$t('周一'),this.$t('周二'),this.$t('周三'),this.$t('周四'),this.$t('周五'),this.$t('周六')],
|
|
- timer:null
|
|
|
|
|
|
+ timer:null,
|
|
|
|
+ dashboarddata: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
@@ -205,12 +207,29 @@
|
|
this.dateWeek = date.format(this.weekday[date.day()]);
|
|
this.dateWeek = date.format(this.weekday[date.day()]);
|
|
},1000);
|
|
},1000);
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ this.getList();
|
|
|
|
+ // 每隔30秒请求一次数据
|
|
|
|
+ window.setInterval(() => {undefined
|
|
|
|
+ setTimeout(() => {undefined
|
|
|
|
+ ///调取接口获取数据
|
|
|
|
+ this.getList();
|
|
|
|
+ }, 0)
|
|
|
|
+ }, 10000)
|
|
|
|
+ },
|
|
beforeDestroy(){
|
|
beforeDestroy(){
|
|
if(this.timer){
|
|
if(this.timer){
|
|
clearInterval(this.timer);
|
|
clearInterval(this.timer);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ /** 查询dashboard抓取数据列表 */
|
|
|
|
+ getList()
|
|
|
|
+ {
|
|
|
|
+ selectLast(this.queryParams).then(response => {
|
|
|
|
+ this.dashboarddata = response.data;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
cancelLoading() {
|
|
cancelLoading() {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.loading = false;
|
|
this.loading = false;
|