Authored by dongjunjie

总览页面列表时间bug

@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 <div id="businessIndex"> 4 <div id="businessIndex">
5 <div class="overViewTitle"> 5 <div class="overViewTitle">
6 <h3>经营指标</h3> 6 <h3>经营指标</h3>
7 - <span>展示当日经营指标数据({{overViewUpdateTime}}更新)</span> 7 + <span>展示当日经营指标数据({{overViewUpdateTime}} 更新)</span>
8 </div> 8 </div>
9 9
10 <div class="overViewContent" style="margin-left: 200px"> 10 <div class="overViewContent" style="margin-left: 200px">
@@ -47,23 +47,23 @@ @@ -47,23 +47,23 @@
47 </div> 47 </div>
48 48
49 <div class="rankData"> 49 <div class="rankData">
50 - <div class="dataModle2"> 50 + <div class="dataModle2" style="margin-bottom: 20px">
51 <p>同品类中<br>品牌排名为</p> 51 <p>同品类中<br>品牌排名为</p>
52 <h2>第<b>{{rankNow}}</b>名</h2> 52 <h2>第<b>{{rankNow}}</b>名</h2>
53 </div> 53 </div>
54 -  
55 <div class="dataModle2"> 54 <div class="dataModle2">
56 <p>较上周同期</p> 55 <p>较上周同期</p>
57 - <h2 class="up" v-show="rankChange > 0"><i>↑</i><b>{{rankChange}}</b>个名次</h2>  
58 - <h2 class="middle" v-show="rankChange == 0"><i>--</i><b>{{rankChange}}</b>个名次</h2>  
59 - <h2 class="down" v-show="rankChange < 0"><i>↓</i><b>{{-rankChange}}</b>个名次</h2>  
60 - <h2 v-show="!rankChange"><b>--</b>个名次</h2> 56 + <h2 class="up" v-show="rankChange > 0"><i>↑</i><b>{{rankChange}}</b> 个名次</h2>
  57 + <h2 class="middle" v-show="rankChange == 0"><i>--</i><b>{{rankChange}}</b> 个名次</h2>
  58 + <h2 class="down" v-show="rankChange < 0"><i>↓</i><b>{{-rankChange}}</b> 个名次</h2>
  59 + <h2 v-show="rankChange=='--'"><b>--</b>个名次</h2>
  60 +
  61 + <div class="rankTip" v-show="rankChange > 0"><b class="_red">今天业绩不错,继续加油哦!</b></div>
  62 + <div class="rankTip" v-show="rankChange == 0"><b class="_blue">继续加油哦!</b></div>
  63 + <div class="rankTip" v-show="rankChange < 0"><b class="_green">还需再接再厉哦!</b></div>
  64 + <div class="rankTip" v-show="rankChange=='--'"><b class="_red">没数据也要加油哦!</b></div>
