Authored by dongjunjie

没数据用--展示

... ... @@ -57,7 +57,7 @@
<h2 class="up" v-show="rankChange > 0"><i>↑</i><b>{{rankChange}}</b>个名次</h2>
<h2 class="middle" v-show="rankChange == 0"><i>--</i><b>{{rankChange}}</b>个名次</h2>
<h2 class="down" v-show="rankChange < 0"><i>↓</i><b>{{-rankChange}}</b>个名次</h2>
<h2 v-show="!rankChange">个名次</h2>
<h2 v-else><b>--</b>个名次</h2>
</div>
</div>
... ... @@ -92,14 +92,14 @@
},
data() {
return {
buyNumbers: '0',
orderAmount: '0',
rankNow: '0',
rankChange: '0',
rankLevel: 5,
buyNumbers: '',
orderAmount: '',
rankNow: '',
rankChange: '',
rankLevel: '',
rankDate: '',
listUpdateTime:'',
overViewUpdateTime:'',
listUpdateTime: '',
overViewUpdateTime: '',
grid:{
url:'/report/getOrdersGoodsRptList',
columns:[
... ... @@ -128,7 +128,6 @@
]
}
}
},
ready() {
this.fetchData1();
... ... @@ -146,9 +145,9 @@
dateId: util.dateFormat(new Date(),"YYYYMMdd")
}).then(function (response) {
var rs = response.data;
self.buyNumbers = rs.data.buyNumbers;
self.orderAmount = rs.data.orderAmount;
self.overViewUpdateTime = rs.data.hour.substring(0,5);
self.buyNumbers = rs.data.buyNumbers?rs.data.buyNumbers:'--';
self.orderAmount = rs.data.orderAmount?rs.data.buyNumbers:'--';
self.overViewUpdateTime = rs.data.hour?rs.data.hour.substring(0,5):'--';
}, function (response) {
var rs = response.data;
console.log(rs.message);
... ... @@ -166,9 +165,9 @@
dateId: util.dateFormat(day,"YYYYMMdd")
}).then(function (response) {
var rs = response.data;
self.rankNow = rs.data.rankNow;
self.rankChange = rs.data.rankChange;
self.rankLevel = rs.data.rankLevel;
self.rankNow = rs.data.rankNow?rs.data.rankNow:'--';
self.rankChange = rs.data.rankChange?rs.data.rankChange:'--';
self.rankLevel = rs.data.rankLevel?rs.data.rankLevel:'';
}, function (response) {
var rs = response.data;
console.log(rs.message);
... ... @@ -177,7 +176,11 @@
},
events:{
complete(data){
this.listUpdateTime = data.list[0].hour + ":00";
if(data.length > 0){
this.listUpdateTime = data.list[0].hour? data.list[0].hour+":00":'--';
}else{
this.listUpdateTime = '--';
}
}
}
}
... ...
... ... @@ -110,12 +110,12 @@
if(result.allNumber){
this.cards[0].value = result.allNumber;
}else{
this.cards[0].value = '0';
this.cards[0].value = '--';
}
if(result.allAmount){
this.cards[1].value = result.allAmount;
}else{
this.cards[1].value = '0';
this.cards[1].value = '--';
}
}
}
... ...
... ... @@ -107,16 +107,8 @@
complete(data){
let result = data.additionInfo;
if(result){
if(result.allNumber){
this.cards[0].value = result.allNumber;
}else{
this.cards[0].value = '0';
}
if(result.allAmount){
this.cards[1].value = result.allAmount;
}else{
this.cards[1].value = '0';
}
this.cards[0].value = result.allNumber?result.allNumber:'--';
this.cards[1].value = result.allAmount?result.allAmount:'--';
}
}
}
... ...
... ... @@ -115,11 +115,11 @@
{
let result = data.additionInfo;
if (result) {
this.cards[0].value = result.storageTotalNum ? result.storageTotalNum : 0;
this.cards[1].value = result.storageTotalMoney ? result.storageTotalMoney : 0;
this.cards[2].value = result.onSaleTotalNum ? result.onSaleTotalNum : 0;
this.cards[3].value = result.preSaleTotalNum ? result.preSaleTotalNum : 0;
this.cards[4].value = result.outSaleTotalNum ? result.outSaleTotalNum : 0;
this.cards[0].value = result.storageTotalNum ? result.storageTotalNum : '--';
this.cards[1].value = result.storageTotalMoney ? result.storageTotalMoney : '--';
this.cards[2].value = result.onSaleTotalNum ? result.onSaleTotalNum : '--';
this.cards[3].value = result.preSaleTotalNum ? result.preSaleTotalNum : '--';
this.cards[4].value = result.outSaleTotalNum ? result.outSaleTotalNum : '--';
result.dateId = result.dateId + "";
let month = result.dateId.substr(4, 2);
let date = result.dateId.substr(6, 2);
... ...