update
This commit is contained in:
parent
6c70d3c75d
commit
23fb9a310a
@ -58,7 +58,7 @@
|
||||
</view>
|
||||
<view class="curRevenue">
|
||||
<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>
|
||||
@ -186,16 +186,24 @@ export default {
|
||||
Statistics_Date:time,
|
||||
}
|
||||
let data = await request.$webGet('CommercialApi/BaseInfo/GetBrandAnalysis',req)
|
||||
console.log('111',data)
|
||||
if (data.Result_Code===100){
|
||||
let list = data.Result_Data.ShopBrandList
|
||||
console.log('list111',list)
|
||||
let resList = []
|
||||
let noResList = []
|
||||
// 原先是要去掉营收为0的 现在不去
|
||||
list.forEach(item=>{
|
||||
if (item.CurRevenue){
|
||||
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)
|
||||
}
|
||||
uni.hideLoading()
|
||||
@ -215,6 +223,19 @@ export default {
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -312,7 +312,7 @@ export default {
|
||||
for (var i = 0; i < len - 1; i++) {
|
||||
for (var j = 0; j < len - 1 - i; j++) {
|
||||
// 判断按照那个排序
|
||||
if (this.type===1){
|
||||
if (this.type===1 || this.type===2){
|
||||
// 正序
|
||||
if (this.sortType===0){
|
||||
// 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){
|
||||
// 正序
|
||||
if (this.sortType===0){
|
||||
|
||||
@ -6,23 +6,23 @@
|
||||
<image class="icon" :src="item.Brand_ICO?item.Brand_ICO:'/static/images/revenue/home.png'"></image>
|
||||
</div>
|
||||
<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>-->
|
||||
</div>
|
||||
<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">
|
||||
<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 class="time" v-if="item.Bussiness_Time">
|
||||
<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 class="label">
|
||||
<!-- <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.Business_Trade}}</div>
|
||||
<div class="labelItem">{{item.Business_Trade || '-'}}</div>
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="boxItem">
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user