133 lines
3.1 KiB
Vue
133 lines
3.1 KiB
Vue
<!--
|
|
* @Author: zhp
|
|
* @Date: 2024-05-20 16:04:18
|
|
* @LastEditTime: 2024-06-03 16:46:11
|
|
* @LastEditors: zhp
|
|
* @Description:
|
|
-->
|
|
<template>
|
|
<!-- <div class="copilot-layout" ref="copilot-layout"> -->
|
|
<div class="copilot-layout" ref="copilot-layout">
|
|
<CopilotHeaderVue :than="than" :active="page" :period="period" @update:active="updateActive"
|
|
@update:period="period = $event" @update:than="updateThan" />
|
|
|
|
<!-- <YieldCopilot v-if="page == '产量'" :period="period" /> -->
|
|
<!-- <EnergyCopilot v-if="page == '综合'" :period="period" /> -->
|
|
<EfficiencyCopilot :period="period" :than="than" />
|
|
<div class="copilot-footer">© 中建材智能自动化研究院有限公司</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import CopilotHeaderVue from "./components/CopilotHeader.vue";
|
|
// import YieldCopilot from "./yield/index.vue";
|
|
// import EnergyCopilot from "./energy/index.vue";
|
|
import EfficiencyCopilot from "./efficiency/index.vue";
|
|
|
|
export default {
|
|
name: "copilotEfficiencyContainer",
|
|
components: {
|
|
CopilotHeaderVue,
|
|
EfficiencyCopilot,
|
|
},
|
|
data() {
|
|
return {
|
|
than:'同比',
|
|
page: "效率",
|
|
period: "月",
|
|
currentsStyles: '',
|
|
};
|
|
},
|
|
methods: {
|
|
updateThan(val) {
|
|
console.log(val);
|
|
this.than = val;
|
|
// this.getMes();
|
|
},
|
|
updateActive(val, oldVal) {
|
|
console.log(val)
|
|
if (val === '效率') {
|
|
this.$router.push({
|
|
path: 'efficiency-container',
|
|
query: {
|
|
name: '效率'
|
|
}
|
|
})
|
|
// this.page = oldVal
|
|
} else if (val === '产量') {
|
|
this.$router.push({
|
|
path: 'main',
|
|
query: {
|
|
name: '产量'
|
|
}
|
|
})
|
|
// this.page = oldVal
|
|
}
|
|
}
|
|
},
|
|
// mounted() {
|
|
// this.page = this.$route.query.name
|
|
// },
|
|
// watch: {
|
|
// page(val) {
|
|
// if (val === '产量') {
|
|
// console.log(val)
|
|
// this.currentsStyles =
|
|
// 'height: calc(100% + 38px)'
|
|
// console.log(this.currentsStyles)
|
|
// } else {
|
|
// console.log(val)
|
|
// this.currentsStyles = 'height:100%+38px'
|
|
// console.log(this.currentsStyles)
|
|
// }
|
|
// immediate: true
|
|
// }
|
|
// }
|
|
// mounted() {
|
|
// document.body.style.minHeight = "1024px";
|
|
// document.body.style.minWidth = "1550px";
|
|
// },
|
|
// destroyed() {
|
|
// document.body.style.minHeight = "1024px";
|
|
// document.body.style.minWidth = "1550px";
|
|
// },
|
|
};
|
|
</script>
|
|
<style>
|
|
|
|
|
|
.copilot-layout {
|
|
padding: 16px;
|
|
background: url(../../assets/images/copilot-bg.png) 0 0 / 100% 100% no-repeat;
|
|
position: absolute;
|
|
left: -16px;
|
|
/* top: -8px; */
|
|
height: calc(100% + 30px);
|
|
width: calc(100% + 30px);
|
|
z-index: 1001;
|
|
color: #fff;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* .produce{
|
|
height: calc(100% + 38px);
|
|
} */
|
|
/* .other { */
|
|
/* height: calc(100% + 240px); */
|
|
/* } */
|
|
.copilot-footer {
|
|
/** position: absolute;
|
|
bottom: 10px; **/
|
|
height: 10px;
|
|
width: 100%;
|
|
color: rgb(80, 80, 80);
|
|
user-select: none;
|
|
font-size: 14px;
|
|
letter-spacing: 1px;
|
|
display: grid;
|
|
place-content: center;
|
|
}
|
|
</style>
|