From 23fb9a310abe09661ad01b5f756865c44f8565ec Mon Sep 17 00:00:00 2001
From: cclu <1106109051@qq.com>
Date: Tue, 6 Feb 2024 16:12:44 +0800
Subject: [PATCH] update
---
pages/commercialBI/map.vue | 25 ++++++-
pages/nationalPage/merchantRevenue.vue | 71 +------------------
.../components/format/bandNumber.vue | 10 +--
3 files changed, 29 insertions(+), 77 deletions(-)
diff --git a/pages/commercialBI/map.vue b/pages/commercialBI/map.vue
index b1e7419..2023482 100644
--- a/pages/commercialBI/map.vue
+++ b/pages/commercialBI/map.vue
@@ -58,7 +58,7 @@
实时营收:
- {{item.CurRevenue?$util.getMoney(item.CurRevenue):''}}
+ {{item.CurRevenue?$util.getMoney(item.CurRevenue):'-'}}
@@ -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
}
}
}
diff --git a/pages/nationalPage/merchantRevenue.vue b/pages/nationalPage/merchantRevenue.vue
index d245658..17a988e 100644
--- a/pages/nationalPage/merchantRevenue.vue
+++ b/pages/nationalPage/merchantRevenue.vue
@@ -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){
diff --git a/pages/summaryOfPortraits/components/components/format/bandNumber.vue b/pages/summaryOfPortraits/components/components/format/bandNumber.vue
index 6da9a0f..c800277 100644
--- a/pages/summaryOfPortraits/components/components/format/bandNumber.vue
+++ b/pages/summaryOfPortraits/components/components/format/bandNumber.vue
@@ -6,23 +6,23 @@
- {{item.BrandType_Name}}
+ {{item.BrandType_Name || '-'}}
-
{{item.Brand_Name}}
+
{{item.Brand_Name || '-'}}
-
{{item.Bussiness_Name}}
+
{{item.Bussiness_Name || '-'}}
-
{{item.Bussiness_Time}}
+
{{item.Bussiness_Time || '-'}}
{{item.Bussiness_State==='1000'?'运营中':'已暂停'}}
-
{{item.Business_Trade}}
+
{{item.Business_Trade || '-'}}