包装新增页面
This commit is contained in:
+11
-7
@@ -95,7 +95,6 @@ n <!-- 新增按钮 -->
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
@@ -110,7 +109,8 @@ n <!-- 新增按钮 -->
|
||||
import {
|
||||
reqPackagingInformationList
|
||||
} from '@/api/hj.js'
|
||||
|
||||
import {
|
||||
onShow } from '@dcloudio/uni-app'
|
||||
const userStore = useUserStore()
|
||||
const {
|
||||
currentProject
|
||||
@@ -174,10 +174,14 @@ n <!-- 新增按钮 -->
|
||||
hasTrainNumber: hasTrainNumber.value
|
||||
})
|
||||
|
||||
const pageData = res.data?.getDataList || []
|
||||
const pageData = res.data?.list || res.data?.getDataList || []
|
||||
hasMore.value = pageData.length === pageSize
|
||||
|
||||
listData.value = [...listData.value, ...pageData]
|
||||
|
||||
if (isRefresh) {
|
||||
listData.value = pageData
|
||||
} else {
|
||||
listData.value = [...listData.value, ...pageData]
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载数据失败:', error)
|
||||
uni.showToast({
|
||||
@@ -241,7 +245,7 @@ n <!-- 新增按钮 -->
|
||||
}
|
||||
|
||||
// ===== 生命周期 =====
|
||||
onMounted(() => {
|
||||
fetchData(true)
|
||||
onShow(() => {
|
||||
resetAndLoad()
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user