yudao-init/src/views/copilot/container.vue

135 lines
3.1 KiB
Vue
Raw Normal View History

2024-05-08 16:38:05 +08:00
<!--
2024-04-18 17:01:10 +08:00
filename: container.vue
author: liubin
date: 2024-04-16 14:51:25
2024-05-08 16:38:05 +08:00
description:
2024-04-18 17:01:10 +08:00
-->
<template>
2024-05-17 10:31:47 +08:00
<!-- <div class="copilot-layout" ref="copilot-layout"> -->
2024-05-21 09:13:52 +08:00
<div class="copilot-layout produce" ref="copilot-layout">
2024-05-29 17:05:55 +08:00
<CopilotHeaderVue :than="than" :active="page" :period="period" @update:active="updateActive" @update:period="period = $event"
@update:than="updateThan" />
2024-04-18 17:01:10 +08:00
2024-05-29 17:05:55 +08:00
<YieldCopilot :period="period" :than="than" />
2024-05-21 09:13:52 +08:00
<!-- <EnergyCopilot v-if="page == '综合'" :period="period" /> -->
<!-- <EfficiencyCopilot v-if="page == '效率'" :period="period" /> -->
2024-04-18 17:01:10 +08:00
<div class="copilot-footer">© 中建材智能自动化研究院有限公司</div>
</div>
</template>
<script>
import CopilotHeaderVue from "./components/CopilotHeader.vue";
import YieldCopilot from "./yield/index.vue";
2024-05-29 17:05:55 +08:00
// import EnergyCopilot from "./energy/index.vue";
// import EfficiencyCopilot from "./efficiency/index.vue";
2024-04-18 17:01:10 +08:00
export default {
name: "CopilotContainer",
components: {
CopilotHeaderVue,
YieldCopilot,
2024-05-29 17:05:55 +08:00
// EnergyCopilot,
// EfficiencyCopilot,
2024-04-18 17:01:10 +08:00
},
data() {
return {
page: "产量",
period: "日",
2024-05-29 17:05:55 +08:00
than:'同比',
2024-05-10 11:10:42 +08:00
currentsStyles: '',
2024-04-18 17:01:10 +08:00
};
},
2024-05-21 09:13:52 +08:00
methods: {
2024-05-29 17:05:55 +08:00
updateThan(val) {
console.log(val);
this.than = val;
// this.getMes();
},
2024-05-21 09:13:52 +08:00
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
// },
2024-05-10 11:10:42 +08:00
// 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
// }
// }
2024-04-25 14:55:23 +08:00
// mounted() {
// document.body.style.minHeight = "1024px";
// document.body.style.minWidth = "1550px";
// },
// destroyed() {
// document.body.style.minHeight = "1024px";
// document.body.style.minWidth = "1550px";
// },
2024-04-18 17:01:10 +08:00
};
</script>
<style>
.copilot-layout {
padding: 16px;
background: url(../../assets/images/copilot-bg.png) 0 0 / 100% 100% no-repeat;
position: absolute;
left: -16px;
2024-05-10 11:10:42 +08:00
/* top: -8px; */
2024-05-17 10:31:47 +08:00
/* height: calc(100% + 38px); */
2024-04-18 17:01:10 +08:00
width: calc(100% + 30px);
z-index: 1001;
color: #fff;
display: flex;
flex-direction: column;
gap: 8px;
}
2024-05-21 09:13:52 +08:00
.produce {
2024-05-10 11:10:42 +08:00
height: calc(100% + 38px);
}
2024-05-21 09:13:52 +08:00
2024-05-10 11:10:42 +08:00
.other {
2024-05-20 10:20:37 +08:00
height: calc(100% + 240px);
2024-05-10 11:10:42 +08:00
}
2024-05-21 09:13:52 +08:00
2024-04-18 17:01:10 +08:00
.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>