|
@@ -63,15 +63,18 @@ import { processTaskPagePendingApprovalApi } from '@/api/flow/processTask'
|
|
|
// store值
|
|
|
const taskProcessInfo = useTaskProcessStore()
|
|
|
|
|
|
-const satelliteList = ref([])
|
|
|
const input3 = ref('')
|
|
|
-const loading = ref(false)
|
|
|
-const totalNumber = ref(0)
|
|
|
-const totalPages = ref(0)
|
|
|
+// 下拉滚动属性值 start
|
|
|
+const loading = ref(false) // loading
|
|
|
+const totalNumber = ref(0) // 总条数
|
|
|
+const totalPages = ref(0) // 总页数
|
|
|
+// 当前页码数和每页条数
|
|
|
const condition = reactive({
|
|
|
page: 1,
|
|
|
pageSize: 10
|
|
|
})
|
|
|
+const satelliteList = ref([]) // 列表数据
|
|
|
+// 下拉滚动属性值 end
|
|
|
|
|
|
// 初始化
|
|
|
const init = () => {
|
|
@@ -93,12 +96,15 @@ const load = () => {
|
|
|
// 获取分页数据
|
|
|
const getPagedSatellites = async () => {
|
|
|
try {
|
|
|
- const { records, total, current } = await processTaskPagePendingApprovalApi(condition)
|
|
|
- satelliteList.value = satelliteList.value.concat(records)
|
|
|
+ const { records, total, pages } = await processTaskPagePendingApprovalApi(condition)
|
|
|
+ records.forEach(item => {
|
|
|
+ satelliteList.value.push(item)
|
|
|
+ })
|
|
|
totalNumber.value = total
|
|
|
- totalPages.value = current
|
|
|
+ totalPages.value = pages
|
|
|
loading.value = false
|
|
|
if (condition.page > totalPages.value) {
|
|
|
+ console.log('没有更多数据了')
|
|
|
return
|
|
|
}
|
|
|
condition.page++
|
|
@@ -132,7 +138,7 @@ watch(
|
|
|
|
|
|
const noMore = computed(() => satelliteList.value.length > totalNumber.value)
|
|
|
|
|
|
-const disabledInfinite = computed(() => loading.value || noMore.value)
|
|
|
+const disabledInfinite = computed(() => noMore.value)
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|