This commit is contained in:
cclu 2023-07-05 19:44:42 +08:00
parent 647a59fd05
commit f0833a6392
5 changed files with 757 additions and 253 deletions

BIN
ahyd_DIB.zip Normal file

Binary file not shown.

View File

@ -5,7 +5,7 @@
<commercial-type :have="0"/>
</div>
<div class="main" v-if="isHaveData">
<div class="header" :style="{backgroundImage: 'url('+ 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/car.svg' +')'}">
<div v-if="!isShowAllProvince" class="header" :style="{backgroundImage: 'url('+ 'https://eshangtech.com/ShopICO/ahyd-BID/commercial/car.svg' +')'}">
<div class="analyse" v-if="analyseText">
<text class="title">分析</text>
<text class="content">{{analyseText}}</text>
@ -42,7 +42,18 @@
</div>
</div>
</div>
<div class="charts">
<div v-if="isShowAllProvince" class="headerTop" :style="{height:(menu.bottom + 6) + 'px'}">
<div class="box" :style="{top:(menu.bottom - (menu.height / 2)) + 'px'}">
<div class="icon" @click="handleBack">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/navigation-left.svg"></image>
</div>
<text class="title">车流画像</text>
<!-- 占位 -->
<div class="seize"></div>
</div>
</div>
<div class="charts" v-if="!isShowAllProvince">
<div class="chartsItem">
<div style="display: flex;align-items: center;justify-content: space-between">
<p class="title">昨日入区车流</p>
@ -57,7 +68,6 @@
<no-data v-if="!carData.length" :type="'car'"/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">月度车流累计</p>
<div>
@ -100,6 +110,7 @@
</div>
<no-data v-if="!homePlace.length" :type="'car'"/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分析/日均</p>
<div v-if="carTypeTimeData.series.length>0">
@ -108,6 +119,7 @@
</div>
<no-data v-if="!carTypeTimeData.series.length" :type="'car'"/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<p class="title">{{thisMonth?thisMonth:'-'}}月车型停留分布图/日均</p>
<div v-if="timeAnalysisData.series.length>0">
@ -116,6 +128,7 @@
</div>
<no-data v-if="!timeAnalysisData.series.length" :type="'car'"/>
</div>
<div class="chartsItem" style="margin-top: 32px">
<div class="topItem" >
<p class="title">{{thisMonth?thisMonth:'-'}}月入区车型占比</p>
@ -135,11 +148,95 @@
<no-data v-if="!percentEntryData.length" :type="'car'"/>
</div>
</div>
<div v-else class="otherCharts" :style="{paddingTop:(menu.bottom + 18)+'px'}">
<div v-if="regionList.length>0">
<view class="chartsTop">
<view class="left">
<div class="serviceArea" :style="{top : (menu.bottom + 14) + 'px'}" @click="handleGoSelectService">
<div class="picker">
<div class="selectService">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/fixed.svg"></image>
<view class="select">
<view class="content">
<view class="uni-input">{{serviceInfo.SERVERPART_NAME}}</view>
<p class="area" v-if="serviceInfo.Serverpart_ID">{{serviceInfo.SPREGIONTYPE_NAME}}</p>
<image class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"></image>
</view>
</view>
</div>
</div>
</div>
</view>
<view class="right">
<picker mode="date" :value="searchText" :end="lastDay" @change="changeAllProvinceSearch" >
<view class="time">
<view class="uni-input" style="background: transparent;padding: 0;height:100%">{{ searchText }}</view>
<image class="icon" src="/static/images/index/arrow_bottom.svg"></image>
</view>
</picker>
</view>
</view>
</div>
<div class="list">
<div class="listItem" v-for="(item,index) in regionList" :key="index" @click="handleNoneChild(item)">
<div class="itemTop">
<div class="itemLeft">
<span class="serverName">{{item.name}}</span>
<span class="value">{{item.entry}} / {{item.flow}}</span>
<!-- <span class="value">1,000,000 / 1,000,000</span>-->
</div>
<div class="itemCenter">
<span class="serverName">入区率</span>
<span class="value">{{item.flowRate}}</span>
</div>
<div class="itemRight">
<div style="height: 100%;display: flex;align-items: center;">
<image :style="{transform:item.showChild?`rotate(90deg)`:''}" class="rightArrow" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/rightArrow.svg"/>
</div>
</div>
<div class="other">
</div>
</div>
<block v-if="item.showChild">
<scroll-view scroll-y="true" style="height: 400px">
<div class="serviceItem" v-for="(subItem,subIndex) in item.spList" :key="subIndex" :style="{background:subIndex%2===0?'#FCFCFC':'#f7f7f7'}" @click.stop="()=>{}">
<div class="subItemTop">
<div class="serviceItemLeft">
<div style="display: flex;align-items: center">
<image class="leftIcon" src="/static/images/authority/serverpart.png"/>
<span class="name">{{subItem.name}}</span>
</div>
</div>
<div class="serviceItemCenter">
<span class="title">入区流量/断面流量</span>
</div>
<div class="serviceItemRight">
<span class="text">//小车型</span>
</div>
</div>
<div class="subItemBottom">
<div class="subBottomItem" v-for="(thirdItem,thirdIndex) in subItem.regionList" :key="thirdIndex">
<div class="subBottomItemTop">
<div class="topLeft">
<span :class="thirdIndex===0?'position0':'position1'">{{thirdItem.name}}</span>
<span v-if="thirdItem.entryRate!==0 && thirdItem.Vehicle_Count<thirdItem.SectionFlow_Count">:</span>
<span class="rate" :style="{color:thirdItem.entryRate>30 || thirdItem.entryRate<5?'red':''}" v-if="thirdItem.entryRate!==0 && thirdItem.Vehicle_Count<thirdItem.SectionFlow_Count">{{thirdItem.entryRate}}%</span>
</div>
<div class="topCenter">
<span>{{thirdItem.Vehicle_Count}}/{{thirdItem.SectionFlow_Count}}</span>
</div>
<div class="topRight">
<span>{{thirdItem.LargeVehicle_Count}}/{{thirdItem.MediumVehicle_Count}}/{{thirdItem.MinVehicle_Count}}</span>
</div>
</div>
</div>
</div>
</div>
</scroll-view>
</block>
</div>
</div>
<div v-else class="noData">
<div class="box">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/noData.svg"></image>
<p class="text">抱歉,第三方数据未传,无法分析</p>
</div>
</div>
</div>
@ -156,13 +253,15 @@ import MonthTotal from "./components/car/monthTotal.vue";
import NoData from "./components/noData.vue";
import Analyse from "./components/analyse.vue";
import CommercialType from "./commercialType.vue";
import shopCell from "../everdayRenven/components/listUnit.vue";
import anhuiYestodayRevenueData from "../everdayRenven/components/anhuiYestodayRevenueData";
export default {
name: "carPortrait",
data(){
const lastDay = this.$util.cutDate(new Date(), 'YYYY-MM-DD', -1)
return {
menu:{}, //
serviceArray:["123465","123465","123465","123465","123465"], //
serviceArray:[], //
serviceIndex:0, //
area:'片区', //
labelList:[], //
@ -188,6 +287,7 @@ export default {
serviceInfo:{}, //
backType:'',//
analyseText:'',//
statusBarHeight:'',
single:'',//
lastDay:lastDay,
endTime:'',
@ -200,9 +300,16 @@ export default {
selectProvinceName:'',//
selectValue:'',//
allProvince:true,//
isShowAllProvince:false,//
regionList: null,
theRequest: null,
headMsg:null,
searchEndTime:'',
searchText:'',//
}
},
components: {
shopCell,
CommercialType,
Analyse, NoData, PercentEntry, CarTypeTime, HomePlace, EntryZone,timeAnalysis,MonthTotal},
computed:{
@ -234,12 +341,17 @@ export default {
this.time = storeTime
}
this.single = this.$util.getThisMonthHave(this.time)
const date = new Date(this.single)
this.searchText = this.time
const date = new Date(this.time)
//
let m = date.getMonth() + 1
if (m<10){
m = '0' + m
}
let d = date.getDate()
if (d<10){
d = '0'+ d
}
this.thisMonth = m
let systemInfo = uni.getSystemInfoSync()
//
@ -257,6 +369,20 @@ export default {
}else{
this.serviceInfo = storeServiceInfo
}
this.theRequest = {
GroupType: 1000,
ProvinceCode: 340000,
ServerpartIds: "",
ShopAnalysisType: 0,
month: `${y}${m}`,
time: `${y}-${m}-${d}`,
}
if (this.serviceInfo.SERVERPART_NAME==='安徽驿达'){
this.isShowAllProvince = true
}
if (this.isShowAllProvince === true){
this.getDetail(this.theRequest)
}else{
//
this.getServiceInfo()
//
@ -273,9 +399,14 @@ export default {
this.getPercentEntry()
//
this.getLabelDetail()
}
},
onReady(){
},
onHide(){
this.isShowAllProvince = false
},
onUnload() {
this.$util.addUserBehavior()
@ -284,8 +415,94 @@ export default {
})
this.selectProvinceName = ''
this.carType = ''
this.searchText=''
},
methods:{
handleNoneChild(obj){
this.regionList.forEach(item=>{
if (item.name === obj.name){
item.showChild = !item.showChild
}
})
},
async getDetail(obj) {
uni.showLoading({
title: '正在加载...'
})
const requestParamas = {
Statistics_Date: obj.time ,
Statistics_Month: obj.month ,
Province_Code: obj.ProvinceCode ,
pushProvinceCode: obj.ProvinceCode ,
Serverpart_ID: obj.GroupType != 1020 ? obj.ServerpartIds : '',
SPRegionType_ID: obj.GroupType == 1020 ? obj.ServerpartIds : '',
// Revenue_Include: 1
}
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParamas)
const res = bayonetCount.Result_Data.List
let bayonetPie = [] //
res.map(async (n, index) => {
bayonetPie = anhuiYestodayRevenueData.getBayonetPie('Serverpart_Name', n, bayonetPie)
})
bayonetPie.forEach((item,index)=>{
let entryNum = 0 //
let flowNum = 0 //
let entryNumNoZero = 0 //
let flowNumNoZero = 0 //
item.spList.forEach(subItem=>{
entryNum+=subItem.Vehicle_Count
flowNum+=subItem.SectionFlow_Count
if (subItem.regionList && subItem.regionList.length>0){
subItem.regionList.forEach(thirdItem=>{
if (thirdItem.SectionFlow_Count===0 || thirdItem.Vehicle_Count===0){
thirdItem.entryRate = 0
}else{
thirdItem.entryRate = Number(((thirdItem.Vehicle_Count / thirdItem.SectionFlow_Count)*100).toFixed(2))
}
if (thirdItem.Vehicle_Count<thirdItem.SectionFlow_Count && thirdItem.Vehicle_Count!==0 && thirdItem.SectionFlow_Count!==0){
entryNumNoZero+=thirdItem.Vehicle_Count
flowNumNoZero+=thirdItem.SectionFlow_Count
}
})
}
})
item.entry = entryNum
item.flow = flowNum
item.flowRate = ((entryNumNoZero / flowNumNoZero)*100).toFixed(2) + '%'
item.showChild = true
})
for (let i=0;i<=bayonetPie.length-1;i++){
for (let j=0;j<=bayonetPie.length - i - 1;j++){
if (bayonetPie[j] && bayonetPie[j + 1] && bayonetPie[j].entry && bayonetPie[j+1].entry){
if (bayonetPie[j].entry < bayonetPie[j+1].entry){
let temp = bayonetPie[j]
bayonetPie[j] = bayonetPie[j + 1]
bayonetPie[j + 1] = temp
}
}
}
}
bayonetPie.forEach(item=>{
for (let i=0;i<=item.spList.length-1;i++){
for (let j=0;j<=item.spList.length - i - 1;j++){
if (item.spList[j] && item.spList[j + 1] && item.spList[j].Vehicle_Count && item.spList[j+1].Vehicle_Count){
if (item.spList[j].Vehicle_Count < item.spList[j+1].Vehicle_Count){
let temp = item.spList[j]
item.spList[j] = item.spList[j + 1]
item.spList[j + 1] = temp
}
}
}
}
})
this.regionList = bayonetPie
uni.hideLoading()
},
//
handleCarType(selectItem){
if (selectItem.value===this.carType){
@ -337,6 +554,28 @@ export default {
this.tabList = tabList
}
},
async changeAllProvinceSearch(e){
const date = new Date(e.detail.value)
const y = date.getFullYear()
let m = date.getMonth() + 1
if (m<10){
m = '0'+m
}
let d = date.getDate()
if (d<10){
d = '0'+d
}
this.theRequest = {
GroupType: 1000,
ProvinceCode: 340000,
ServerpartIds: "",
ShopAnalysisType: 0,
month: `${y}${m}`,
time: `${y}-${m}-${d}`,
}
await this.getDetail(this.theRequest)
this.searchText = e.detail.value
},
//
bindDateChange(e){
const date = new Date(e.detail.value)
@ -1029,6 +1268,43 @@ export default {
}
}
}
.headerTop{
width: 100vw;
position: fixed;
top: 0;
left: 0;
z-index: 9999999999999;
background: linear-gradient(180deg, #A2B9E8 0%, #B2C6ED 100%);
.box{
padding: 0 16px;
position: absolute;
box-sizing: border-box;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
transform: translateY(-50%);
.icon{
width: 24px;
height: 24px;
.img{
width: 100%;
height: 100%;
}
}
.title{
font-size: 36rpx;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 600;
color: #1C2130;
line-height: 56rpx;
}
.seize{
width: 24px;
height: 24px;
}
}
}
.charts{
width: 100%;
box-sizing: border-box;
@ -1212,6 +1488,233 @@ export default {
padding-bottom: 32px;
}
}
.otherCharts{
width: 100%;
box-sizing: border-box;
/*日结上传*/
.chartsTop {
width: 100%;
box-sizing: border-box;
padding: 0 16px;
display: flex;
align-items: center;
justify-content: space-between;
.left{
display: flex;
justify-content: flex-start;
.serviceArea{
box-sizing: border-box;
.picker{
.selectService{
display: flex;
align-items: center;
.img{
width: 40px;
height: 40px;
z-index: 2;
}
.select{
height: 32px;
background: #F8F8FA;
border-radius: 0 16px 16px 0;
transform: translateX(-20px);
box-sizing: border-box;
padding-left: 25px;
display: flex;
align-items: center;
.content{
display: flex;
align-items: center;
.uni-input{
padding: 0;
background: transparent;
font-size: 14px;
font-family: PingFangSC-Semibold, PingFang SC;
font-weight: 600;
color: #160002;
}
.area{
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #786B6C;
line-height: 40px;
margin-left: 4px;
}
.rightArrow{
width: 24px;
height: 12px;
}
}
}
}
}
}
}
.right{
.time {
display: flex;
align-items: center;
margin-right: 4px;
.day {
font-size: 32rpx;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #782717;
line-height: 44rpx;
margin-right: 4px;
}
.uni-input {
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ae664e;
line-height: 36rpx;
}
.icon {
width: 24px;
height: 16px;
}
}
}
}
.list{
margin-top: 20px;
.listItem{
width: 100%;
box-sizing: border-box;
.itemTop{
width: 100%;
box-sizing: border-box;
padding: 0 16px;
position: relative;
display: flex;
.itemLeft{
display: flex;
flex-direction: column;
align-items: flex-start;
width: 70%;
.serverName{
color: #929292;
}
.value{
font-weight: 700;
}
}
.itemCenter{
display: flex;
flex-direction: column;
align-items: center;
.serverName{
color: #929292;
}
.value{
font-weight: 700;
}
}
.itemRight{
display: inline-block;
height: 100%;
position: absolute;
right: 16px;bottom:0;
.rightArrow{
width: 16px;
height: 16px;
}
}
.other{
width: 0;
}
}
.serviceItem{
width: 100vw;
box-sizing: border-box;
padding: 4px 16px;
.subItemTop{
display: flex;
align-items: center;
.serviceItemLeft{
display: inline-block;
width: 30%;
.leftIcon{
width: 18px;
height: 18px;
}
.name{
position: relative;
}
}
.serviceItemCenter{
display: inline-block;
width: 40%;
text-align: center;
.title{
color: #868686;
}
}
.serviceItemRight{
display: inline-block;
width: 30%;
.text{
color: #868686;
}
}
}
.subItemBottom{
.subBottomItem{
.subBottomItemTop{
width: 100%;
.topLeft{
display: inline-block;
width: 30%;
.position0{
position: relative;
margin-left: 12px;
}
.position0:before{
content:'';
position: absolute;
width: 4px;
height: 4px;
left: -8px;top: calc(50% - 2px);
border-radius: 50%;
background: #5596F9;
}
.position1{
position: relative;
margin-left: 12px;
}
.position1:before{
content:'';
position: absolute;
width: 4px;
height: 4px;
left: -8px;top: calc(50% - 2px);
border-radius: 50%;
background: #FE6D67;
}
.rate{
color: #EF884F;
}
}
.topCenter{
display: inline-block;
width: 40%;
text-align: center;
}
.topRight{
display: inline-block;
width: 30%;
}
}
}
}
}
}
}
}
}
.noData{
width: 100%;

View File

@ -184,7 +184,6 @@
</template>
<template v-else>
<shopCell v-for="(item,i) in regionList" :key="i" :item='item' @toggleShow="toggleShow" :i='i' />
</template>
</view>
<template v-if="theRequest && theRequest.ProvinceCode==620000">
@ -305,8 +304,6 @@ export default {
item.visited = true
this.$forceUpdate()
},
selectTab(name, index) {
this[name] = index
@ -385,6 +382,7 @@ export default {
});
},
getDetail(obj) {
console.log('obj',obj)
let _this = this
this.$request.$webGet('CommercialApi/Revenue/GetServerpartEndAccountList', {
Serverpart_ID: obj.ServerpartIds,
@ -399,6 +397,7 @@ export default {
})
_this.regionList = res.Result_Data.ShopEndaccountList
console.log('_this.regionList',_this.regionList)
})
},
getListDetail(data) {
@ -455,10 +454,12 @@ export default {
},
async initData() { //
let _this = this
console.log('this.theRequest',this.theRequest)
const [reginList, totalData, busniessTypePie, busniessTradePie, busniessAreaPie, bayonetPie] =
await anhuiYestodayRevenueData.getData(this.theRequest) //
if (this.theRequest.GroupType !== 1010) {
console.log('reginList',reginList)
this.regionList = reginList // reginListModel[]
}
//

View File

@ -352,6 +352,7 @@ const methods = {
if(budgetAmount.length){
totalShow.budgetAmount = budgetAmount[0].BUDGET_AMOUNT
}
console.log('list',list)
return [list, totalShow, busniessTypePie, busniessTradePie,busniessAreaPie,bayonetPie]
}
}

View File

@ -1,6 +1,6 @@
<template>
<view class="main">
<view class="header" :style="{height:loadMore?'290px':'500px'}">
<view class="header" :style="{height:loadMore?'310px':'520px'}">
<image class="headerBg" src="https://eshangtech.com/ShopICO/ahyd-BID/index/indexBg.png"></image>
<div class="headerTop" :style="{ height: menu.bottom + 5 + 'px'}">
<view class="selectTime" :style="{ top: menu.top + (menu.height - 22) / 2 + 'px' }">
@ -19,7 +19,10 @@
<view v-if="user.Membership_Id" >
<view class="topTitle">
<p class="title">对客营收</p>
<view style="display: flex;flex-direction: column;text-align: right">
<text class="smallTitle">{{monthAmountAdd?monthAmountAdd:'-'}}<text class="month">({{thisMonth?thisMonth:'-'}}月累计)</text></text>
<text class="smallTitle">{{yearAmountAdd?yearAmountAdd:'-'}}<text class="month">(年度累计)</text></text>
</view>
<!-- 移位置 不确定会不会加回去 先注释 -->
<!-- <span class="text">门店上传: <text style="margin-left: 4px" :style="{color:isBig?'red':''}">{{showTableData.Revenue_Upload?showTableData.Revenue_Upload:'-'}}/{{allShopCount?allShopCount:'-'}}</text></span>-->
</view>
@ -142,110 +145,28 @@
<text class="name">{{ item.name }}</text>
</view>
</div>
<div class="detailType">
<view v-for="(item, index) in detailTypeList" :key="index" class="item">
<view class="box">
<p class="title">
{{ item.name }}<text class="unit">{{ item.unit }}</text>
</p>
<p class="money" v-if="index===0 || index===2">{{ item.value }}</p>
<p class="money" v-else>{{ item.yesterValue }}</p>
<view v-if="index === 0 || index === 2" class="active">
<image v-if="Number(item.add)!==0" class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>
<text v-if="Number(item.add)!==0" class="add" :style="{color:Number(item.add)<0?'#07C160':'#FA5151'}">{{ item.add?Math.abs(item.add):'' }}</text>
<text v-if="Number(item.add)!==0" class="yesterday">(相比昨日)</text>
</view>
<view class="otherBox" v-else>
<view class="other">本月累计</view>
<text class="month">{{ item.value }}</text>
</view>
<image :src="item.imgIcon" class="imgIcon"></image>
</view>
</view>
</div>
<!-- <div class="detailType">-->
<!-- <view v-for="(item, index) in detailTypeList" :key="index" class="item">-->
<!-- <view class="box">-->
<!-- <p class="title">-->
<!-- {{ item.name }}<text class="unit">{{ item.unit }}</text>-->
<!-- </p>-->
<!-- <p class="money" v-if="index===0 || index===2">{{ item.value }}</p>-->
<!-- <p class="money" v-else>{{ item.yesterValue }}</p>-->
<!-- <view v-if="index === 0 || index === 2" class="active">-->
<!-- <image v-if="Number(item.add)!==0" class="addIcon" :src="Number(item.add)>0?'https://eshangtech.com/ShopICO/ahyd-BID/index/addIcon.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/reduce.svg'"></image>-->
<!-- <text v-if="Number(item.add)!==0" class="add" :style="{color:Number(item.add)<0?'#07C160':'#FA5151'}">{{ item.add?Math.abs(item.add):'' }}</text>-->
<!-- <text v-if="Number(item.add)!==0" class="yesterday">(相比昨日)</text>-->
<!-- </view>-->
<!-- <view class="otherBox" v-else>-->
<!-- <view class="other">本月累计</view>-->
<!-- <text class="month">{{ item.value }}</text>-->
<!-- </view>-->
<!-- <image :src="item.imgIcon" class="imgIcon"></image>-->
<!-- </view>-->
<!-- </view>-->
<!-- </div>-->
<div class="propOfReven">
<p class="title">营收占比</p>
<view class="tabs">
<view
v-for="(item, index) in propOfRevenList"
:key="index"
:class="selectTab === item.value ? 'active tabItem' : 'tabItem'"
@click="handleSelectTab(item.value)">
{{ item.name }}
</view>
</view>
<view class="chart">
<!-- 123就是对应的第几个标题选中 老项目复制的 -->
<div v-show="selectTab===1" v-if="modelProgress.length > 0 && theRequest.ProvinceCode==340000">
<div>
<div class="operation-c-list" v-for="(item,o) in modelProgress" :key="o">
<div class="top">
<div class="left">
<div class="icon">
<image :src="o===0?'https://eshangtech.com/ShopICO/ahyd-BID/index/No1.svg':o===1?'https://eshangtech.com/ShopICO/ahyd-BID/index/No2.svg':o===2?'https://eshangtech.com/ShopICO/ahyd-BID/index/No3.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/No4.svg'"></image>
<text>{{o+1}}</text>
</div>
<p class="name">{{item.name}}</p>
</div>
<p class="price">{{item.value}}</p>
</div>
<div class="bottom">
<div class="bar">
<div class="progress" :style="{width:item.percentage+'%'}"></div>
</div>
<p class="number">{{item.percentage+'%'}}</p>
</div>
</div>
</div>
</div>
<div v-show="selectTab===2" v-if="regionProgress.length>0">
<div>
<div class="operation-c-list" v-for="(item,o) in regionProgress" :key="o">
<div class="top">
<div class="left">
<div class="icon">
<image :src="o===0?'https://eshangtech.com/ShopICO/ahyd-BID/index/No1.svg':o===1?'https://eshangtech.com/ShopICO/ahyd-BID/index/No2.svg':o===2?'https://eshangtech.com/ShopICO/ahyd-BID/index/No3.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/No4.svg'"></image>
<text>{{o+1}}</text>
</div>
<p class="name">{{item.name}}</p>
</div>
<p class="price">{{item.value}}</p>
</div>
<div class="bottom">
<div class="bar">
<div class="progress" :style="{width:item.percentage+'%'}"></div>
</div>
<p class="number">{{item.percentage+'%'}}</p>
</div>
</div>
</div>
</div>
<div v-show="selectTab===3" v-if="areaProgress.length>0">
<div>
<div class="operation-c-list" v-for="(item,o) in areaProgress" :key="o">
<div class="top">
<div class="left">
<div class="icon">
<image :src="o===0?'https://eshangtech.com/ShopICO/ahyd-BID/index/No1.svg':o===1?'https://eshangtech.com/ShopICO/ahyd-BID/index/No2.svg':o===2?'https://eshangtech.com/ShopICO/ahyd-BID/index/No3.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/No4.svg'"></image>
<text>{{o+1}}</text>
</div>
<p class="name">{{item.name}}</p>
</div>
<p class="price">{{item.value}}</p>
</div>
<div class="bottom">
<div class="bar">
<div class="progress" :style="{width:item.percentage+'%'}"></div>
</div>
<p class="number">{{item.percentage+'%'}}</p>
</div>
</div>
</div>
</div>
</view>
</div>
<div class="thisMonth" @click="handlePlanPageGo('month')">
<div class="titleTop">
@ -343,6 +264,92 @@
</view>
</view>
</div>
<div class="propOfReven">
<p class="title">营收占比</p>
<view class="tabs">
<view
v-for="(item, index) in propOfRevenList"
:key="index"
:class="selectTab === item.value ? 'active tabItem' : 'tabItem'"
@click="handleSelectTab(item.value)">
{{ item.name }}
</view>
</view>
<view class="chart">
<!-- 123就是对应的第几个标题选中 老项目复制的 -->
<div v-show="selectTab===1" v-if="modelProgress.length > 0 && theRequest.ProvinceCode==340000">
<div>
<div class="operation-c-list" v-for="(item,o) in modelProgress" :key="o">
<div class="top">
<div class="left">
<div class="icon">
<image :src="o===0?'https://eshangtech.com/ShopICO/ahyd-BID/index/No1.svg':o===1?'https://eshangtech.com/ShopICO/ahyd-BID/index/No2.svg':o===2?'https://eshangtech.com/ShopICO/ahyd-BID/index/No3.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/No4.svg'"></image>
<text>{{o+1}}</text>
</div>
<p class="name">{{item.name}}</p>
</div>
<p class="price">{{item.value}}</p>
</div>
<div class="bottom">
<div class="bar">
<div class="progress" :style="{width:item.percentage+'%'}"></div>
</div>
<p class="number">{{item.percentage+'%'}}</p>
</div>
</div>
</div>
</div>
<div v-show="selectTab===2" v-if="regionProgress.length>0">
<div>
<div class="operation-c-list" v-for="(item,o) in regionProgress" :key="o">
<div class="top">
<div class="left">
<div class="icon">
<image :src="o===0?'https://eshangtech.com/ShopICO/ahyd-BID/index/No1.svg':o===1?'https://eshangtech.com/ShopICO/ahyd-BID/index/No2.svg':o===2?'https://eshangtech.com/ShopICO/ahyd-BID/index/No3.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/No4.svg'"></image>
<text>{{o+1}}</text>
</div>
<p class="name">{{item.name}}</p>
</div>
<p class="price">{{item.value}}</p>
</div>
<div class="bottom">
<div class="bar">
<div class="progress" :style="{width:item.percentage+'%'}"></div>
</div>
<p class="number">{{item.percentage+'%'}}</p>
</div>
</div>
</div>
</div>
<div v-show="selectTab===3" v-if="areaProgress.length>0">
<div>
<div class="operation-c-list" v-for="(item,o) in areaProgress" :key="o">
<div class="top">
<div class="left">
<div class="icon">
<image :src="o===0?'https://eshangtech.com/ShopICO/ahyd-BID/index/No1.svg':o===1?'https://eshangtech.com/ShopICO/ahyd-BID/index/No2.svg':o===2?'https://eshangtech.com/ShopICO/ahyd-BID/index/No3.svg':'https://eshangtech.com/ShopICO/ahyd-BID/index/No4.svg'"></image>
<text>{{o+1}}</text>
</div>
<p class="name">{{item.name}}</p>
</div>
<p class="price">{{item.value}}</p>
</div>
<div class="bottom">
<div class="bar">
<div class="progress" :style="{width:item.percentage+'%'}"></div>
</div>
<p class="number">{{item.percentage+'%'}}</p>
</div>
</div>
</div>
</div>
</view>
</div>
</view>
</view>
<!-- isShow-->
@ -432,6 +439,7 @@ export default {
{ name: '区域经营', value: 3 }],
selectTab:1, //
monthAmountAdd:'',//
yearAmountAdd:'',//
mobileData :{}, //
single:'', //
monthAdd:'',//
@ -578,7 +586,6 @@ export default {
m = '0' + m
}
const time = `${y}-${m}`
console.log('time',time)
howDay = this.$util.getThisMonthDay(time)
this.startDate = `${y}-${m}-${howDay - k}`
}else{
@ -824,11 +831,9 @@ export default {
}
//
if (option.ProvinceCode) { //
console.log('推送')
this.theRequest = option
option.time = this.$util.cutDate(option.time, 'YYYY-MM-DD')
option.month = this.$util.cutDate(option.time, 'YYYYMM')
console.log('type',type)
if (!type){
this.lastDay = this.$util.cutDate(option.time, 'YYYY-MM-DD')
//
@ -1019,7 +1024,6 @@ export default {
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
flag2 = true
// .then(res=>{
// console.log('flag2',res)
// // data
// this.lastDayBillCount = res.Result_Data
// this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
@ -1062,14 +1066,15 @@ export default {
const allPriceData = {
pushProvinceCode:'340000',
Statistics_Date:this.lastDay,
ShowCompareRate: true
ShowCompareRate: true,
ShowYearRevenue: true
}
request.$webGet('CommercialApi/Revenue/GetSummaryRevenue',allPriceData).then(res=>{
flag3 = true
// data
let result = res.Result_Data
for(let key in result){
if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount'){
if (key!=='RevenuePushModel' && key!=='GrowthRate' && key!=='MonthRevenueAmount' && key!=='YearRevenueAmount'){
let all = 0
//
result[key].forEach(item=>{
@ -1086,6 +1091,7 @@ export default {
}
}
this.monthAmountAdd = this.$util.fmoney(result.MonthRevenueAmount)
this.yearAmountAdd = result.YearRevenueAmount?this.$util.fmoney(result.YearRevenueAmount):'-'
this.modelProgress = result.BusinessTypeList
this.regionProgress = result.BusinessTradeList
this.areaProgress = result.SPRegionList
@ -1122,13 +1128,10 @@ export default {
//
bindDateChange(e){
let isOnRefresh = false
console.log('this.startDate',this.startDate)
console.log('this.noChangeLastDay',this.noChangeLastDay)
let startTime = new Date(this.startDate).getTime()
let endTime = new Date(this.noChangeLastDay).getTime() - 8 * 3600 * 1000 //
const date = new Date(e.detail.value).getTime() - 8 * 3600 * 1000
let startDate = new Date(this.startDate)
console.log('startDate',startDate)
let startMonth = startDate.getMonth() + 1
let startDay = startDate.getDate()
let endDate = new Date(this.noChangeLastDay)
@ -1140,8 +1143,6 @@ export default {
}else{
isOnRefresh = true
}
console.log('isOnRefresh',isOnRefresh)
console.log('timestampToTime(date)',timestampToTime(date))
//
if (isOnRefresh){
this.single = timestampToTime(date)
@ -1150,8 +1151,6 @@ export default {
this.thisDay = getThisDay(new Date(e.detail.value).getDay())
this.onRefresh(true)
}else{
console.log('startMonth',startMonth)
console.log('startDay',startDay)
uni.showModal({
title: `数据看板仅支持查看${startMonth}.${startDay}-${endMonth}.${endDay}的数据,更多数据请登陆商业综合平台查看`,
icon:'none',
@ -1338,7 +1337,7 @@ $iphoneHeight: env(safe-area-inset-bottom);
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
align-items: flex-start;
.title {
font-size: 28rpx;
font-family: PingFangSC-Semibold, PingFang SC;