修改重新审核bug,选择固定时间去记账之后返回还是原本的时间和tab
This commit is contained in:
@ -98,9 +98,10 @@ export default {
|
||||
}
|
||||
},
|
||||
async mounted() {
|
||||
console.log("params",this.$route.params?.queryTime)
|
||||
this.activeIndex=this.$route.params?.activeIndex || 0
|
||||
this.queryType=this.$route.params?.queryType || this.queryType
|
||||
this.time = this.$route.params?.queryTime || this.queryTime
|
||||
this.time = this.$route.params?.queryTime
|
||||
await this.initIndex()
|
||||
await this.initSelectTime();
|
||||
await this.getPermissions();
|
||||
@ -174,7 +175,7 @@ export default {
|
||||
id: item.id, // 参数对象的属性
|
||||
postfix:item.postfix,
|
||||
index:this.activeIndex,
|
||||
queryTime:this.queryTime
|
||||
queryTime: this.time || this.queryTime
|
||||
}
|
||||
});
|
||||
},
|
||||
@ -189,16 +190,18 @@ export default {
|
||||
await this.getList();
|
||||
},
|
||||
initSelectTime() {//初始化查询时间
|
||||
const year = this.currentDate.getFullYear(); // 获取年份,结果为 2023
|
||||
const month = (this.currentDate.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1,结果为 9
|
||||
this.ymTime = year + '-' + month;
|
||||
this.queryTime=timeFormat(new Date());
|
||||
if(this.time){
|
||||
const date = new Date(this.time);
|
||||
const year = date.getFullYear(); // 获取年份,结果为 2023
|
||||
const month = (date.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1,结果为 9
|
||||
this.ymTime = year + '-' + month
|
||||
return
|
||||
}
|
||||
const year = this.currentDate.getFullYear(); // 获取年份,结果为 2023
|
||||
const month = (this.currentDate.getMonth() + 1).toString().padStart(2, '0'); // 获取月份,需要注意月份从 0 开始,所以要加 1,结果为 9
|
||||
this.ymTime = year + '-' + month;
|
||||
this.queryTime=timeFormat(new Date());
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user