This commit is contained in:
cclu 2025-01-14 19:03:35 +08:00
parent c48289bb60
commit 4491ce3042
5 changed files with 1391 additions and 732 deletions

0
pages/index/new_file.js Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@ -728,12 +728,60 @@ export default {
if (query.type) { if (query.type) {
this.type = Number(query.type); this.type = Number(query.type);
} }
if (query.festivalType) { if (query.festivalObj) {
this.selectFestival = Number(query.festivalType); this.festivalObj = JSON.parse(query.festivalObj);
console.log("this.festivalObj", this.festivalObj);
this.selectFestival = this.festivalObj.HolidayType;
} }
if (query.time) { if (query.time) {
this.currentScroll = "item" + query.time; this.currentScroll = "item" + query.time;
this.allDateDay = this.currentScroll.split("item")[1];
} }
this.lastDay = uni.getStorageSync("lastDay");
const currentDate = new Date(this.lastDay);
let nowTime = currentDate.getTime();
let dayList = [];
if (
new Date(this.festivalObj.startTime).getTime() <= nowTime &&
new Date(this.festivalObj.endTime).getTime() > nowTime
) {
let dayNumber = moment(this.lastDay).diff(
this.festivalObj.startTime,
"days"
);
console.log("dayNumber", dayNumber);
if (dayNumber > 0) {
for (let i = 0; i < dayNumber; i++) {
dayList.push({
label: `${i + 1}`,
value: moment(this.festivalObj.startTime)
.add(i, "days")
.format("YYYY-MM-DD"),
});
}
}
} else if (new Date(this.festivalObj.endTime).getTime() < nowTime) {
//
let dayNumber =
moment(this.festivalObj.endTime).diff(
this.festivalObj.startTime,
"days"
) + 1;
console.log("dayNumber", dayNumber);
if (dayNumber > 0) {
for (let i = 0; i < dayNumber; i++) {
dayList.push({
label: `${i + 1}`,
value: moment(this.festivalObj.startTime)
.add(i, "days")
.format("YYYY-MM-DD"),
});
}
}
}
this.scrollList = dayList;
this.handleGetData();
return; return;
this.lastDay = uni.getStorageSync("lastDay"); this.lastDay = uni.getStorageSync("lastDay");
@ -909,7 +957,7 @@ export default {
const time = new Date(date); const time = new Date(date);
let m = time.getMonth() + 1; let m = time.getMonth() + 1;
let d = time.getDate(); let d = time.getDate();
this.allDateDay = `${m < 10 ? "0" + m : m}${d < 10 ? "0" + d : d}`; this.allDateDay = date;
} }
this.handleGetData(date); this.handleGetData(date);
@ -926,26 +974,26 @@ export default {
: this.currentScroll.split("item")[1]; : this.currentScroll.split("item")[1];
const req = { const req = {
calcType: this.pageType, calcType: this.pageType,
pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000", pushProvinceCode: "340000",
curYear: this.curYear, curYear: this.festivalObj.curYear,
compareYear: this.compareYear, compareYear: this.festivalObj.compareYear,
HolidayType: HolidayType: this.selectFestival,
this.selectFestival === 0 // this.selectFestival === 0
? 2 // ? 2
: this.selectFestival === 1 // : this.selectFestival === 1
? 3 // ? 3
: this.selectFestival === 2 // : this.selectFestival === 2
? 4 // ? 4
: this.selectFestival === 3 // : this.selectFestival === 3
? 5 // ? 5
: this.selectFestival === 4 // : this.selectFestival === 4
? 6 // ? 6
: this.selectFestival === 5 // : this.selectFestival === 5
? 7 // ? 7
: this.selectFestival === 6 // : this.selectFestival === 6
? 8 // ? 8
: "", // : "",
StatisticsDate: time, StatisticsDate: this.allDateDay,
businessRegion: 1, businessRegion: 1,
SortStr: `${ SortStr: `${
this.type === 1 this.type === 1
@ -1320,12 +1368,13 @@ export default {
Serverpart_ID: obj.ServerpartId, Serverpart_ID: obj.ServerpartId,
}; };
uni.setStorageSync("springService", springObj); // uni.setStorageSync("springService", springObj); //
console.log("obj", obj);
this.$util.toNextRoute( this.$util.toNextRoute(
"navigateTo", "navigateTo",
`/pages/nationalPage/merchantRevenue?ServerpartId=${ `/pages/nationalPage/merchantRevenue?ServerpartId=${
obj.ServerpartId obj.ServerpartId
}&type=${this.type}&serverPartList=${JSON.stringify( }&type=${this.type}&festivalObj=${JSON.stringify(
this.serverPartList this.festivalObj
)}&currentScroll=${this.currentScroll}&festivalType=${ )}&currentScroll=${this.currentScroll}&festivalType=${
this.selectFestival this.selectFestival
}` }`

View File

@ -86,14 +86,29 @@
class="pick" class="pick"
@change="handleChangeFestival($event)" @change="handleChangeFestival($event)"
:value="currentIndex" :value="currentIndex"
:range="defaultFestivalList" :range="canSelectFestivalList"
range-key="label" range-key="label"
> >
<!-- :range="defaultFestivalList" -->
<div <div
class="festivalChangeBox" class="festivalChangeBox"
:style="{ paddingTop: menu.bottom + 32 + 'px' }" :style="{ paddingTop: menu.bottom + 32 + 'px' }"
> >
<image <div class="newChangeBox">
<image
class="changeIcon"
src="https://eshangtech.com/ShopICO/ahyd-BID/newIndex/1stDateTime.svg"
/>
<!-- defaultFestivalList[currentIndex].label -->
<span class="festivalName">{{
canSelectFestivalList[currentIndex].label
}}</span>
<image
class="changeIcon"
src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"
/>
</div>
<!-- <image
:style="{ :style="{
width: width:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival===2
@ -146,8 +161,8 @@
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayTitleIcon.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayTitleIcon.png'
: '' : ''
" "
/> /> -->
<image <!-- <image
class="changeIcon" class="changeIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival===2
@ -166,7 +181,7 @@
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/nationalDayRightArrow.png'
: '' : ''
" "
/> /> -->
</div> </div>
</picker> </picker>
</div> </div>
@ -177,7 +192,7 @@
<!-- 对客营收 --> <!-- 对客营收 -->
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'overAllDataTop springTop' ? 'overAllDataTop springTop'
: selectFestival === 3 : selectFestival === 3
? 'overAllDataTop qmTop' ? 'overAllDataTop qmTop'
@ -200,7 +215,7 @@
<img <img
class="titleImg" class="titleImg"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png'
@ -217,7 +232,10 @@
: '' : ''
" "
/> />
<text <text class="titleNotice"
>/{{ currentHoliday }}</text
>
<!-- <text
class="titleNotice" class="titleNotice"
v-if="!isShowWarningTime && selectFestival === 0" v-if="!isShowWarningTime && selectFestival === 0"
>{{ `/统计到${StatisticsDate}` }}</text >{{ `/统计到${StatisticsDate}` }}</text
@ -241,7 +259,7 @@
class="titleNotice" class="titleNotice"
v-if="!isShowWarningTime && selectFestival === 4" v-if="!isShowWarningTime && selectFestival === 4"
>{{ `/统计到${StatisticsDate}` }}</text >{{ `/统计到${StatisticsDate}` }}</text
> > -->
</div> </div>
<div class="typeChangeBox" v-if="!showSpring"> <div class="typeChangeBox" v-if="!showSpring">
<div <div
@ -325,7 +343,7 @@
<div class="pkBox"> <div class="pkBox">
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'leftBox springLeftBox' ? 'leftBox springLeftBox'
: selectFestival === 3 : selectFestival === 3
? 'leftBox qmLeftBox' ? 'leftBox qmLeftBox'
@ -351,11 +369,11 @@
</div> </div>
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'rightBox springRightBox' ? 'rightBox springRightBox'
: selectFestival === 3 : selectFestival === 3
? 'rightBox qmRightBox' ? 'rightBox qmRightBox'
: selectFestival ===4 : selectFestival === 4
? 'rightBox labourRightBox' ? 'rightBox labourRightBox'
: selectFestival === 5 : selectFestival === 5
? 'rightBox dragonBoatRightBox' ? 'rightBox dragonBoatRightBox'
@ -378,7 +396,7 @@
<img <img
class="pkLogo" class="pkLogo"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/vs.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/vs.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk1st.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk1st.png'
@ -1125,7 +1143,7 @@
<div class="pkBox"> <div class="pkBox">
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'leftBox revenueLeft' ? 'leftBox revenueLeft'
: selectFestival === 3 : selectFestival === 3
? 'leftBox qmRevenueLeft' ? 'leftBox qmRevenueLeft'
@ -1137,7 +1155,7 @@
? 'leftBox summerHolidayRevenueLeft' ? 'leftBox summerHolidayRevenueLeft'
: selectFestival === 7 : selectFestival === 7
? 'leftBox midAutumnRevenueLeft' ? 'leftBox midAutumnRevenueLeft'
: selectFestival ===8 : selectFestival === 8
? 'leftBox nationalDayRevenueLeft' ? 'leftBox nationalDayRevenueLeft'
: '' : ''
" "
@ -1151,7 +1169,7 @@
</div> </div>
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'rightBox revenueRight' ? 'rightBox revenueRight'
: selectFestival === 3 : selectFestival === 3
? 'rightBox qmRevenueRight' ? 'rightBox qmRevenueRight'
@ -1178,7 +1196,7 @@
<img <img
class="pkLogo" class="pkLogo"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueVS.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueVS.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk2st.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk2st.png'
@ -1722,9 +1740,9 @@
<div class="pkBox" style="margin-bottom: 20px"> <div class="pkBox" style="margin-bottom: 20px">
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'leftBox carLeft' ? 'leftBox carLeft'
: selectFestival ===3 : selectFestival === 3
? 'leftBox qmCarLeft' ? 'leftBox qmCarLeft'
: selectFestival === 4 : selectFestival === 4
? 'leftBox labourCarLeft' ? 'leftBox labourCarLeft'
@ -1748,11 +1766,11 @@
</div> </div>
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'rightBox carRight' ? 'rightBox carRight'
: selectFestival === 3 : selectFestival === 3
? 'rightBox qmCarRight' ? 'rightBox qmCarRight'
: selectFestival ===4 : selectFestival === 4
? 'rightBox labourCarRight' ? 'rightBox labourCarRight'
: selectFestival === 5 : selectFestival === 5
? 'rightBox dragonBoatCarRight' ? 'rightBox dragonBoatCarRight'
@ -1775,7 +1793,7 @@
<img <img
class="pkLogo" class="pkLogo"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/carVS.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/carVS.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk3st.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPk3st.png'
@ -1905,7 +1923,7 @@
<div class="revenueDetail"> <div class="revenueDetail">
<div <div
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'springTitleBox revenueDetailTitleBox' ? 'springTitleBox revenueDetailTitleBox'
: selectFestival === 3 : selectFestival === 3
? 'qmTitleBox revenueDetailTitleBox' ? 'qmTitleBox revenueDetailTitleBox'
@ -1926,7 +1944,7 @@
<img <img
class="detailLogo" class="detailLogo"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailLogo.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailLogo.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDaily.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDaily.png'
@ -1946,7 +1964,7 @@
<img <img
class="detailIcon" class="detailIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailIcon.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/revenueDetailIcon.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDetailIcon.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmDetailIcon.png'
@ -1973,7 +1991,7 @@
class="goTest" class="goTest"
@click="handleGoTest" @click="handleGoTest"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/springTravelBtn.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/springTravelBtn.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPic.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmPic.png'
@ -1995,7 +2013,7 @@
<scroll-view <scroll-view
scroll-x="true" scroll-x="true"
:class=" :class="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'navList springNav' ? 'navList springNav'
: selectFestival === 3 : selectFestival === 3
? 'navList qmNav' ? 'navList qmNav'
@ -2039,13 +2057,13 @@
class="modalIndex" class="modalIndex"
:style="{ :style="{
background: background:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#DB6465' ? '#DB6465'
: selectFestival === 3 : selectFestival === 3
? '#3B9285' ? '#3B9285'
: selectFestival ===4 : selectFestival === 4
? '#D14702' ? '#D14702'
: selectFestival ===5 : selectFestival === 5
? '#3E8958' ? '#3E8958'
: selectFestival === 6 : selectFestival === 6
? '#007797' ? '#007797'
@ -2064,7 +2082,7 @@
class="moreText" class="moreText"
:style="{ :style="{
color: color:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#ED3E48' ? '#ED3E48'
: selectFestival === 3 : selectFestival === 3
? '#226C61' ? '#226C61'
@ -2086,13 +2104,13 @@
<img <img
class="moreIcon" class="moreIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
: selectFestival === 4 : selectFestival === 4
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
: selectFestival ===5 : selectFestival === 5
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png'
: selectFestival === 6 : selectFestival === 6
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/summerHolidayRight.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/summerHolidayRight.png'
@ -2114,7 +2132,7 @@
class="modalIndex" class="modalIndex"
:style="{ :style="{
background: background:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#DB6465' ? '#DB6465'
: selectFestival === 3 : selectFestival === 3
? '#3B9285' ? '#3B9285'
@ -2139,7 +2157,7 @@
class="moreText" class="moreText"
:style="{ :style="{
color: color:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#ED3E48' ? '#ED3E48'
: selectFestival === 3 : selectFestival === 3
? '#226C61' ? '#226C61'
@ -2161,11 +2179,11 @@
<img <img
class="moreIcon" class="moreIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
: selectFestival ===4 : selectFestival === 4
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
: selectFestival === 5 : selectFestival === 5
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatRight.png'
@ -2693,7 +2711,7 @@
class="modalIndex" class="modalIndex"
:style="{ :style="{
background: background:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#DB6465' ? '#DB6465'
: selectFestival === 3 : selectFestival === 3
? '#3B9285' ? '#3B9285'
@ -2718,11 +2736,11 @@
class="moreText" class="moreText"
:style="{ :style="{
color: color:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#ED3E48' ? '#ED3E48'
: selectFestival === 3 : selectFestival === 3
? '#226C61' ? '#226C61'
: selectFestival ===4 : selectFestival === 4
? '#D14702' ? '#D14702'
: selectFestival === 5 : selectFestival === 5
? '#226C61' ? '#226C61'
@ -2740,7 +2758,7 @@
<img <img
class="moreIcon" class="moreIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
@ -2778,7 +2796,7 @@
class="modalIndex" class="modalIndex"
:style="{ :style="{
background: background:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#DB6465' ? '#DB6465'
: selectFestival === 3 : selectFestival === 3
? '#3B9285' ? '#3B9285'
@ -2803,7 +2821,7 @@
class="moreText" class="moreText"
:style="{ :style="{
color: color:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#ED3E48' ? '#ED3E48'
: selectFestival === 3 : selectFestival === 3
? '#226C61' ? '#226C61'
@ -2825,7 +2843,7 @@
<img <img
class="moreIcon" class="moreIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
@ -3359,7 +3377,7 @@
class="modalIndex" class="modalIndex"
:style="{ :style="{
background: background:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#DB6465' ? '#DB6465'
: selectFestival === 3 : selectFestival === 3
? '#3B9285' ? '#3B9285'
@ -3384,7 +3402,7 @@
class="moreText" class="moreText"
:style="{ :style="{
color: color:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#ED3E48' ? '#ED3E48'
: selectFestival === 3 : selectFestival === 3
? '#226C61' ? '#226C61'
@ -3406,9 +3424,9 @@
<img <img
class="moreIcon" class="moreIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
: selectFestival ===3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
: selectFestival === 4 : selectFestival === 4
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourRight.png'
@ -3444,7 +3462,7 @@
class="modalIndex" class="modalIndex"
:style="{ :style="{
background: background:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#DB6465' ? '#DB6465'
: selectFestival === 3 : selectFestival === 3
? '#3B9285' ? '#3B9285'
@ -3452,7 +3470,7 @@
? '#D14702' ? '#D14702'
: selectFestival === 5 : selectFestival === 5
? '#3E8958' ? '#3E8958'
: selectFestival ===6 : selectFestival === 6
? '#007797' ? '#007797'
: selectFestival === 7 : selectFestival === 7
? '#DA5015' ? '#DA5015'
@ -3469,7 +3487,7 @@
class="moreText" class="moreText"
:style="{ :style="{
color: color:
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? '#ED3E48' ? '#ED3E48'
: selectFestival === 3 : selectFestival === 3
? '#226C61' ? '#226C61'
@ -3491,7 +3509,7 @@
<img <img
class="moreIcon" class="moreIcon"
:src=" :src="
selectFestival === 1 || selectFestival===2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/redRightArrow.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/greenRightArrow.png'
@ -3861,7 +3879,7 @@ export default {
HolidayType: 2, HolidayType: 2,
curYear: 2025, curYear: 2025,
compareYear: 2024, compareYear: 2024,
startTime: "2025-01-13", startTime: "2025-01-14",
endTime: "2025-02-23", endTime: "2025-02-23",
lastYearStart: "2024/01/26", lastYearStart: "2024/01/26",
lastYearEnd: "2024/03/05", lastYearEnd: "2024/03/05",
@ -3906,9 +3924,9 @@ export default {
curYear: 2025, curYear: 2025,
compareYear: 2024, compareYear: 2024,
startTime: "2025-06-30", startTime: "2025-06-30",
endTime: "2025-09-01", endTime: "2025-08-31",
lastYearStart: "2024/06/30", lastYearStart: "2024/06/30",
lastYearEnd: "2024/09/01", lastYearEnd: "2024/08/31",
}, },
// { // {
// label: "25", // label: "25",
@ -3991,9 +4009,9 @@ export default {
curYear: 2024, curYear: 2024,
compareYear: 2023, compareYear: 2023,
startTime: "2024-06-30", startTime: "2024-06-30",
endTime: "2024-09-01", endTime: "2024-08-31",
lastYearStart: "2023/06/30", lastYearStart: "2023/06/30",
lastYearEnd: "2023/09/01", lastYearEnd: "2023/08/31",
}, },
{ {
label: "24年中秋", label: "24年中秋",
@ -4021,6 +4039,8 @@ export default {
currentFestival: {}, // currentFestival: {}, //
currentIndex: 0, // currentIndex: 0, //
StatisticsDate: "", // StatisticsDate: "", //
currentHoliday: 0, //
canSelectFestivalList:[], //
}; };
}, },
async onLoad(query) { async onLoad(query) {
@ -4042,15 +4062,24 @@ export default {
let nowTime = currentDate.getTime(); // let nowTime = currentDate.getTime(); //
let currentIndex = 0; // let currentIndex = 0; //
let currentObj = {}; // let currentObj = {}; //
let nowBeforeList = [];
this.defaultFestivalList.forEach((item, index) => { this.defaultFestivalList.forEach((item, index) => {
if (new Date(item.startTime).getTime() <= nowTime) {
nowBeforeList.push(item);
}
if ( if (
new Date(item.startTime).getTime() < nowTime && new Date(item.startTime).getTime() <= nowTime &&
new Date(item.endTime).getTime() > nowTime new Date(item.endTime).getTime() > nowTime
) { ) {
currentIndex = index; currentIndex = index;
currentObj = item; currentObj = item;
} }
}); });
console.log("nowBeforeList", nowBeforeList);
this.canSelectFestivalList = nowBeforeList
// currentObj // currentObj
// 25 // 25
if (!currentObj.label) { if (!currentObj.label) {
@ -4086,10 +4115,11 @@ export default {
if (currentObj) { if (currentObj) {
// //
if ( if (
new Date(currentObj.startTime).getTime() < nowTime && new Date(currentObj.startTime).getTime() <= nowTime &&
new Date(currentObj.endTime).getTime() > nowTime new Date(currentObj.endTime).getTime() > nowTime
) { ) {
let dayNumber = moment(this.lastDay).diff(currentObj.startTime, "days"); let dayNumber =
moment(this.lastDay).diff(currentObj.startTime, "days") + 1;
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++) {
@ -4101,6 +4131,7 @@ export default {
}); });
} }
} }
this.currentHoliday = dayNumber;
this.currentScroll = "item" + this.lastDay; this.currentScroll = "item" + this.lastDay;
this.StatisticsDate = this.lastDay; this.StatisticsDate = this.lastDay;
} else if (new Date(currentObj.endTime).getTime() < nowTime) { } else if (new Date(currentObj.endTime).getTime() < nowTime) {
@ -4118,6 +4149,7 @@ export default {
}); });
} }
} }
this.currentHoliday = dayNumber;
this.currentScroll = "item" + currentObj.endTime; this.currentScroll = "item" + currentObj.endTime;
this.StatisticsDate = currentObj.endTime; this.StatisticsDate = currentObj.endTime;
} }
@ -4370,21 +4402,21 @@ export default {
let currentObj = this.defaultFestivalList[Number(e.detail.value)]; let currentObj = this.defaultFestivalList[Number(e.detail.value)];
this.selectFestival = currentObj.HolidayType; this.selectFestival = currentObj.HolidayType;
this.currentFestival = currentObj; this.currentFestival = currentObj;
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);
let nowTime = currentDate.getTime(); // let nowTime = currentDate.getTime(); //
console.log("currentObj", currentObj);
console.log("this.lastDay", this.lastDay);
let dayList = []; let dayList = [];
if (currentObj) { if (currentObj) {
// //
if ( if (
new Date(currentObj.startTime).getTime() < nowTime && new Date(currentObj.startTime).getTime() <= nowTime &&
new Date(currentObj.endTime).getTime() > nowTime new Date(currentObj.endTime).getTime() > nowTime
) { ) {
let dayNumber = moment(this.lastDay).diff( let dayNumber =
currentObj.startTime, moment(this.lastDay).diff(currentObj.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++) {
@ -4396,6 +4428,7 @@ export default {
}); });
} }
} }
this.currentHoliday = dayNumber;
this.currentScroll = "item" + this.lastDay; this.currentScroll = "item" + this.lastDay;
this.StatisticsDate = this.lastDay; this.StatisticsDate = this.lastDay;
} else if (new Date(currentObj.endTime).getTime() < nowTime) { } else if (new Date(currentObj.endTime).getTime() < nowTime) {
@ -4413,6 +4446,7 @@ export default {
}); });
} }
} }
this.currentHoliday = dayNumber;
this.currentScroll = "item" + currentObj.endTime; this.currentScroll = "item" + currentObj.endTime;
this.StatisticsDate = currentObj.endTime; this.StatisticsDate = currentObj.endTime;
} }
@ -5465,7 +5499,9 @@ export default {
let time = this.currentScroll.split("item")[1]; let time = this.currentScroll.split("item")[1];
this.$util.toNextRoute( this.$util.toNextRoute(
"navigateTo", "navigateTo",
`/pages/nationalPage/rankPage?type=${type}&time=${time}&festivalType=${this.currentFestival.HolidayType}` `/pages/nationalPage/rankPage?type=${type}&time=${time}&festivalObj=${JSON.stringify(
this.currentFestival
)}`
); );
}, },
handleGoTest(type) { handleGoTest(type) {
@ -5709,15 +5745,34 @@ export default {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
padding: 32rpx; padding: 32rpx;
.festivalImg { .newChangeBox {
width: 168rpx; background: #fff;
height: 68rpx; padding: 16rpx 16rpx 16rpx 32rpx;
} border-radius: 32rpx;
.changeIcon { display: flex;
width: 32rpx; align-items: center;
height: 32rpx; .festivalName {
margin-left: 12rpx; margin: 0 16rpx;
font-size: 28rpx;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #160002;
line-height: 36rpx;
}
.changeIcon {
width: 32rpx;
height: 32rpx;
}
} }
// .festivalImg {
// width: 168rpx;
// height: 68rpx;
// }
// .changeIcon {
// width: 32rpx;
// height: 32rpx;
// margin-left: 12rpx;
// }
} }
} }

