task#10677,tab切的索引bug修复

This commit is contained in:
2024-02-01 14:11:22 +08:00
parent 4c451dc0fc
commit d8a853566c
2 changed files with 7 additions and 3 deletions

View File

@ -65,11 +65,14 @@ export default {
}, },
}, },
created() { created() {
const urlParams = new URLSearchParams(window.location.search);
this.id = this.$route.params.id || urlParams.get('id') || this.$route.params.batchCode;
}, },
async mounted() { async mounted() {
const urlParams = new URLSearchParams(window.location.search);
this.id = this.$route.params.id || urlParams.get('id') || this.$route.params.batchCode;
// console.log(" this.id", this.id)
this.activeIndex=this.$route.params?.activeIndex || 0 this.activeIndex=this.$route.params?.activeIndex || 0
// console.log(" this.activeIndex", this.activeIndex)
await this.batchOrderCount(); await this.batchOrderCount();
await this.getList() await this.getList()
}, },

View File

@ -150,6 +150,7 @@ export default {
this.id = this.$route.params.id; this.id = this.$route.params.id;
this.activeIndex=this.$route.params.index; this.activeIndex=this.$route.params.index;
this.batchCode=this.$route.params.batchCode this.batchCode=this.$route.params.batchCode
console.log(" this.batchCode", this.batchCode)
}, },
async mounted(){ async mounted(){
await this.getOrderDetail() await this.getOrderDetail()
@ -158,11 +159,11 @@ export default {
}); });
}, },
methods:{ methods:{
goPrePage(){ goPrePage(){
this.$router.push({ this.$router.push({
name: 'caseAuditList', // 目标路由的名称 name: 'caseAuditList', // 目标路由的名称
params: { params: {
id:this.id,
activeIndex:this.activeIndex, activeIndex:this.activeIndex,
batchCode:this.batchCode, batchCode:this.batchCode,
} }