Commit d20efc80 authored by agping's avatar agping

修改

parent efbce62c
...@@ -11,7 +11,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -11,7 +11,7 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
store_id_Two: 0,//二级门店id store_id_Two: 0,//二级门店id
is_today_yeji:0,//默认搜索的不是今天 传参数0 is_today_yeji:0,//默认搜索的不是今天 传参数0
panfangData: null, panfangData: null,
orderList:'data.data.list', orderList:0,
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -86,14 +86,14 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -86,14 +86,14 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
_doc.on('click', '.positive-sequence-yeji', function(e) { _doc.on('click', '.positive-sequence-yeji', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
realtime.orderList='data.data.list.reverse()'; realtime.orderList=1;
realtime.getList(1); realtime.getList(1);
}); });
//倒序 //倒序
_doc.on('click', '.reverse-order-yeji', function(e) { _doc.on('click', '.reverse-order-yeji', function(e) {
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
realtime.orderList='data.data.list'; realtime.orderList=0;
realtime.getList(1); realtime.getList(1);
}); });
...@@ -155,7 +155,12 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h ...@@ -155,7 +155,12 @@ define(['doT', 'text!temp/real_time_performance_template_tpl.html', 'css!style/h
var tpl=realtime.switchTpl(); var tpl=realtime.switchTpl();
console.log(tpl); console.log(tpl);
var doTtmpl = doT.template(document.getElementById(tpl).innerHTML); var doTtmpl = doT.template(document.getElementById(tpl).innerHTML);
$("#maintable_list").html(doTtmpl(eval(realtime.orderList))); if(realtime.orderList==0){
$("#maintable_list").html(doTtmpl(data.data.list.slice(0,19)));
}
if(realtime.orderList==1){
$("#maintable_list").html(doTtmpl(data.data.list.reverse().slice(0,19)));
}
//获取统计时间 //获取统计时间
$('#rank_start_day').html(data.data.start_time); $('#rank_start_day').html(data.data.start_time);
$('#rank_end_day').html(data.data.end_time); $('#rank_end_day').html(data.data.end_time);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment