|
@@ -26,12 +26,7 @@
|
|
|
</div>
|
|
|
</v-card>
|
|
|
</v-hover>
|
|
|
- <CtPagination
|
|
|
- :total="total"
|
|
|
- :page="query.pageNo"
|
|
|
- :limit="query.pageSize"
|
|
|
- @handleChange="handleChangePage"
|
|
|
- ></CtPagination>
|
|
|
+ <div :class="['loading', {'defaultLink-i': !loadingType}]" @click="handleChangePage">{{ loadingText[loadingType] }}</div>
|
|
|
</div>
|
|
|
<Empty v-else :elevation="false" message="该企业暂无在招职位,换个企业试试吧"></Empty>
|
|
|
</template>
|
|
@@ -58,7 +53,6 @@ const query = reactive({
|
|
|
keyword: '',
|
|
|
jobFairId: props.jobFairId
|
|
|
})
|
|
|
-const total = ref(0)
|
|
|
// 城市、学历、工作经验
|
|
|
const desc = [
|
|
|
{ mdi: 'mdi-map-marker-outline', value: 'areaName' },
|
|
@@ -75,19 +69,23 @@ const textItem = ref({
|
|
|
hideDetails: true,
|
|
|
appendInnerIcon: 'mdi-magnify'
|
|
|
})
|
|
|
+const loadingText = ['加载更多', '加载中...', '没有更多数据了']
|
|
|
+const loadingType = ref(0)
|
|
|
|
|
|
// 职位列表
|
|
|
const getPositionList = async () => {
|
|
|
loading.value = true
|
|
|
+ loadingType.value = 1
|
|
|
try {
|
|
|
- const { list, total: number } = await getJobFairEntJobPage(query)
|
|
|
+ const { list, total } = await getJobFairEntJobPage(query)
|
|
|
if (!list || !list.length) {
|
|
|
items.value = []
|
|
|
total.value = 0
|
|
|
+ loadingType.value = 2
|
|
|
return
|
|
|
}
|
|
|
- total.value = number
|
|
|
- items.value = dealDictArrayData([], list)
|
|
|
+ items.value = items.value.concat(dealDictArrayData([], list))
|
|
|
+ loadingType.value = items.value.length === total ? 2 : 0
|
|
|
loading.value = false
|
|
|
} catch {}
|
|
|
}
|
|
@@ -99,9 +97,10 @@ const handleSearch = (val) => {
|
|
|
getPositionList()
|
|
|
}
|
|
|
|
|
|
-// 分页
|
|
|
-const handleChangePage = (index) => {
|
|
|
- query.pageNo = index
|
|
|
+// 加载更多
|
|
|
+const handleChangePage = () => {
|
|
|
+ if (loadingType.value) return // 没有更多数据了
|
|
|
+ query.pageNo++
|
|
|
getPositionList()
|
|
|
}
|
|
|
|
|
@@ -110,6 +109,8 @@ watch(
|
|
|
(val) => {
|
|
|
query.enterpriseId = val
|
|
|
query.keyword = ''
|
|
|
+ query.pageNo = 1
|
|
|
+ items.value = []
|
|
|
getPositionList()
|
|
|
},
|
|
|
{ immediate: true }
|
|
@@ -136,4 +137,10 @@ const handleClick = (id) => {
|
|
|
color: var(--v-primary-base)
|
|
|
}
|
|
|
}
|
|
|
+.loading {
|
|
|
+ margin-top: 8px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 13px;
|
|
|
+ color: gray;
|
|
|
+}
|
|
|
</style>
|