Authored by dongjunjie

各种bug

@@ -79,12 +79,20 @@ @@ -79,12 +79,20 @@
79 } 79 }
80 }, 80 },
81 ready() { 81 ready() {
  82 + this.setDefaultParams();
82 this.submit(); 83 this.submit();
83 }, 84 },
84 methods: { 85 methods: {
85 submit(){ 86 submit(){
86 this.$broadcast('grid-reload', this.getSubmitParams()); 87 this.$broadcast('grid-reload', this.getSubmitParams());
87 }, 88 },
  89 + //默认前一天数据
  90 + setDefaultParams(){
  91 + var day = new Date();
  92 + day.setDate(day.getDate()-1); //前一天
  93 + this.params.beginTime = util.dateFormat(day, "YYYY-MM-dd");
  94 + this.params.endTime = util.dateFormat(day, "YYYY-MM-dd");
  95 + },
88 //解析提交Ajax参数 96 //解析提交Ajax参数
89 getSubmitParams(){ 97 getSubmitParams(){
90 var submitParams = $.extend({}, this.params); 98 var submitParams = $.extend({}, this.params);
@@ -79,12 +79,20 @@ @@ -79,12 +79,20 @@
79 } 79 }
80 }, 80 },
81 ready() { 81 ready() {
  82 + this.setDefaultParams();
82 this.submit(); 83 this.submit();
83 }, 84 },
84 methods: { 85 methods: {
85 submit(){ 86 submit(){
86 this.$broadcast('grid-reload', this.getSubmitParams()); 87 this.$broadcast('grid-reload', this.getSubmitParams());
87 }, 88 },
  89 + //默认前一天数据
  90 + setDefaultParams(){
  91 + var day = new Date();
  92 + day.setDate(day.getDate()-1); //前一天
  93 + this.params.beginTime = util.dateFormat(day, "YYYY-MM-dd");
  94 + this.params.endTime = util.dateFormat(day, "YYYY-MM-dd");
  95 + },
88 //解析提交Ajax参数 96 //解析提交Ajax参数
89 getSubmitParams(){ 97 getSubmitParams(){
90 var submitParams = $.extend({}, this.params); 98 var submitParams = $.extend({}, this.params);
@@ -119,13 +119,13 @@ import dateMonths from "./dateMonths.vue" @@ -119,13 +119,13 @@ import dateMonths from "./dateMonths.vue"
119 }, 119 },
120 //点击空白处弹层关闭 120 //点击空白处弹层关闭
121 blindEvent(){ 121 blindEvent(){
122 - // var self = this;  
123 - // $(document).on("click", function(){  
124 - // self.mo="";  
125 - // });  
126 - // $(".datepicker").on("click", function(event){  
127 - // event.stopPropagation();//阻止事件向上冒泡  
128 - // }); 122 + var self = this;
  123 + $(document).on("click", function(){
  124 + self.mo="";
  125 + });
  126 + $(".datepicker").on("click", function(event){
  127 + event.stopPropagation();//阻止事件向上冒泡
  128 + });
129 } 129 }
130 }, 130 },
131 ready(){ 131 ready(){
@@ -84,8 +84,8 @@ @@ -84,8 +84,8 @@
84 } 84 }
85 }, 85 },
86 next(){ 86 next(){
87 - if (this.currentPage < this.pages - 1) {  
88 - this.nav(this.currentPage + 1); 87 + if (this.currentPage<this.pages) {
  88 + this.nav(this.currentPage+1);
89 } 89 }
90 } 90 }
91 } 91 }