|
@@ -10,21 +10,24 @@
|
|
|
<view class="query adfacjb">
|
|
<view class="query adfacjb">
|
|
|
<u-icon name="search" size="38rpx" color="#B3BFC8"></u-icon>
|
|
<u-icon name="search" size="38rpx" color="#B3BFC8"></u-icon>
|
|
|
<view class="query-inp">
|
|
<view class="query-inp">
|
|
|
- <u-input v-model="keyword" border="none" fontSize="26rpx" color="#002846" clearable
|
|
|
|
|
|
|
+ <u-input v-model="queryParams.teamName" border="none" fontSize="26rpx" color="#002846" clearable
|
|
|
placeholder="请输入团队名称查询" @confirm="getList"></u-input>
|
|
placeholder="请输入团队名称查询" @confirm="getList"></u-input>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="box">
|
|
|
|
|
|
|
+ <view class="box" v-if="list.length">
|
|
|
<template v-if="tindex===0">
|
|
<template v-if="tindex===0">
|
|
|
<receive-list :list="list" @scrolltolower="scrolltolower"></receive-list>
|
|
<receive-list :list="list" @scrolltolower="scrolltolower"></receive-list>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="tindex===1">
|
|
<template v-else-if="tindex===1">
|
|
|
- <generate-list :list="list" @scrolltolower="scrolltolower"></generate-list>
|
|
|
|
|
|
|
+ <generate-list :list="list" @scrolltolower="scrolltolower" @reSendReport="reSendReport"></generate-list>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-else-if="tindex===2">
|
|
<template v-else-if="tindex===2">
|
|
|
<send-list :list="list" @scrolltolower="scrolltolower"></send-list>
|
|
<send-list :list="list" @scrolltolower="scrolltolower"></send-list>
|
|
|
</template>
|
|
</template>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view style="flex: 1;" v-else>
|
|
|
|
|
+ <page-empty text='暂无报告'></page-empty>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -32,17 +35,24 @@
|
|
|
import ReceiveList from './components/report/receiveList.vue'
|
|
import ReceiveList from './components/report/receiveList.vue'
|
|
|
import GenerateList from './components/report/generateList.vue'
|
|
import GenerateList from './components/report/generateList.vue'
|
|
|
import SendList from './components/report/sendList.vue'
|
|
import SendList from './components/report/sendList.vue'
|
|
|
|
|
+ import PageEmpty from '@/components/pageEmpty/index.vue'
|
|
|
export default {
|
|
export default {
|
|
|
components:{
|
|
components:{
|
|
|
ReceiveList,
|
|
ReceiveList,
|
|
|
GenerateList,
|
|
GenerateList,
|
|
|
- SendList
|
|
|
|
|
|
|
+ SendList,
|
|
|
|
|
+ PageEmpty
|
|
|
},
|
|
},
|
|
|
data(){
|
|
data(){
|
|
|
return {
|
|
return {
|
|
|
tindex:0,
|
|
tindex:0,
|
|
|
- keyword:'',
|
|
|
|
|
- list:[]
|
|
|
|
|
|
|
+ queryParams:{
|
|
|
|
|
+ page:1,
|
|
|
|
|
+ limit:10,
|
|
|
|
|
+ teamName:''
|
|
|
|
|
+ },
|
|
|
|
|
+ list:[],
|
|
|
|
|
+ isOver:false
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -51,24 +61,45 @@
|
|
|
methods:{
|
|
methods:{
|
|
|
changeTab(index){
|
|
changeTab(index){
|
|
|
this.tindex = index;
|
|
this.tindex = index;
|
|
|
|
|
+ this.initList();
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
|
|
+ initList(){
|
|
|
|
|
+ this.queryParams.page = 1;
|
|
|
|
|
+ this.isOver = false;
|
|
|
|
|
+ this.list = [];
|
|
|
|
|
+ },
|
|
|
getList(){
|
|
getList(){
|
|
|
if(this.tindex===0) this.getReceiveList()
|
|
if(this.tindex===0) this.getReceiveList()
|
|
|
else if(this.tindex===1) this.getGenerateList()
|
|
else if(this.tindex===1) this.getGenerateList()
|
|
|
else if(this.tindex===2) this.getSendList()
|
|
else if(this.tindex===2) this.getSendList()
|
|
|
},
|
|
},
|
|
|
getReceiveList(){
|
|
getReceiveList(){
|
|
|
- this.list = [{id:1},{id:2},{id:3}];
|
|
|
|
|
|
|
+ this.$api.get('/core/report/receivedReportList',this.queryParams).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.list = [...this.list,...res.data.list];
|
|
|
|
|
+ this.queryParams.page++;
|
|
|
|
|
+ if(res.data.list.length===0) this.isOver = true;
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
getGenerateList(){
|
|
getGenerateList(){
|
|
|
- this.list = [{id:1},{id:2},{id:3}];
|
|
|
|
|
|
|
+ this.$api.get('/core/report/generatedReportList',this.queryParams).then(({data:res})=>{
|
|
|
|
|
+ if(res.code!==0) return this.$showToast(res.msg)
|
|
|
|
|
+ this.list = [...this.list,...res.data.list];
|
|
|
|
|
+ this.queryParams.page++;
|
|
|
|
|
+ if(res.data.list.length===0) this.isOver = true;
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
getSendList(){
|
|
getSendList(){
|
|
|
this.list = [{id:1},{id:2},{id:3}];
|
|
this.list = [{id:1},{id:2},{id:3}];
|
|
|
},
|
|
},
|
|
|
|
|
+ reSendReport(){
|
|
|
|
|
+ this.getList()
|
|
|
|
|
+ this.$showToast('重新生成成功')
|
|
|
|
|
+ },
|
|
|
scrolltolower(){
|
|
scrolltolower(){
|
|
|
- console.log(this.tindex);
|
|
|
|
|
|
|
+ if(this.isOver) return
|
|
|
|
|
+ this.getList()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|