This commit is contained in:
cclu 2023-09-26 18:30:55 +08:00
parent b65799a706
commit 569b17fbbd
5 changed files with 763 additions and 2 deletions

View File

@ -82,6 +82,18 @@
}
]
},
{
"root": "pages/nationalPage",
"pages": [
{
"path": "index",
"style": {
"navigationBarTitleText": "",
"navigationStyle": "custom"
}
}
]
},
{
"root": "pages/revenue",
"pages": [

View File

@ -380,6 +380,29 @@
</div>
</div>
<div class="nationalDay">
<div class="national">
<div class="nationalTop">
<image class="lanternImg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/lantern.png" />
<div class="titleBox" @click="goToNational">
<!-- <image class="titleBg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/titleBox.svg"/>-->
<div class="title" >
<span class="text">欢度国庆</span>
<image class="rightIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/rightIcon.svg"/>
</div>
</div>
</div>
<div class="nationalContent">
<div class="itemContent" v-for="(item,index) in nationalDayList" :key="index">
<p class="value">{{item.value || '-'}}</p>
<p class="title">{{item.title}}<span>{{item.unit}}</span></p>
<image class="itemBg" :src="item.bg"/>
</div>
</div>
</div>
</div>
<!-- 营收占比-->
<view class="proportion">
@ -749,6 +772,11 @@ export default {
popupType:'center',
popupShow:false,
popup:true,
nationalDayList:[
{title:'当日营收',unit:'/万元',value:'',bg:'https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/revenueBg.svg'},
{title:'当日车流',unit:'/辆',value:'',bg:'https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/carIcon.svg'},
{title:'车流增幅Top1',unit:'',value:'',bg:'https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/add.png'},
],
tabTypeList:[
{ imgUrl: 'https://eshangtech.com/ShopICO/ahyd-BID/index/car.svg', path: '/pages/commercialBI/carPortrait', name: '车流'},
{ imgUrl: '/static/images/index/guest.svg', path: '/pages/commercialBI/guestPortrait', name: '客群' },
@ -1023,7 +1051,21 @@ export default {
},
methods:{
...mapActions(['memberLogin','getLoginCode']),
//
async handleGetNationalData(){
let req = {
pushProvinceCode:this.useInfo.userData.ProvinceCode || '340000',
StatisticsEndDate:this.lastDay,
ShowGrowthRate:true
}
const data = await request.$webGet('CommercialApi/BigData/GetBayonetGrowthAnalysis',req)
this.nationalDayList[1].value = data.Result_Data.sumEntryCount?this.$util.noDecimal(data.Result_Data.sumEntryCount):''
this.nationalDayList[2].value = data.Result_Data.GrowthList[0].Entry_GrowthRate>0?'+' + data.Result_Data.GrowthList[0].Entry_GrowthRate + '%':'-' + data.Result_Data.GrowthList[0].Entry_GrowthRate + '%'
console.log('拿到国庆数据data',data)
},
goToNational(){
this.$util.toNextRoute('navigateTo', `/pages/nationalPage/index?time=${this.lastDay}`)
},
handleShowTrafficDetail(){
this.showMonthDetail = !this.showMonthDetail
},
@ -1222,6 +1264,8 @@ export default {
this.handleGetDailyPatrol()
//
this.handleGetAllCarTraffic()
//
this.handleGetNationalData()
} else if (this.user.Membership_Id){ //
//
// if (!this.PushAuthority){return}
@ -1246,6 +1290,8 @@ export default {
this.handleGetDailyPatrol()
//
this.handleGetAllCarTraffic()
//
this.handleGetNationalData()
}
//
@ -1663,9 +1709,11 @@ export default {
if (str==='first'){
this.yesObj = result.RevenuePushModel
if (this.yesObj){
let indexYes = (result.RevenuePushModel.CashPay / 10000).toString().indexOf('.')
this.yesObj.CashPay = (result.RevenuePushModel.CashPay / 10000).toString().substring(0,indexYes+3)
this.nationalDayList[0].value = this.$util.fmoney(this.yesObj.CashPay,2)
}
if (result.GrowthRate){
this.yesObjCompared = result.GrowthRate
@ -1876,7 +1924,6 @@ export default {
let index1= (this.showTableData.CashPay / 10000).toString().indexOf('.')
this.showTableData.CashPayChange = (this.showTableData.CashPay / 10000).toString().substring(0,index1+3)
// for (let key in this.showTableData){
// if (this.showTableData[key]){
// //
@ -3510,6 +3557,102 @@ $iphoneHeight: env(safe-area-inset-bottom);
}
}
.nationalDay{
width: calc(100% - 64rpx);
height: 286rpx;
margin-left: 32rpx;
border-radius: 16rpx;
background: linear-gradient(135deg, rgba(255, 238, 232, 1) 0%, rgba(255, 238, 231, 1) 79%, rgba(255, 221, 215, 1) 100%);
//background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/indexBg.svg");
//background-repeat: no-repeat;
//background-size: 100% 100%;
.national{
box-sizing: border-box;
padding: 0 24rpx 24rpx;
width: 100%;
height: 100%;
.nationalTop{
width: 100%;
display: flex;
align-items: center;
.lanternImg{
width: 104rpx;
height: 126rpx;
margin-left: 8rpx;
}
.titleBox{
width: 300rpx;
height: 60rpx;
background-image: url("https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/titleBox.svg");
background-repeat: no-repeat;
background-size: contain;
padding-left: 36rpx;
box-sizing: border-box;
display: flex;
transform: translateX(-30px);
align-items: center;
.title{
display: flex;
align-items: center;
.text{
font-size: 32rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #E93113;
line-height: 44rpx;
}
.rightIcon{
width: 32rpx;
height: 32rpx;
margin-left: 16rpx;
}
}
}
}
.nationalContent{
width: 100%;
display: flex;
justify-content: space-between;
.itemContent{
width: calc((100% - 32rpx)/3);
box-sizing: border-box;
padding: 24rpx 16rpx;
background: #FFFAF7;
box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(162,4,4,0.1);
border-radius: 12rpx;
border: 2rpx solid #FFFFFF;
overflow: hidden;
position: relative;
.itemBg{
position: absolute;
bottom: 0;right: 0;
width: 100rpx;
height: 100rpx;
}
.value{
font-size: 32rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #E23038;
line-height: 40rpx;
margin-bottom: 8rpx;
}
.title{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 500;
color: rgba(120, 107, 108, 1);
line-height: 36rpx;
span{
margin-left: 4rpx;
}
}
}
}
}
}
.otherFunBox{
width: 100%;
box-sizing: border-box;

View File

@ -0,0 +1,598 @@
<template>
<div class="main">
<div class="top">
<image class="topBg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/pageBg.png"/>
<div class="header" :style="{height:menu.height + 'px',top:menu.top+'px'}">
<image class="backArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/examine/leftArrowWhite.svg" @click="handleBack"/>
</div>
<div class="topContent" :style="{top:200+'rpx'}">
<p class="pageTitle" >欢度国庆</p>
</div>
</div>
<div class="pageContent">
<!-- 服务区当日营收 Top5-->
<div class="dailyRevenue">
<div class="dailyContent">
<image class="itemBg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/revenueItemBg.png"/>
<div class="list">
<p class="title">服务区当日营收 Top5</p>
<div class="listBox">
<div class="itemTop">
<image class="itemIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/firstItemIcon.svg"/>
<div class="revenueBox">
<p class="revenueValue">{{ $util.fmoney(revenueSum,2) }}</p>
<p class="revenueText">总营收 <span>/</span></p>
</div>
</div>
<div class="listItemTop" >
<div class="listTopItem" v-for="(item,index) in revenueList" :key="index">
<div class="itemLeft">
<image class="itemIcon" :src="'https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/Top'+ (index +1) +'.svg'" />
<span class="name">{{item.Serverpart_Name.split('服务区')[0]}}<span class="type">{{item.ShopRegionName}}</span></span>
</div>
<div class="itemRight">
<span class="itemValue">{{$util.fmoney(item.CashPay,2)}}<span class="unit">/</span></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 当日入区车流量 Top5-->
<div class="dailyEntry">
<div class="dailyContent">
<image class="itemBg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/entryIcon.png"/>
<div class="list">
<p class="title">当日入区车流量 Top5</p>
<div class="listBox">
<div class="itemTop">
<image class="itemIcon" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/pass.svg"/>
<div class="revenueBox">
<p class="revenueValue">{{$util.noDecimal(entrySum)}}</p>
<p class="revenueText">总车流量<span>/</span></p>
</div>
</div>
<div class="listItemTop" >
<div class="listTopItem" v-for="(item,index) in entryCarList" :key="index">
<div class="itemLeft">
<image class="itemIcon" :src="'https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/Top'+ (index +1) +'.svg'" />
<span class="name">{{item.Serverpart_Name.split('服务区')[0]}}<span class="type">{{item.Serverpart_Region}}</span></span>
</div>
<div class="itemRight">
<span class="itemValue">{{$util.noDecimal(item.Vehicle_Count) }}<span class="unit">/</span></span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 当日入区车流量增幅 Top5-->
<div class="dailyEntryAdd">
<div class="dailyContent">
<image class="itemBg" src="https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/entryAdd.png"/>
<div class="list">
<p class="title">当日入区车流量增幅 Top5</p>
<div class="listBox">
<div class="listItemTop" >
<div class="listTopItem" v-for="(item,index) in addList" :key="index">
<div class="itemLeft">
<image class="itemIcon" :src="'https://eshangtech.com/ShopICO/ahyd-BID/nationalDay/Top'+ (index +1) +'.svg'" />
<span class="name">{{item.Serverpart_Name.split('服务区')[0]}}<span class="type">{{item.Serverpart_Region}}</span></span>
</div>
<div class="itemRight">
<image class="addIcon" src='/static/images/examine/add.svg'/>
<span class="itemValue">{{item.Entry_GrowthRate}}%</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import request from '@/util/index.js'
export default {
name: "index",
data(){
return {
statusBarHeight:0,
menu:{},
revenueList: [],//
revenueSum:0,//
entryCarList:[],//
entrySum:0,//
addList:[],//
}
},
onLoad(query){
//
let systemInfo = uni.getSystemInfoSync()
this.statusBarHeight = Number(systemInfo.statusBarHeight)
this.menu = uni.getMenuButtonBoundingClientRect()
//
let userInfo = uni.getStorageSync('vuex')
userInfo = JSON.parse(userInfo)
this.useInfo = JSON.parse(JSON.stringify(userInfo))
uni.showLoading({
title: '正在加载...'
})
//
this.handleGetRevenue(query.time)
//
this.handleGetCar(query.time)
},
methods:{
handleBack(){
uni.navigateBack({
delta: 1
});
},
//
async handleGetRevenue(date){
const req= {
pushProvinceCode:this.useInfo.userData.ProvinceCode || '340000',
Statistics_Date:date,
Revenue_Include:1
}
const data = await request.$webGet('CommercialApi/Revenue/GetSPRevenueRank',req)
console.log('拿到营收排行',data)
this.revenueSum = data.Result_Data.OtherData
this.revenueList = data.Result_Data.List.slice(0,5)
if (this.entrySum && this.entryCarList && this.entryCarList.length>0 && this.addList && this.addList.length>0
&& this.revenueSum && this.revenueList && this.revenueList.length>0){
uni.hideLoading()
}
},
//
async handleGetCar(date){
const req= {
pushProvinceCode:this.useInfo.userData.ProvinceCode || '340000',
StatisticsEndDate:date,
ShowGrowthRate:true
}
const data = await request.$webGet('CommercialApi/BigData/GetBayonetGrowthAnalysis',req)
console.log('车流排行',data)
this.entrySum = data.Result_Data.sumEntryCount
this.entryCarList = data.Result_Data.EntryList.slice(0,5)
this.addList = data.Result_Data.GrowthList.slice(0,5)
if (this.entrySum && this.entryCarList && this.entryCarList.length>0 && this.addList && this.addList.length>0
&& this.revenueSum && this.revenueList && this.revenueList.length>0){
uni.hideLoading()
}
}
}
}
</script>
<style scoped lang="scss">
@import '/static/public/fontNational/stylesheet.css';
.main{
width: 100%;
height: 100%;
.top{
width: 100%;
height: 560rpx;
position: relative;
.topBg{
width: 100%;
height: 100%;
z-index: 1;
}
.header{
position: absolute;
width: 100%;
padding: 0 16px;
box-sizing: border-box;
display: flex;
align-items: center;
z-index: 2;
.backArrow{
width: 24px;
height: 24px;
margin-right: 16px;
}
}
.topContent{
position: absolute;
left: 32rpx;
.pageTitle{
font-size: 56rpx;
font-family: Alimama ShuHeiTi;
font-weight: bold;
color: #FFFFFF;
line-height: 68rpx;
text-shadow: 0px 8px 20px rgba(158,29,0,0.25);
background: linear-gradient(180deg, #FEFFFE 0%, #FFC7B6 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
}
}
.pageContent{
width: 100%;
box-sizing: border-box;
padding: 0 32rpx 28rpx;
transform: translateY(-260rpx);
.dailyRevenue{
width: 100%;
height: 680rpx;
background: #fff;
border-radius: 24rpx;
box-sizing: border-box;
padding: 2px;
.dailyContent{
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 22rpx 24rpx;
background: linear-gradient(360deg, rgba(255,233,229,0) 0%, rgba(255,233,229,0.7) 21%, #FFE9E5 100%);
border-radius: 20rpx;
position: relative;
.itemBg{
width: 266rpx;
height: 208rpx;
position: absolute;
right: 0;top: 0;
z-index:1;
}
.list{
position: absolute;
width: calc(100% - 48rpx);
z-index: 2;
.title{
font-size: 36rpx;
font-family: Alimama ShuHeiTi;
font-weight: bold;
color: #F95222;
line-height: 44rpx;
}
.listBox{
width: 100%;
background: #fff;
margin-top: 22rpx;
border-radius: 12rpx;
box-sizing: border-box;
padding: 32rpx;
.itemTop{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-bottom: 36rpx;
border-bottom: 2rpx solid #F7F4F4;
.itemIcon{
width: 96rpx;
height: 96rpx;
border-radius: 16rpx;
}
.revenueBox{
.revenueValue{
font-size: 40rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #160002;
line-height: 48rpx;
}
.revenueText{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40rpx;
text-align: right;
span{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A69E9F;
line-height: 40rpx;
margin-left: 4rpx;
}
}
}
}
.listItemTop{
margin-top: 34rpx;
.listTopItem{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 0;
.itemLeft{
display: flex;
align-items: center;
.itemIcon{
width: 40rpx;
height: 40rpx;
}
.name{
margin-left: 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 40rpx;
.type{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 36rpx;
margin-left: 4rpx;
}
}
}
.itemRight{
.itemValue{
font-size: 32rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #160002;
line-height: 40rpx;
.unit{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A69E9F;
line-height: 40rpx;
margin-left: 4rpx;
}
}
}
}
}
}
}
}
}
.dailyEntry{
width: 100%;
height: 680rpx;
background: #fff;
border-radius: 24rpx;
box-sizing: border-box;
padding: 2px;
margin-top: 28rpx;
.dailyContent{
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 22rpx 24rpx;
background: linear-gradient(360deg, rgba(238,242,255,0) 0%, rgba(238,242,255,0.7) 20%, #EEF2FF 100%);
border-radius: 20rpx;
position: relative;
.itemBg{
width: 320rpx;
height: 320rpx;
position: absolute;
right: 0;top: 0;
z-index:1;
}
.list{
position: absolute;
width: calc(100% - 48rpx);
z-index: 2;
.title{
font-size: 36rpx;
font-family: Alimama ShuHeiTi;
font-weight: bold;
color: #096EF7;
line-height: 44rpx;
}
.listBox{
width: 100%;
background: #fff;
margin-top: 22rpx;
border-radius: 12rpx;
box-sizing: border-box;
padding: 32rpx;
.itemTop{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding-bottom: 36rpx;
border-bottom: 2rpx solid #F7F4F4;
.itemIcon{
width: 96rpx;
height: 96rpx;
border-radius: 16rpx;
}
.revenueBox{
.revenueValue{
font-size: 40rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #160002;
line-height: 48rpx;
}
.revenueText{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40rpx;
text-align: right;
span{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A69E9F;
line-height: 40rpx;
margin-left: 4rpx;
}
}
}
}
.listItemTop{
margin-top: 34rpx;
.listTopItem{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 0;
.itemLeft{
display: flex;
align-items: center;
.itemIcon{
width: 40rpx;
height: 40rpx;
}
.name{
margin-left: 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 40rpx;
.type{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 36rpx;
margin-left: 4rpx;
}
}
}
.itemRight{
.itemValue{
font-size: 32rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #160002;
line-height: 40rpx;
.unit{
font-size: 28rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #A69E9F;
line-height: 40rpx;
margin-left: 4rpx;
}
}
}
}
}
}
}
}
}
.dailyEntryAdd{
width: 100%;
height: 500rpx;
background: #fff;
border-radius: 24rpx;
box-sizing: border-box;
padding: 2px;
margin-top: 28rpx;
.dailyContent{
width: 100%;
height: 100%;
box-sizing: border-box;
padding: 22rpx 24rpx;
background: linear-gradient(360deg, rgba(229,247,255,0) 0%, rgba(229,247,255,0.7) 23%, #E5F7FF 100%);
border-radius: 20rpx;
position: relative;
.itemBg{
width: 320rpx;
height: 320rpx;
position: absolute;
right: 0;top: 0;
z-index:1;
}
.list{
position: absolute;
width: calc(100% - 48rpx);
z-index: 2;
.title{
font-size: 36rpx;
font-family: Alimama ShuHeiTi;
font-weight: bold;
color: #018ABD;
line-height: 44rpx;
}
.listBox{
width: 100%;
background: #fff;
margin-top: 22rpx;
border-radius: 12rpx;
box-sizing: border-box;
padding: 32rpx;
.listItemTop{
.listTopItem{
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
padding: 10rpx 0;
.itemLeft{
display: flex;
align-items: center;
.itemIcon{
width: 40rpx;
height: 40rpx;
}
.name{
margin-left: 20rpx;
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
line-height: 40rpx;
.type{
font-size: 24rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 36rpx;
margin-left: 4rpx;
}
}
}
.itemRight{
.addIcon{
width: 28rpx;
height: 28rpx;
}
.itemValue{
display: inline-block;
width: 80px;
text-align: left;
margin-left: 8rpx;
font-size: 32rpx;
font-family: DINAlternate-Bold, DINAlternate;
font-weight: bold;
color: #160002;
line-height: 40rpx;
}
}
}
}
}
}
}
}
}
}
</style>

Binary file not shown.

View File

@ -0,0 +1,8 @@
@font-face {
font-family: 'Alimama ShuHeiTi';
src:url("/static/public/fontNational/qL6Y7kMqM7Kt.woff");
font-weight: bold;
font-style: normal;
font-display: swap;
}