This commit is contained in:
cclu 2024-02-06 16:12:44 +08:00
parent 6c70d3c75d
commit 23fb9a310a
3 changed files with 29 additions and 77 deletions

View File

@ -58,7 +58,7 @@
</view> </view>
<view class="curRevenue"> <view class="curRevenue">
<span class="label">实时营收</span> <span class="label">实时营收</span>
<span class="value">{{item.CurRevenue?$util.getMoney(item.CurRevenue):''}}</span> <span class="value">{{item.CurRevenue?$util.getMoney(item.CurRevenue):'-'}}</span>
</view> </view>
</view> </view>
</view> </view>
@ -186,16 +186,24 @@ export default {
Statistics_Date:time, Statistics_Date:time,
} }
let data = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req) let data = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
console.log('111',data)
if (data.Result_Code===100){ if (data.Result_Code===100){
let list = data.Result_Data.ShopBrandList let list = data.Result_Data.ShopBrandList
console.log('list111',list)
let resList = [] let resList = []
let noResList = []
// 0
list.forEach(item=>{ list.forEach(item=>{
if (item.CurRevenue){ if (item.CurRevenue){
resList.push(item) resList.push(item)
}else{
noResList.push(item)
} }
}) })
this.dataList = this.handleSortList(resList)
this.dataList = this.handleSortList(resList).concat(this.handleSortBrandIdList(noResList))
console.log('dataList',this.dataList) console.log('dataList',this.dataList)
} }
uni.hideLoading() uni.hideLoading()
@ -215,6 +223,19 @@ export default {
} }
} }
return list return list
},
handleSortBrandIdList(list){
var len = list.length;
for (var i = 0; i < len - 1; i++) {
for (var j = 0; j < len - 1 - i; j++) {
if (list[j].Brand_Id < list[j + 1].Brand_Id){
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
}
}
return list
} }
} }
} }

View File

@ -312,7 +312,7 @@ export default {
for (var i = 0; i < len - 1; i++) { for (var i = 0; i < len - 1; i++) {
for (var j = 0; j < len - 1 - i; j++) { for (var j = 0; j < len - 1 - i; j++) {
// //
if (this.type===1){ if (this.type===1 || this.type===2){
// //
if (this.sortType===0){ if (this.sortType===0){
// 24 // 24
@ -378,75 +378,6 @@ export default {
} }
} }
} }
else if(this.type===2){
//
if (this.sortType===0){
// 24
if (this.sortName===1){
if (list[j].AccountINC.curYearData > list[j + 1].AccountINC.curYearData) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
// 23
}else if(this.sortName===2){
if (list[j].AccountINC.lYearData > list[j + 1].AccountINC.lYearData ) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
//
}else if(this.sortName===3){
if ((list[j].AccountINC.increaseData || 0) > (list[j + 1].AccountINC.increaseData || 0) ) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
//
}else if(this.sortName===4){
if ((list[j].AccountINC.increaseRate || 0) > (list[j + 1].AccountINC.increaseRate || 0) ) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
}
}
//
else{
// 24
if (this.sortName===1){
if (list[j].AccountINC.curYearData < list[j + 1].AccountINC.curYearData) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
// 23
}else if(this.sortName===2){
if (list[j].AccountINC.lYearData < list[j + 1].AccountINC.lYearData ) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
//
}else if(this.sortName===3){
if (list[j].AccountINC && list[j + 1].AccountINC){
if ((list[j].AccountINC.increaseData || 0) < (list[j + 1].AccountINC.increaseData || 0)) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
}
//
}else if(this.sortName===4){
if ((list[j].AccountINC.increaseRate|| 0) < (list[j + 1].AccountINC.increaseRate|| 0) ) { //
var temp = list[j];
list[j] = list[j + 1];
list[j + 1] = temp;
}
}
}
}
else if(this.type===3){ else if(this.type===3){
// //
if (this.sortType===0){ if (this.sortType===0){

View File

@ -6,23 +6,23 @@
<image class="icon" :src="item.Brand_ICO?item.Brand_ICO:'/static/images/revenue/home.png'"></image> <image class="icon" :src="item.Brand_ICO?item.Brand_ICO:'/static/images/revenue/home.png'"></image>
</div> </div>
<div class="typePic"> <div class="typePic">
<text class="typeName">{{item.BrandType_Name}}</text> <text class="typeName">{{item.BrandType_Name || '-'}}</text>
<!-- <image class="typeImg" :src="item.type===1?'https://eshangtech.com/ShopICO/ahyd-BID/commercial/success.svg':item.type===2?'https://eshangtech.com/ShopICO/ahyd-BID/commercial/punish.svg':''"></image>--> <!-- <image class="typeImg" :src="item.type===1?'https://eshangtech.com/ShopICO/ahyd-BID/commercial/success.svg':item.type===2?'https://eshangtech.com/ShopICO/ahyd-BID/commercial/punish.svg':''"></image>-->
</div> </div>
<div class="right"> <div class="right">
<p class="title" :style="item.Bussiness_State==='2000'?'color: #ccc':''">{{item.Brand_Name}}</p> <p class="title" :style="item.Bussiness_State==='2000'?'color: #ccc':''">{{item.Brand_Name || '-'}}</p>
<div class="company" v-if="item.Bussiness_Name"> <div class="company" v-if="item.Bussiness_Name">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/shop.svg"></image> <image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/shop.svg"></image>
<p class="text">{{item.Bussiness_Name}}</p> <p class="text">{{item.Bussiness_Name || '-'}}</p>
</div> </div>
<div class="time" v-if="item.Bussiness_Time"> <div class="time" v-if="item.Bussiness_Time">
<image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/time.svg"></image> <image class="img" src="https://eshangtech.com/ShopICO/ahyd-BID/commercial/time.svg"></image>
<p class="text">{{item.Bussiness_Time}}</p> <p class="text">{{item.Bussiness_Time || '-'}}</p>
</div> </div>
<div class="label"> <div class="label">
<!-- <div class="labelItem" v-for="(item,index) in item.label" :key="index">{{item}}</div>--> <!-- <div class="labelItem" v-for="(item,index) in item.label" :key="index">{{item}}</div>-->
<div class="labelItem">{{item.Bussiness_State==='1000'?'运营中':'已暂停'}}</div> <div class="labelItem">{{item.Bussiness_State==='1000'?'运营中':'已暂停'}}</div>
<div class="labelItem">{{item.Business_Trade}}</div> <div class="labelItem">{{item.Business_Trade || '-'}}</div>
</div> </div>
<div class="box"> <div class="box">
<div class="boxItem"> <div class="boxItem">