diff --git a/package-lock.json b/package-lock.json
index e0e05cb..10a3fa3 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,10 +1,11 @@
{
- "name": "ahyd_DIB-master",
+ "name": "ahyd_DIB",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
+ "chinese-lunar-calendar": "^1.0.1",
"moment": "^2.25.3",
"sass": "^1.45.1",
"sass-loader": "^10.3.1",
@@ -397,6 +398,11 @@
],
"peer": true
},
+ "node_modules/chinese-lunar-calendar": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/chinese-lunar-calendar/-/chinese-lunar-calendar-1.0.1.tgz",
+ "integrity": "sha512-T5XjtA6ygOkxjwltYf8dEB1DLsPKewDKajf74fNeT6rH2g9EZPf2AHk6vAlK/SAImTYKXoUNQ3Q4JwN0BduqRA=="
+ },
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@@ -1518,6 +1524,11 @@
"integrity": "sha512-Rcp7221ScNqQPP3W+lVOYDyjdR6dC+neEQCttoNr5bAyz54AboB4iwpnWgyi8P4YUsPybVzT4LgWiBbI3drL4g==",
"peer": true
},
+ "chinese-lunar-calendar": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/chinese-lunar-calendar/-/chinese-lunar-calendar-1.0.1.tgz",
+ "integrity": "sha512-T5XjtA6ygOkxjwltYf8dEB1DLsPKewDKajf74fNeT6rH2g9EZPf2AHk6vAlK/SAImTYKXoUNQ3Q4JwN0BduqRA=="
+ },
"chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
diff --git a/package.json b/package.json
index a3d34d5..5599f61 100644
--- a/package.json
+++ b/package.json
@@ -1,8 +1,9 @@
{
"dependencies": {
+ "chinese-lunar-calendar": "^1.0.1",
+ "moment": "^2.25.3",
"sass": "^1.45.1",
"sass-loader": "^10.3.1",
- "vuex-persistedstate": "^4.1.0",
- "moment": "^2.25.3"
+ "vuex-persistedstate": "^4.1.0"
}
}
diff --git a/pages.json b/pages.json
index 3aa43e1..ee8c12b 100644
--- a/pages.json
+++ b/pages.json
@@ -82,6 +82,7 @@
}
]
},
+
{
"root": "pages/nationalPage",
"pages": [
diff --git a/pages/festival/components/entryCarNumber.vue b/pages/festival/components/entryCarNumber.vue
new file mode 100644
index 0000000..285b7e0
--- /dev/null
+++ b/pages/festival/components/entryCarNumber.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+
+
+
diff --git a/pages/festival/components/yearRevenue.vue b/pages/festival/components/yearRevenue.vue
new file mode 100644
index 0000000..26812b7
--- /dev/null
+++ b/pages/festival/components/yearRevenue.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
diff --git a/pages/festival/index.vue b/pages/festival/index.vue
new file mode 100644
index 0000000..053bf07
--- /dev/null
+++ b/pages/festival/index.vue
@@ -0,0 +1,986 @@
+
+
+
+
+
+
+
+
+
{{`欢度${festival[selectIndex - 1].label}`}}
+

+
+
+
+
+
+
+
+
+
营收同比
+
{{showTimeText}}
+
+
+
+
2023年对客营收金额:
+
+
{{ $util.fmoney(currentRevenue,2) }}元
+
+
+
2022年对客营收金额:
+
{{ $util.fmoney(compareRevenue,2) }}元
+
+
+
+
+
+
{{`2022年${festival[selectIndex - 1].label}假期为${selectIndex===1?'10.1-10.7':selectIndex===2?'4.30-5.4':'1.31-2.09'},共${selectIndex===1?'7':selectIndex===2?'5':'10'}日`}}
+
+
{{`2023年${festival[selectIndex - 1].label}假期为${selectIndex===1?'10.1-10.7':selectIndex===2?'4.29-5.5':'1.20-1.29'},共${selectIndex===3?10:7}日`}}
+
+
+
+
+
+
+
入区车流量
+
单位:辆
+
+
注:入区车辆数按当期卡口设备的服务区,计算的平均每日入区数量
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 73b1e3a..d988c25 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -419,35 +419,6 @@
-
-
-
-
-
-
-
-
{{item.value || '-'}}
-
{{item.title}}{{item.unit}}
-
-
-
-
-
@@ -716,7 +687,35 @@
+
+
+
+
+
+ 节日特刊
+
+
+
+
+
+
+
+
+
+
+ {{lastDay}}
+
+
+
+
+
{{item.value || '-'}}
+
{{item.title}}{{item.unit}}
+
+
+
+
+
@@ -3597,7 +3596,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
.nationalDay{
width: calc(100% - 64rpx);
- height: 286rpx;
+ //height: 286rpx;
margin-left: 32rpx;
border-radius: 16rpx;
margin-top: 24rpx;
@@ -3607,7 +3606,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
//background-size: 100% 100%;
.national{
box-sizing: border-box;
- padding: 0 24rpx 24rpx;
+ padding: 20rpx 24rpx;
width: 100%;
height: 100%;
.nationalTop{
@@ -3615,9 +3614,18 @@ $iphoneHeight: env(safe-area-inset-bottom);
display: flex;
align-items: center;
justify-content: space-between;
+ margin-bottom: 8px;
.nationalTopLeft{
display: flex;
align-items: center;
+
+ .topText{
+ font-size: 32rpx;
+ //font-family: Alimama ShuHeiTi;
+ font-weight: bold;
+ color: #EC6C00;
+ line-height: 38rpx;
+ }
.lanternImg{
width: 104rpx;
height: 126rpx;
diff --git a/pages/nationalPage/index.vue b/pages/nationalPage/index.vue
index 53fc78a..5751072 100644
--- a/pages/nationalPage/index.vue
+++ b/pages/nationalPage/index.vue
@@ -6,11 +6,17 @@
-
欢度国庆
+
欢度国庆
+
+
+
{{`欢度${festival[selectIndex - 1].label}`}}
+

+
+
-
+
@@ -131,7 +137,7 @@
2023年对客营收金额:
-
+
{{ $util.fmoney(currentRevenue,2) }}元
-
2022年国庆假期为10.1-10.7,共7日
-
2023年双节假期为9.28-10.6,共8日
+
{{`2022年${festival[selectIndex - 1].label}假期为${selectIndex===1?'10.1-10.7':selectIndex===2?'4.30-5.4':'1.31-2.09'},共${selectIndex===1?'7':selectIndex===2?'5':'10'}日`}}
+
+
{{`2023年${festival[selectIndex - 1].label}假期为${selectIndex===1?'10.1-10.7':selectIndex===2?'4.29-5.5':'1.20-1.29'},共${selectIndex===3?10:7}日`}}
@@ -166,7 +173,6 @@
单位:万元
-
@@ -177,6 +183,8 @@
import request from '@/util/index.js'
import YearRevenue from "./components/yearRevenue.vue";
import EntryCarNumber from "./components/entryCarNumber.vue";
+import {getLunar} from "chinese-lunar-calendar";
+import moment from "moment/moment";
export default {
name: "index",
components: {EntryCarNumber, YearRevenue},
@@ -184,6 +192,8 @@ export default {
return {
selectTab:1,
statusBarHeight:0,
+ festival:[{label:'国庆',value:1},{label:'五一',value:2},{label:'春节',value:3}],
+ selectIndex:1,
menu:{},
revenueList: [],// 营收排行
revenueSum:0,// 营收总计
@@ -202,6 +212,7 @@ export default {
flagGetCar:false,// 车流排行
flagGetCarCompare:false,//车流比较
flagGetRevenueCompare:false,// 营收比较
+ isUserEnter:true
}
},
onLoad(query){
@@ -216,13 +227,17 @@ export default {
uni.showLoading({
title: '正在加载...'
})
+ if (query.type){
+ this.isUserEnter = !(query.type==='true')
+ this.selectTab = 2
+ }
this.time = query.time
const date = new Date(query.time)
if (new Date(query.time).getTime() > new Date('2023-09-27').getTime()){
const date = new Date(query.time)
let m = date.getMonth()+1
let d = date.getDate()
- this.showTimeText = `9.28-${m}.${d}`
+ this.showTimeText = `9.28-10.7`
}else{
this.showTimeText = `9.28-9.28`
}
@@ -233,12 +248,30 @@ export default {
let d = date.getDate()
// ${y}年
this.dayName = `${m}月${d}日`
- // 拿到营收排行
- this.handleGetRevenue(query.time)
- // 车流排行
- this.handleGetCar(query.time)
+ if (this.selectTab===1){
+ // 拿到营收排行
+ this.handleGetRevenue(query.time)
+ // 车流排行
+ this.handleGetCar(query.time)
+ }else{
+ this.showTimeText = this.selectIndex===1?'9.28-10.7':this.selectIndex===2?'4.29-5.5':'1.20-1.29'
+ this.handleGetCarCompare()
+ this.handleGetRevenueCompare()
+ }
+
},
methods:{
+ // 切换节日类型
+ handleChangeType(e){
+ console.log('e',e)
+ this.selectIndex = Number(e.detail.value) + 1
+ uni.showLoading({
+ title:' 正在加载...'
+ })
+ this.showTimeText = this.selectIndex===1?'9.28-10.7':this.selectIndex===2?'4.29-5.5':'1.07-2.15'
+ this.handleGetCarCompare()
+ this.handleGetRevenueCompare()
+ },
// 切换标签卡
changeTab(num){
this.selectTab = num
@@ -302,8 +335,9 @@ export default {
async handleGetCarCompare(){
const req = {
pushProvinceCode:this.useInfo.userData.ProvinceCode || '340000',
- StatisticsStartDate:'2023/09/28',
- StatisticsEndDate:'2023/10/07'
+ StatisticsStartDate:this.selectIndex===1?'2023/09/28':this.selectIndex===2?'2023/04/29':'2023/01/20',
+ StatisticsEndDate:this.selectIndex===1?'2023/10/07':this.selectIndex===2?'2023/05/05':'2023/01/29',
+ ShowDateFormat:this.selectIndex===3?2:1
}
const data = await request.$webGet('CommercialApi/BigData/GetBayonetCompare',req)
console.log('compare',data)
@@ -311,6 +345,8 @@ export default {
let compareList = []
let curList = []
let max = 0
+ let dateList = []
+
data.Result_Data.compareList.forEach(item=>{
if (Number(item.value)>max){
max = Number(item.value)
@@ -322,9 +358,22 @@ export default {
max = Number(item.value)
}
curList.push(Number(item.value))
+
+ if (this.selectIndex===3){
+ const date = new Date(item.name)
+ let year = date.getFullYear()
+ let month = date.getMonth() + 1
+ let day = date.getDate()
+ const lunarDate = getLunar(year, month, day);
+ dateList.push(lunarDate.dateStr.slice(2,4))
+ // item.lunarDate = lunarDate.dateStr.slice(2,4)
+ }else{
+ dateList.push(moment(item.name).format('M.D'))
+ }
})
+
let res = {
- categories: ["9.28","9.29","9.30","10.1","10.2","10.3","10.4","10.5","10.6","10.7"],
+ categories: dateList,
series:[
{
name:"2022年",
@@ -347,9 +396,10 @@ export default {
async handleGetRevenueCompare(){
const req = {
pushProvinceCode:this.useInfo.userData.ProvinceCode || '340000',
- StatisticsStartDate:'2023/09/28',
- StatisticsEndDate:'2023/10/07',
- StatisticsDate:this.time
+ StatisticsStartDate:this.selectIndex===1?'2023/09/28':this.selectIndex===2?'2023/04/29':'2023/01/20',
+ StatisticsEndDate:this.selectIndex===1?'2023/10/07':this.selectIndex===2?'2023/05/05':'2023/01/29',
+ StatisticsDate:this.time,
+ ShowDateFormat:this.selectIndex===3?2:1
}
const data = await request.$webGet('CommercialApi/Revenue/GetRevenueYOY',req)
console.log('22222',data)
@@ -364,6 +414,7 @@ export default {
let curList = []
let realCurList = []
let max =0
+ let dateList = []
data.Result_Data.compareList.forEach(item=>{
let number = Number((item.value / 10000).toFixed(2))
if (number>max){
@@ -379,9 +430,69 @@ export default {
}
curList.push(number)
realCurList.push(item.value)
+
+ if (this.selectIndex===3){
+ const date = new Date(item.name)
+ let year = date.getFullYear()
+ let month = date.getMonth() + 1
+ let day = date.getDate()
+ const lunarDate = getLunar(year, month, day);
+ dateList.push(lunarDate.dateStr.slice(2,4))
+ // item.lunarDate = lunarDate.dateStr.slice(2,4)
+ }else{
+ dateList.push(moment(item.name).format('M.D'))
+ }
})
+
+ // if (this.selectIndex===3){
+ // let smallDateList = []
+ // let smallCompareList = []
+ // let smallCurList = []
+ // dateList.forEach((item,index)=>{
+ // if (smallDateList.length>=10){
+ // return
+ // }
+ // if (index%4===0){
+ // if (smallDateList.length===9){
+ // smallDateList.push('2.15')
+ // }else{
+ // smallDateList.push(item)
+ // }
+ // }
+ // })
+ //
+ // compareList.forEach((item,index)=>{
+ // if (smallCompareList.length>=10){
+ // return
+ // }
+ // if (index%4===0){
+ // if (smallDateList.length===9){
+ // smallCompareList.push(compareList[compareList.length-1])
+ // }else{
+ // smallCompareList.push(item)
+ // }
+ // }
+ // })
+ //
+ // curList.forEach((item,index)=>{
+ // if (smallCurList.length>=10){
+ // return
+ // }
+ // if (index%4===0){
+ // if (smallDateList.length===9){
+ // smallCurList.push(smallCurList[smallCurList.length-1])
+ // }else{
+ // smallCurList.push(item)
+ // }
+ // }
+ // })
+ // dateList = smallDateList
+ // compareList = smallCompareList
+ // curList = smallCurList
+ // }
+
let res = {
- categories: ["9.28","9.29","9.30","10.1","10.2","10.3","10.4","10.5","10.6","10.7"],
+ categories: dateList,
series:[
{
name:"2022年",
@@ -397,12 +508,11 @@ export default {
max:max
}
this.compareRevenueList = res
- console.log('this.compareRevenueList',this.compareRevenueList)
this.flagGetRevenueCompare=true
if (this.flagGetCarCompare && this.flagGetRevenueCompare){
uni.hideLoading()
}
- }
+ },
}
}
diff --git a/pages/suggestion/suggestionDetail.vue b/pages/suggestion/suggestionDetail.vue
index fd51da5..5936468 100644
--- a/pages/suggestion/suggestionDetail.vue
+++ b/pages/suggestion/suggestionDetail.vue
@@ -54,7 +54,7 @@
请选择
{{pickerIndex==-1? '请选择': dealerList[pickerIndex].MEMBERSHIP_NAME}}
@@ -195,6 +195,7 @@
let arr = []
_this.isLoadingDelPerson = false
uni.hideLoading()
+ console.log('res.Data.List',res.Data.List)
_this.dealerList = res.Data.List
})
diff --git a/pages/userCenter/userCenter.vue b/pages/userCenter/userCenter.vue
index 355ba77..57cc154 100644
--- a/pages/userCenter/userCenter.vue
+++ b/pages/userCenter/userCenter.vue
@@ -79,10 +79,10 @@ import Tabbar from "../../components/tabbar/tabbar.vue";
{
id:'',
name: '节日特刊',
- homeUrl: '/commercialOperation/festival/index',
+ homeUrl: `/pages/nationalPage/index?time=${lastDay}&type=true`,
imagePath: 'https://eshangtech.com/ShopICO/ahyd-BID/user/festival.svg',
bgUrl:'https://eshangtech.com/ShopICO/ahyd-BID/user/firstBg_2.png',
- isNotice:'',
+ isNotice:true,
value: 1,
},
{
diff --git a/static/images/puching/succes.png b/static/images/puching/succes.png
deleted file mode 100644
index d621eeb..0000000
Binary files a/static/images/puching/succes.png and /dev/null differ
diff --git a/static/images/revenue/330000.png b/static/images/revenue/330000.png
deleted file mode 100644
index 56ac4e7..0000000
Binary files a/static/images/revenue/330000.png and /dev/null differ
diff --git a/static/images/revenue/451200.png b/static/images/revenue/451200.png
deleted file mode 100644
index 56ac4e7..0000000
Binary files a/static/images/revenue/451200.png and /dev/null differ
diff --git a/static/images/revenue/620000.png b/static/images/revenue/620000.png
deleted file mode 100644
index 59b5721..0000000
Binary files a/static/images/revenue/620000.png and /dev/null differ
diff --git a/static/images/success.png b/static/images/success.png
deleted file mode 100644
index d4006a5..0000000
Binary files a/static/images/success.png and /dev/null differ