|
@@ -12,7 +12,7 @@
|
|
|
<task-ima-tab @setProductId="setProductId" :num-type="0"></task-ima-tab>
|
|
<task-ima-tab @setProductId="setProductId" :num-type="0"></task-ima-tab>
|
|
|
<EnScroll ref="scroll" :navHeight="105" is_tabHeight @onRefresh="onRefresh" @onScrollBottom="onScrollBottom">
|
|
<EnScroll ref="scroll" :navHeight="105" is_tabHeight @onRefresh="onRefresh" @onScrollBottom="onScrollBottom">
|
|
|
<view v-if="current===1">
|
|
<view v-if="current===1">
|
|
|
- <TaskItem :type="1" is_bottom :task-list="backlogList"></TaskItem>
|
|
|
|
|
|
|
+ <TaskItem :type="5" is_bottom :task-list="backlogList"></TaskItem>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-else>
|
|
<view v-else>
|
|
|
<TaskItem :type="1" is_bottom :task-list="taskList"></TaskItem>
|
|
<TaskItem :type="1" is_bottom :task-list="taskList"></TaskItem>
|
|
@@ -103,11 +103,15 @@
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
getDayBacklogList() {
|
|
getDayBacklogList() {
|
|
|
|
|
+ if (this.isAjax || (this.totalNum <= this.backlogList.length)) {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
getDayBacklogList({
|
|
getDayBacklogList({
|
|
|
'selectStr': this.selectStr
|
|
'selectStr': this.selectStr
|
|
|
}).then((res) => {
|
|
}).then((res) => {
|
|
|
if (res.code === 1) {
|
|
if (res.code === 1) {
|
|
|
- this.backlogList = res.data
|
|
|
|
|
|
|
+ this.backlogList = res.data.items
|
|
|
|
|
+ this.totalNum = res.data.totalNum
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -139,40 +143,22 @@
|
|
|
tabsChange(index) {
|
|
tabsChange(index) {
|
|
|
if (index !== this.current) {
|
|
if (index !== this.current) {
|
|
|
this.current = index;
|
|
this.current = index;
|
|
|
|
|
+ this.startList()
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 下拉刷新
|
|
// 下拉刷新
|
|
|
onRefresh() {
|
|
onRefresh() {
|
|
|
- // uni.showLoading({
|
|
|
|
|
- // title: '数据加载中'
|
|
|
|
|
- // })
|
|
|
|
|
- // setTimeout(() => {
|
|
|
|
|
- // uni.showToast({
|
|
|
|
|
- // title: '加载完成',
|
|
|
|
|
- // icon: 'none'
|
|
|
|
|
- // })
|
|
|
|
|
- // this.$refs.scroll.onEndPulling()
|
|
|
|
|
- // }, 1000)
|
|
|
|
|
- console.log("下拉刷新");
|
|
|
|
|
this.startList()
|
|
this.startList()
|
|
|
},
|
|
},
|
|
|
// 滚动到底部
|
|
// 滚动到底部
|
|
|
onScrollBottom() {
|
|
onScrollBottom() {
|
|
|
- // uni.showLoading({
|
|
|
|
|
- // title: '数据加载中'
|
|
|
|
|
- // })
|
|
|
|
|
|
|
+
|
|
|
if (this.current === 1) {
|
|
if (this.current === 1) {
|
|
|
this.getDayBacklogList()
|
|
this.getDayBacklogList()
|
|
|
} else {
|
|
} else {
|
|
|
this.getTaskReceiving();
|
|
this.getTaskReceiving();
|
|
|
}
|
|
}
|
|
|
- // setTimeout(() => {
|
|
|
|
|
- // uni.showToast({
|
|
|
|
|
- // title: '加载完成',
|
|
|
|
|
- // icon: 'none'
|
|
|
|
|
- // })
|
|
|
|
|
- // }, 1000)
|
|
|
|
|
- console.log("到底部了");
|
|
|
|
|
|
|
+
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
},
|
|
},
|