This commit is contained in:
cclu 2023-07-24 18:57:06 +08:00
parent 84e0f9761d
commit d1059fc5cc

View File

@ -1064,6 +1064,8 @@ export default {
} }
}, },
async handleGetTrafficList(){ async handleGetTrafficList(){
this.allTrafficList = []
this.showTrafficList = []
uni.showLoading({ uni.showLoading({
title: '正在加载...' title: '正在加载...'
}) })
@ -1072,60 +1074,70 @@ export default {
Province_Code: '340000', Province_Code: '340000',
GroupType: 1 GroupType: 1
} }
const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetSPBayonetList', requestParams) const bayonetCount = await request.$webGet('CommercialApi/Revenue/GetBayonetRankList', requestParams)
let res = bayonetCount.Result_Data.List console.log('bayonetCount',bayonetCount)
res.forEach((item=>{ let res = bayonetCount.Result_Data
if (item.Vehicle_Count===null || item.SectionFlow_Count===null || item.Entry_Rate===null || item.Entry_Rate>100){ let list1 = JSON.parse(JSON.stringify(res.ServerpartFlowList)) //
item.Vehicle_Count = 0 let list2 = JSON.parse(JSON.stringify(res.SectionFlowList))//
item.SectionFlow_Count = 0 let list3 = JSON.parse(JSON.stringify(res.EntryRateList ))//
item.Entry_Rate = 0
}
}))
let allList = []// 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(list1.slice(0,20))
allList.push(list2.slice(0,20)) allList.push(list2.slice(0,20))
allList.push(list3.slice(0,20)) allList.push(list3.slice(0,20))
this.allTrafficList = allList this.allTrafficList = allList
this.showTrafficList = this.allTrafficList[this.selectSmallTab - 1] 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(){ handleChangeLoadMore(){
this.loadMore = !this.loadMore this.loadMore = !this.loadMore
@ -1213,7 +1225,7 @@ export default {
Province_Code:'340000', Province_Code:'340000',
latitude:seat.latitude, latitude:seat.latitude,
} }
const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req) // const data = await request.$webGet('CommercialApi/BaseInfo/GetServerpartList',req)
// let res = { // let res = {
// SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,// // SERVERPART_NAME:data.Result_Data.List[0].SERVERPART_NAME,//
// SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,// // SPREGIONTYPE_NAME:data.Result_Data.List[0].SPREGIONTYPE_NAME,//
@ -1555,19 +1567,19 @@ export default {
// this.monthPrice = res.Result_Data.Royalty_Price // this.monthPrice = res.Result_Data.Royalty_Price
// }) // })
// //
const todayData = { // const todayData = {
Province_Code:'340000', // Province_Code:'340000',
Statistics_Date: this.lastDay, // Statistics_Date: this.lastDay,
ShowCompareRate:true // ShowCompareRate:true
} // }
console.log(11111) // console.log(11111)
const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData) // const data = await request.$webGet('CommercialApi/Revenue/GetMallDeliver',todayData)
console.log(4444) // console.log(4444)
this.lastDayBillCount = data.Result_Data // this.lastDayBillCount = data.Result_Data
this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count // this.detailTypeList[2].value = this.lastDayBillCount.DeliverBill_Count
this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count // this.detailTypeList[2].add = this.lastDayBillCount.DeliverBillGrowth_Count
this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price) // this.detailTypeList[3].value = this.$util.fmoney(this.lastDayBillCount.MonthDeliver_Price)
this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price) // this.detailTypeList[3].yesterValue = this.$util.fmoney(this.lastDayBillCount.Deliver_Price)
flag2 = true flag2 = true
// .then(res=>{ // .then(res=>{
// // data // // data
@ -1674,7 +1686,7 @@ export default {
// //
bindDateChange(e){ bindDateChange(e){
let isOnRefresh = false 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 // let endTime = new Date(this.noChangeLastDay).getTime() - 8 * 3600 * 1000 //
const date = new Date(e.detail.value).getTime() - 8 * 3600 * 1000 const date = new Date(e.detail.value).getTime() - 8 * 3600 * 1000
let startDate = new Date(this.startDate) let startDate = new Date(this.startDate)
@ -1725,16 +1737,14 @@ export default {
Statistics_Date: this.lastDay, Statistics_Date: this.lastDay,
ShowCompareRate: true ShowCompareRate: true
} }
const mobileShareData = await request.$webGet('CommercialApi/Revenue/GetMobileShare',shareData) // const mobileShareData = await request.$webGet('CommercialApi/Revenue/GetMobileShare',shareData)
this.mobileData = mobileShareData.Result_Data // this.mobileData = mobileShareData.Result_Data
// //mobileData
// this.detailTypeList[0].value = this.mobileData.ShareShop_Count
//mobileData // this.detailTypeList[0].add = this.mobileData.ShareShopGrowth_Count
this.detailTypeList[0].value = this.mobileData.ShareShop_Count // this.detailTypeList[1].value = this.$util.fmoney(this.mobileData.MonthRoyalty_Price)
this.detailTypeList[0].add = this.mobileData.ShareShopGrowth_Count // this.detailTypeList[1].yesterValue = this.$util.fmoney(this.mobileData.Royalty_Price) //
this.detailTypeList[1].value = this.$util.fmoney(this.mobileData.MonthRoyalty_Price) // // class
this.detailTypeList[1].yesterValue = this.$util.fmoney(this.mobileData.Royalty_Price) //
// class
this.priceMove = true this.priceMove = true
// //
}, },