task#11265,按钮加防重复点击,已审核和待审核tab切不一致进行更改

This commit is contained in:
2024-02-23 14:24:11 +08:00
parent 80751ca40e
commit 1399d002e4
3 changed files with 101 additions and 61 deletions

View File

@ -20,7 +20,7 @@
</div>
<van-pull-refresh class="refresh" v-model="isLoading" @refresh="onRefresh" v-show="!show">
<div class="listWrap">
<div class="listItem" v-for="(item,index) in pageList" :key="index" @click="goPageDetail(item.id)">
<div class="listItem" v-for="(item,index) in pageList" :key="index" @click="noMultipleClicks(goPageDetail,item.id)">
<div class="line1">
<div><span>案件编号:</span><span>{{ item.userOrderCode }}</span></div>
<div class="right">
@ -50,7 +50,7 @@ export default {
mixins: [myMixins],
data(){
return{
tabArr: [{name: '待审核', status: 1,num:0}, {name: '审核通过', status: 2,num:0},{name: '审核不通过', status: 2,num:0},],
tabArr: [ {name: '审核通过', status: 2,num:0},{name: '审核不通过', status: 2,num:0},],
activeIndex: 0,
pageList:[],
pageNum:1,
@ -58,6 +58,8 @@ export default {
id:'',//批次id
isLoading:"",
isShowBackBtn:true,
type:'',//用于判断是已审核还是待审核,已审核只有两个tab切
noClick:true
}
},
computed:{
@ -76,8 +78,14 @@ export default {
}else{
this.isShowBackBtn=true
}
// console.log("===",urlParams.get('status'))
this.id = urlParams.get('id') || this.$route.params.id || this.$route.params.batchCode;
this.activeIndex=this.$route.params?.activeIndex || 0
this.type=this.$route.params?.type
console.log(urlParams.get('status') && urlParams.get('status') == 1)
if (this.type==1 || (urlParams.get('status') && urlParams.get('status') == 1)) {
this.tabArr.unshift({name: '待审核', status: 1,num:0},);
}
await this.batchOrderCount();
await this.getList()
},
@ -103,7 +111,7 @@ export default {
pageNum:this.pageNum,
pageSize:this.pageSize,
batchCode:this.id,
type: this.activeIndex+1
type:this.tabArr.length==3 ? this.activeIndex+1 : this.activeIndex+2
})
this.pageList=res.data
},