projects/mescc/zhp #45
@ -437,7 +437,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
|
||||
for (const factory of preData) {
|
||||
const fId = getPreFactoryId(factory);
|
||||
if (factory.previousGlassType === 0) {
|
||||
chipInvest.previous[fId] = factory.inputNumber
|
||||
chipInvest.previous[fId] = factory.previousYearInputNumber
|
||||
}
|
||||
// chipInvest.previous[fId] = factory.previousYearInputNumber;
|
||||
if (![0, 1, 2].includes(factory.previousGlassType)) continue;
|
||||
@ -476,7 +476,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
|
||||
const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType];
|
||||
_t.current[fId] = factory.outputNumber;
|
||||
}
|
||||
console.log('chipInvest',chipInvest);
|
||||
console.log('chipInvest',ftoInvest);
|
||||
return {
|
||||
chipInvest,
|
||||
// ftoInvest,
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-29 14:48:06
|
||||
* @LastEditTime: 2024-06-07 14:11:01
|
||||
* @LastEditTime: 2024-06-17 16:40:15
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -54,8 +54,20 @@ export default {
|
||||
legend() {
|
||||
let items = [];
|
||||
var day1 = new Date();
|
||||
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
|
||||
var day2 = new Date();
|
||||
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
|
||||
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
|
||||
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
|
||||
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
|
||||
//今天的时间
|
||||
// var day2 = new Date();
|
||||
// day2.setTime(day2.getTime());
|
||||
// var s2 = (day2.getMonth() + 1) + "月" + day2.getDate() + '日';
|
||||
// const today = new Date().getDate();
|
||||
// let yesterday = new Date().getDate() -1;
|
||||
// const month = new Date().getMonth() + 1;
|
||||
// const lastMonth = new Date().getMonth() + 1 === 12 ? 1 : new Date().getMonth() + 1 - 1;
|
||||
// const year = new Date().getFullYear();
|
||||
//今天的时间
|
||||
// var day2 = new Date();
|
||||
// day2.setTime(day2.getTime());
|
||||
@ -67,13 +79,16 @@ export default {
|
||||
const year = new Date().getFullYear();
|
||||
if (this.period === 1 && this.than === '同比') {
|
||||
items = [
|
||||
{ label: `${year-1}年${month}月${today}日`, color: "#12f7f1" },
|
||||
{ label: `${month}月${today}日`, color: "#58adfa" },
|
||||
{ label: `${year - 1}年${yesterday}累计` },
|
||||
{ label: `${yesterday}日累计`, },
|
||||
|
||||
// { label: `${month}月${today}日目标`, },
|
||||
];
|
||||
} else if (this.period ===1 && this.than === '环比') {
|
||||
} else if (this.period === 1 && this.than === '环比') {
|
||||
items = [
|
||||
{ label: `${yesterday}日`, color: "#12f7f1" },
|
||||
{ label: `${month}月${today}日`, color: "#58adfa" },
|
||||
{ label: `${dayBeYes}日累计` },
|
||||
{ label: `${yesterday}日累计` },
|
||||
// { label: `${month}月${today}日目标`, },
|
||||
];
|
||||
} else if (this.period === 2 && this.than === '同比') {
|
||||
items = [
|
||||
|
@ -105,7 +105,7 @@ export default {
|
||||
);
|
||||
arr.push(
|
||||
`<span title=${this.prodOrder[i].orderStatus || ""}>${
|
||||
this.prodOrder[i].orderStatus === 0 ? '未开始' : this.prodOrder[i].orderStatus === 1 ? '进行中' : '已完成' || ""
|
||||
this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
|
||||
}</span>`
|
||||
);
|
||||
arr.push(
|
||||
|
@ -89,7 +89,7 @@ export default {
|
||||
updateThan(val) {
|
||||
console.log(val);
|
||||
this.than = val;
|
||||
// this.getMes();
|
||||
this.getMes()
|
||||
},
|
||||
updatePeriod(val) {
|
||||
this.period = val;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-05-20 13:32:59
|
||||
* @LastEditTime: 2024-06-14 09:44:42
|
||||
* @LastEditTime: 2024-06-17 16:42:12
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -118,13 +118,13 @@ export default {
|
||||
items = [
|
||||
{ label: `${yesterday}日累计`,},
|
||||
{ label: `${year - 1}年${yesterday}累计` },
|
||||
{ label: `${month}月${today}日目标`, },
|
||||
{ label: `${yesterday}日目标`, },
|
||||
];
|
||||
} else if (this.period === '日' && this.than === '环比') {
|
||||
items = [
|
||||
{ label: `${yesterday}日累计`},
|
||||
{ label: `${dayBeYes}日累计` },
|
||||
{ label: `${month}月${today}日目标`, },
|
||||
{ label: `${yesterday}日目标`, },
|
||||
];
|
||||
} else if (this.period === '周' && this.than === '同比') {
|
||||
items = [
|
||||
@ -243,13 +243,13 @@ function calculateItems(period, valueTuple, than) {
|
||||
items = [
|
||||
{ label: `${year - 1}年${yesterday}累计`, value: valueTuple[0] },
|
||||
{ label: `${yesterday}累计`, value: valueTuple[1] },
|
||||
{ label: `${month}月${today}日目标`, value: valueTuple[2] },
|
||||
{ label: `${yesterday}日目标`, value: valueTuple[2] },
|
||||
];
|
||||
} else if (period === '日' && than === '环比') {
|
||||
items = [
|
||||
{ label: `${dayBeYes}日累计`, value: valueTuple[0] },
|
||||
{ label: `${yesterday}日累计`, value: valueTuple[1] },
|
||||
{ label: `${month}月${today}日目标`, value: valueTuple[2] },
|
||||
{ label: `${yesterday}日目标`, value: valueTuple[2] },
|
||||
];
|
||||
} else if (period === '周' && than === '同比') {
|
||||
items = [
|
||||
|
Loading…
Reference in New Issue
Block a user