flat: 暂存
This commit is contained in:
@@ -1,125 +1,108 @@
|
||||
<template>
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
|
||||
<view class="two-head">
|
||||
<!-- <view class="head-item active">市北区</view> -->
|
||||
<view
|
||||
class="head-item"
|
||||
:class="{ active: state.comId === item.commercialAreaId }"
|
||||
v-for="(item, index) in state.comlist"
|
||||
:key="item.commercialAreaId"
|
||||
:key="item.commercialAreaName"
|
||||
@click="clickCommercialArea(item)"
|
||||
>
|
||||
{{ item.commercialAreaName }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="list-head" @touchmove.stop.prevent>
|
||||
<view class="tab-options">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll" @touchmove.stop>
|
||||
<view class="tab-op-left">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="tab-list"
|
||||
:class="{ tabchecked: state.tabIndex === 'all' }"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="tab-list"
|
||||
:class="{ tabchecked: state.tabIndex === index }"
|
||||
@click="choosePosition(index)"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="tab-op-right">
|
||||
<uni-icons type="plusempty" style="margin-right: 10rpx" size="20"></uni-icons>
|
||||
<view class="tab-recommend">
|
||||
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
|
||||
</view>
|
||||
<view class="tab-filter" @click="emit('onFilter', 3)">
|
||||
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
|
||||
<image class="image" src="/static/icon/filter.png"></image>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-left">{{ item.jobTitle }}</view>
|
||||
<view class="row-right">
|
||||
<Salary-Expectation
|
||||
:max-salary="item.maxSalary"
|
||||
:min-salary="item.minSalary"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left">
|
||||
<view class="row-tag" v-if="item.education">
|
||||
<dict-Label dictType="education" :value="item.education"></dict-Label>
|
||||
</view>
|
||||
<view class="row-tag" v-if="item.experience">
|
||||
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
|
||||
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
|
||||
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
|
||||
<view class="row-item">
|
||||
<uni-icons type="star" size="28"></uni-icons>
|
||||
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left mineText">{{ item.companyName }}</view>
|
||||
<view class="row-right mineText">
|
||||
青岛
|
||||
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
|
||||
<convert-distance
|
||||
:alat="item.latitude"
|
||||
:along="item.longitude"
|
||||
:blat="latitude()"
|
||||
:blong="longitude()"
|
||||
></convert-distance>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { getDictSelectOption, oneDictData } = useDictStore();
|
||||
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { getLocation, longitude, latitude } = useLocationStore();
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { oneDictData } = useDictStore();
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
import point2 from '@/static/icon/point2.png';
|
||||
import LocationPng from '@/static/icon/Location.png';
|
||||
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||
|
||||
const emit = defineEmits(['onFilter']);
|
||||
const state = reactive({
|
||||
tabIndex: 'all',
|
||||
tabBxText: 'buxianquyu',
|
||||
comlist: [],
|
||||
comId: 0,
|
||||
});
|
||||
const fromValue = reactive({
|
||||
area: 0,
|
||||
areaInfo: {},
|
||||
});
|
||||
const loadmoreRef = ref(null);
|
||||
const userInfo = ref({});
|
||||
const isLoaded = ref(false);
|
||||
const showFilter = ref(false);
|
||||
const selectFilterModel = ref();
|
||||
const fromValue = reactive({
|
||||
area: 0,
|
||||
});
|
||||
const loadmoreRef = ref(null);
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
total: 0,
|
||||
@@ -131,20 +114,59 @@ const pageState = reactive({
|
||||
});
|
||||
const list = ref([]);
|
||||
|
||||
onShow(() => {
|
||||
userInfo.value = useUserStore().userInfo;
|
||||
});
|
||||
const rangeOptions = ref([
|
||||
{ value: 0, text: '推荐' },
|
||||
{ value: 1, text: '最热' },
|
||||
{ value: 2, text: '最新发布' },
|
||||
]);
|
||||
|
||||
function choosePosition(index) {
|
||||
state.tabIndex = index;
|
||||
list.value = [];
|
||||
if (index === 'all') {
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
jobTitle: '',
|
||||
};
|
||||
getJobList('refresh');
|
||||
} else {
|
||||
// const id = useUserStore().userInfo.jobTitleId.split(',')[index];
|
||||
pageState.search.jobTitle = userInfo.value.jobTitle[index];
|
||||
getJobList('refresh');
|
||||
}
|
||||
}
|
||||
|
||||
function openFilter() {
|
||||
showFilter.value = true;
|
||||
selectFilterModel.value?.open({
|
||||
title: '筛选',
|
||||
maskClick: true,
|
||||
success: (values) => {
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
};
|
||||
for (const [key, value] of Object.entries(values)) {
|
||||
pageState.search[key] = value.join(',');
|
||||
}
|
||||
showFilter.value = false;
|
||||
console.log(pageState.search);
|
||||
getJobList('refresh');
|
||||
},
|
||||
cancel: () => {
|
||||
showFilter.value = false;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
onLoad(() => {
|
||||
getBusinessDistrict();
|
||||
});
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
try {
|
||||
if (isLoaded.value) return;
|
||||
const area = oneDictData('area')[0];
|
||||
fromValue.area = area.value;
|
||||
getJobList('refresh');
|
||||
isLoaded.value = true;
|
||||
} catch (err) {
|
||||
@@ -152,19 +174,6 @@ async function loadData() {
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
function scrollBottom() {
|
||||
getJobList();
|
||||
loadmoreRef.value.change('loading');
|
||||
}
|
||||
function choosePosition(index) {
|
||||
state.tabIndex = index;
|
||||
if (index === 'all') {
|
||||
pageState.search.jobTitle = '';
|
||||
} else {
|
||||
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
|
||||
}
|
||||
getJobList('refresh');
|
||||
}
|
||||
|
||||
function clickCommercialArea(area) {
|
||||
state.areaInfo = area;
|
||||
@@ -172,6 +181,25 @@ function clickCommercialArea(area) {
|
||||
getJobList('refresh');
|
||||
}
|
||||
|
||||
function scrollBottom() {
|
||||
getJobList();
|
||||
loadmoreRef.value.change('loading');
|
||||
}
|
||||
|
||||
// function choosePosition(index) {
|
||||
// state.tabIndex = index;
|
||||
// if (index === 'all') {
|
||||
// pageState.search.jobTitle = '';
|
||||
// } else {
|
||||
// pageState.search.jobTitle = userInfo.jobTitle[index];
|
||||
// }
|
||||
// getJobList('refresh');
|
||||
// }
|
||||
function changeArea(area, item) {
|
||||
fromValue.area = area;
|
||||
getJobList('refresh');
|
||||
}
|
||||
|
||||
function getBusinessDistrict() {
|
||||
$api.createRequest(`/app/common/commercialArea`).then((resData) => {
|
||||
if (resData.data.length) {
|
||||
@@ -181,6 +209,7 @@ function getBusinessDistrict() {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getJobList(type = 'add') {
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
@@ -197,7 +226,10 @@ function getJobList(type = 'add') {
|
||||
radius: 2,
|
||||
...pageState.search,
|
||||
};
|
||||
$api.createRequest('/app/job/commercialArea', params, 'POST').then((resData) => {
|
||||
if (fromValue.area === state.tabBxText) {
|
||||
params.countyIds = [];
|
||||
}
|
||||
$api.createRequest('/app/job/countyJob', params, 'POST').then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.page - 1);
|
||||
@@ -241,125 +273,96 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
.nearby-scroll
|
||||
overflow: hidden;
|
||||
.two-head
|
||||
margin: 24rpx;
|
||||
padding: 26rpx;
|
||||
background: #FFFFFF;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-column-gap: 40rpx;
|
||||
grid-row-gap: 30rpx;
|
||||
margin: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap
|
||||
// grid-template-columns: repeat(4, 1fr);
|
||||
// grid-column-gap: 10rpx;
|
||||
// grid-row-gap: 24rpx;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
.head-item
|
||||
min-width: 129rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
margin: 10rpx
|
||||
white-space: nowrap
|
||||
min-width: 156rpx
|
||||
line-height: 64rpx
|
||||
text-align: center;
|
||||
width: fit-content;
|
||||
background: #D9D9D9;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
background: #F6F6F6;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
.active
|
||||
background: #4778EC;
|
||||
color: #FFFFFF;
|
||||
.nearby-list
|
||||
margin-top: 40rpx;
|
||||
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
|
||||
.list-head
|
||||
height: 77rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
position: relative;
|
||||
top: -17rpx;
|
||||
z-index: 9999;
|
||||
.tab-options
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 77rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
padding: 0 24rpx;
|
||||
overflow: hidden;
|
||||
.tab-scroll
|
||||
height: 77rpx;
|
||||
line-height: 77rpx;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding-right: 10rpx;
|
||||
.tab-op-left
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
.tab-list
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
margin-right: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #606060;
|
||||
.tab-op-right
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.tab-recommend
|
||||
white-space: nowrap;
|
||||
width: fit-content;
|
||||
padding: 0 10rpx;
|
||||
height: 42rpx;
|
||||
background: #4778EC;
|
||||
border-radius: 17rpx 17rpx 0rpx 17rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-size: 21rpx;
|
||||
line-height: 42rpx;
|
||||
margin-right: 12rpx;
|
||||
.tab-number
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
.tab-filter
|
||||
display: flex;
|
||||
.image
|
||||
width: 28rpx;
|
||||
height: 27rpx;
|
||||
|
||||
.one-cards
|
||||
color: #256BFA;
|
||||
background: #E9F0FF;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
.nearby-list
|
||||
border-top: 2rpx solid #EBEBEB;
|
||||
height: 100%
|
||||
.one-cards{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
.card-box
|
||||
width: calc(100% - 36rpx - 36rpx);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx;
|
||||
padding: 15rpx 36rpx;
|
||||
margin-top: 24rpx;
|
||||
.box-row
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 8rpx;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
background: #f4f4f4
|
||||
}
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
display: flex
|
||||
align-items: center;
|
||||
.mineText
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
.textblue
|
||||
color: #4778EC;
|
||||
.row-right
|
||||
min-width: 120rpx
|
||||
text-align: right
|
||||
.row-left
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.row-tag
|
||||
background: #13C57C;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
font-size: 21rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
padding: 4rpx 8rpx;
|
||||
margin-right: 23rpx;
|
||||
.card-box:first-child
|
||||
margin-top: -14rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
</style>
|
||||
|
@@ -2,112 +2,111 @@
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
|
||||
<view class="nearby-map" @touchmove.stop.prevent>
|
||||
<map
|
||||
style="width: 100%; height: 300px"
|
||||
:latitude="latitude()"
|
||||
:longitude="longitude()"
|
||||
style="width: 100%; height: 400px"
|
||||
:latitude="latitudeVal"
|
||||
:longitude="longitudeVal"
|
||||
:markers="mapCovers"
|
||||
:circles="mapCircles"
|
||||
:controls="mapControls"
|
||||
@controltap="handleControl"
|
||||
></map>
|
||||
<view class="nearby-select">
|
||||
<view class="select-view" @click="changeRangeShow">
|
||||
<text>{{ pageState.search.radius }}km</text>
|
||||
<image class="view-sx" :class="{ active: rangeShow }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
<transition name="fade-slide">
|
||||
<view class="select-list" v-if="rangeShow">
|
||||
<view class="list-item button-click" v-for="(item, index) in range" @click="changeRadius(item)">
|
||||
{{ item }}km
|
||||
</view>
|
||||
</view>
|
||||
</transition>
|
||||
<!-- <view class="select-list" v-show="!rangeShow">
|
||||
<view class="list-item" v-for="(item, index) in range">{{ item }}km</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="list-head" @touchmove.stop.prevent>
|
||||
<view class="tab-options">
|
||||
<view class="tab-scroll" ref="progress">
|
||||
<view class="tab-scr-d" :style="`width: ${state.progressWidth}`">
|
||||
<view class="">1km</view>
|
||||
<view class="">5km</view>
|
||||
<view class="">10km</view>
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
<bingProgressComponent
|
||||
strokeWidth="7px"
|
||||
:max="10"
|
||||
activeColor="#13C57C"
|
||||
handleWidth="10px"
|
||||
handleHeight="10px"
|
||||
handleBorderRadius="5px"
|
||||
handleColor="#4778EC"
|
||||
@change="progressChange"
|
||||
:showInfo="false"
|
||||
:width="state.progressWidth"
|
||||
></bingProgressComponent>
|
||||
</scroll-view>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
<view class="tab-op-right">
|
||||
<view class="tab-recommend">
|
||||
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
|
||||
</view>
|
||||
<view class="tab-filter" @click="emit('onFilter', 0)">
|
||||
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
|
||||
<image class="image" src="/static/icon/filter.png"></image>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-left">{{ item.jobTitle }}</view>
|
||||
<view class="row-right">
|
||||
<Salary-Expectation
|
||||
:max-salary="item.maxSalary"
|
||||
:min-salary="item.minSalary"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left">
|
||||
<view class="row-tag" v-if="item.education">
|
||||
<dict-Label dictType="education" :value="item.education"></dict-Label>
|
||||
</view>
|
||||
<view class="row-tag" v-if="item.experience">
|
||||
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
|
||||
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
|
||||
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
|
||||
<view class="row-item">
|
||||
<uni-icons type="star" size="28"></uni-icons>
|
||||
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left mineText">{{ item.companyName }}</view>
|
||||
<view class="row-right mineText">
|
||||
青岛
|
||||
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
|
||||
<convert-distance
|
||||
:alat="item.latitude"
|
||||
:along="item.longitude"
|
||||
:blat="latitude()"
|
||||
:blong="longitude()"
|
||||
></convert-distance>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import point2 from '@/static/icon/point2.png';
|
||||
import LocationPng from '@/static/icon/Location.png';
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
import bingProgressComponent from '/components/bing-progress/bing-progress.vue';
|
||||
import screeningJobRequirementsVue from '@/components/screening-job-requirements/screening-job-requirements.vue';
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
const { getLocation, longitude, latitude } = useLocationStore();
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import { msg } from '../../../common/globalFunction';
|
||||
const { $api, navTo, debounce, vacanciesTo, customSystem, formatTotal } = inject('globalFunction');
|
||||
const emit = defineEmits(['onFilter']);
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
import point2 from '@/static/icon/Location1.png';
|
||||
import LocationPng from '@/static/icon/Location12.png';
|
||||
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||
|
||||
const emit = defineEmits(['onFilter']);
|
||||
const range = ref([1, 2, 4, 6, 8, 10]);
|
||||
const rangeShow = ref(false);
|
||||
|
||||
const selectFilterModel = ref(null);
|
||||
const tMap = ref();
|
||||
const progress = ref();
|
||||
const mapCovers = ref([]);
|
||||
@@ -117,10 +116,10 @@ const mapControls = ref([
|
||||
id: 1,
|
||||
position: {
|
||||
// 控件位置
|
||||
left: customSystem.systemInfo.screenWidth - 50,
|
||||
top: 180,
|
||||
width: 30,
|
||||
height: 30,
|
||||
left: customSystem.systemInfo.screenWidth - 48 - 14,
|
||||
top: 320,
|
||||
width: 48,
|
||||
height: 48,
|
||||
},
|
||||
iconPath: LocationPng, // 控件图标
|
||||
},
|
||||
@@ -137,17 +136,67 @@ const pageState = reactive({
|
||||
},
|
||||
});
|
||||
const isLoaded = ref(false);
|
||||
const showFilter = ref(false);
|
||||
const list = ref([]);
|
||||
const state = reactive({
|
||||
progressWidth: '200px',
|
||||
});
|
||||
const rangeOptions = ref([
|
||||
{ value: 0, text: '推荐' },
|
||||
{ value: 1, text: '最热' },
|
||||
{ value: 2, text: '最新发布' },
|
||||
]);
|
||||
|
||||
function changeRangeShow() {
|
||||
rangeShow.value = !rangeShow.value;
|
||||
}
|
||||
|
||||
function changeRadius(item) {
|
||||
pageState.search.radius = item;
|
||||
rangeShow.value = false;
|
||||
progressChange(item);
|
||||
}
|
||||
|
||||
function choosePosition(index) {
|
||||
state.tabIndex = index;
|
||||
list.value = [];
|
||||
if (index === 'all') {
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
jobTitle: '',
|
||||
};
|
||||
getJobList('refresh');
|
||||
} else {
|
||||
// const id = useUserStore().userInfo.jobTitleId.split(',')[index];
|
||||
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
|
||||
getJobList('refresh');
|
||||
}
|
||||
}
|
||||
|
||||
function openFilter() {
|
||||
showFilter.value = true;
|
||||
selectFilterModel.value?.open({
|
||||
title: '筛选',
|
||||
maskClick: true,
|
||||
success: (values) => {
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
};
|
||||
for (const [key, value] of Object.entries(values)) {
|
||||
pageState.search[key] = value.join(',');
|
||||
}
|
||||
showFilter.value = false;
|
||||
console.log(pageState.search);
|
||||
getJobList('refresh');
|
||||
},
|
||||
cancel: () => {
|
||||
showFilter.value = false;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
onLoad(() => {});
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
try {
|
||||
if (isLoaded.value) return;
|
||||
@@ -176,35 +225,39 @@ onMounted(() => {
|
||||
});
|
||||
|
||||
function getInit() {
|
||||
getLocation().then((res) => {
|
||||
mapCovers.value = [
|
||||
{
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude,
|
||||
iconPath: point2,
|
||||
},
|
||||
];
|
||||
mapCircles.value = [
|
||||
{
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude,
|
||||
radius: 1000,
|
||||
fillColor: '#00b8002e',
|
||||
},
|
||||
];
|
||||
getJobList('refresh');
|
||||
});
|
||||
useLocationStore()
|
||||
.getLocation()
|
||||
.then((res) => {
|
||||
mapCovers.value = [
|
||||
{
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude,
|
||||
iconPath: point2,
|
||||
},
|
||||
];
|
||||
mapCircles.value = [
|
||||
{
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude,
|
||||
radius: 1000,
|
||||
fillColor: '#1c52fa25',
|
||||
color: '#256BFA',
|
||||
},
|
||||
];
|
||||
getJobList('refresh');
|
||||
});
|
||||
}
|
||||
|
||||
function progressChange(e) {
|
||||
const range = 1 + e.value;
|
||||
function progressChange(value) {
|
||||
const range = 1 + value;
|
||||
pageState.search.radius = range;
|
||||
mapCircles.value = [
|
||||
{
|
||||
latitude: latitude(),
|
||||
longitude: longitude(),
|
||||
latitude: latitudeVal.value,
|
||||
longitude: longitudeVal.value,
|
||||
radius: range * 1000,
|
||||
fillColor: '#00b8002e',
|
||||
fillColor: '#1c52fa25',
|
||||
color: '#256BFA',
|
||||
},
|
||||
];
|
||||
debounceAjax('refresh');
|
||||
@@ -222,8 +275,8 @@ function getJobList(type = 'add') {
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
longitude: longitude(),
|
||||
latitude: latitude(),
|
||||
longitude: longitudeVal.value,
|
||||
latitude: latitudeVal.value,
|
||||
...pageState.search,
|
||||
};
|
||||
|
||||
@@ -267,118 +320,117 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.nearby-select{
|
||||
width: 184rpx;
|
||||
height: 64rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
position: absolute
|
||||
right: 28rpx;
|
||||
top: 28rpx
|
||||
.select-view{
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
height: 100%
|
||||
.view-sx{
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
}
|
||||
.active{
|
||||
transform: rotate(180deg)
|
||||
}
|
||||
}
|
||||
.select-list{
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
overflow: hidden
|
||||
position: absolute
|
||||
top: 76rpx
|
||||
left: 0
|
||||
display: flex
|
||||
flex-direction: column
|
||||
background: #FFFFFF;
|
||||
text-align: center
|
||||
|
||||
.list-item{
|
||||
width: 184rpx;
|
||||
line-height: 68rpx;
|
||||
height: 68rpx;
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.nearby-scroll
|
||||
overflow: hidden;
|
||||
.nearby-map
|
||||
height: 467rpx;
|
||||
height: 767rpx;
|
||||
background: #e8e8e8;
|
||||
overflow: hidden
|
||||
.nearby-list
|
||||
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
|
||||
.list-head
|
||||
height: 77rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
position: relative;
|
||||
top: -17rpx;
|
||||
z-index: 9999;
|
||||
.tab-options
|
||||
margin-top: -15rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 77rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
padding: 0 24rpx;
|
||||
overflow: hidden;
|
||||
.tab-scroll
|
||||
height: 77rpx;
|
||||
flex: 1;
|
||||
padding-right: 20rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
.tab-scr-d
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-weight: 400;
|
||||
font-size: 21rpx;
|
||||
color: #000000;
|
||||
.tab-op-left
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
.tab-list
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
margin-right: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #606060;
|
||||
.tab-op-right
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.tab-recommend
|
||||
white-space: nowrap;
|
||||
width: fit-content;
|
||||
padding: 0 10rpx;
|
||||
height: 42rpx;
|
||||
background: #4778EC;
|
||||
border-radius: 17rpx 17rpx 0rpx 17rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-size: 21rpx;
|
||||
line-height: 42rpx;
|
||||
margin-right: 12rpx;
|
||||
.tab-number
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
.tab-filter
|
||||
display: flex;
|
||||
.image
|
||||
width: 28rpx;
|
||||
height: 27rpx;
|
||||
|
||||
.one-cards
|
||||
.nearby-list
|
||||
.one-cards{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
.card-box
|
||||
width: calc(100% - 36rpx - 36rpx);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx;
|
||||
padding: 15rpx 36rpx;
|
||||
margin-top: 24rpx;
|
||||
.box-row
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 8rpx;
|
||||
background: #f4f4f4
|
||||
height: 100%
|
||||
}
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
display: flex
|
||||
align-items: center;
|
||||
.mineText
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
.textblue
|
||||
color: #4778EC;
|
||||
.row-right
|
||||
min-width: 120rpx
|
||||
text-align: right
|
||||
.row-left
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.row-tag
|
||||
background: #13C57C;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
font-size: 21rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
padding: 4rpx 8rpx;
|
||||
margin-right: 23rpx;
|
||||
.card-box:first-child
|
||||
margin-top: 6rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
</style>
|
||||
|
@@ -1,26 +1,21 @@
|
||||
<template>
|
||||
<scroll-view :scroll-y="true" class="nearby-scroll" @scrolltolower="scrollBottom">
|
||||
<view class="three-head" @touchmove.stop.prevent>
|
||||
<view class="one-picker">
|
||||
<view class="oneleft button-click" @click="openFilterSubway">
|
||||
<view class="uni-input">{{ inputText(state.subwayId) }}</view>
|
||||
<view class="btm-right">
|
||||
<image
|
||||
class="right-sx"
|
||||
:class="{ active: showFiltersubway }"
|
||||
src="@/static/icon/shaixun.png"
|
||||
></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="oneright">{{ state.subwayStart.stationName }}-{{ state.subwayEnd.stationName }}</view>
|
||||
</view>
|
||||
<scroll-view class="scroll-head" :scroll-x="true" :show-scrollbar="false">
|
||||
<view class="metro">
|
||||
<view class="metro-one">
|
||||
<picker
|
||||
class="one-picker"
|
||||
@change="bindPickerChange"
|
||||
@cancel="state.downup = true"
|
||||
@click="state.downup = false"
|
||||
:value="state.value"
|
||||
range-key="text"
|
||||
:range="range"
|
||||
>
|
||||
<view class="one-picker">
|
||||
<view class="uni-input">{{ inputText(state.subwayId) }}</view>
|
||||
<uni-icons v-if="state.downup" type="down" size="16"></uni-icons>
|
||||
<uni-icons v-else type="up" size="16"></uni-icons>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="metro-two">{{ state.subwayStart.stationName }}-{{ state.subwayEnd.stationName }}</view>
|
||||
<view class="metro-three">
|
||||
<view class="three-background">
|
||||
<view class="three-items">
|
||||
@@ -47,20 +42,20 @@
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="list-head" @touchmove.stop.prevent>
|
||||
<view class="tab-options">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll" @touchmove.stop>
|
||||
<view class="tab-op-left">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="tab-list"
|
||||
:class="{ tabchecked: state.tabIndex === 'all' }"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="tab-list"
|
||||
:class="{ tabchecked: state.tabIndex === index }"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
@@ -69,82 +64,68 @@
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="tab-op-right">
|
||||
<uni-icons type="plusempty" style="margin-right: 10rpx" size="20"></uni-icons>
|
||||
<view class="tab-recommend">
|
||||
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
|
||||
</view>
|
||||
<view class="tab-filter" @click="emit('onFilter', 2)">
|
||||
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
|
||||
<image class="image" src="/static/icon/filter.png"></image>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-left">{{ item.jobTitle }}</view>
|
||||
<view class="row-right">
|
||||
<Salary-Expectation
|
||||
:max-salary="item.maxSalary"
|
||||
:min-salary="item.minSalary"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left">
|
||||
<view class="row-tag" v-if="item.education">
|
||||
<dict-Label dictType="education" :value="item.education"></dict-Label>
|
||||
</view>
|
||||
<view class="row-tag" v-if="item.experience">
|
||||
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
|
||||
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
|
||||
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
|
||||
<view class="row-item">
|
||||
<uni-icons type="star" size="28"></uni-icons>
|
||||
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left mineText">{{ item.companyName }}</view>
|
||||
<view class="row-right mineText">
|
||||
青岛
|
||||
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
|
||||
<convert-distance
|
||||
:alat="item.latitude"
|
||||
:along="item.longitude"
|
||||
:blat="latitude()"
|
||||
:blong="longitude()"
|
||||
></convert-distance>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
const openSelectPopup = inject('openSelectPopup');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { getLocation, longitude, latitude } = useLocationStore();
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { oneDictData } = useDictStore();
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
import point2 from '@/static/icon/point2.png';
|
||||
import LocationPng from '@/static/icon/Location.png';
|
||||
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||
const emit = defineEmits(['onFilter']);
|
||||
// status
|
||||
const showFiltersubway = ref(false);
|
||||
const showFilter = ref(false);
|
||||
const selectFilterModel = ref();
|
||||
const subwayCurrent = ref([]);
|
||||
const isLoaded = ref(false);
|
||||
const range = ref([]);
|
||||
const userInfo = ref({});
|
||||
const state = reactive({
|
||||
subwayList: [],
|
||||
subwayStart: {},
|
||||
@@ -167,15 +148,15 @@ const pageState = reactive({
|
||||
});
|
||||
const list = ref([]);
|
||||
const loadmoreRef = ref(null);
|
||||
|
||||
const rangeOptions = ref([
|
||||
{ value: 0, text: '推荐' },
|
||||
{ value: 1, text: '最热' },
|
||||
{ value: 2, text: '最新发布' },
|
||||
]);
|
||||
onLoad(() => {
|
||||
getSubway();
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
userInfo.value = useUserStore().userInfo;
|
||||
});
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
}
|
||||
@@ -191,6 +172,51 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
function openFilter() {
|
||||
showFilter.value = true;
|
||||
selectFilterModel.value?.open({
|
||||
title: '筛选',
|
||||
maskClick: true,
|
||||
success: (values) => {
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
};
|
||||
for (const [key, value] of Object.entries(values)) {
|
||||
pageState.search[key] = value.join(',');
|
||||
}
|
||||
showFilter.value = false;
|
||||
console.log(pageState.search);
|
||||
getJobList('refresh');
|
||||
},
|
||||
cancel: () => {
|
||||
showFilter.value = false;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function openFilterSubway() {
|
||||
const diti = state.subwayList.map((item) => ({ ...item, label: item.lineName, value: item.lineId }));
|
||||
openSelectPopup({
|
||||
title: '地铁',
|
||||
maskClick: true,
|
||||
data: [diti],
|
||||
success: (_, [value]) => {
|
||||
subwayCurrent.value = value;
|
||||
state.subwayId = value.value;
|
||||
state.value = value.value;
|
||||
const points = value.subwayStationList;
|
||||
state.downup = true;
|
||||
if (points.length) {
|
||||
state.dont = 0;
|
||||
state.dontObj = points[0];
|
||||
state.subwayStart = points[0];
|
||||
state.subwayEnd = points[points.length - 1];
|
||||
getJobList('refresh');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function scrollBottom() {
|
||||
getJobList();
|
||||
loadmoreRef.value.change('loading');
|
||||
@@ -201,7 +227,7 @@ function choosePosition(index) {
|
||||
if (index === 'all') {
|
||||
pageState.search.jobTitle = '';
|
||||
} else {
|
||||
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
|
||||
pageState.search.jobTitle = userInfo.value.jobTitle[index];
|
||||
}
|
||||
getJobList('refresh');
|
||||
}
|
||||
@@ -312,15 +338,36 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
.tabchecked
|
||||
color: #4778EC !important;
|
||||
.nearby-scroll
|
||||
overflow: hidden;
|
||||
.three-head
|
||||
margin: 24rpx;
|
||||
padding: 26rpx;
|
||||
background: #FFFFFF;
|
||||
margin: 24rpx 0 0 0;
|
||||
padding: 26rpx 0 0 0;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
.one-picker
|
||||
height: 100%
|
||||
padding: 0 28rpx
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between
|
||||
.oneleft
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
.oneright
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
.scroll-head
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
@@ -330,14 +377,9 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
line-height: 33rpx;
|
||||
width: fit-content;
|
||||
width: 100%;
|
||||
min-width: 100rpx;
|
||||
.one-picker
|
||||
width: 100%
|
||||
height: 100%
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
align-items: center;
|
||||
|
||||
.metro-two
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
@@ -345,7 +387,8 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
margin-top: 6rpx;
|
||||
.metro-three
|
||||
width: fit-content;
|
||||
margin-top: 26rpx;
|
||||
margin-top: 100rpx;
|
||||
padding: 0 64rpx;
|
||||
.three-background
|
||||
position: relative;
|
||||
.three-items
|
||||
@@ -354,15 +397,17 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
z-index: 2;
|
||||
height: 90rpx
|
||||
.three-item
|
||||
margin-right: 70rpx;
|
||||
margin-right: 124rpx;
|
||||
position: relative
|
||||
.item-dont
|
||||
width: 17rpx;
|
||||
height: 17rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 50%;
|
||||
position: relative;
|
||||
margin-bottom: 10rpx;
|
||||
margin-bottom: 20rpx;
|
||||
.donted::after
|
||||
position: absolute;
|
||||
content: '';
|
||||
@@ -389,27 +434,33 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
line-height: 28rpx;
|
||||
background: #666666;
|
||||
border-radius: 50%;
|
||||
.dontend::after
|
||||
position: absolute;
|
||||
content: '终点';
|
||||
color: #FFFFFF;
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
left: 0;
|
||||
top: -5rpx;
|
||||
width: 27rpx;
|
||||
height: 27rpx;
|
||||
line-height: 28rpx;
|
||||
background: #666666;
|
||||
border-radius: 50%;
|
||||
// .dontend::after
|
||||
// position: absolute;
|
||||
// content: '终';
|
||||
// color: #FFFFFF;
|
||||
// font-size: 20rpx;
|
||||
// text-align: center;
|
||||
// left: 0;
|
||||
// top: -5rpx;
|
||||
// width: 27rpx;
|
||||
// height: 27rpx;
|
||||
// line-height: 28rpx;
|
||||
// background: #666666;
|
||||
// border-radius: 50%;
|
||||
.item-text
|
||||
width: 23rpx;
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
position: absolute
|
||||
left: 0
|
||||
width: fit-content;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
.three-item:last-child
|
||||
margin-right: 0;
|
||||
white-space: nowrap
|
||||
transform: translate(-50% + 8rpx, 0)
|
||||
.three-item:nth-child(2n)
|
||||
.item-text
|
||||
margin-top: -90rpx;
|
||||
.three-background::after
|
||||
position: absolute;
|
||||
content: '';
|
||||
@@ -420,104 +471,71 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
background: #FFCB47;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
z-index: 1;
|
||||
.nearby-list
|
||||
margin-top: 40rpx;
|
||||
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
|
||||
.list-head
|
||||
height: 77rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
position: relative;
|
||||
top: -17rpx;
|
||||
z-index: 2;
|
||||
.tab-options
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 77rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
padding: 0 24rpx;
|
||||
overflow: hidden;
|
||||
.tab-scroll
|
||||
height: 77rpx;
|
||||
line-height: 77rpx;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding-right: 10rpx;
|
||||
.tab-op-left
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
.tab-list
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
margin-right: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #606060;
|
||||
.tab-op-right
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.tab-recommend
|
||||
white-space: nowrap;
|
||||
width: fit-content;
|
||||
padding: 0 10rpx;
|
||||
height: 42rpx;
|
||||
background: #4778EC;
|
||||
border-radius: 17rpx 17rpx 0rpx 17rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-size: 21rpx;
|
||||
line-height: 42rpx;
|
||||
margin-right: 12rpx;
|
||||
.tab-number
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
.tab-filter
|
||||
display: flex;
|
||||
.image
|
||||
width: 28rpx;
|
||||
height: 27rpx;
|
||||
|
||||
.one-cards
|
||||
.nearby-list
|
||||
border-top: 2rpx solid #EBEBEB;
|
||||
.one-cards{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
.card-box
|
||||
width: calc(100% - 36rpx - 36rpx);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx;
|
||||
padding: 15rpx 36rpx;
|
||||
margin-top: 24rpx;
|
||||
.box-row
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 8rpx;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
background: #f4f4f4
|
||||
}
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
display: flex
|
||||
align-items: center;
|
||||
.mineText
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
.textblue
|
||||
color: #4778EC;
|
||||
.row-right
|
||||
min-width: 120rpx
|
||||
text-align: right
|
||||
.row-left
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.row-tag
|
||||
background: #13C57C;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
font-size: 21rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
padding: 4rpx 8rpx;
|
||||
margin-right: 23rpx;
|
||||
.card-box:first-child
|
||||
margin-top: -14rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
</style>
|
||||
|
@@ -19,111 +19,94 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="nearby-list">
|
||||
<view class="list-head" @touchmove.stop.prevent>
|
||||
<view class="tab-options">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll" @touchmove.stop>
|
||||
<view class="tab-op-left">
|
||||
<view class="nav-filter" @touchmove.stop.prevent>
|
||||
<view class="filter-top">
|
||||
<scroll-view :scroll-x="true" :show-scrollbar="false" class="tab-scroll">
|
||||
<view class="jobs-left">
|
||||
<view
|
||||
class="tab-list"
|
||||
:class="{ tabchecked: state.tabIndex === 'all' }"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === 'all' }"
|
||||
@click="choosePosition('all')"
|
||||
>
|
||||
全部
|
||||
</view>
|
||||
<view
|
||||
class="tab-list"
|
||||
:class="{ tabchecked: state.tabIndex === index }"
|
||||
@click="choosePosition(index)"
|
||||
class="job button-click"
|
||||
:class="{ active: state.tabIndex === index }"
|
||||
v-for="(item, index) in userInfo.jobTitle"
|
||||
:key="index"
|
||||
@click="choosePosition(index)"
|
||||
>
|
||||
{{ item }}
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="tab-op-right">
|
||||
<uni-icons type="plusempty" style="margin-right: 10rpx" size="20"></uni-icons>
|
||||
<view class="tab-recommend">
|
||||
<latestHotestStatus @confirm="handelHostestSearch"></latestHotestStatus>
|
||||
</view>
|
||||
<view class="tab-filter" @click="emit('onFilter', 1)">
|
||||
<view class="tab-number" v-show="pageState.total">{{ formatTotal(pageState.total) }}</view>
|
||||
<image class="image" src="/static/icon/filter.png"></image>
|
||||
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')">
|
||||
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
|
||||
<text>添加</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter-bottom">
|
||||
<view class="btm-left">
|
||||
<view
|
||||
class="button-click filterbtm"
|
||||
:class="{ active: pageState.search.order === item.value }"
|
||||
v-for="item in rangeOptions"
|
||||
@click="handelHostestSearch(item)"
|
||||
:key="item.value"
|
||||
>
|
||||
{{ item.text }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="btm-right button-click" @click="openFilter">
|
||||
筛选
|
||||
<image class="right-sx" :class="{ active: showFilter }" src="@/static/icon/shaixun.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="one-cards">
|
||||
<view class="card-box" v-for="(item, index) in list" :key="item.jobId" @click="navToPost(item.jobId)">
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-left">{{ item.jobTitle }}</view>
|
||||
<view class="row-right">
|
||||
<Salary-Expectation
|
||||
:max-salary="item.maxSalary"
|
||||
:min-salary="item.minSalary"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left">
|
||||
<view class="row-tag" v-if="item.education">
|
||||
<dict-Label dictType="education" :value="item.education"></dict-Label>
|
||||
</view>
|
||||
<view class="row-tag" v-if="item.experience">
|
||||
<dict-Label dictType="experience" :value="item.experience"></dict-Label>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row mar_top0">
|
||||
<view class="row-item mineText">{{ item.postingDate || '发布日期' }}</view>
|
||||
<view class="row-item mineText">{{ vacanciesTo(item.vacancies) }}</view>
|
||||
<view class="row-item mineText textblue"><matchingDegree :job="item"></matchingDegree></view>
|
||||
<view class="row-item">
|
||||
<uni-icons type="star" size="28"></uni-icons>
|
||||
<!-- <uni-icons type="star-filled" color="#FFCB47" size="30"></uni-icons> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="box-row">
|
||||
<view class="row-left mineText">{{ item.companyName }}</view>
|
||||
<view class="row-right mineText">
|
||||
青岛
|
||||
<dict-Label dictType="area" :value="item.jobLocationAreaCode"></dict-Label>
|
||||
<convert-distance
|
||||
:alat="item.latitude"
|
||||
:along="item.longitude"
|
||||
:blat="latitude()"
|
||||
:blong="longitude()"
|
||||
></convert-distance>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<renderJobs
|
||||
v-if="list.length"
|
||||
:list="list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
<empty v-else pdTop="60"></empty>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
<loadmore ref="loadmoreRef"></loadmore>
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { reactive, inject, watch, ref, onMounted, onBeforeUnmount } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
const { $api, navTo, debounce, customSystem } = inject('globalFunction');
|
||||
import { storeToRefs } from 'pinia';
|
||||
import useLocationStore from '@/stores/useLocationStore';
|
||||
const { getLocation, longitude, latitude } = useLocationStore();
|
||||
const { getDictSelectOption, oneDictData } = useDictStore();
|
||||
const { $api, navTo, vacanciesTo, formatTotal } = inject('globalFunction');
|
||||
import useUserStore from '@/stores/useUserStore';
|
||||
import useDictStore from '@/stores/useDictStore';
|
||||
const { oneDictData } = useDictStore();
|
||||
const { userInfo } = storeToRefs(useUserStore());
|
||||
const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
import point2 from '@/static/icon/point2.png';
|
||||
import LocationPng from '@/static/icon/Location.png';
|
||||
import selectFilter from '@/components/selectFilter/selectFilter.vue';
|
||||
|
||||
const emit = defineEmits(['onFilter']);
|
||||
const state = reactive({
|
||||
tabIndex: 'all',
|
||||
tabBxText: 'buxianquyu',
|
||||
});
|
||||
const isLoaded = ref(false);
|
||||
const showFilter = ref(false);
|
||||
const selectFilterModel = ref();
|
||||
const fromValue = reactive({
|
||||
area: 0,
|
||||
});
|
||||
const loadmoreRef = ref(null);
|
||||
const userInfo = ref({});
|
||||
const pageState = reactive({
|
||||
page: 0,
|
||||
total: 0,
|
||||
@@ -135,12 +118,48 @@ const pageState = reactive({
|
||||
});
|
||||
const list = ref([]);
|
||||
|
||||
onShow(() => {
|
||||
userInfo.value = useUserStore().userInfo;
|
||||
});
|
||||
const rangeOptions = ref([
|
||||
{ value: 0, text: '推荐' },
|
||||
{ value: 1, text: '最热' },
|
||||
{ value: 2, text: '最新发布' },
|
||||
]);
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
function choosePosition(index) {
|
||||
state.tabIndex = index;
|
||||
list.value = [];
|
||||
if (index === 'all') {
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
jobTitle: '',
|
||||
};
|
||||
getJobList('refresh');
|
||||
} else {
|
||||
// const id = useUserStore().userInfo.jobTitleId.split(',')[index];
|
||||
pageState.search.jobTitle = userInfo.value.jobTitle[index];
|
||||
getJobList('refresh');
|
||||
}
|
||||
}
|
||||
|
||||
function openFilter() {
|
||||
showFilter.value = true;
|
||||
selectFilterModel.value?.open({
|
||||
title: '筛选',
|
||||
maskClick: true,
|
||||
success: (values) => {
|
||||
pageState.search = {
|
||||
...pageState.search,
|
||||
};
|
||||
for (const [key, value] of Object.entries(values)) {
|
||||
pageState.search[key] = value.join(',');
|
||||
}
|
||||
showFilter.value = false;
|
||||
console.log(pageState.search);
|
||||
getJobList('refresh');
|
||||
},
|
||||
cancel: () => {
|
||||
showFilter.value = false;
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
@@ -161,15 +180,15 @@ function scrollBottom() {
|
||||
loadmoreRef.value.change('loading');
|
||||
}
|
||||
|
||||
function choosePosition(index) {
|
||||
state.tabIndex = index;
|
||||
if (index === 'all') {
|
||||
pageState.search.jobTitle = '';
|
||||
} else {
|
||||
pageState.search.jobTitle = useUserStore().userInfo.jobTitle[index];
|
||||
}
|
||||
getJobList('refresh');
|
||||
}
|
||||
// function choosePosition(index) {
|
||||
// state.tabIndex = index;
|
||||
// if (index === 'all') {
|
||||
// pageState.search.jobTitle = '';
|
||||
// } else {
|
||||
// pageState.search.jobTitle = userInfo.jobTitle[index];
|
||||
// }
|
||||
// getJobList('refresh');
|
||||
// }
|
||||
function changeArea(area, item) {
|
||||
fromValue.area = area;
|
||||
getJobList('refresh');
|
||||
@@ -235,125 +254,96 @@ defineExpose({ loadData, handleFilterConfirm });
|
||||
.nearby-scroll
|
||||
overflow: hidden;
|
||||
.two-head
|
||||
margin: 24rpx;
|
||||
padding: 26rpx;
|
||||
background: #FFFFFF;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
grid-column-gap: 40rpx;
|
||||
grid-row-gap: 30rpx;
|
||||
margin: 22rpx;
|
||||
display: flex;
|
||||
flex-wrap: wrap
|
||||
// grid-template-columns: repeat(4, 1fr);
|
||||
// grid-column-gap: 10rpx;
|
||||
// grid-row-gap: 24rpx;
|
||||
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
.head-item
|
||||
min-width: 129rpx;
|
||||
height: 44rpx;
|
||||
line-height: 44rpx;
|
||||
margin: 10rpx
|
||||
white-space: nowrap
|
||||
min-width: 156rpx
|
||||
line-height: 64rpx
|
||||
text-align: center;
|
||||
width: fit-content;
|
||||
background: #D9D9D9;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
background: #F6F6F6;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
.active
|
||||
background: #4778EC;
|
||||
color: #FFFFFF;
|
||||
.nearby-list
|
||||
margin-top: 40rpx;
|
||||
// background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
|
||||
.list-head
|
||||
height: 77rpx;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
position: relative;
|
||||
top: -17rpx;
|
||||
z-index: 9999;
|
||||
.tab-options
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 77rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx 17rpx 0rpx 0rpx;
|
||||
padding: 0 24rpx;
|
||||
overflow: hidden;
|
||||
.tab-scroll
|
||||
height: 77rpx;
|
||||
line-height: 77rpx;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
padding-right: 10rpx;
|
||||
.tab-op-left
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: nowrap;
|
||||
.tab-list
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
margin-right: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #606060;
|
||||
.tab-op-right
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.tab-recommend
|
||||
white-space: nowrap;
|
||||
width: fit-content;
|
||||
padding: 0 10rpx;
|
||||
height: 42rpx;
|
||||
background: #4778EC;
|
||||
border-radius: 17rpx 17rpx 0rpx 17rpx;
|
||||
text-align: center;
|
||||
color: #FFFFFF;
|
||||
font-size: 21rpx;
|
||||
line-height: 42rpx;
|
||||
margin-right: 12rpx;
|
||||
.tab-number
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
.tab-filter
|
||||
display: flex;
|
||||
.image
|
||||
width: 28rpx;
|
||||
height: 27rpx;
|
||||
|
||||
.one-cards
|
||||
color: #256BFA;
|
||||
background: #E9F0FF;
|
||||
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||
.nearby-list
|
||||
border-top: 2rpx solid #EBEBEB;
|
||||
.one-cards{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20rpx;
|
||||
.card-box
|
||||
width: calc(100% - 36rpx - 36rpx);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
background: #FFFFFF;
|
||||
border-radius: 17rpx;
|
||||
padding: 15rpx 36rpx;
|
||||
margin-top: 24rpx;
|
||||
.box-row
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-top: 8rpx;
|
||||
padding: 0 20rpx 20rpx 20rpx;
|
||||
background: #f4f4f4
|
||||
}
|
||||
.nav-filter
|
||||
padding: 16rpx 28rpx 0 28rpx
|
||||
.filter-top
|
||||
display: flex
|
||||
justify-content: space-between;
|
||||
.tab-scroll
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-right: 20rpx
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: clip;
|
||||
-webkit-mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
mask-image: linear-gradient(to right, black 60%, transparent);
|
||||
.jobs-left
|
||||
display: flex
|
||||
flex-wrap: nowrap
|
||||
.job
|
||||
font-weight: 400;
|
||||
font-size: 36rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 32rpx;
|
||||
white-space: nowrap
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
.jobs-add
|
||||
display: flex
|
||||
align-items: center;
|
||||
.mineText
|
||||
justify-content: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
line-height: 38rpx;
|
||||
.filter-bottom
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
padding: 24rpx 0
|
||||
.btm-left
|
||||
display: flex
|
||||
.filterbtm
|
||||
font-weight: 400;
|
||||
font-size: 21rpx;
|
||||
color: #606060;
|
||||
.textblue
|
||||
color: #4778EC;
|
||||
.row-right
|
||||
min-width: 120rpx
|
||||
text-align: right
|
||||
.row-left
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.row-tag
|
||||
background: #13C57C;
|
||||
border-radius: 17rpx 17rpx 17rpx 17rpx;
|
||||
font-size: 21rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 25rpx;
|
||||
text-align: center;
|
||||
padding: 4rpx 8rpx;
|
||||
margin-right: 23rpx;
|
||||
.card-box:first-child
|
||||
margin-top: -14rpx;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
margin-right: 40rpx
|
||||
.active
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #256BFA;
|
||||
.btm-right
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #6C7282;
|
||||
.right-sx
|
||||
width: 26rpx;
|
||||
height: 26rpx;
|
||||
.active
|
||||
transform: rotate(180deg)
|
||||
</style>
|
||||
|
@@ -1,56 +1,36 @@
|
||||
<template>
|
||||
<view class="app-container">
|
||||
<view class="nearby-head">
|
||||
<view class="head-item" :class="{ actived: state.current === 0 }" @click="changeType(0)">附近工作</view>
|
||||
<view class="head-item" :class="{ actived: state.current === 1 }" @click="changeType(1)">区县工作</view>
|
||||
<view class="head-item" :class="{ actived: state.current === 2 }" @click="changeType(2)">地铁周边</view>
|
||||
<view class="head-item" :class="{ actived: state.current === 3 }" @click="changeType(3)">商圈附近</view>
|
||||
<AppLayout title="附近" :use-scroll-view="false">
|
||||
<template #headerleft>
|
||||
<view class="btn">
|
||||
<image src="@/static/icon/back.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view class="app-container">
|
||||
<view class="nearby-head">
|
||||
<view class="head-item" :class="{ actived: state.current === 0 }" @click="changeType(0)">附近工作</view>
|
||||
<view class="head-item" :class="{ actived: state.current === 1 }" @click="changeType(1)">区县工作</view>
|
||||
<view class="head-item" :class="{ actived: state.current === 2 }" @click="changeType(2)">地铁周边</view>
|
||||
<view class="head-item" :class="{ actived: state.current === 3 }" @click="changeType(3)">商圈附近</view>
|
||||
</view>
|
||||
<view class="nearby-content">
|
||||
<swiper class="swiper" :current="state.current" @change="changeSwiperType">
|
||||
<swiper-item class="swiper-item" v-for="(_, index) in 4" :key="index">
|
||||
<component :is="components[index]" :ref="(el) => handelComponentsRef(el, index)" />
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class="nearby-content">
|
||||
<swiper class="swiper" :current="state.current" @change="changeSwiperType">
|
||||
<!-- 动态绑定ref -->
|
||||
<swiper-item class="swiper-item" v-for="(_, index) in 4" :key="index">
|
||||
<component
|
||||
:is="components[index]"
|
||||
@onFilter="addfileter"
|
||||
:ref="(el) => handelComponentsRef(el, index)"
|
||||
/>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- 弹窗 -->
|
||||
<screeningJobRequirementsVue
|
||||
:area="false"
|
||||
v-model:show="showFilter"
|
||||
@confirm="handleFilterConfirm"
|
||||
></screeningJobRequirementsVue>
|
||||
<screeningJobRequirementsVue
|
||||
:area="false"
|
||||
v-model:show="showFilter1"
|
||||
@confirm="handleFilterConfirm"
|
||||
></screeningJobRequirementsVue>
|
||||
<screeningJobRequirementsVue
|
||||
:area="false"
|
||||
v-model:show="showFilter2"
|
||||
@confirm="handleFilterConfirm"
|
||||
></screeningJobRequirementsVue>
|
||||
<screeningJobRequirementsVue
|
||||
:area="false"
|
||||
v-model:show="showFilter3"
|
||||
@confirm="handleFilterConfirm"
|
||||
></screeningJobRequirementsVue>
|
||||
</view>
|
||||
</AppLayout>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import screeningJobRequirementsVue from '@/components/screening-job-requirements/screening-job-requirements.vue';
|
||||
import oneComponent from './components/one.vue';
|
||||
import twoComponent from './components/two.vue';
|
||||
import threeComponent from './components/three.vue';
|
||||
import fourComponent from './components/four.vue';
|
||||
import { reactive, inject, watch, ref, onMounted } from 'vue';
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app';
|
||||
const { $api, debounce, throttle } = inject('globalFunction');
|
||||
const { $api, debounce, throttle, navBack } = inject('globalFunction');
|
||||
const loadedMap = reactive([false, false, false, false]);
|
||||
const swiperRefs = [ref(null), ref(null), ref(null), ref(null)];
|
||||
const components = [oneComponent, twoComponent, threeComponent, fourComponent];
|
||||
@@ -66,35 +46,13 @@ const state = reactive({
|
||||
all: [{}],
|
||||
});
|
||||
|
||||
// filter education aera scale 。。。。
|
||||
function handleFilterConfirm(e) {
|
||||
swiperRefs[filterId.value].value?.handleFilterConfirm(e);
|
||||
}
|
||||
|
||||
function addfileter(val) {
|
||||
filterId.value = val;
|
||||
switch (val) {
|
||||
case 0:
|
||||
showFilter.value = true;
|
||||
break;
|
||||
case 1:
|
||||
showFilter1.value = true;
|
||||
break;
|
||||
case 2:
|
||||
showFilter2.value = true;
|
||||
break;
|
||||
case 3:
|
||||
showFilter3.value = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
handleTabChange(state.current);
|
||||
});
|
||||
|
||||
const handelComponentsRef = (el, index) => {
|
||||
if (el) {
|
||||
console.log(el);
|
||||
swiperRefs[index].value = el;
|
||||
}
|
||||
};
|
||||
@@ -118,29 +76,43 @@ function handleTabChange(index) {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.btn {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
}
|
||||
image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.app-container
|
||||
width: 100%;
|
||||
height: calc(100vh - var(--window-top) - var(--status-bar-height) - var(--window-bottom));
|
||||
background: linear-gradient( 180deg, #4778EC 0%, #002979 100%);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.nearby-head
|
||||
height: 63rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
line-height: 63rpx;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 32rpx;
|
||||
color: #666D7F;
|
||||
.head-item
|
||||
width: calc(100% / 4);
|
||||
z-index: 9
|
||||
.actived
|
||||
// width: 169rpx;
|
||||
height: 63rpx;
|
||||
background: #13C57C;
|
||||
box-shadow: 0rpx 7rpx 7rpx 0rpx rgba(0,0,0,0.25);
|
||||
border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
// height: 63rpx;
|
||||
// background: #13C57C;
|
||||
// box-shadow: 0rpx 7rpx 7rpx 0rpx rgba(0,0,0,0.25);
|
||||
// border-radius: 0rpx 0rpx 0rpx 0rpx;
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
color: #000000;
|
||||
.nearby-content
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
Reference in New Issue
Block a user