Changed: blockDetail.vue to handle date range input and added a watcher for date range changes.

master
Tuzki 2 years ago
parent 3036969271
commit be47d074e9
  1. 28
      sunPages/blockDetail/blockDetail.vue

@ -127,6 +127,16 @@ export default {
tabIndex: 0
};
},
watch:{
datetimerange:{
handler(val){
console.log(val)
if (val.length == 0){
this.$refs.paging.reload();
}
}
},
},
onReady() {},
onLoad: function (option) {
//optionobject
@ -273,14 +283,16 @@ export default {
},
searchData(val) {
console.log(val, this.datetimerange);
const t1 = val[0].split(' ')[0]+" 00:00:00"
const t2 = val[1].split(' ')[0]+" 23:59:59"
this.$nextTick(()=>{
this.datetimerange = [t1,t2];
this.$forceUpdate()
})
console.log(val, this.datetimerange);
this.$refs.paging.reload();
if (val.length>0){
const t1 = val[0].split(' ')[0]+" 00:00:00"
const t2 = val[1].split(' ')[0]+" 23:59:59"
this.$nextTick(()=>{
this.datetimerange = [t1,t2];
this.$forceUpdate()
})
console.log(val, this.datetimerange);
this.$refs.paging.reload();
}
},
getNoteList(row){
const obj = {

Loading…
Cancel
Save