修改bug

This commit is contained in:
‘937886381’
2024-06-07 11:13:59 +08:00
parent 1e8d60696b
commit ef618a4abb
27 changed files with 643 additions and 214 deletions

View File

@@ -58,7 +58,7 @@ export default {
const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') {
items = [
{ label: `${month}${today}`, color: "#12f7f1" },
{ label: `${year-1}${month}${today}`, color: "#12f7f1" },
{ label: `${month}${today}`, color: "#58adfa" },
];
} else if (this.period === '日' && this.than === '环比') {
@@ -68,7 +68,7 @@ export default {
];
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `年本周`, color: "#12f7f1" },
{ label: `${year-1}年本周`, color: "#12f7f1" },
{ label: `本周`, color: "#58adfa" },
];
} else if (this.period === '周' && this.than === '环比') {
@@ -78,7 +78,7 @@ export default {
];
} else if (this.period === '月' && this.than === '同比') {
items = [
{ label: `${month}`, color: "#12f7f1" },
{ label: `${year-1}${month}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" },
// { label: `${month}月目标`, value: valueTuple[2] },
];
@@ -163,7 +163,7 @@ function getTemplate(period, dataList,than) {
if (period === '日' && than === '同比') {
items = [
{
name: `${month}${today}`,
name: `${year-1}${month}${today}`,
data: dataList ? dataList[0] : [],
},
{
@@ -187,7 +187,7 @@ function getTemplate(period, dataList,than) {
} else if (period === '周' && than === '同比') {
items = [
{
name: `年本周`,
name: `${year-1}年本周`,
data: dataList ? dataList[0] : [],
},
{
@@ -211,7 +211,7 @@ function getTemplate(period, dataList,than) {
} else if (period === '月' && than === '同比') {
items = [
{
name: `${month}`,
name: `${year-1}${month}`,
data: dataList ? dataList[0] : [],
},
{

View File

@@ -58,7 +58,7 @@ export default {
const year = new Date().getFullYear();
if (this.period === '日' && this.than === '同比') {
items = [
{ label: `${month}${today}`, color: "#12f7f1" },
{ label: `${year-1}${month}${today}`, color: "#12f7f1" },
{ label: `${month}${today}`, color: "#58adfa" },
];
} else if (this.period === '日' && this.than === '环比') {
@@ -68,7 +68,7 @@ export default {
];
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `年本周`, color: "#12f7f1" },
{ label: `${year-1}年本周`, color: "#12f7f1" },
{ label: `本周`, color: "#58adfa" },
];
} else if (this.period === '周' && this.than === '环比') {
@@ -78,7 +78,7 @@ export default {
];
} else if (this.period === '月' && this.than === '同比') {
items = [
{ label: `${month}`, color: "#12f7f1" },
{ label: `${year-1}${month}`, color: "#12f7f1" },
{ label: `${month}`, color: "#58adfa" },
// { label: `${month}月目标`, value: valueTuple[2] },
];
@@ -165,7 +165,7 @@ function getTemplate(period, dataList,than) {
if (period === '日' && than === '同比') {
items = [
{
name: `${month}${today}`,
name: `${year-1}${month}${today}`,
data: dataList ? dataList[0] : [],
},
{
@@ -189,7 +189,7 @@ function getTemplate(period, dataList,than) {
} else if (period === '周' && than === '同比') {
items = [
{
name: `年本周`,
name: `${year-1}年本周`,
data: dataList ? dataList[0] : [],
},
{
@@ -213,7 +213,7 @@ function getTemplate(period, dataList,than) {
} else if (period === '月' && than === '同比') {
items = [
{
name: `${month}`,
name: `${year-1}${month}`,
data: dataList ? dataList[0] : [],
},
{

View File

@@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-20 13:32:59
* @LastEditTime: 2024-06-05 13:43:13
* @LastEditTime: 2024-06-06 08:42:04
* @LastEditors: zhp
* @Description:
-->
@@ -114,7 +114,7 @@ export default {
if (this.period === '日' && this.than === '同比') {
items = [
{ label: `${month}${today}日累计`,},
{ label: `${month}${today}日累计` },
{ label: `${year-1}${month}${today}日累计` },
{ label: `${month}${today}日目标`, },
];
} else if (this.period === '日' && this.than === '环比') {
@@ -126,7 +126,7 @@ export default {
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `本周累计`,},
{ label: `年本周累计` },
{ label: `${year-1}年本周累计` },
{ label: `本周目标`, },
];
} else if (this.period === '周' && this.than === '环比') {
@@ -138,7 +138,7 @@ export default {
} else if (this.period === '月' && this.than === '同比') {
items = [
{ label: `${month}月累计`,},
{ label: `${month}月累计`, },
{ label: `${year-1}${month}月累计`, },
{ label: `${month}月目标`,},
];
} else if (this.period === '月' && this.than === '环比') {
@@ -160,7 +160,7 @@ 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(this.valueTuple[2]- this.valueTuple[1])
return getOptions({
@@ -234,7 +234,7 @@ function calculateItems(period, valueTuple, than) {
const year = new Date().getFullYear();
if (period === '日' && than === '同比') {
items = [
{ label: `${month}${today}日累计`, value: valueTuple[0] },
{ label: `${year-1}${month}${today}日累计`, value: valueTuple[0] },
{ label: `${month}${today}日累计`, value: valueTuple[1] },
{ label: `${month}${today}日目标`, value: valueTuple[2] },
];
@@ -246,7 +246,7 @@ function calculateItems(period, valueTuple, than) {
];
} else if (period === '周' && than === '同比') {
items = [
{ label: `年本周累计`, value: valueTuple[0] },
{ label: `${year-1}年本周累计`, value: valueTuple[0] },
{ label: `本周累计`, value: valueTuple[1] },
{ label: `本周目标`, value: valueTuple[2] },
];
@@ -258,7 +258,7 @@ function calculateItems(period, valueTuple, than) {
];
} else if (period === '月' && than === '同比') {
items = [
{ label: `${month}月累计`, value: valueTuple[0] },
{ label: `${year-1}${month}月累计`, value: valueTuple[0] },
{ label: `${month}月累计`, value: valueTuple[1] },
{ label: `${month}月目标`, value: valueTuple[2] },
];