|
@@ -96,7 +96,6 @@ const queryDailyNotifyTotal = () => {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-queryDailyNotifyTotal()
|
|
|
|
|
|
const loading = ref(false);
|
|
|
const finished = ref(false);
|
|
@@ -115,7 +114,7 @@ const pageData = ref<{
|
|
|
total?: number
|
|
|
}>({
|
|
|
pageNo: 0,
|
|
|
- pageSize: 10,
|
|
|
+ pageSize: 8,
|
|
|
total: 0
|
|
|
})
|
|
|
/**
|
|
@@ -133,14 +132,17 @@ const queryDailyNotifyByPage = (isPull = false) => {
|
|
|
readType: 2,
|
|
|
...pageData.value
|
|
|
}
|
|
|
+ if(pageData.value.pageNo === 1) noticeLists.value = []
|
|
|
reqest.post('/admin-api/adm/noticeAndLearn/query/page', sendData).then((result: any) => {
|
|
|
const resultData = result.data;
|
|
|
if (resultData) {
|
|
|
if (resultData && resultData.list) {
|
|
|
- isPull ? noticeLists.value = resultData.list : noticeLists.value?.push(...resultData.list)
|
|
|
+ (isPull) ? noticeLists.value = resultData.list : noticeLists.value?.push(...resultData.list)
|
|
|
}
|
|
|
if (isPull) {
|
|
|
refreshing.value = false
|
|
|
+ } else {
|
|
|
+ loading.value = false
|
|
|
}
|
|
|
/** 用来解决tab切换时,容器高度发生变化自动触发loading事件 */
|
|
|
const time = setTimeout(() => {
|
|
@@ -173,7 +175,15 @@ const queryDailyNotifyGroup = () => {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
-queryDailyNotifyGroup();
|
|
|
+const initDailyNotifyData = () => {
|
|
|
+ pageData.value.pageNo = 0
|
|
|
+ loading.value = false
|
|
|
+ finished.value = false
|
|
|
+ refreshing.value = false
|
|
|
+ queryDailyNotifyTotal()
|
|
|
+ queryDailyNotifyGroup()
|
|
|
+}
|
|
|
+initDailyNotifyData()
|
|
|
const router = useRouter()
|
|
|
const clickHandler = (item: any) => {
|
|
|
router.push({
|
|
@@ -193,7 +203,7 @@ const onDeleteHandle = (item: any) => {
|
|
|
duration: 800,
|
|
|
position: 'top',
|
|
|
onOpened() {
|
|
|
- queryDailyNotifyGroup();
|
|
|
+ initDailyNotifyData();
|
|
|
}
|
|
|
});
|
|
|
}
|