修改
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-20 13:32:59
|
||||
* @LastEditTime: 2024-06-03 16:26:24
|
||||
* @LastEditTime: 2024-06-05 13:43:13
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -115,21 +115,25 @@ export default {
|
||||
items = [
|
||||
{ label: `${month}月${today}日累计`,},
|
||||
{ label: `去年${month}月${today}日累计` },
|
||||
{ label: `${month}月${today}日目标`, },
|
||||
];
|
||||
} else if (this.period === '日' && this.than === '环比') {
|
||||
items = [
|
||||
{ label: `${month}月${today}日累计`},
|
||||
{ label: `${yesterday}日累计`},
|
||||
{ label: `${yesterday}日累计` },
|
||||
{ label: `${month}月${today}日目标`, },
|
||||
];
|
||||
} else if (this.period === '周' && this.than === '同比') {
|
||||
items = [
|
||||
{ label: `本周累计`,},
|
||||
{ label: `去年本周累计`},
|
||||
{ label: `去年本周累计` },
|
||||
{ label: `本周目标`, },
|
||||
];
|
||||
} else if (this.period === '周' && this.than === '环比') {
|
||||
items = [
|
||||
{ label: `本周累计`,},
|
||||
{ label: `上周累计`,},
|
||||
{ label: `上周累计`, },
|
||||
{ label: `本周目标`, },
|
||||
];
|
||||
} else if (this.period === '月' && this.than === '同比') {
|
||||
items = [
|
||||
@@ -156,9 +160,9 @@ export default {
|
||||
: (vt[1] != 0 && vt[1] != null) && vt[2] == 0
|
||||
? "100%" : '0%',
|
||||
subtitle =
|
||||
this.period == "日" ? `${month}月${today}日累计` : this.period == "周" ? `本周` : this.period == "月" ? `${month}月累计产出` : `${year}年累计产出`;
|
||||
this.period == "日" ? `${month}月${today}日累计完成` : this.period == "周" ? `本周累计完成` : this.period == "月" ? `${month}月累计完成` : `${year}年累计完成`;
|
||||
console.log(this.valueTuple[0], this.valueTuple[1], this.valueTuple[2],)
|
||||
console.log(items)
|
||||
console.log(this.valueTuple[2]- this.valueTuple[1])
|
||||
return getOptions({
|
||||
titleValue,
|
||||
subtitle,
|
||||
@@ -166,7 +170,7 @@ export default {
|
||||
preName: items[1].label,
|
||||
previousSum: this.valueTuple[0],
|
||||
currentSum: this.valueTuple[1],
|
||||
targetSum: this.valueTuple[2] ? this.valueTuple[2] :0 ,
|
||||
targetSum: this.valueTuple[2] ? this.valueTuple[2] :0,
|
||||
});
|
||||
},
|
||||
|
||||
@@ -213,7 +217,8 @@ export default {
|
||||
},
|
||||
};
|
||||
|
||||
function calculateItems(period, valueTuple,than) {
|
||||
function calculateItems(period, valueTuple, than) {
|
||||
console.log('valueTuple', valueTuple);
|
||||
let items = [];
|
||||
var day1 = new Date();
|
||||
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
|
||||
@@ -231,21 +236,25 @@ function calculateItems(period, valueTuple,than) {
|
||||
items = [
|
||||
{ label: `去年${month}月${today}日累计`, value: valueTuple[0] },
|
||||
{ label: `${month}月${today}日累计`, value: valueTuple[1] },
|
||||
{ label: `${month}月${today}日目标`, value: valueTuple[2] },
|
||||
];
|
||||
} else if (period === '日' && than === '环比') {
|
||||
items = [
|
||||
{ label: `${yesterday}日累计`, value: valueTuple[0] },
|
||||
{ label: `${month}月${today}日累计`, value: valueTuple[1] },
|
||||
{ label: `${month}月${today}日目标`, value: valueTuple[2] },
|
||||
];
|
||||
} else if (period === '周' && than === '同比') {
|
||||
items = [
|
||||
{ label: `去年本周累计`, value: valueTuple[0] },
|
||||
{ label: `本周累计`, value: valueTuple[1] },
|
||||
{ label: `本周目标`, value: valueTuple[2] },
|
||||
];
|
||||
} else if (period === '周' && than === '环比') {
|
||||
items = [
|
||||
{ label: `上周累计`, value: valueTuple[0] },
|
||||
{ label: `本周累计`, value: valueTuple[1] },
|
||||
{ label: `本周目标`, value: valueTuple[2] },
|
||||
];
|
||||
} else if (period === '月' && than === '同比') {
|
||||
items = [
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-10 11:10:54
|
||||
* @LastEditTime: 2024-05-28 13:36:07
|
||||
* @LastEditTime: 2024-06-05 09:49:46
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@@ -9,29 +9,32 @@
|
||||
<template>
|
||||
<div class="yield-copilot">
|
||||
<section class="top flex">
|
||||
<db-container class="std-yield" title="标准组件产出" icon="std">
|
||||
<right-container class="std-yield" title="标准组件产出" icon="std">
|
||||
<std-output v-if="show" :period="period" :than="than" />
|
||||
</db-container>
|
||||
</right-container>
|
||||
<db-container class="chip-yield" title="芯片产出" icon="chip2">
|
||||
<chip-output v-if="show" :period="period" :than="than" />
|
||||
</db-container>
|
||||
<db-container class="bipv-yield" title="BIPV产出" icon="bipv">
|
||||
<left-container class="bipv-yield" title="BIPV产出" icon="bipv">
|
||||
<bipv-output v-if="show" :period="period" :than="than" />
|
||||
</db-container>
|
||||
</left-container>
|
||||
</section>
|
||||
<section class="bottom flex">
|
||||
<db-container class="fto-involve" title="FTO投入">
|
||||
<right-container class="fto-involve" title="FTO投入">
|
||||
<fto-invest :period="period" :than="than" />
|
||||
</db-container>
|
||||
<db-container class="chip-involve" title="芯片投入" icon="chip">
|
||||
</right-container>
|
||||
<left-container class="chip-involve" title="芯片投入" icon="chip">
|
||||
<chip-invest :period="period" :than="than" />
|
||||
</db-container>
|
||||
</left-container>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Container from "@/views/copilot/components/Container.vue";
|
||||
import twoContainer from "@/views/copilot/components/twoContainer.vue";
|
||||
import leftContainer from "@/views/copilot/components/leftContainer.vue";
|
||||
import rightContainer from "@/views/copilot/components/rightContainer.vue";
|
||||
|
||||
import StdOutput from "./components/StdOutput.vue";
|
||||
import ChipOutput from "./components/ChipOutput.vue";
|
||||
import FtoInvest from "./components/FtoInvest.vue";
|
||||
@@ -41,7 +44,9 @@ import ChipInvest from "./components/ChipInvest.vue";
|
||||
export default {
|
||||
name: "YieldCopilot",
|
||||
components: {
|
||||
DbContainer: Container,
|
||||
DbContainer: twoContainer,
|
||||
leftContainer,
|
||||
rightContainer,
|
||||
StdOutput,
|
||||
ChipOutput,
|
||||
BipvOutput,
|
||||
|
||||
@@ -61,6 +61,9 @@ export default ({
|
||||
value: currentSum,
|
||||
name: currentName,
|
||||
selected: false,
|
||||
tooltip: {
|
||||
formatter: `${currentName} : ${currentSum}`
|
||||
},
|
||||
itemStyle: {
|
||||
borderJoin: "round",
|
||||
borderCap: "round",
|
||||
@@ -80,10 +83,11 @@ export default ({
|
||||
},
|
||||
},
|
||||
{
|
||||
value:currentSum == 0
|
||||
? 1
|
||||
: 0,
|
||||
name: "未达成累计",
|
||||
value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
|
||||
name: currentName,
|
||||
tooltip: {
|
||||
formatter: `${currentName} : ${currentSum}`
|
||||
},
|
||||
itemStyle: { color: "transparent" },
|
||||
label: { show: false },
|
||||
},
|
||||
@@ -106,6 +110,9 @@ export default ({
|
||||
value: previousSum,
|
||||
name: preName,
|
||||
selected: false,
|
||||
tooltip: {
|
||||
formatter: `${preName} : ${previousSum}`
|
||||
},
|
||||
itemStyle: {
|
||||
borderJoin: "round",
|
||||
borderCap: "round",
|
||||
@@ -125,10 +132,12 @@ export default ({
|
||||
},
|
||||
},
|
||||
{
|
||||
value:previousSum == 0
|
||||
? 1
|
||||
: 0,
|
||||
name: "-",
|
||||
|
||||
value:previousSum === 0 ? 1 : 0,
|
||||
name: preName,
|
||||
tooltip: {
|
||||
formatter: `${preName} : ${previousSum}`
|
||||
},
|
||||
itemStyle: { color: "transparent" },
|
||||
label: { show: false },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user