|
@@ -220,7 +220,7 @@
|
|
|
<tr><th v-for="(item,index) in head_list" :class="{'sort_': index==0,'long_': index==1 ,'middle':index==2||index==3}" v-html="item"></th></tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr v-for="(item,index) in data_list" v-show="item.total==0 && item.amount==0">
|
|
|
+ <tr v-for="(item,index) in data_list" >
|
|
|
<td class="sort_">${index + 1}</td>
|
|
|
<td class="long_">${item.buyclass}</td>
|
|
|
<td class="t_right middle">${item.total}</td>
|
|
@@ -247,7 +247,7 @@
|
|
|
<tr><th v-for="(item,index) in head_list" :class="{'sort': index==0,'long': index==1 || index==2}" v-html="item"></th></tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
- <tr v-for="(item,index) in data_list" v-show="item.value == 0">
|
|
|
+ <tr v-for="(item,index) in data_list" >
|
|
|
<td class="sort">${index + 1}</td>
|
|
|
<td class="long">${item.buyerclass}</td>
|
|
|
<td class="t_right long">${item.value}</td>
|
|
@@ -265,7 +265,7 @@
|
|
|
<script src=//cdn-common.jianyu360.com/cdn/lib/zepto/1.2.0/zepto.min.js></script>
|
|
|
<script src='{{Msg "seo" "cdn"}}/big-member/js/utils.js?v={{Msg "seo" "version"}}'></script>
|
|
|
<script>
|
|
|
- var vNode_ = {
|
|
|
+ var vNode_ = {
|
|
|
delimiters: ['${', '}'],
|
|
|
el: '#report_table',
|
|
|
components: {
|
|
@@ -347,10 +347,15 @@
|
|
|
if (res && res.error_code === 0 && res.data) {
|
|
|
let data_ = res.data.customer_scale
|
|
|
data_.forEach(ele => {
|
|
|
- ele.amount=ele.amount.toFixed(2)
|
|
|
+ if(ele.amount){
|
|
|
+ ele.amount=ele.amount.toFixed(2)
|
|
|
+ }
|
|
|
});
|
|
|
data_.sort(function(a,b){return b.total-a.total});
|
|
|
- this_.data_list=data_
|
|
|
+ let newarr = data_.filter(function (item, index) {
|
|
|
+ return !(item['amount'] ==0 && item['total'] ==0 )
|
|
|
+ })
|
|
|
+ this_.data_list=newarr
|
|
|
if(res.data.customer_scale_other){
|
|
|
this_.analysis_num=res.data.customer_scale_other.total
|
|
|
this_.analysis_price=res.data.customer_scale_other.amount.toFixed(2)
|
|
@@ -374,51 +379,69 @@
|
|
|
success:function(res) {
|
|
|
// console.log(res)
|
|
|
if(res.error_code == 0 && res.data) {
|
|
|
+ console.log(that.parm)
|
|
|
if(that.parm=='curMonthCountTop'){ //数量
|
|
|
let others=[]
|
|
|
let data_ =res.data.project_buyerclass_count
|
|
|
+ // data_.push({buyerclass:'其它',count:12})
|
|
|
data_.forEach(ele => {
|
|
|
- ele.value=ele.count
|
|
|
- if(ele.buyclass=='其它'){
|
|
|
+ if(ele.count){
|
|
|
+ ele.value=ele.count
|
|
|
+ }
|
|
|
+ if(ele.buyerclass=='其它'){
|
|
|
others.push(ele)
|
|
|
}
|
|
|
});
|
|
|
|
|
|
let newarr = data_.filter(function (item, index) {
|
|
|
- return item[buyerclass] != '其它'
|
|
|
+ return (item['buyerclass'] != '其它' && item['count']!=0)
|
|
|
})
|
|
|
-
|
|
|
that.data_list=newarr
|
|
|
- that.num=others[0].count
|
|
|
-
|
|
|
- }else if(this.parm=='curMonthScaleTop'){ //规模排行
|
|
|
+
|
|
|
+ if(others.length!=0){
|
|
|
+ that.num=others[0].count
|
|
|
+ }
|
|
|
+
|
|
|
+ }else if(that.parm=='curMonthScaleTop'){ //规模排行
|
|
|
let data_ =res.data.project_buyerclass_bidamount
|
|
|
let others=[]
|
|
|
+ // data_.push({buyerclass:'其它',bidamount:12})
|
|
|
data_.forEach(ele => {
|
|
|
- ele.value=ele.bidamount.toFixed(2)
|
|
|
- if(ele.buyclass=='其它'){
|
|
|
+ if(ele.bidamount){
|
|
|
+ ele.value=ele.bidamount.toFixed(2)
|
|
|
+ }
|
|
|
+ if(ele.buyerclass=='其它'){
|
|
|
others.push(ele)
|
|
|
}
|
|
|
});
|
|
|
let newarr = data_.filter(function (item, index) {
|
|
|
- return item[buyerclass] != '其它'
|
|
|
+ return (item['buyerclass'] != '其它' && item['bidamount']!=0)
|
|
|
})
|
|
|
+ console.log(newarr)
|
|
|
that.data_list=newarr
|
|
|
- that.num=others[0].bidamount
|
|
|
- }else if(this.parm=='averageScaleTop'){ //平均规模排行
|
|
|
+ if(others.length!=0){
|
|
|
+ that.num=others[0].bidamount
|
|
|
+ }
|
|
|
+ }else if(that.parm=='averageScaleTop'){ //平均规模排行
|
|
|
let data_ =res.data.project_buyerclass_average_bidamount
|
|
|
let others=[]
|
|
|
+ // data_.push({buyerclass:'其它',average:12})
|
|
|
data_.forEach(ele => {
|
|
|
- ele.value=ele.average.toFixed(2)
|
|
|
- if(ele.buyclass=='其它'){
|
|
|
+ if(ele.average){
|
|
|
+ ele.value=ele.average.toFixed(2)
|
|
|
+
|
|
|
+ }
|
|
|
+ if(ele.buyerclass=='其它'){
|
|
|
others.push(ele)
|
|
|
}
|
|
|
});
|
|
|
let newarr = data_.filter(function (item, index) {
|
|
|
- return item[buyerclass] != '其它'
|
|
|
+ return (item['buyerclass'] != '其它' && item['average']!=0)
|
|
|
})
|
|
|
that.data_list=newarr
|
|
|
- that.num=others[0].average
|
|
|
+ if(others.length!=0){
|
|
|
+ that.num=others[0].average
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}else{
|