修改
This commit is contained in:
@@ -63,20 +63,22 @@ export default {
|
||||
}
|
||||
},
|
||||
series() {
|
||||
const { ftoInvest } = this.$store.getters.copilot.efficiency.chipOee;
|
||||
// console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
|
||||
const { chipOee } = this.$store.getters.copilot.efficiency;
|
||||
let dataList = null;
|
||||
|
||||
switch (this.period) {
|
||||
case "日":
|
||||
case "周":
|
||||
dataList = ftoInvest?.current;
|
||||
dataList = chipOee?.current;
|
||||
case "周":
|
||||
dataList = chipOee?.current;
|
||||
break;
|
||||
default:
|
||||
dataList = [];
|
||||
dataList[0] = ftoInvest?.pervious;
|
||||
dataList[1] = ftoInvest?.current;
|
||||
dataList[0] = chipOee?.previous;
|
||||
dataList[1] = chipOee?.current;
|
||||
}
|
||||
|
||||
// console.log(dataList)
|
||||
return getTemplate(this.period, dataList);
|
||||
},
|
||||
},
|
||||
@@ -86,6 +88,7 @@ export default {
|
||||
function getTemplate(period, dataList) {
|
||||
const year = new Date().getFullYear();
|
||||
const month = new Date().getMonth() + 1;
|
||||
console.log('11111', dataList);
|
||||
return period == "日" || period == "周"
|
||||
? [
|
||||
{
|
||||
|
||||
@@ -1,20 +1,18 @@
|
||||
<!--
|
||||
filename: StdRate.vue
|
||||
author: liubin
|
||||
date: 2024-04-29 08:50:43
|
||||
description: 标准组件良率
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-07 10:25:10
|
||||
* @LastEditTime: 2024-05-08 15:55:24
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="std-rate">
|
||||
<div class="span-2">
|
||||
<StdRateItem :city="cities[5]" />
|
||||
<StdRateItem :period="period" :city="cities[5]" />
|
||||
</div>
|
||||
<div
|
||||
v-for="item in cities.filter((val, index) => index != 5)"
|
||||
:key="item.name"
|
||||
>
|
||||
<StdRateItem :city="item" />
|
||||
<div v-for="item in cities.filter((val, index) => index != 5)" :key="item.name">
|
||||
<StdRateItem :period="period" :city="item" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -24,7 +22,12 @@ import StdRateItem from "./sub/std/StdRateItem.vue";
|
||||
export default {
|
||||
name: "StdRate",
|
||||
components: { StdRateItem },
|
||||
props: {},
|
||||
props: {
|
||||
period: {
|
||||
type: String,
|
||||
default: "日",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
cities: [
|
||||
@@ -38,7 +41,9 @@ export default {
|
||||
],
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
computed: {
|
||||
|
||||
},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
@@ -48,7 +53,7 @@ export default {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-rows: repeat(4, 1fr);
|
||||
grid-template-rows: repeat(1, 1fr);
|
||||
}
|
||||
|
||||
.span-2 {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!--
|
||||
<!--
|
||||
filename: TransformRate.vue
|
||||
author: liubin
|
||||
date: 2024-04-29 08:50:34
|
||||
@@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BarChartBase from "@/views/copilot/components/BarChartBase.vue";
|
||||
import BarChartBase from "@/views/copilot/efficiency/components/sub/bar/BarChartChipOEE.vue";
|
||||
export default {
|
||||
name: "TransformRate",
|
||||
components: { BarChartBase },
|
||||
@@ -63,18 +63,18 @@ export default {
|
||||
}
|
||||
},
|
||||
series() {
|
||||
const { ftoInvest } = this.$store.getters.copilot.yield;
|
||||
const { transformRate } = this.$store.getters.copilot.efficiency;
|
||||
let dataList = null;
|
||||
|
||||
switch (this.period) {
|
||||
case "日":
|
||||
case "周":
|
||||
dataList = ftoInvest?.current;
|
||||
dataList = transformRate?.current;
|
||||
break;
|
||||
default:
|
||||
dataList = [];
|
||||
dataList[0] = ftoInvest?.pervious;
|
||||
dataList[1] = ftoInvest?.current;
|
||||
dataList[0] = transformRate?.previous;
|
||||
dataList[1] = transformRate?.current;
|
||||
}
|
||||
|
||||
return getTemplate(this.period, dataList);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-07 13:22:43
|
||||
* @LastEditTime: 2024-05-07 13:29:55
|
||||
* @LastEditTime: 2024-05-08 15:52:09
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div
|
||||
ref="chart"
|
||||
style="max-width: 50vw"
|
||||
style="max-width: 40vw"
|
||||
:style="{ height: vHeight + 'vh' }"
|
||||
></div>
|
||||
</chart-container>
|
||||
@@ -198,7 +198,8 @@ export default {
|
||||
this.initOptions(this.options);
|
||||
return;
|
||||
}
|
||||
const actualOptions = JSON.parse(JSON.stringify(this.options));
|
||||
console.log(val)
|
||||
const actualOptions = JSON.parse(JSON.stringify(this.options))
|
||||
actualOptions.series[0].data = val[0].data;
|
||||
actualOptions.series[0].name = val[0].name;
|
||||
actualOptions.series[1].data = val?.[1]?.data || [];
|
||||
|
||||
@@ -192,4 +192,4 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
l
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
<!--
|
||||
filename: CityName.vue
|
||||
author: liubin
|
||||
date: 2024-04-10 08:59:28
|
||||
description:
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<!--
|
||||
<!--
|
||||
filename: ProgressBar.vue
|
||||
author: liubin
|
||||
date: 2024-04-29 09:18:30
|
||||
description:
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,20 +1,38 @@
|
||||
<!--
|
||||
filename: StdRateItem.vue
|
||||
author: liubin
|
||||
date: 2024-04-29 08:59:33
|
||||
description:
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-07 10:25:10
|
||||
* @LastEditTime: 2024-05-08 14:54:24
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div class="std-rate-item">
|
||||
<div v-if="period == '日'" class="std-rate-item">
|
||||
<CityName :value="city.name" />
|
||||
<div class="std-rate-item__value">
|
||||
<ProgressBar title="24年目标" :total="city.target" :value="city.target" />
|
||||
<ProgressBar
|
||||
title="24年累计"
|
||||
:total="city.target"
|
||||
:value="city.thisYear"
|
||||
/>
|
||||
<ProgressBar :title="title" :total="city.target" :value="city.target" />
|
||||
<!-- <ProgressBar title="24年累计" :total="city.target" :value="city.thisYear" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="period == '周'" class="std-rate-item">
|
||||
<CityName :value="city.name" />
|
||||
<div class="std-rate-item__value">
|
||||
<ProgressBar :title="title" :total="city.target" :value="city.target" />
|
||||
<!-- <ProgressBar title="24年累计" :total="city.target" :value="city.thisYear" /> -->
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="period == '月'" class="std-rate-item">
|
||||
<CityName :value="city.name" />
|
||||
<div class="std-rate-item__value">
|
||||
<ProgressBar :title="titleEnd" :total="city.target" :value="city.target" />
|
||||
<ProgressBar :title="title" :total="city.target" :value="city.thisYear" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-else="period == '年'" class="std-rate-item">
|
||||
<CityName :value="city.name" />
|
||||
<div class="std-rate-item__value">
|
||||
<ProgressBar :title="titleEnd" :total="city.target" :value="city.target" />
|
||||
<ProgressBar :title="title" :total="city.target" :value="city.thisYear" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -31,9 +49,55 @@ export default {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
period: {
|
||||
type: String,
|
||||
default: "日",
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
showDay:true,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
title() {
|
||||
switch (this.period) {
|
||||
case "日":
|
||||
return "今日"
|
||||
case "周":
|
||||
return "本周"
|
||||
case "月":
|
||||
const year = new Date().getFullYear();
|
||||
const month = new Date().getMonth() + 1;
|
||||
return `${year - 1}年${month}月累计`
|
||||
case "年": {
|
||||
const year = new Date().getFullYear();
|
||||
// return [
|
||||
return `${year - 1}年累计`
|
||||
// ];
|
||||
}
|
||||
default:
|
||||
return "今日"
|
||||
}
|
||||
},
|
||||
titleEnd() {
|
||||
switch (this.period) {
|
||||
// case "日":
|
||||
// return "今日"
|
||||
// case "周":
|
||||
// return "本周"
|
||||
case "月":
|
||||
const year = new Date().getFullYear();
|
||||
const month = new Date().getMonth() + 1;
|
||||
return `${year}年${month}月目标`
|
||||
case "年": {
|
||||
const year = new Date().getFullYear();
|
||||
// return [
|
||||
return `${year}年目标`
|
||||
// ];
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-07 10:04:53
|
||||
* @LastEditTime: 2024-05-07 10:25:55
|
||||
* @LastEditTime: 2024-05-08 15:58:14
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -74,7 +74,7 @@ export default {
|
||||
display: grid;
|
||||
gap: 16px;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
grid-template-rows: .5fr .5fr;
|
||||
}
|
||||
|
||||
.efficiency-copilot > div {
|
||||
|
||||
Reference in New Issue
Block a user