- 车流预警
+ {{ isShowFestival ? '昨日车流对比' : '车流预警' }}
/Top3
@@ -4151,48 +4152,64 @@ export default {
title: "元旦",
startTime: "2025-12-31",
endTime: "2026-01-04",
+ curYear: 2026,
+ lastYear: 2025
}, //
spring: {
name: "spring",
title: "平安春运",
startTime: "2026-02-02",
endTime: "2026-03-14",
+ curYear: 2026,
+ lastYear: 2025
}, // 春运
qm: {
name: "qm",
title: "清明节",
startTime: "2026-04-03",
endTime: "2026-04-07",
+ curYear: 2026,
+ lastYear: 2025
}, // 清明节
labour: {
name: "labour",
title: "劳动节",
startTime: "2026-04-30",
endTime: "2026-05-06",
+ curYear: 2026,
+ lastYear: 2025
}, // 劳动节
dragonBoat: {
name: "dragonBoat",
title: "端午节",
startTime: "2026-06-18",
endTime: "2026-06-22",
+ curYear: 2026,
+ lastYear: 2025
},
summerHoliday: {
name: "summerHoliday",
title: "火热暑运",
startTime: "2026-06-30",
endTime: "2026-08-31",
+ curYear: 2026,
+ lastYear: 2025
}, // 暑假
midAutumn: {
name: "midAutumn",
title: "中秋节",
startTime: "2026-09-24",
endTime: "2026-09-28",
+ curYear: 2026,
+ lastYear: 2025
}, // 中秋节
nationalDay: {
name: "nationalDay",
title: "国庆节",
startTime: "2026-09-30", // 说要提早两天显示节日的图标 没有数据也没关系 2024-09-30
endTime: "2026-10-08",
+ curYear: 2026,
+ lastYear: 2025
}, // 国庆节
// spring: {
// name: "spring",
@@ -4237,6 +4254,7 @@ export default {
// endTime: "2025-10-09",
// }, // 国庆节
}, // 2024年的全部节日
+ currentFestivalObj: {},// 当前选择的节日
allselectVersion3Obj: {}, //累计
selectVersion3Obj: {}, //正常
smallTab: 1, // 演示版的几个显示样式
@@ -4297,6 +4315,22 @@ export default {
if (!this.isReturn) {
+
+ for (let key in this.festivalObj) {
+ let obj = this.festivalObj[key];
+ if (
+ new Date(obj.startTime).getTime() <= new Date(this.lastDay).getTime() &&
+ new Date(this.lastDay).getTime() < new Date(obj.endTime).getTime()
+ ) {
+ this.isShowFestival = obj.name
+ this.currentFestivalObj = obj
+ }
+ }
+ if (!this.isShowFestival) {
+ this.isShowFestival = "other";
+ }
+ uni.setStorageSync("festival", this.isShowFestival);
+
this.getData(this.option);
this.handleNoticeMonth();
this.handleNoticeYear();
@@ -4362,7 +4396,8 @@ export default {
new Date(obj.startTime).getTime() <= new Date(this.lastDay).getTime() &&
new Date(this.lastDay).getTime() < new Date(obj.endTime).getTime()
) {
- this.isShowFestival = obj.name;
+ this.isShowFestival = obj.name
+ this.currentFestivalObj = obj
}
}
if (!this.isShowFestival) {
@@ -4631,7 +4666,7 @@ export default {
let m = date.getMonth() + 1;
const req = {
calcType: 1, //计算方式:1【当月】,2【累计】
- pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
curYear: y, //本年年份
compareYear: y - 1, //历年年份
StatisticsMonth: this.selectMonth, //结算月份
@@ -4643,7 +4678,7 @@ export default {
);
const allReq = {
calcType: 2, //计算方式:1【当月】,2【累计】
- pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
curYear: y, //本年年份
compareYear: y - 1, //历年年份
StatisticsMonth: this.selectMonth, //结算月份
@@ -4805,7 +4840,7 @@ export default {
// 拿到国庆数据
async handleGetNationalData() {
let req = {
- pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
StatisticsEndDate: this.lastDay,
ShowGrowthRate: true,
};
@@ -5166,7 +5201,7 @@ export default {
// 实时营收
handleRealRevenue() {
let req = {
- pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
StatisticsDate: this.nowDay,
};
request
@@ -5191,44 +5226,89 @@ export default {
d = "0" + d;
}
- const req = {
- // this.single
- StatisticsDate:
- h === 0
- ? moment(`${y}-${m}-${d}`).subtract(1, "day").format("YYYY-MM-DD")
- : `${y}-${m}-${d}`,
- StatisticsHour: h === 0 ? 23 : h - 1,
- StatisticsType: 1,
- ShowCount: 20,
- };
- request
- .$webGet("CommercialApi/BigData/GetBayonetWarning", req)
- .then((res) => {
- if (res.Result_Data.List && res.Result_Data.List.length > 0) {
- this.special = true;
- }
- res.Result_Data.List.forEach((item) => {
- item.name = item.SERVERPART_NAME.split("服务区")[0];
- });
- let list = JSON.parse(JSON.stringify(res.Result_Data.List));
- for (let i = 0; i <= list.length - 1; i++) {
- for (let j = 0; j <= list.length - i - 1; j++) {
- if (
- list[j] &&
- list[j + 1] &&
- list[j].VEHICLE_COUNT !== null &&
- list[j + 1].VEHICLE_COUNT !== null
- ) {
- if (list[j].VEHICLE_COUNT < list[j + 1].VEHICLE_COUNT) {
- let temp = list[j];
- list[j] = list[j + 1];
- list[j + 1] = temp;
+ console.log('this.currentFestivalObj', this.currentFestivalObj);
+
+ // 判断一下因为首页现在要昨日的 那么就是得 看看有没有节日 有节日才输出
+ if (!this.isShowFestival) {
+ const req = {
+ // this.single
+ StatisticsDate:
+ h === 0
+ ? moment(`${y}-${m}-${d}`).subtract(1, "day").format("YYYY-MM-DD")
+ : `${y}-${m}-${d}`,
+ StatisticsHour: h === 0 ? 23 : h - 1,
+ StatisticsType: 1,
+ ShowCount: 20,
+
+ };
+ request
+ .$webGet("CommercialApi/BigData/GetBayonetWarning", req)
+ .then((res) => {
+ if (res.Result_Data.List && res.Result_Data.List.length > 0) {
+ this.special = true;
+ }
+ res.Result_Data.List.forEach((item) => {
+ item.name = item.SERVERPART_NAME.split("服务区")[0];
+ });
+ let list = JSON.parse(JSON.stringify(res.Result_Data.List));
+ for (let i = 0; i <= list.length - 1; i++) {
+ for (let j = 0; j <= list.length - i - 1; j++) {
+ if (
+ list[j] &&
+ list[j + 1] &&
+ list[j].VEHICLE_COUNT !== null &&
+ list[j + 1].VEHICLE_COUNT !== null
+ ) {
+ if (list[j].VEHICLE_COUNT < list[j + 1].VEHICLE_COUNT) {
+ let temp = list[j];
+ list[j] = list[j + 1];
+ list[j + 1] = temp;
+ }
}
}
}
+ this.warningList = list.slice(0, 3);
+ });
+ } else {
+ let holidayObj = {
+ "newYearDay": 1,
+ "spring": 2,
+ "qm": 3,
+ "labour": 4,
+ "dragonBoat": 5,
+ "summerHoliday": 6,
+ "midAutumn": 7,
+ "nationalDay": 8,
+ }
+ // 到这里说明 首页是节假日
+ let req = {
+ StatisticsDate:
+ h === 0
+ ? moment(`${y}-${m}-${d}`).subtract(1, "day").format("YYYY-MM-DD")
+ : `${y}-${m}-${d}`,
+ StatisticsHour: h === 0 ? 23 : h - 1,
+ StatisticsType: 5, // 1: 预警, 2: 排行
+ HolidayType: holidayObj[this.isShowFestival],
+ curYear: this.currentFestivalObj.curYear,
+ compareYear: this.currentFestivalObj.lastYear,
+ ShowCount: 20,
+ }
+ console.log('fjdjafjsa', req);
+
+ request.$webGet('CommercialApi/BigData/GetHolidayBayonetWarning', req).then((res) => {
+ const list = res.Result_Data.List || [];
+ if (list.length > 0) {
+ this.special = true;
+ // 预处理名称
+ list.forEach((item) => {
+ item.name = item.SERVERPART_NAME ? item.SERVERPART_NAME.split("服务区")[0] : "";
+ });
+ // 使用原生 sort 降序排序
+ list.sort((a, b) => (b.VEHICLE_RATE || 0) - (a.VEHICLE_RATE || 0));
}
this.warningList = list.slice(0, 3);
- });
+ })
+ }
},
handleGoMap() {
this.$util.toNextRoute("navigateTo", "/pages/map/index?type=index");
@@ -5556,7 +5636,7 @@ export default {
DataType: 1,
StartMonth: date,
EndMonth: date,
- provinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ provinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
};
request
@@ -5605,7 +5685,7 @@ export default {
const req = {
StartDate: obj && obj.start ? obj.start : this.lastDay,
EndDate: obj && obj.end ? obj.end : this.lastDay,
- provinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ provinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
};
request
.$webGet("CommercialApi/Examine/GetPatrolAnalysis", req)
@@ -5661,20 +5741,20 @@ export default {
if (type) {
if (nowDate.getMonth() + 1 === this.selectMonth) {
req = {
- pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
StatisticsMonth: `${nowDate.getFullYear()}${month}`,
StatisticsDate: this.lastDay,
};
} else {
req = {
- pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
StatisticsMonth: `${nowDate.getFullYear()}${month}`,
StatisticsDate: this.lastDay,
};
}
} else {
req = {
- pushProvinceCode: this.useInfo.userData.ProvinceCode || "340000",
+ pushProvinceCode: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
StatisticsMonth: `${nowDate.getFullYear()}${month}`,
StatisticsDate: type ? null : this.lastDay,
};
@@ -5929,7 +6009,7 @@ export default {
time = `${y}${m}`;
}
const req = {
- Province_Code: this.useInfo.userData.ProvinceCode || "340000",
+ Province_Code: this.useInfo.userData ? this.useInfo.userData.ProvinceCode : "340000",
Statistics_Date: time,
};
request
diff --git a/pages/nationalPage/merchantRevenue.vue b/pages/nationalPage/merchantRevenue.vue
index bfe1574..6410d5a 100644
--- a/pages/nationalPage/merchantRevenue.vue
+++ b/pages/nationalPage/merchantRevenue.vue
@@ -31,11 +31,12 @@
: selectFestival === 8
? 'header headerNationalDay'
: ''
- " :style="{ height: menu.height + menu.top + 'px', top: 0 + 'px' }">
-
+
-
@@ -84,7 +88,7 @@
+
@@ -1085,7 +1088,15 @@ export default {
margin-right: 16px;
position: absolute;
}
+
+ .titleSvg {
+ width: 166rpx;
+ height: 48rpx;
+ position: absolute;
+ left: 100rpx;
+ }
}
+
}
.contentPage {
diff --git a/pages/nationalPage/springTravel.vue b/pages/nationalPage/springTravel.vue
index 4503983..037e218 100644
--- a/pages/nationalPage/springTravel.vue
+++ b/pages/nationalPage/springTravel.vue
@@ -536,60 +536,60 @@
-
+