产量和效率

This commit is contained in:
‘937886381’
2024-05-29 17:05:55 +08:00
83 changed files with 17006 additions and 10610 deletions

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-07 10:04:53
* @LastEditTime: 2024-05-17 17:05:36
* @LastEditTime: 2024-05-29 14:24:48
* @LastEditors: zhp
* @Description:
-->
@@ -9,16 +9,16 @@
<template>
<div class="efficiency-copilot">
<Container title="芯片良率" icon="chip2">
<ChipRate :period="period" />
<ChipRate :period="period" :than="than" />
</Container>
<Container title="标准组件良率" icon="std">
<StdRate :period="period" />
<StdRate :period="period" :than="than" />
</Container>
<Container title="芯片OEE" icon="chip">
<ChipOee :period="period" />
<ChipOee :chipOeeRate="chipOeeRate" :period="period" :than="than" />
</Container>
<Container title="转化效率" icon="cube">
<TransformRate :period="period" />
<TransformRate :transformRate="transformRate" :period="period" :than="than" />
</Container>
</div>
</template>
@@ -44,25 +44,45 @@ export default {
type: String,
default: "日",
},
than: {
type: String,
default: "同比",
},
},
data() {
return {};
return {
chipOeeRate: {},
transformRate:{}
};
},
watch: {
period: {
handler(val) {
val && this.fetchData(val);
val && this.fetchData(val,this.than);
},
immediate: true,
},
than: {
handler(val) {
console.log(val)
val && this.fetchData(this.period, val);
},
immediate: true,
},
},
methods: {
fetchData(period = "日") {
fetchData(period = "日",than) {
console.log(`效率驾驶舱,获取${period}数据`);
this.$store.dispatch("copilot/initCopilot", {
period,
source: "efficiency",
});
than
}).then(() => {
this.$nextTick(() => {
this.chipOeeRate = this.$store.getters.copilot.efficiency.chipOeeRate
this.transformRate = this.$store.getters.copilot.efficiency.transformRate
})
})
},
},
};