|
@@ -52,7 +52,7 @@
|
|
<b-empty v-if="dataList.length<=0" :loading="loading"/>
|
|
<b-empty v-if="dataList.length<=0" :loading="loading"/>
|
|
<ion-infinite-scroll threshold="100px" @ionInfinite="onScroll($event)">
|
|
<ion-infinite-scroll threshold="100px" @ionInfinite="onScroll($event)">
|
|
<ion-infinite-scroll-content
|
|
<ion-infinite-scroll-content
|
|
- :loadingText="pagination.total>pagination.pageIndex*pagination.pageSize?'正在加载...':'暂无更多'"
|
|
|
|
|
|
+ :loadingText="pagination.total>pagination.current*pagination.pageSize?'正在加载...':'暂无更多'"
|
|
loadingSpinner="bubbles">
|
|
loadingSpinner="bubbles">
|
|
</ion-infinite-scroll-content>
|
|
</ion-infinite-scroll-content>
|
|
</ion-infinite-scroll>
|
|
</ion-infinite-scroll>
|
|
@@ -86,6 +86,7 @@ import {arrowBackOutline,addCircleOutline,chevronForwardOutline,buildOutline,tra
|
|
import {useRouter} from "vue-router";
|
|
import {useRouter} from "vue-router";
|
|
import {computed, defineComponent, reactive, ref} from 'vue';
|
|
import {computed, defineComponent, reactive, ref} from 'vue';
|
|
import {IonIcon, onIonViewDidEnter} from '@ionic/vue';
|
|
import {IonIcon, onIonViewDidEnter} from '@ionic/vue';
|
|
|
|
+import BEmpty from "@/components/empty.vue";
|
|
import {getJobUserList} from "@/api/jobUserInfo";
|
|
import {getJobUserList} from "@/api/jobUserInfo";
|
|
import {getJobHuntListByJobUserID} from "@/api/jobHuntInfo";
|
|
import {getJobHuntListByJobUserID} from "@/api/jobHuntInfo";
|
|
import {post} from "@/api/common";
|
|
import {post} from "@/api/common";
|
|
@@ -93,7 +94,7 @@ import {useUserStore} from "@/store/modules/user";
|
|
|
|
|
|
export default defineComponent({
|
|
export default defineComponent({
|
|
name: 'jobUserList',
|
|
name: 'jobUserList',
|
|
- components: {IonIcon},
|
|
|
|
|
|
+ components: {IonIcon,BEmpty},
|
|
setup() {
|
|
setup() {
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
const curUserID = ref("");
|
|
const curUserID = ref("");
|
|
@@ -101,7 +102,7 @@ export default defineComponent({
|
|
const loading = ref(true);
|
|
const loading = ref(true);
|
|
const pagination = computed(() => ({
|
|
const pagination = computed(() => ({
|
|
total: total,
|
|
total: total,
|
|
- pageIndex: searchParams.pageIndex,
|
|
|
|
|
|
+ current: searchParams.pageIndex,
|
|
pageSize: searchParams.pageSize
|
|
pageSize: searchParams.pageSize
|
|
}));
|
|
}));
|
|
const searchParams = reactive({
|
|
const searchParams = reactive({
|
|
@@ -110,7 +111,6 @@ export default defineComponent({
|
|
name:''
|
|
name:''
|
|
});
|
|
});
|
|
const dataList = ref<any>([]);
|
|
const dataList = ref<any>([]);
|
|
- const colors = ref(["secondary", "tertiary", "success", "warning"]);
|
|
|
|
const calculateAge = (idCardNumber:string) => {
|
|
const calculateAge = (idCardNumber:string) => {
|
|
// 假设身份证号中出生日期的格式为YYYYMMDD
|
|
// 假设身份证号中出生日期的格式为YYYYMMDD
|
|
const birthYear = parseInt(idCardNumber.substring(6, 10), 10);
|
|
const birthYear = parseInt(idCardNumber.substring(6, 10), 10);
|
|
@@ -130,10 +130,9 @@ export default defineComponent({
|
|
}
|
|
}
|
|
const loadData = async function () {
|
|
const loadData = async function () {
|
|
loading.value = true;
|
|
loading.value = true;
|
|
- const loginUserInfo = useUserStore().getUserInfo;
|
|
|
|
- curUserID.value = loginUserInfo.userID == undefined?"":loginUserInfo.userID;
|
|
|
|
getJobUserList(searchParams).then(data=>{
|
|
getJobUserList(searchParams).then(data=>{
|
|
dataList.value = dataList.value.concat(data.list);
|
|
dataList.value = dataList.value.concat(data.list);
|
|
|
|
+ total.value = data.total;
|
|
(dataList.value as any[]).map(item=>{
|
|
(dataList.value as any[]).map(item=>{
|
|
if(item.identityNumber){
|
|
if(item.identityNumber){
|
|
item.age = calculateAge(item.identityNumber)+"岁";
|
|
item.age = calculateAge(item.identityNumber)+"岁";
|
|
@@ -142,9 +141,10 @@ export default defineComponent({
|
|
item.jobHuntCount = data.total;
|
|
item.jobHuntCount = data.total;
|
|
});
|
|
});
|
|
});
|
|
});
|
|
- //console.log("dataList",dataList.value);
|
|
|
|
- total.value = data.total;
|
|
|
|
|
|
+ console.log("dataList",dataList.value);
|
|
});
|
|
});
|
|
|
|
+ const loginUserInfo = useUserStore().getUserInfo;
|
|
|
|
+ curUserID.value = loginUserInfo.userID == undefined?"":loginUserInfo.userID;
|
|
loading.value = false;
|
|
loading.value = false;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -157,7 +157,7 @@ export default defineComponent({
|
|
const onScroll = (e: any) => {
|
|
const onScroll = (e: any) => {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
e.target.complete();
|
|
e.target.complete();
|
|
- if (pagination.value.total.value > pagination.value.pageIndex * pagination.value.pageSize) {
|
|
|
|
|
|
+ if (pagination.value.total.value > pagination.value.current * pagination.value.pageSize) {
|
|
searchParams.pageIndex += 1;
|
|
searchParams.pageIndex += 1;
|
|
loadData();
|
|
loadData();
|
|
}
|
|
}
|
|
@@ -254,7 +254,6 @@ export default defineComponent({
|
|
buildOutline,
|
|
buildOutline,
|
|
trashOutline,
|
|
trashOutline,
|
|
router,
|
|
router,
|
|
- colors,
|
|
|
|
total,
|
|
total,
|
|
loading,
|
|
loading,
|
|
pagination,
|
|
pagination,
|