节日特刊问题修复

This commit is contained in:
cclu 2025-01-15 18:24:21 +08:00
parent 4491ce3042
commit 838cb3c123
6 changed files with 340 additions and 77 deletions

View File

@ -1203,14 +1203,14 @@
selectVersion3Obj["累计"].RevenueINC selectVersion3Obj["累计"].RevenueINC
.curYearData || "-" .curYearData || "-"
}}</text> }}</text>
<text class="label">2024/万元</text> <text class="label">{{(Math.floor(index / 12) + 2023)}}/万元</text>
</div> </div>
<div class="rightBox carRight"> <div class="rightBox carRight">
<text class="value">{{ <text class="value">{{
selectVersion3Obj["累计"].RevenueINC.lYearData || selectVersion3Obj["累计"].RevenueINC.lYearData ||
"-" "-"
}}</text> }}</text>
<text class="label">2023/万元</text> <text class="label">{{(Math.floor(index / 12) + 2022)}}/万元</text>
</div> </div>
<img <img
class="pkLogo" class="pkLogo"
@ -1272,7 +1272,7 @@
? "+" ? "+"
: selectVersion3Obj["累计"].AccountINC : selectVersion3Obj["累计"].AccountINC
.increaseRate < 0 .increaseRate < 0
? "-" ? ""
: "" : ""
}}</span }}</span
> >
@ -1304,14 +1304,14 @@
selectVersion3Obj["累计"].AccountINC selectVersion3Obj["累计"].AccountINC
.curYearData || "-" .curYearData || "-"
}}</text> }}</text>
<text class="label">2024/万元</text> <text class="label">{{(Math.floor(index / 12) + 2023)}}/万元</text>
</div> </div>
<div class="rightBox qmCarRight"> <div class="rightBox qmCarRight">
<text class="value">{{ <text class="value">{{
selectVersion3Obj["累计"].AccountINC.lYearData || selectVersion3Obj["累计"].AccountINC.lYearData ||
"-" "-"
}}</text> }}</text>
<text class="label">2023/万元</text> <text class="label">{{(Math.floor(index / 12) + 2022)}}/万元</text>
</div> </div>
<img <img
class="pkLogo" class="pkLogo"
@ -1373,7 +1373,7 @@
? "+" ? "+"
: selectVersion3Obj["累计"].BayonetINC : selectVersion3Obj["累计"].BayonetINC
.increaseRate < 0 .increaseRate < 0
? "-" ? ""
: "" : ""
}}</span }}</span
> >
@ -1405,14 +1405,14 @@
selectVersion3Obj["累计"].BayonetINC selectVersion3Obj["累计"].BayonetINC
.curYearData || "-" .curYearData || "-"
}}</text> }}</text>
<text class="label">2024/万元</text> <text class="label">{{(Math.floor(index / 12) + 2023)}}/万元</text>
</div> </div>
<div class="rightBox summerHolidayRightBox"> <div class="rightBox summerHolidayRightBox">
<text class="value">{{ <text class="value">{{
selectVersion3Obj["累计"].BayonetINC.lYearData || selectVersion3Obj["累计"].BayonetINC.lYearData ||
"-" "-"
}}</text> }}</text>
<text class="label">2023/万元</text> <text class="label">{{(Math.floor(index / 12) + 2022)}}/万元</text>
</div> </div>
<img <img
class="pkLogo" class="pkLogo"
@ -1477,7 +1477,7 @@
? "+" ? "+"
: allselectVersion3Obj["累计"].RevenueINC : allselectVersion3Obj["累计"].RevenueINC
.increaseRate < 0 .increaseRate < 0
? "-" ? ""
: "" : ""
}}</span }}</span
> >
@ -5522,44 +5522,44 @@ export default {
spring: { spring: {
name: "spring", name: "spring",
title: "平安春运", title: "平安春运",
startTime: "2024-01-26", startTime: "2025-01-14",
endTime: "2024-03-05", endTime: "2025-02-23",
}, // }, //
qm: { qm: {
name: "qm", name: "qm",
title: "清明节", title: "清明节",
startTime: "2024-04-03", startTime: "2025-04-03",
endTime: "2024-04-07", endTime: "2025-04-07",
}, // }, //
labour: { labour: {
name: "labour", name: "labour",
title: "劳动节", title: "劳动节",
startTime: "2024-04-30", startTime: "2025-04-30",
endTime: "2024-05-06", endTime: "2025-05-06",
}, // }, //
dragonBoat: { dragonBoat: {
name: "dragonBoat", name: "dragonBoat",
title: "端午节", title: "端午节",
startTime: "2024-06-07", startTime: "2025-05-30",
endTime: "2024-06-11", endTime: "2025-06-03",
}, },
summerHoliday: { summerHoliday: {
name: "summerHoliday", name: "summerHoliday",
title: "火热暑运", title: "火热暑运",
startTime: "2024-06-30", startTime: "2025-06-30",
endTime: "2024-09-01", endTime: "2025-08-31",
}, // }, //
midAutumn: { // midAutumn: {
name: "midAutumn", // name: "midAutumn",
title: "中秋节", // title: "",
startTime: "2024-09-14", // startTime: "2024-09-14",
endTime: "2024-09-18", // endTime: "2024-09-18",
}, // // }, //
nationalDay: { nationalDay: {
name: "nationalDay", name: "nationalDay",
title: "国庆节", title: "国庆节",
startTime: "2024-09-29", // 2024-09-30 startTime: "2025-09-30", // 2024-09-30
endTime: "2024-10-08", endTime: "2025-10-09",
}, // }, //
}, // 2024 }, // 2024
allselectVersion3Obj: {}, // allselectVersion3Obj: {}, //

View File

@ -110,6 +110,163 @@ const getMoneyNoDecimal = (money) => {
return num; return num;
} }
// 2023年的农历日历
let chineseCalendar2023 = [
'腊月十六',
'腊月十七',
'腊月十八',
'腊月十九',
'腊月二十',
'腊月廿一',
'腊月廿二',
'北小年',
'南小年',
'腊月廿五',
'腊月廿六',
'腊月廿七',
'腊月廿八',
'腊月廿九',
'除夕',
'春节',
'正月初二',
'正月初三',
'正月初四',
'正月初五',
'正月初六',
'正月初七',
'正月初八',
'正月初九',
'正月初十',
'正月十一',
'正月十二',
'正月十三',
'正月十四',
'正月十五',
'正月十六',
'正月十七',
'正月十八',
'正月十九',
'正月二十',
'正月廿一',
'正月廿二',
'正月廿三',
'正月廿四',
'正月廿五',
]
// 2024年的农历日历
let chineseCalendar2024 = [
'腊月十六',
'腊月十七',
'腊月十八',
'腊月十九',
'腊月二十',
'腊月廿一',
'腊月廿二',
'北小年',
'南小年',
'腊月廿五',
'腊月廿六',
'腊月廿七',
'腊月廿八',
'腊月廿九',
'除夕',
'春节',
'正月初二',
'正月初三',
'正月初四',
'正月初五',
'正月初六',
'正月初七',
'正月初八',
'正月初九',
'正月初十',
'正月十一',
'正月十二',
'正月十三',
'正月十四',
'正月十五',
'正月十六',
'正月十七',
'正月十八',
'正月十九',
'正月二十',
'正月廿一',
'正月廿二',
'正月廿三',
'正月廿四',
'正月廿五',
]
// 2025年农历日历
let chineseCalendar2025 = [
'腊月十五',
'腊月十六',
'腊月十七',
'腊月十八',
'腊月十九',
'腊月二十',
'腊月廿一',
'腊月廿二',
'北小年',
'南小年',
'腊月廿五',
'腊月廿六',
'腊月廿七',
'腊月廿八',
'除夕',
'春节',
'正月初二',
'正月初三',
'正月初四',
'正月初五',
'正月初六',
'正月初七',
'正月初八',
'正月初九',
'正月初十',
'正月十一',
'正月十二',
'正月十三',
'正月十四',
'正月十五',
'正月十六',
'正月十七',
'正月十八',
'正月十九',
'正月二十',
'正月廿一',
'正月廿二',
'正月廿三',
'正月廿四',
'正月廿五',
]
// 2023年节假日安排表
let festivalObj2023 = {
"2023-01-01": "元旦",
"2023-04-05": "清明节",
"2023-05-01": "劳动节‌",
"2023-06-22": "端午节‌",
"2023-09-29": "中秋节",
"2023-10-01": "国庆节",
}
// 2024年节假日安排表
let festivalObj2024 = {
"2024-01-01": "元旦",
"2024-04-04": "清明节",
"2024-05-01": "劳动节‌",
"2024-06-10": "端午节‌",
"2024-09-17": "中秋节",
"2024-10-01": "国庆节",
}
// 2025年节假日安排表
let festivalObj2025 = {
"2025-01-01": "元旦",
"2025-04-04": "清明节",
"2025-05-01": "劳动节‌",
"2025-05-31": "端午节‌",
"2025-10-06": "中秋节",
"2025-10-01": "国庆节",
}
const handleRedText = (value) => { const handleRedText = (value) => {
return <text > { return <text > {
@ -348,8 +505,56 @@ const cfu = {
console.log('category', category); console.log('category', category);
console.log('index', index); console.log('index', index);
console.log('opts', opts); console.log('opts', opts);
// 先拿到节日类型
let festival = opts.selectFestival
// 需要添加在显示文字的节日文字
let otherFestivalTest = ''
// 从opts里面 拿到这一行的详细数据 // 从opts里面 拿到这一行的详细数据
let detail = opts.series.filter(subItem => subItem.name === item.name)[0] let detail = opts.series.filter(subItem => subItem.name === item.name)[0]
console.log('detail.realDateList[index]', detail.realDateList[index]);
if (festival === 2) {
// 春节
let resObj = [];
if (item.name === 2023) {
resObj = chineseCalendar2023
} else if (item.name === 2024) {
resObj = chineseCalendar2024
} else if (item.name === 2025) {
resObj = chineseCalendar2025
}
otherFestivalTest = resObj[index]
} else if (festival === 1 || festival === 3 || festival === 4 || festival === 5 || festival === 7 || festival === 8) {
// 非春节和暑期
let resObj = {}
if (item.name === 2023) {
resObj = festivalObj2023
} else if (item.name === 2024) {
resObj = festivalObj2024
} else if (item.name === 2025) {
resObj = festivalObj2025
}
if (detail.realDateList[index]) {
if (resObj[detail.realDateList[index]]) {
otherFestivalTest = resObj[detail.realDateList[index]]
}
}
}
// 日期格式老的太长了修改一下显示
const date = new Date(detail.realDateList[index])
let y = date.getFullYear()
y = y.toString().slice(2, 4)
let m = date.getMonth() + 1
if (m < 10) {
m = '0' + m
}
let d = date.getDate()
if (d < 10) {
d = '0' + d
}
let dateText = `${y}.${m}.${d}`
let add = '' let add = ''
if (detail.linearIndex > 0) { if (detail.linearIndex > 0) {
// 上一年 // 上一年
@ -360,7 +565,7 @@ const cfu = {
add = (((currentYearObj.real[index] - lastYearObj.real[index]) / lastYearObj.real[index]) * 100).toFixed(2) + '%' add = (((currentYearObj.real[index] - lastYearObj.real[index]) / lastYearObj.real[index]) * 100).toFixed(2) + '%'
} }
return `${detail.realDateList[index]} ${detail.data[index].toFixed(2)}万元${add?detail.data[index]>0?''+add:'':''}` return `${dateText}${otherFestivalTest?`(${otherFestivalTest})`:'' } ${detail.data[index].toFixed(2)}万元${add?detail.data[index]>0?''+add:'':''}`
// return item.name // return item.name
// let data = opts.series.filter(subItem=> subItem.name === item.name)[0].real[index] // let data = opts.series.filter(subItem=> subItem.name === item.name)[0].real[index]

View File

@ -6,7 +6,7 @@
? 'top springTop' ? 'top springTop'
: selectFestival === 3 : selectFestival === 3
? 'top qmTop' ? 'top qmTop'
: selectFestival ===4 : selectFestival === 4
? 'top labourTop' ? 'top labourTop'
: selectFestival === 5 : selectFestival === 5
? 'top dragonBoatTop' ? 'top dragonBoatTop'
@ -209,7 +209,9 @@
@click="handleChangeSortName(1)" @click="handleChangeSortName(1)"
> >
<!-- <text class="sortText">{{ `24年${type === 1 ? '销售' : type === 2 ? '营收' : type === 3 ? '车流' : ''}` }}</text>--> <!-- <text class="sortText">{{ `24年${type === 1 ? '销售' : type === 2 ? '营收' : type === 3 ? '车流' : ''}` }}</text>-->
<text class="sortText">{{ `24年` }}</text> <text class="sortText">{{
`${curYear.toString().slice(2, 4)}`
}}</text>
<view class="sortIconBox" style="margin-right: 60rpx"> <view class="sortIconBox" style="margin-right: 60rpx">
<image <image
class="upIcon" class="upIcon"
@ -254,7 +256,9 @@
@click="handleChangeSortName(2)" @click="handleChangeSortName(2)"
> >
<!-- <text class="sortText">{{ `23年${type === 1 ? '销售' : type === 2 ? '营收' : type === 3 ? '车流' : ''}` }}</text>--> <!-- <text class="sortText">{{ `23年${type === 1 ? '销售' : type === 2 ? '营收' : type === 3 ? '车流' : ''}` }}</text>-->
<text class="sortText">{{ `23年` }}</text> <text class="sortText">{{
`${compareYear.toString().slice(2, 4)}`
}}</text>
<view class="sortIconBox"> <view class="sortIconBox">
<image <image
class="upIcon" class="upIcon"
@ -527,6 +531,8 @@ export default {
type: 0, // 1 2 3 type: 0, // 1 2 3
ServerpartId: "", // id ServerpartId: "", // id
useInfo: {}, useInfo: {},
curYear: "",
compareYear: "",
ServerpartList: [], ServerpartList: [],
currentServerPart: "", currentServerPart: "",
showSpring: false, showSpring: false,
@ -550,7 +556,6 @@ export default {
this.type = Number(query.type); this.type = Number(query.type);
} }
if (query.festivalType) { if (query.festivalType) {
this.selectFestival = Number(query.festivalType);
} }
if (query.currentScroll) { if (query.currentScroll) {
this.currentScroll = query.currentScroll; this.currentScroll = query.currentScroll;
@ -558,6 +563,11 @@ export default {
if (query.festivalObj) { if (query.festivalObj) {
this.festivalObj = JSON.parse(query.festivalObj); this.festivalObj = JSON.parse(query.festivalObj);
} }
this.selectFestival = this.festivalObj.HolidayType;
this.curYear = this.festivalObj.curYear;
this.compareYear = this.festivalObj.compareYear;
console.log("this.festivalObj", this.festivalObj);
this.lastDay = uni.getStorageSync("lastDay"); this.lastDay = uni.getStorageSync("lastDay");
const currentDate = new Date(this.lastDay); const currentDate = new Date(this.lastDay);
let nowTime = currentDate.getTime(); let nowTime = currentDate.getTime();
@ -566,10 +576,8 @@ export default {
new Date(this.festivalObj.startTime).getTime() <= nowTime && new Date(this.festivalObj.startTime).getTime() <= nowTime &&
new Date(this.festivalObj.endTime).getTime() > nowTime new Date(this.festivalObj.endTime).getTime() > nowTime
) { ) {
let dayNumber = moment(this.lastDay).diff( let dayNumber =
this.festivalObj.startTime, moment(this.lastDay).diff(this.festivalObj.startTime, "days") + 1;
"days"
);
console.log("dayNumber", dayNumber); console.log("dayNumber", dayNumber);
if (dayNumber > 0) { if (dayNumber > 0) {
for (let i = 0; i < dayNumber; i++) { for (let i = 0; i < dayNumber; i++) {

View File

@ -198,7 +198,7 @@
<view class="sortBox"> <view class="sortBox">
<view class="sortItem" @click="handleChangeSortName(1)"> <view class="sortItem" @click="handleChangeSortName(1)">
<text class="sortText">{{ <text class="sortText">{{
`24${ `${curYear}${
type === 1 type === 1
? "销售" ? "销售"
: type === 2 : type === 2
@ -248,7 +248,7 @@
<view class="sortItem" @click="handleChangeSortName(2)"> <view class="sortItem" @click="handleChangeSortName(2)">
<text class="sortText">{{ <text class="sortText">{{
`23${ `${compareYear}${
type === 1 type === 1
? "销售" ? "销售"
: type === 2 : type === 2
@ -732,6 +732,8 @@ export default {
this.festivalObj = JSON.parse(query.festivalObj); this.festivalObj = JSON.parse(query.festivalObj);
console.log("this.festivalObj", this.festivalObj); console.log("this.festivalObj", this.festivalObj);
this.selectFestival = this.festivalObj.HolidayType; this.selectFestival = this.festivalObj.HolidayType;
this.curYear = this.festivalObj.curYear;
this.compareYear = this.festivalObj.compareYear;
} }
if (query.time) { if (query.time) {
this.currentScroll = "item" + query.time; this.currentScroll = "item" + query.time;
@ -746,11 +748,8 @@ export default {
new Date(this.festivalObj.startTime).getTime() <= nowTime && new Date(this.festivalObj.startTime).getTime() <= nowTime &&
new Date(this.festivalObj.endTime).getTime() > nowTime new Date(this.festivalObj.endTime).getTime() > nowTime
) { ) {
let dayNumber = moment(this.lastDay).diff( let dayNumber =
this.festivalObj.startTime, moment(this.lastDay).diff(this.festivalObj.startTime, "days") + 1;
"days"
);
console.log("dayNumber", dayNumber);
if (dayNumber > 0) { if (dayNumber > 0) {
for (let i = 0; i < dayNumber; i++) { for (let i = 0; i < dayNumber; i++) {
dayList.push({ dayList.push({
@ -1005,6 +1004,7 @@ export default {
: "" : ""
} ${this.sortType === 0 ? "asc" : "desc"}`, } ${this.sortType === 0 ? "asc" : "desc"}`,
}; };
console.log("req", req);
// this.dataList // this.dataList
const data = await request.$webGet( const data = await request.$webGet(
"CommercialApi/Revenue/GetServerpartINCAnalysis", "CommercialApi/Revenue/GetServerpartINCAnalysis",

View File

@ -365,7 +365,7 @@
? $util.getMoney(pageData.curYearRevenue.data / 10000) ? $util.getMoney(pageData.curYearRevenue.data / 10000)
: "0.00" : "0.00"
}}</text> }}</text>
<text class="label">2024/万元</text> <text class="label">{{ curYear || "" }}/万元</text>
</div> </div>
<div <div
:class=" :class="
@ -391,7 +391,7 @@
? $util.getMoney(pageData.lYearRevenue.data / 10000) ? $util.getMoney(pageData.lYearRevenue.data / 10000)
: "0.00" : "0.00"
}}</text> }}</text>
<text class="label">2023/万元</text> <text class="label">{{compareYear}}/万元</text>
</div> </div>
<img <img
class="pkLogo" class="pkLogo"
@ -431,8 +431,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- 增长 / 23 --> <!-- 增长 / 23 -->
@ -1016,8 +1018,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- 增长 / 23 --> <!-- 增长 / 23 -->
@ -1165,7 +1169,7 @@
? $util.getMoney(pageData.curYearAccount.data / 10000) ? $util.getMoney(pageData.curYearAccount.data / 10000)
: "0.00" : "0.00"
}}</text> }}</text>
<text class="label">2024/万元</text> <text class="label">{{ curYear || "" }}/万元</text>
</div> </div>
<div <div
:class=" :class="
@ -1191,7 +1195,7 @@
? $util.getMoney(pageData.lYearAccount.data / 10000) ? $util.getMoney(pageData.lYearAccount.data / 10000)
: "0.00" : "0.00"
}}</text> }}</text>
<text class="label">2023/万元</text> <text class="label">{{compareYear|| "" }}/万元</text>
</div> </div>
<img <img
class="pkLogo" class="pkLogo"
@ -1231,8 +1235,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- 增长 / 23 --> <!-- 增长 / 23 -->
@ -1613,8 +1619,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- 增长 / 23 --> <!-- 增长 / 23 -->
@ -1762,7 +1770,7 @@
? $util.getMoney(pageData.curYearBayonet.data / 10000) ? $util.getMoney(pageData.curYearBayonet.data / 10000)
: "0.00" : "0.00"
}}</text> }}</text>
<text class="label">2024/万辆</text> <text class="label">{{ curYear || "" }}/万辆</text>
</div> </div>
<div <div
:class=" :class="
@ -1788,7 +1796,7 @@
? $util.getMoney(pageData.lYearBayonet.data / 10000) ? $util.getMoney(pageData.lYearBayonet.data / 10000)
: "0.00" : "0.00"
}}</text> }}</text>
<text class="label">2023/万辆</text> <text class="label">{{compareYear|| "" }}/万辆</text>
</div> </div>
<img <img
class="pkLogo" class="pkLogo"
@ -1825,8 +1833,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- 增长 / 23 --> <!-- 增长 / 23 -->
@ -2207,8 +2217,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- <div class="titleItem" style="width: 130rpx">同比去年</div>--> <!-- <div class="titleItem" style="width: 130rpx">同比去年</div>-->
@ -2871,8 +2883,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- <div class="titleItem" style="width: 130rpx">同比去年</div>--> <!-- <div class="titleItem" style="width: 130rpx">同比去年</div>-->
@ -3537,8 +3551,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- <div class="titleItem" style="width: 130rpx">同比去年</div>--> <!-- <div class="titleItem" style="width: 130rpx">同比去年</div>-->
@ -3623,8 +3639,10 @@
> >
类别 类别
</div> </div>
<div class="titleItem" style="width: 110rpx">2024</div> <div class="titleItem" style="width: 110rpx">
<div class="titleItem" style="width: 110rpx">2023</div> {{ curYear || "" }}
</div>
<div class="titleItem" style="width: 110rpx">{{compareYear|| "" }}</div>
<div class="titleItem" style="width: 110rpx">增长</div> <div class="titleItem" style="width: 110rpx">增长</div>
<div class="titleItem" style="width: 110rpx">增幅</div> <div class="titleItem" style="width: 110rpx">增幅</div>
<!-- <div class="titleItem" style="width: 130rpx">同比去年</div>--> <!-- <div class="titleItem" style="width: 130rpx">同比去年</div>-->
@ -4040,7 +4058,7 @@ export default {
currentIndex: 0, // currentIndex: 0, //
StatisticsDate: "", // StatisticsDate: "", //
currentHoliday: 0, // currentHoliday: 0, //
canSelectFestivalList:[], // canSelectFestivalList: [], //
}; };
}, },
async onLoad(query) { async onLoad(query) {
@ -4079,7 +4097,7 @@ export default {
} }
}); });
console.log("nowBeforeList", nowBeforeList); console.log("nowBeforeList", nowBeforeList);
this.canSelectFestivalList = nowBeforeList this.canSelectFestivalList = nowBeforeList;
// currentObj // currentObj
// 25 // 25
if (!currentObj.label) { if (!currentObj.label) {
@ -4103,6 +4121,9 @@ export default {
} }
this.selectFestival = currentObj.HolidayType; this.selectFestival = currentObj.HolidayType;
this.currentFestival = currentObj; this.currentFestival = currentObj;
this.curYear = currentObj.curYear;
this.compareYear = currentObj.compareYear;
this.currentIndex = currentIndex; this.currentIndex = currentIndex;
console.log("当前节日的索引", currentIndex); console.log("当前节日的索引", currentIndex);
console.log("当前节日的对象", currentObj); console.log("当前节日的对象", currentObj);
@ -4399,9 +4420,11 @@ export default {
async handleChangeFestival(e) { async handleChangeFestival(e) {
this.handleResest(); this.handleResest();
console.log("e", e); console.log("e", e);
let currentObj = this.defaultFestivalList[Number(e.detail.value)]; let currentObj = this.canSelectFestivalList[Number(e.detail.value)];
this.selectFestival = currentObj.HolidayType; this.selectFestival = currentObj.HolidayType;
this.currentFestival = currentObj; this.currentFestival = currentObj;
this.curYear = currentObj.curYear;
this.compareYear = currentObj.compareYear;
console.log("this.currentFestival", this.currentFestival); console.log("this.currentFestival", this.currentFestival);
this.currentIndex = Number(e.detail.value); this.currentIndex = Number(e.detail.value);
const currentDate = new Date(this.lastDay); const currentDate = new Date(this.lastDay);

View File

@ -418,7 +418,7 @@
:animation="false" :animation="false"
:canvas2d="true" :canvas2d="true"
:inScrollView="true" :inScrollView="true"
tooltipFormat="entryCarNumber2" tooltipFormat="entryCarNumber"
:ontouch="true" :ontouch="true"
:reshow="allScreen" :reshow="allScreen"
/> />
@ -820,7 +820,17 @@ export default {
rotateLock: false, rotateLock: false,
enableScroll: true, enableScroll: true,
background: "#FFFFFF", background: "#FFFFFF",
color: ["#1E80FF", "#00B6FF", "#ACB9CD"], color: [
"#1890FF",
"#91CB74",
"#FAC858",
"#EE6666",
"#73C0DE",
"#3CA272",
"#FC8452",
"#9A60B4",
"#ea7ccc",
],
padding: [15, 15, 5, 5], padding: [15, 15, 5, 5],
dataLabel: false, dataLabel: false,
legend: { legend: {
@ -844,9 +854,9 @@ export default {
{ {
min: 0, min: 0,
max: max:
this.selectFestival === 0 this.selectFestival === 2
? 3000 ? 3000
: this.selectFestival === 4 : this.selectFestival === 6
? 900 ? 900
: 1500, : 1500,
}, },
@ -862,6 +872,7 @@ export default {
activeType: "hollow", activeType: "hollow",
}, },
}, },
selectFestival: this.selectFestival,
}; };
let phoneInfo = uni.getStorageSync("phoneInfo"); let phoneInfo = uni.getStorageSync("phoneInfo");
console.log("phoneInfo", phoneInfo); console.log("phoneInfo", phoneInfo);
@ -875,7 +886,17 @@ export default {
rotateLock: false, rotateLock: false,
enableScroll: true, enableScroll: true,
background: "#FFFFFF", background: "#FFFFFF",
color: ["#1E80FF", "#00B6FF", "#ACB9CD"], color: [
"#1890FF",
"#91CB74",
"#FAC858",
"#EE6666",
"#73C0DE",
"#3CA272",
"#FC8452",
"#9A60B4",
"#ea7ccc",
],
padding: [15, 15, 5, 5], padding: [15, 15, 5, 5],
dataLabel: false, dataLabel: false,
legend: { legend: {
@ -895,7 +916,12 @@ export default {
data: [ data: [
{ {
min: 0, min: 0,
max: 2000, max:
this.selectFestival === 2
? 3000
: this.selectFestival === 6
? 900
: 1500,
}, },
], ],
}, },
@ -909,6 +935,7 @@ export default {
activeType: "hollow", activeType: "hollow",
}, },
}, },
selectFestival: this.selectFestival,
}; };
console.log("this.opts2", this.opts2); console.log("this.opts2", this.opts2);
console.log("this.res2", this.res2); console.log("this.res2", this.res2);