|
<template>
|
<div id="index" ref="appRef">
|
<div class="bg">
|
<div class="myhead"></div>
|
<dv-loading v-if="loading">Loading...</dv-loading>
|
<div v-else class="host-body">
|
<div class="d-flex jc-center" style="margin-top: 17px">
|
<div class="d-flex jc-center">
|
<div class="dv-dec-8"></div>
|
<div class="title">
|
<span
|
class="title-text"
|
style="
|
font-size: 55px;
|
color: #ffffff;
|
width: 700px;
|
height: 100px;
|
margin-top: -10px;
|
">可 视 化 平 台</span>
|
</div>
|
</div>
|
</div>
|
<div class="react-right" style="margin-left: 1510px">
|
<span class="text" style="width: 400px">{{ dateYear }} {{ dateWeek }} {{ dateDay }}</span>
|
</div>
|
<div class="body-box">
|
<div class="content-box">
|
<!-- 生产计划板块 -->
|
<div>
|
<dv-border-box-12>
|
<centerView1 />
|
</dv-border-box-12>
|
</div>
|
<!-- 标准参数、达成情况、设备状态模块 -->
|
<div style="display: flex; flex-wrap: wrap">
|
<centerView2 />
|
</div>
|
</div>
|
<div class="bototm-box">
|
<!-- 当前生产任务模块 -->
|
<dv-border-box-12>
|
<bottomView1 />
|
</dv-border-box-12>
|
<!-- 合格率模块 -->
|
<dv-border-box-13 style="margin-left: 10px;width: 620px;">
|
<bottomView2 />
|
</dv-border-box-13>
|
<!-- 稼动率模块 -->
|
<dv-border-box-13 style="margin-left: -40px;width: 620px;">
|
<bottomView3 />
|
</dv-border-box-13>
|
</div>
|
</div>
|
</div>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import axios from "@/api/ajax.js";
|
import drawMixin from "../utils/drawMixin";
|
import { formatTime } from "../utils/index.js";
|
import centerView1 from "./centerView1.vue";
|
import centerView2 from "./centerView2.vue";
|
import bottomView1 from "./bottomView1.vue";
|
import bottomView2 from "./bottomView2.vue";
|
import bottomView3 from "./bottomView3.vue";
|
|
// import{GetDateForLED} from "@/api/http.js"
|
|
export default {
|
mixins: [drawMixin],
|
data() {
|
return {
|
timing: null,
|
loading: true,
|
dateDay: null,
|
dateYear: null,
|
dateWeek: null,
|
dataTime:null,
|
weekday: ["周日", "周一", "周二", "周三", "周四", "周五", "周六"],
|
};
|
},
|
components: {
|
centerView1,
|
centerView2,
|
bottomView1,
|
bottomView2,
|
bottomView3
|
},
|
mounted() {
|
this.timeFn();
|
this.cancelLoading();
|
this.GetTitleItem();
|
this.GetEquipmentStatus();
|
setInterval(() => {
|
this.GetEquipmentStatus();
|
}, 1000);
|
},
|
beforeDestroy() {
|
clearInterval(this.timing);
|
},
|
methods: {
|
|
//刷新时间
|
timeFn() {
|
this.timing = setInterval(() => {
|
axios.post("/api/dt_productionpara/GetTime", null, "").then((x) => {
|
this.dateDay = x.data.data.dateDay;
|
this.dateYear = x.data.data.dateYear;
|
this.dateWeek = x.data.data.dateWeek;
|
});
|
}, 1000);
|
},
|
cancelLoading() {
|
setTimeout(() => {
|
this.loading = false;
|
}, 1000);
|
},
|
},
|
};
|
</script>
|
|
<style lang="scss">
|
@import "../assets/scss/index.scss";
|
</style>
|
|
<style lang="css" scoped>
|
.myhead {
|
position: absolute;
|
width: 100%;
|
height: 100px;
|
/* background-color: red; */
|
top: 0;
|
left: 0;
|
z-index: 999;
|
background-image: url("../assets/head_bg1.png");
|
background-size: cover;
|
background-position: center center;
|
}
|
</style>
|