|
|
@@ -2,12 +2,12 @@
|
|
|
<ie-page bg-color="#F6F8FA" :fix-height="true">
|
|
|
<ie-navbar title="组卷作业" />
|
|
|
<view class="bg-white">
|
|
|
- <uv-tabs :current="currentTab" :list="tabList" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle" :scrollable="false"
|
|
|
- @change="handleTabChange"></uv-tabs>
|
|
|
+ <uv-tabs :current="currentTab" :list="tabList" :activeStyle="activeStyle" :inactiveStyle="inactiveStyle"
|
|
|
+ :scrollable="false" @change="handleTabChange"></uv-tabs>
|
|
|
</view>
|
|
|
<view class="flex-1 min-h-1 relative">
|
|
|
<view class="absolute inset-0">
|
|
|
- <z-paging ref="paging" :fixed="false" v-model="dataList" :safe-area-inset-bottom="true"
|
|
|
+ <z-paging ref="pagingRef" :fixed="false" v-model="dataList" :safe-area-inset-bottom="true"
|
|
|
:use-safe-area-placeholder="true" :auto="false" bg-color="#F6F8FA" empty-view-text="暂无发布组卷作业~"
|
|
|
:empty-view-img="resolvePath('/pagesStudy/static/image/icon-empty.png')" :empty-view-style="emptyViewStyle"
|
|
|
:empty-view-img-style="emptyViewImgStyle" :empty-view-title-style="emptyViewTextStyle" @query="handleQuery">
|
|
|
@@ -66,23 +66,23 @@ const tabList = ref([
|
|
|
}
|
|
|
])
|
|
|
const dataList = ref<Study.PaperWork[]>([]);
|
|
|
-const paging = ref<any>(null);
|
|
|
+const pagingRef = ref();
|
|
|
const currentTab = ref(0);
|
|
|
const handleTabChange = (item: any) => {
|
|
|
currentTab.value = item.index;
|
|
|
- paging.value.reload();
|
|
|
+ pagingRef.value.reload();
|
|
|
}
|
|
|
const handleQuery = (page: number, pageSize: number) => {
|
|
|
uni.$ie.showLoading();
|
|
|
- const params = {} as {state?: EnumPaperWorkState};
|
|
|
+ const params = {} as { state?: EnumPaperWorkState };
|
|
|
const state = tabList.value[currentTab.value].state;
|
|
|
if (state) {
|
|
|
params.state = state;
|
|
|
}
|
|
|
getPaperWorkList(params).then(res => {
|
|
|
- paging.value.complete(res.rows);
|
|
|
+ pagingRef.value.complete(res.rows);
|
|
|
}).catch(err => {
|
|
|
- paging.value.complete(false);
|
|
|
+ pagingRef.value.complete(false);
|
|
|
}).finally(() => {
|
|
|
uni.$ie.hideLoading();
|
|
|
});
|
|
|
@@ -102,8 +102,9 @@ const loadStatistic = () => {
|
|
|
loadStatistic();
|
|
|
|
|
|
onMounted(() => {
|
|
|
- paging.value.reload();
|
|
|
-
|
|
|
+ nextTick(() => {
|
|
|
+ pagingRef.value.refresh();
|
|
|
+ });
|
|
|
});
|
|
|
</script>
|
|
|
|