update
This commit is contained in:
parent
84e0f9761d
commit
d1059fc5cc
@ -1064,6 +1064,8 @@ export default {
|
||||
}
|
||||
},
|
||||
async handleGetTrafficList(){
|
||||
this.allTrafficList = []
|
||||
this.showTrafficList = []
|
||||
uni.showLoading({
|
||||
title: '正在加载...'
|
||||
})
|
||||
@ -1072,60 +1074,70 @@ export default {
|
||||
Province_Code: '340000',
|
||||
GroupType: 1
|
||||
}
|
||||
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParams)
|
||||
let res = bayonetCount.Result_Data.List
|
||||
res.forEach((item=>{
|
||||
if (item.Vehicle_Count===null || item.SectionFlow_Count===null || item.Entry_Rate===null || item.Entry_Rate>100){
|
||||
item.Vehicle_Count = 0
|
||||
item.SectionFlow_Count = 0
|
||||
item.Entry_Rate = 0
|
||||
}
|
||||
}))
|
||||
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetBayonetRankList', requestParams)
|
||||
console.log('bayonetCount',bayonetCount)
|
||||
let res = bayonetCount.Result_Data
|
||||
let list1 = JSON.parse(JSON.stringify(res.ServerpartFlowList)) // 服务区流量排行
|
||||
let list2 = JSON.parse(JSON.stringify(res.SectionFlowList))// 断面流量排行
|
||||
let list3 = JSON.parse(JSON.stringify(res.EntryRateList ))// 断面流量排行
|
||||
let allList = []// 全部的
|
||||
let list1 = JSON.parse(JSON.stringify(res)) // 服务区流量排名
|
||||
let list2 = JSON.parse(JSON.stringify(res)) // 断面流量排名
|
||||
let list3 = JSON.parse(JSON.stringify(res)) // 驶入率排名
|
||||
// 排序
|
||||
for (let i=0;i<=list1.length - 1;i++){
|
||||
for (let j=0;j<=list1.length - i - 1 ;j++){
|
||||
if (list1[j] && list1[j + 1] && list1[j].Vehicle_Count!==null && list1[j+1].Vehicle_Count!==null){
|
||||
if (list1[j].Vehicle_Count < list1[j+1].Vehicle_Count ){
|
||||
let temp = list1[j]
|
||||
list1[j] = list1[j + 1]
|
||||
list1[j + 1] = temp
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i=0;i<=list2.length-1;i++){
|
||||
for (let j=0;j<=list2.length - i - 1;j++){
|
||||
if (list2[j] && list2[j + 1] && list2[j].SectionFlow_Count!==null && list2[j+1].SectionFlow_Count !==null ){
|
||||
if (list2[j].SectionFlow_Count < list2[j+1].SectionFlow_Count){
|
||||
let temp = list2[j]
|
||||
list2[j] = list2[j + 1]
|
||||
list2[j + 1] = temp
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let i=0;i<=list3.length-1;i++){
|
||||
for (let j=0;j<=list3.length - i - 1;j++){
|
||||
if (list3[j] && list3[j + 1] && list3[j].Entry_Rate!==null && list3[j+1].Entry_Rate!==null ){
|
||||
if (list3[j].Entry_Rate < list3[j+1].Entry_Rate){
|
||||
let temp = list3[j]
|
||||
list3[j] = list3[j + 1]
|
||||
list3[j + 1] = temp
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 截取前20
|
||||
allList.push(list1.slice(0,20))
|
||||
allList.push(list2.slice(0,20))
|
||||
allList.push(list3.slice(0,20))
|
||||
this.allTrafficList = allList
|
||||
this.showTrafficList = this.allTrafficList[this.selectSmallTab - 1]
|
||||
// uni.hideLoading()
|
||||
// res.forEach((item=>{
|
||||
// if (item.Vehicle_Count===null || item.SectionFlow_Count===null || item.Entry_Rate===null || item.Entry_Rate>100){
|
||||
// item.Vehicle_Count = 0
|
||||
// item.SectionFlow_Count = 0
|
||||
// item.Entry_Rate = 0
|
||||
// }
|
||||
// }))
|
||||
// let allList = []// 全部的
|
||||
// let list1 = JSON.parse(JSON.stringify(res)) // 服务区流量排名
|
||||
// let list2 = JSON.parse(JSON.stringify(res)) // 断面流量排名
|
||||
// let list3 = JSON.parse(JSON.stringify(res)) // 驶入率排名
|
||||
// // 排序
|
||||
// for (let i=0;i<=list1.length - 1;i++){
|
||||
// for (let j=0;j<=list1.length - i - 1 ;j++){
|
||||
// if (list1[j] && list1[j + 1] && list1[j].Vehicle_Count!==null && list1[j+1].Vehicle_Count!==null){
|
||||
// if (list1[j].Vehicle_Count < list1[j+1].Vehicle_Count ){
|
||||
// let temp = list1[j]
|
||||
// list1[j] = list1[j + 1]
|
||||
// list1[j + 1] = temp
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// for (let i=0;i<=list2.length-1;i++){
|
||||
// for (let j=0;j<=list2.length - i - 1;j++){
|
||||
// if (list2[j] && list2[j + 1] && list2[j].SectionFlow_Count!==null && list2[j+1].SectionFlow_Count !==null ){
|
||||
// if (list2[j].SectionFlow_Count < list2[j+1].SectionFlow_Count){
|
||||
// let temp = list2[j]
|
||||
// list2[j] = list2[j + 1]
|
||||
// list2[j + 1] = temp
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// for (let i=0;i<=list3.length-1;i++){
|
||||
// for (let j=0;j<=list3.length - i - 1;j++){
|
||||
// if (list3[j] && list3[j + 1] && list3[j].Entry_Rate!==null && list3[j+1].Entry_Rate!==null ){
|
||||
// if (list3[j].Entry_Rate < list3[j+1].Entry_Rate){
|
||||
// let temp = list3[j]
|
||||
// list3[j] = list3[j + 1]
|
||||
// list3[j + 1] = temp
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // 截取前20
|
||||
// allList.push(list1.slice(0,20))
|
||||
// allList.push(list2.slice(0,20))
|
||||
// allList.push(list3.slice(0,20))
|
||||
// this.allTrafficList = allList
|
||||
// this.showTrafficList = this.allTrafficList[this.selectSmallTab - 1]
|
||||
// // uni.hideLoading()
|
||||
},
|
||||
handleChangeLoadMore(){
|
||||
this.loadMore = !this.loadMore
|
||||
@ -1213,7 +1225,7 @@ export default {
|
||||
Province_Code:'340000',
|
||||
latitude:seat.latitude,
|
||||
}
|
||||
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||
// const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
|
||||
// let res = {
|
||||
// SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//服务区
|
||||
// SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//片区
|
||||
@ -1555,19 +1567,19 @@ export default {
|
||||
// this.monthPrice = res.Result_Data.Royalty_Price
|
||||
// })
|
||||
//这一日的订单配送
|
||||
const todayData = {
|
||||
Province_Code:'340000',
|
||||
Statistics_Date: this.lastDay,
|
||||
ShowCompareRate:true
|
||||
}
|
||||
console.log(11111)
|
||||
const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData)
|
||||
console.log(4444)
|
||||
this.lastDayBillCount = data.Result_Data
|
||||
this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
|
||||
this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
|
||||
this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price)
|
||||
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
|
||||
// const todayData = {
|
||||
// Province_Code:'340000',
|
||||
// Statistics_Date: this.lastDay,
|
||||
// ShowCompareRate:true
|
||||
// }
|
||||
// console.log(11111)
|
||||
// const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData)
|
||||
// console.log(4444)
|
||||
// this.lastDayBillCount = data.Result_Data
|
||||
// this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
|
||||
// this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
|
||||
// this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price)
|
||||
// this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
|
||||
flag2 = true
|
||||
// .then(res=>{
|
||||
// // 赋值给data中的这个对象 在请求完之后会进行统一的数据处理
|
||||
@ -1674,7 +1686,7 @@ export default {
|
||||
// 顶部的时间组件切换时间触发的方法
|
||||
bindDateChange(e){
|
||||
let isOnRefresh = false
|
||||
let startTime = new Date(this.startDate).getTime()
|
||||
let startTime = new Date(this.startDate).getTime()- 8 * 3600 * 1000
|
||||
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)
|
||||
@ -1725,16 +1737,14 @@ export default {
|
||||
Statistics_Date: this.lastDay,
|
||||
ShowCompareRate: true
|
||||
}
|
||||
const mobileShareData = await request.$webGet('CommercialApi/Revenue/GetMobileShare',shareData)
|
||||
this.mobileData = mobileShareData.Result_Data
|
||||
|
||||
|
||||
//mobileData 是移动支付分账接口返回来的全部数据
|
||||
this.detailTypeList[0].value = this.mobileData.ShareShop_Count
|
||||
this.detailTypeList[0].add = this.mobileData.ShareShopGrowth_Count
|
||||
this.detailTypeList[1].value = this.$util.fmoney(this.mobileData.MonthRoyalty_Price)
|
||||
this.detailTypeList[1].yesterValue = this.$util.fmoney(this.mobileData.Royalty_Price) //返回数据可能有问题
|
||||
// 让金额的动画效果出来 设置在class里面
|
||||
// const mobileShareData = await request.$webGet('CommercialApi/Revenue/GetMobileShare',shareData)
|
||||
// this.mobileData = mobileShareData.Result_Data
|
||||
// //mobileData 是移动支付分账接口返回来的全部数据
|
||||
// this.detailTypeList[0].value = this.mobileData.ShareShop_Count
|
||||
// this.detailTypeList[0].add = this.mobileData.ShareShopGrowth_Count
|
||||
// this.detailTypeList[1].value = this.$util.fmoney(this.mobileData.MonthRoyalty_Price)
|
||||
// this.detailTypeList[1].yesterValue = this.$util.fmoney(this.mobileData.Royalty_Price) //返回数据可能有问题
|
||||
// // 让金额的动画效果出来 设置在class里面
|
||||
this.priceMove = true
|
||||
//处理数据的方法
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user