View File

@ -51,7 +51,7 @@
: '' : ''
" "
/> />
<div class="contentText" v-if="selectFestival === 1"> <div class="contentText" v-if="selectFestival === 2">
根据历史大数据显示<br /> 根据历史大数据显示<br />
<div style="text-indent: 2rem; font-size: 24rpx"> <div style="text-indent: 2rem; font-size: 24rpx">
服务区会在春运前至农历小年夜前<span class="red" 服务区会在春运前至农历小年夜前<span class="red"
@ -70,13 +70,13 @@
<div <div
class="noticeBox" class="noticeBox"
style="height: 500rpx" style="height: 500rpx"
v-if="selectFestival === 3" v-if="selectFestival === 4"
> >
<div <div
:class=" :class="
selectFestival === 1 || selectFestival === 2 selectFestival === 1 || selectFestival === 2
? 'boxBg springBox' ? 'boxBg springBox'
: selectFestival ===3 : selectFestival === 3
? 'boxBg qmBox' ? 'boxBg qmBox'
: selectFestival === 4 : selectFestival === 4
? 'boxBg labourBox' ? 'boxBg labourBox'
@ -99,7 +99,7 @@
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/imgDesc.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/imgDesc.png'
: selectFestival === 3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/trendChart.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/trendChart.png'
: selectFestival ===4 : selectFestival === 4
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/larburTrendChart.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/larburTrendChart.png'
: selectFestival === 5 : selectFestival === 5
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatChart.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/dragonBoatChart.png'
@ -165,7 +165,7 @@
:src=" :src="
selectFestival === 1 || selectFestival === 2 selectFestival === 1 || selectFestival === 2
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/allDataTitle.png'
: selectFestival ===3 : selectFestival === 3
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/qmSumData.png'
: selectFestival === 4 : selectFestival === 4
? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourAllData.png' ? 'https://eshangtech.com/ShopICO/ahyd-BID/newIndex3/labourAllData.png'
@ -216,7 +216,7 @@
? 'rightBox qmRightBox' ? 'rightBox qmRightBox'
: selectFestival === 4 : selectFestival === 4
? 'rightBox labourRightBox' ? 'rightBox labourRightBox'
: selectFestival ===5 : selectFestival === 5
? 'rightBox dragonBoatRightBox' ? 'rightBox dragonBoatRightBox'
: selectFestival === 6 : selectFestival === 6
? 'rightBox summerHolidayRightBox' ? 'rightBox summerHolidayRightBox'
@ -609,72 +609,82 @@ export default {
let realCompareList = []; let realCompareList = [];
if (dataObj && dataObj.compareList && dataObj.compareList.length > 0) { if (dataObj && dataObj.compareList && dataObj.compareList.length > 0) {
dataObj.compareList.forEach((item) => {
realCompareList.push(Number(item.value));
compareList.push(Number(item.value) / 10000);
const date = new Date(item.name);
let m = date.getMonth() + 1;
let d = date.getDate();
let dateText = `${m}.${d}`;
item.easyDate = dateText;
compareDateList.push(moment(item.name).format("YYYY-MM-DD"));
});
// //
console.log("type", typeof dataObj.compareHoliday); console.log("type", typeof dataObj.compareHoliday);
let startIndex = 0; let startIndex = 0;
let endIndex = 0; let endIndex = 0;
if (dataObj.compareHoliday.indexOf("-") === -1) { // if (dataObj.compareHoliday.indexOf("-") === -1) {
let midIndex = 0; // let midIndex = 0;
let time = dataObj.compareHoliday.replace(".", "/"); // let time = dataObj.compareHoliday.replace(".", "/");
dataObj.compareList.forEach((item, index) => { // dataObj.compareList.forEach((item, index) => {
let date = new Date(item.name); // let date = new Date(item.name);
let dateM = date.getMonth() + 1; // let dateM = date.getMonth() + 1;
if (dateM < 10) { // if (dateM < 10) {
dateM = "0" + dateM; // dateM = "0" + dateM;
} // }
let dateD = date.getDate(); // let dateD = date.getDate();
if (dateD < 10) { // if (dateD < 10) {
dateD = "0" + dateD; // dateD = "0" + dateD;
} // }
let monthDay = `${dateM}/${dateD}`; // let monthDay = `${dateM}/${dateD}`;
if (monthDay === time) { // if (monthDay === time) {
midIndex = index; // midIndex = index;
} // }
}); // });
startIndex = midIndex - 1; // startIndex = midIndex - 1;
endIndex = midIndex + 1; // endIndex = midIndex + 1;
} else { // } else {
let [start, end] = dataObj.compareHoliday.split("-"); // let [start, end] = dataObj.compareHoliday.split("-");
start = start.replace(".", "/"); // start = start.replace(".", "/");
end = end.replace(".", "/"); // end = end.replace(".", "/");
console.log("start", start); // console.log("start", start);
console.log("end", end); // console.log("end", end);
// // //
dataObj.compareList.forEach((item, index) => { // dataObj.compareList.forEach((item, index) => {
let date = new Date(item.name); // let date = new Date(item.name);
let dateM = date.getMonth() + 1; // let dateM = date.getMonth() + 1;
if (dateM < 10) { // if (dateM < 10) {
dateM = "0" + dateM; // dateM = "0" + dateM;
} // }
let dateD = date.getDate(); // let dateD = date.getDate();
if (dateD < 10) { // if (dateD < 10) {
dateD = "0" + dateD; // dateD = "0" + dateD;
} // }
let monthDay = `${dateM}/${dateD}`; // let monthDay = `${dateM}/${dateD}`;
if (monthDay === start) { // if (monthDay === start) {
startIndex = index; // startIndex = index;
} // }
if (monthDay === end) { // if (monthDay === end) {
endIndex = index; // endIndex = index;
} // }
}); // });
} // }
// // //
let list = dataObj.compareList.slice(startIndex, endIndex + 1); // let list = dataObj.compareList.slice(startIndex, endIndex + 1);
if (list && list.length > 0) { // if (list && list.length > 0) {
list.forEach((item) => { // list.forEach((item) => {
realCompareList.push(Number(item.value)); // realCompareList.push(Number(item.value));
compareList.push(Number(item.value) / 10000); // compareList.push(Number(item.value) / 10000);
const date = new Date(item.name); // const date = new Date(item.name);
let m = date.getMonth() + 1; // let m = date.getMonth() + 1;
let d = date.getDate(); // let d = date.getDate();
let dateText = `${m}.${d}`; // let dateText = `${m}.${d}`;
item.easyDate = dateText; // item.easyDate = dateText;
compareDateList.push(moment(item.name).format("YYYY-MM-DD")); // compareDateList.push(moment(item.name).format("YYYY-MM-DD"));
}); // });
} // }
} }
// //
let curDateList = []; let curDateList = [];
@ -686,71 +696,83 @@ export default {
let startIndex = 0; let startIndex = 0;
let endIndex = 0; let endIndex = 0;
if (dataObj && dataObj.curList && dataObj.curList.length > 0) { if (dataObj && dataObj.curList && dataObj.curList.length > 0) {
if (dataObj.curHoliday.indexOf("-") === -1) { dataObj.curList.forEach((item) => {
let midIndex = 0; realCurList.push(Number(item.value));
let time = dataObj.curHoliday.replace(".", "/"); curListList.push(Number(item.value) / 10000);
dataObj.curList.forEach((item, index) => { const date = new Date(item.name);
let date = new Date(item.name); let m = date.getMonth() + 1;
let dateM = date.getMonth() + 1; let d = date.getDate();
if (dateM < 10) { let dateText = `${m}.${d}`;
dateM = "0" + dateM; item.easyDate = dateText;
} curDateList.push(moment(item.name).format("YYYY-MM-DD"));
let dateD = date.getDate(); });
if (dateD < 10) {
dateD = "0" + dateD;
}
let monthDay = `${dateM}/${dateD}`;
if (monthDay === time) {
midIndex = index;
}
});
startIndex = midIndex - 1;
endIndex = midIndex + 1;
} else {
//
let [start, end] = dataObj.curHoliday.split("-");
start = start.replace(".", "/");
end = end.replace(".", "/");
console.log("start", start);
console.log("end", end);
dataObj.curList.forEach((item, index) => { // if (dataObj.curHoliday.indexOf("-") === -1) {
let date = new Date(item.name); // let midIndex = 0;
let dateM = date.getMonth() + 1; // let time = dataObj.curHoliday.replace(".", "/");
if (dateM < 10) { // dataObj.curList.forEach((item, index) => {
dateM = "0" + dateM; // let date = new Date(item.name);
} // let dateM = date.getMonth() + 1;
let dateD = date.getDate(); // if (dateM < 10) {
if (dateD < 10) { // dateM = "0" + dateM;
dateD = "0" + dateD; // }
} // let dateD = date.getDate();
let monthDay = `${dateM}/${dateD}`; // if (dateD < 10) {
if (monthDay === start) { // dateD = "0" + dateD;
startIndex = index; // }
} // let monthDay = `${dateM}/${dateD}`;
if (monthDay === end) { // if (monthDay === time) {
endIndex = index; // midIndex = index;
} // }
}); // });
// // startIndex = midIndex - 1;
let list = dataObj.curList.slice(startIndex, endIndex + 1); // endIndex = midIndex + 1;
if (list && list.length > 0) { // } else {
list.forEach((item) => { // //
realCurList.push(Number(item.value)); // let [start, end] = dataObj.curHoliday.split("-");
curListList.push(Number(item.value) / 10000); // start = start.replace(".", "/");
const date = new Date(item.name); // end = end.replace(".", "/");
let m = date.getMonth() + 1; // console.log("start", start);
let d = date.getDate(); // console.log("end", end);
let dateText = `${m}.${d}`;
item.easyDate = dateText;
curDateList.push(moment(item.name).format("YYYY-MM-DD"));
});
}
console.log("startIndex", startIndex); // dataObj.curList.forEach((item, index) => {
console.log("endIndex", endIndex); // let date = new Date(item.name);
console.log("list", list); // let dateM = date.getMonth() + 1;
} // if (dateM < 10) {
// dateM = "0" + dateM;
// }
// let dateD = date.getDate();
// if (dateD < 10) {
// dateD = "0" + dateD;
// }
// let monthDay = `${dateM}/${dateD}`;
// if (monthDay === start) {
// startIndex = index;
// }
// if (monthDay === end) {
// endIndex = index;
// }
// });
// console.log("startIndex", startIndex);
// console.log("endIndex", endIndex);
// console.log("list", list);
// }
// //
// let list = dataObj.curList.slice(startIndex, endIndex + 1);
// if (list && list.length > 0) {
// list.forEach((item) => {
// realCurList.push(Number(item.value));
// curListList.push(Number(item.value) / 10000);
// const date = new Date(item.name);
// let m = date.getMonth() + 1;
// let d = date.getDate();
// let dateText = `${m}.${d}`;
// item.easyDate = dateText;
// curDateList.push(moment(item.name).format("YYYY-MM-DD"));
// });
// }
} }
console.log("compareDateMax", compareDateMax); console.log("compareDateMax", compareDateMax);
console.log("compareDateList", compareDateList); console.log("compareDateList", compareDateList);
@ -789,6 +811,7 @@ export default {
} }
this.res = normalData; this.res = normalData;
this.res2 = normalData;
this.opts = { this.opts = {
categories: normalData.categories, categories: normalData.categories,
series: normalData.series, series: normalData.series,
@ -840,7 +863,11 @@ export default {
}, },
}, },
}; };
let phoneInfo = uni.getStorageSync("phoneInfo");
console.log("phoneInfo", phoneInfo);
this.opts2 = { this.opts2 = {
width: phoneInfo.screenHeight + "px",
height: 2 * phoneInfo.screenWidth + "px",
categories: normalData.categories, categories: normalData.categories,
series: normalData.series, series: normalData.series,
animation: false, animation: false,
@ -883,6 +910,8 @@ export default {
}, },
}, },
}; };
console.log("this.opts2", this.opts2);
console.log("this.res2", this.res2);
uni.hideLoading(); uni.hideLoading();
return; return;
// let dateList = []; // let dateList = [];
@ -1213,8 +1242,8 @@ export default {
}, },
}; };
let phoneInfo = uni.getStorageSync("phoneInfo"); // let phoneInfo = uni.getStorageSync("phoneInfo");
console.log("phoneInfo", phoneInfo); // console.log("phoneInfo", phoneInfo);
let _this = this; let _this = this;
this.opts2 = { this.opts2 = {
// width:phoneInfo.screenHeight+'px', // width:phoneInfo.screenHeight+'px',
@ -1266,6 +1295,7 @@ export default {
}, },
handleShowAllScreen() { handleShowAllScreen() {
this.allScreen = !this.allScreen; this.allScreen = !this.allScreen;
console.log("this.allScreen", this.allScreen);
}, },
getSplitNumber(value) { getSplitNumber(value) {
if (value === 0 || value < 5) { if (value === 0 || value < 5) {