Authored by dongjunjie

各种bug

... ... @@ -79,12 +79,20 @@
}
},
ready() {
this.setDefaultParams();
this.submit();
},
methods: {
submit(){
this.$broadcast('grid-reload', this.getSubmitParams());
},
//默认前一天数据
setDefaultParams(){
var day = new Date();
day.setDate(day.getDate()-1); //前一天
this.params.beginTime = util.dateFormat(day, "YYYY-MM-dd");
this.params.endTime = util.dateFormat(day, "YYYY-MM-dd");
},
//解析提交Ajax参数
getSubmitParams(){
var submitParams = $.extend({}, this.params);
... ...
... ... @@ -79,12 +79,20 @@
}
},
ready() {
this.setDefaultParams();
this.submit();
},
methods: {
submit(){
this.$broadcast('grid-reload', this.getSubmitParams());
},
//默认前一天数据
setDefaultParams(){
var day = new Date();
day.setDate(day.getDate()-1); //前一天
this.params.beginTime = util.dateFormat(day, "YYYY-MM-dd");
this.params.endTime = util.dateFormat(day, "YYYY-MM-dd");
},
//解析提交Ajax参数
getSubmitParams(){
var submitParams = $.extend({}, this.params);
... ...
... ... @@ -119,13 +119,13 @@ import dateMonths from "./dateMonths.vue"
},
//点击空白处弹层关闭
blindEvent(){
// var self = this;
// $(document).on("click", function(){
// self.mo="";
// });
// $(".datepicker").on("click", function(event){
// event.stopPropagation();//阻止事件向上冒泡
// });
var self = this;
$(document).on("click", function(){
self.mo="";
});
$(".datepicker").on("click", function(event){
event.stopPropagation();//阻止事件向上冒泡
});
}
},
ready(){
... ...
... ... @@ -84,8 +84,8 @@
}
},
next(){
if (this.currentPage < this.pages - 1) {
this.nav(this.currentPage + 1);
if (this.currentPage<this.pages) {
this.nav(this.currentPage+1);
}
}
}
... ...