61 </div> 65 </div>
62 </div> 66 </div>
63 -  
64 - <div class="rankTip" v-show="rankChange > 0"><b class="_red">今天业绩不错<br>继续加油哦!</b></div>  
65 - <div class="rankTip" v-show="rankChange == 0"><b class="_blue">继续加油哦!</b></div>  
66 - <div class="rankTip" v-show="rankChange < 0"><b class="_green">还需再接再厉哦!</b></div>  
67 <div class="clearfix"></div> 67 <div class="clearfix"></div>
68 </div> 68 </div>
69 </div> 69 </div>
@@ -71,7 +71,7 @@ @@ -71,7 +71,7 @@
71 <div id="businessDetail"> 71 <div id="businessDetail">
72 <div class="overViewTitle"> 72 <div class="overViewTitle">
73 <h3>交易明细</h3> 73 <h3>交易明细</h3>
74 - <span>展示当日商品交易情况({{listUpdateTime}}更新)</span> 74 + <span>展示当日商品交易情况({{listUpdateTime}} 更新)</span>
75 </div> 75 </div>
76 76
77 <div class="detailList"> 77 <div class="detailList">
@@ -92,14 +92,14 @@ @@ -92,14 +92,14 @@
92 }, 92 },
93 data() { 93 data() {
94 return { 94 return {
95 - buyNumbers: '',  
96 - orderAmount: '',  
97 - rankNow: '',  
98 - rankChange: '', 95 + buyNumbers: '--',
  96 + orderAmount: '--',
  97 + rankNow: '--',
  98 + rankChange: '--',
99 rankLevel: '', 99 rankLevel: '',
100 rankDate: '', 100 rankDate: '',
101 - listUpdateTime: '',  
102 - overViewUpdateTime: '', 101 + listUpdateTime: '--:--',
  102 + overViewUpdateTime: '--:--',
103 grid:{ 103 grid:{
104 url:'/report/getOrdersGoodsRptList', 104 url:'/report/getOrdersGoodsRptList',
105 columns:[ 105 columns:[
@@ -147,10 +147,7 @@ @@ -147,10 +147,7 @@
147 var rs = response.data; 147 var rs = response.data;
148 self.buyNumbers = rs.data.buyNumbers?rs.data.buyNumbers:'--'; 148 self.buyNumbers = rs.data.buyNumbers?rs.data.buyNumbers:'--';
149 self.orderAmount = rs.data.orderAmount?rs.data.orderAmount:'--'; 149 self.orderAmount = rs.data.orderAmount?rs.data.orderAmount:'--';
150 - self.overViewUpdateTime = rs.data.hour?rs.data.hour.substring(0,5):'--';  
151 - }, function (response) {  
152 - var rs = response.data;  
153 - console.log(rs.message); 150 + self.overViewUpdateTime = rs.data.hour?rs.data.hour.substring(0,5):'--:--';
154 }); 151 });
155 }, 152 },
156 153
@@ -166,18 +163,15 @@ @@ -166,18 +163,15 @@
166 }).then(function (response) { 163 }).then(function (response) {
167 var rs = response.data; 164 var rs = response.data;
168 self.rankNow = rs.data.rankNow?rs.data.rankNow:'--'; 165 self.rankNow = rs.data.rankNow?rs.data.rankNow:'--';
169 - self.rankChange = rs.data.rankChange?rs.data.rankChange:null; 166 + self.rankChange = rs.data.rankChange?rs.data.rankChange:'--';
170 self.rankLevel = rs.data.rankLevel?rs.data.rankLevel:''; 167 self.rankLevel = rs.data.rankLevel?rs.data.rankLevel:'';
171 - }, function (response) {  
172 - var rs = response.data;  
173 - console.log(rs.message);  
174 }); 168 });
175 } 169 }
176 }, 170 },
177 events:{ 171 events:{
178 complete(data){ 172 complete(data){
179 - if(data.length > 0){  
180 - this.listUpdateTime = data.list[0].hour? data.list[0].hour+":00":'--'; 173 + if(data && data.list.length > 0){
  174 + this.listUpdateTime = data.list[0].hour? data.list[0].hour+":00":'--:--';
181 }else{ 175 }else{
182 this.listUpdateTime = '--'; 176 this.listUpdateTime = '--';
183 } 177 }
@@ -167,7 +167,7 @@ @@ -167,7 +167,7 @@
167 padding: 10px 0; 167 padding: 10px 0;
168 background-color: #eeeeee; 168 background-color: #eeeeee;
169 width: 200px; 169 width: 200px;
170 - height: 132px; 170 + height: 130px;
171 text-align: center; 171 text-align: center;
172 172
173 h2{ 173 h2{
@@ -181,7 +181,7 @@ @@ -181,7 +181,7 @@
181 } 181 }
182 i{ 182 i{
183 color: #ff0000; 183 color: #ff0000;
184 - margin-right: 10px; 184 + margin-right: 5px;
185 font-size: 30px; 185 font-size: 30px;
186 font-style: normal; 186 font-style: normal;
187 } 187 }
@@ -228,7 +228,7 @@ @@ -228,7 +228,7 @@
228 b{ 228 b{
229 text-align: center; 229 text-align: center;
230 display: block; 230 display: block;
231 - margin-bottom: 12px; 231 + margin-bottom: 10px;
232 } 232 }
233 233
234 .shape{ 234 .shape{