修改bug
This commit is contained in:
@@ -60,7 +60,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 === '环比') {
|
||||
@@ -70,7 +70,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 === '环比') {
|
||||
@@ -80,7 +80,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}月目标`, color: "#58adfa" },
|
||||
// { label: `${month}月目标`, value: valueTuple[2] },
|
||||
@@ -177,7 +177,7 @@ function getTemplate(period, dataList, than) {
|
||||
if (period === '日' && than === '同比') {
|
||||
items = [
|
||||
{
|
||||
name: `去年${month}月${today}日`,
|
||||
name: `${year-1}年${month}月${today}日`,
|
||||
data: dataList ? dataList[0] : [],
|
||||
},
|
||||
{
|
||||
@@ -201,7 +201,7 @@ function getTemplate(period, dataList, than) {
|
||||
} else if (period === '周' && than === '同比') {
|
||||
items = [
|
||||
{
|
||||
name: `去年本周`,
|
||||
name: `${year-1}年本周`,
|
||||
data: dataList ? dataList[0] : [],
|
||||
},
|
||||
{
|
||||
@@ -225,7 +225,7 @@ function getTemplate(period, dataList, than) {
|
||||
} else if (period === '月' && than === '同比') {
|
||||
items = [
|
||||
{
|
||||
name: `去年${month}月`,
|
||||
name: `${year-1}年${month}月`,
|
||||
data: dataList ? dataList[0] : [],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user