分类渲染数据类型 : 岗位详情 公司详情 岗位收藏 公司收藏 浏览记录 预约列表
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<view class="collection-content">
|
||||
<renderJobs
|
||||
seeDate="applyTime"
|
||||
<renderDeliveryRecord
|
||||
v-if="pageState.list.length"
|
||||
seeDate="applyTime"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
:latitude="latitudeVal">
|
||||
</renderDeliveryRecord>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</template>
|
||||
@@ -41,9 +41,7 @@ onReachBottom(() => {
|
||||
getJobList();
|
||||
});
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
}
|
||||
|
||||
|
||||
function getJobList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
||||
</view>
|
||||
<view class="companyinfo-right">
|
||||
<view class="row1">{{ companyInfo?.gsmc }}</view>
|
||||
<view class="row1">{{ dataType === 2 ? companyInfo?.gsmc : companyInfo?.name }}</view>
|
||||
<view class="row2">
|
||||
<dict-tree-Label
|
||||
v-if="companyInfo?.industry"
|
||||
@@ -30,15 +30,13 @@
|
||||
></dict-tree-Label>
|
||||
<span v-if="companyInfo?.industry"> </span>
|
||||
<dict-Label dictType="scale" :value="companyInfo?.scale"></dict-Label>
|
||||
<span>{{companyInfo.gsxy}}</span>
|
||||
<span v-if="dataType === 2">{{ companyInfo.gsxy }}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="conetent-info" :class="{ expanded: isExpanded }">
|
||||
<view class="info-title">公司介绍</view>
|
||||
<view class="info-desirption">{{ companyInfo.qyxz }}</view>
|
||||
<!-- <view class="info-title title2">公司地址</view>
|
||||
<view class="locationCompany"></view> -->
|
||||
<view class="info-desirption">{{ dataType === 2 ? companyInfo.qyxz : companyInfo.description }}</view>
|
||||
</view>
|
||||
<view class="expand" @click="expand">
|
||||
<text>{{ isExpanded ? '收起' : '展开' }}</text>
|
||||
@@ -48,12 +46,18 @@
|
||||
src="@/static/icon/downs.png"
|
||||
></image>
|
||||
</view>
|
||||
<!-- <scroll-view scroll-y class="Detailscroll-view" @scrolltolower="getJobsList('add')"> -->
|
||||
<scroll-view scroll-y class="Detailscroll-view">
|
||||
<scroll-view scroll-y class="Detailscroll-view" @scrolltolower="getJobsList('add')">
|
||||
<view class="views">
|
||||
<view class="Detail-title"><text class="title">在招职位</text></view>
|
||||
<!-- 根据 dataType 使用不同的职位列表组件 -->
|
||||
<renderJobsOutData
|
||||
v-if="dataType === 2 && pageState.list.length"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobsOutData>
|
||||
<renderJobs
|
||||
v-if="pageState.list.length"
|
||||
v-else-if="dataType !== 2 && pageState.list.length"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
@@ -77,6 +81,7 @@ const { $api, navTo, vacanciesTo, navBack } = inject('globalFunction');
|
||||
|
||||
const isExpanded = ref(false);
|
||||
const pageState = reactive({
|
||||
current: 0,
|
||||
page: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
@@ -84,35 +89,108 @@ const pageState = reactive({
|
||||
pageSize: 10,
|
||||
});
|
||||
const companyInfo = ref({});
|
||||
const pageOptions = ref({});
|
||||
const dataType = ref(1); // 1: 原数据, 2: 第三方数据
|
||||
|
||||
onLoad((options) => {
|
||||
console.log(options);
|
||||
getCompanyInfo(options.companyId,options.companyName,options.zphId);
|
||||
dataType.value = options.dataType ? parseInt(options.dataType) : 1;
|
||||
pageOptions.value = options;
|
||||
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据
|
||||
getCompanyInfo(options.companyId, options.zphId);
|
||||
getJobsList('refresh');
|
||||
} else {
|
||||
// 原数据
|
||||
getCompanyInfo(options.companyId || options.bussinessId);
|
||||
}
|
||||
});
|
||||
|
||||
function companyCollection() {
|
||||
const companyId = companyInfo.value.gsID;
|
||||
if (companyInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'DELETE').then((resData) => {
|
||||
// getCompanyInfo(companyId);
|
||||
$api.msg('取消收藏成功');
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据收藏逻辑
|
||||
const id = companyInfo.value.id;
|
||||
const companyId = companyInfo.value.gsID;
|
||||
const zphId = companyInfo.value.zphID;
|
||||
if (companyInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/company/collection/${id}/2`, {}, 'DELETE').then((resData) => {
|
||||
getCompanyInfo(companyId, zphId);
|
||||
$api.msg('取消收藏成功');
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/company/collection/${id}/2`, {}, 'POST').then((resData) => {
|
||||
getCompanyInfo(companyId, zphId);
|
||||
$api.msg('收藏成功');
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 原数据收藏逻辑
|
||||
const companyId = companyInfo.value.companyId;
|
||||
if (companyInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'DELETE').then((resData) => {
|
||||
getCompanyInfo(companyId);
|
||||
$api.msg('取消收藏成功');
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'POST').then((resData) => {
|
||||
getCompanyInfo(companyId);
|
||||
$api.msg('收藏成功');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getCompanyInfo(...args) {
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据接口
|
||||
const [companyId, zphId] = args;
|
||||
$api.createRequest(`/app/internal/companyThirdPart/${companyId}/${zphId}`).then((resData) => {
|
||||
companyInfo.value = resData.data;
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/company/collection/${companyId}`, {}, 'POST').then((resData) => {
|
||||
// getCompanyInfo(companyId);
|
||||
$api.msg('收藏成功');
|
||||
// 原数据接口
|
||||
const [companyId] = args;
|
||||
$api.createRequest(`/app/company/${companyId}`).then((resData) => {
|
||||
companyInfo.value = resData.data;
|
||||
getJobsList();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getCompanyInfo(companyId,companyName,zphId) {
|
||||
$api.createRequest(`/app/internal/companyThirdPart/${companyId}/${zphId}`).then((resData) => {
|
||||
companyInfo.value = resData.data;
|
||||
getJobsList(companyId,companyName,zphId);
|
||||
function getJobsList(type = 'add') {
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据职位列表
|
||||
getThirdPartyJobsList(type);
|
||||
} else {
|
||||
// 原数据职位列表
|
||||
getOriginalJobsList(type);
|
||||
}
|
||||
}
|
||||
|
||||
function getThirdPartyJobsList(type = 'add') {
|
||||
const { companyId, companyName, zphId } = pageOptions.value;
|
||||
|
||||
if (type === 'refresh') {
|
||||
pageState.current = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.current < pageState.maxPage) {
|
||||
pageState.current += 1;
|
||||
}
|
||||
|
||||
let params = {
|
||||
current: pageState.current,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
|
||||
$api.createRequest(`/app/internal/jobThirdPart?gsID=${companyId}&gsmc=${companyName}&zphID=${zphId}`, params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
handleJobsListResponse(type, rows, total, 'current');
|
||||
});
|
||||
}
|
||||
|
||||
function getJobsList(companyId,companyName,zphId,type='add') {
|
||||
function getOriginalJobsList(type = 'add') {
|
||||
if (type === 'refresh') {
|
||||
pageState.page = 1;
|
||||
pageState.maxPage = 1;
|
||||
@@ -120,26 +198,31 @@ function getJobsList(companyId,companyName,zphId,type='add') {
|
||||
if (type === 'add' && pageState.page < pageState.maxPage) {
|
||||
pageState.page += 1;
|
||||
}
|
||||
|
||||
let params = {
|
||||
current: pageState.page,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
$api.createRequest(`/app/internal/jobThirdPart?gsID=${companyId}&gsmc=${companyName}&zphID=${zphId}`, ).then((resData) => {
|
||||
|
||||
$api.createRequest(`/app/company/job/${companyInfo.value.companyId}`, params).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
// const str = pageState.pageSize * (pageState.page - 1);
|
||||
// const end = pageState.list.length;
|
||||
// const reslist = rows;
|
||||
// pageState.list.splice(str, end, ...reslist);
|
||||
pageState.list = rows
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
handleJobsListResponse(type, rows, total, 'page');
|
||||
});
|
||||
}
|
||||
|
||||
function handleJobsListResponse(type, rows, total, pageKey) {
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState[pageKey] - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
}
|
||||
|
||||
function expand() {
|
||||
isExpanded.value = !isExpanded.value;
|
||||
}
|
||||
@@ -177,7 +260,6 @@ image {
|
||||
margin-right: 24rpx
|
||||
}
|
||||
.companyinfo-right{
|
||||
|
||||
.row1{
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
@@ -213,7 +295,7 @@ image {
|
||||
}
|
||||
}
|
||||
.expanded {
|
||||
max-height: 1000rpx; // 足够显示完整内容
|
||||
max-height: 1000rpx;
|
||||
}
|
||||
.expand{
|
||||
display: flex
|
||||
@@ -288,7 +370,7 @@ image {
|
||||
}
|
||||
.card-companyName{
|
||||
font-weight: 400;
|
||||
font-size: 28rpx;
|
||||
font-size: 28rpx;
|
||||
color: #6C7282;
|
||||
}
|
||||
.card-tags{
|
||||
@@ -320,4 +402,4 @@ image {
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -25,12 +25,12 @@
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="getJobList('add')">
|
||||
<view class="one-cards">
|
||||
<view class="mian">
|
||||
<renderJobs
|
||||
<renderJobViewRecord
|
||||
:list="pageState.list"
|
||||
v-if="pageState.list.length"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
></renderJobViewRecord>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
<!-- <loadmore ref="loadmoreRef"></loadmore> -->
|
||||
</view>
|
||||
@@ -88,9 +88,7 @@ function toSelectDate() {
|
||||
});
|
||||
}
|
||||
|
||||
function navToPost(jobId) {
|
||||
navTo(`/packageA/pages/post/post?jobId=${btoa(jobId)}`);
|
||||
}
|
||||
|
||||
|
||||
function searchCollection(e) {
|
||||
const value = e.detail.value;
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<swiper-item class="list">
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLower">
|
||||
<view class="mian">
|
||||
<renderJobs
|
||||
:list="pageState.list"
|
||||
<renderJobCollectionRecord
|
||||
v-if="pageState.list.length"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderJobs>
|
||||
:latitude="latitudeVal">
|
||||
</renderJobCollectionRecord>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -28,12 +28,12 @@
|
||||
<swiper-item class="list">
|
||||
<scroll-view scroll-y class="main-scroll" @scrolltolower="handleScrollToLowerCompany">
|
||||
<view class="mian">
|
||||
<renderCompanys
|
||||
<renderCompanyCollectionRecord
|
||||
:list="pageCompanyState.list"
|
||||
v-if="pageCompanyState.list.length"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderCompanys>
|
||||
></renderCompanyCollectionRecord>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
@@ -69,18 +69,18 @@
|
||||
src="@/static/icon/downs.png"
|
||||
></image>
|
||||
</view>
|
||||
<scroll-view scroll-y class="Detailscroll-view">
|
||||
<scroll-view scroll-y class="Detailscroll-view" @scrolltolower="getCompanyList('add')">
|
||||
<view class="views">
|
||||
<view class="Detail-title">
|
||||
<text class="title">参会单位({{ companyList.length }})</text>
|
||||
<text class="title">参会单位({{ pageState.total }})</text>
|
||||
</view>
|
||||
<renderCompanys
|
||||
v-if="companyList.length"
|
||||
<renderCompanysOutData
|
||||
v-if="pageState.list.length"
|
||||
:zphId="zphId"
|
||||
:list="companyList"
|
||||
:list="pageState.list"
|
||||
:longitude="longitudeVal"
|
||||
:latitude="latitudeVal"
|
||||
></renderCompanys>
|
||||
></renderCompanysOutData>
|
||||
<empty v-else pdTop="200"></empty>
|
||||
</view>
|
||||
</scroll-view>
|
||||
@@ -111,13 +111,24 @@ const { longitudeVal, latitudeVal } = storeToRefs(useLocationStore());
|
||||
|
||||
const isExpanded = ref(false);
|
||||
const fairInfo = ref({});
|
||||
const companyList = ref([]);
|
||||
|
||||
const pageState = reactive({
|
||||
current: 0,
|
||||
list: [],
|
||||
total: 0,
|
||||
maxPage: 1,
|
||||
pageSize: 10,
|
||||
});
|
||||
const hasnext = ref(true);
|
||||
|
||||
const zphId = ref('');
|
||||
const pageOptions = ref({})
|
||||
|
||||
onLoad((options) => {
|
||||
zphId.value = options.jobFairId
|
||||
pageOptions.value = options
|
||||
getJobFairInfo(options.jobFairId, options.jobFairName);
|
||||
getCompanyInfo(options.jobFairId, options.jobFairName);
|
||||
getCompanyList('refresh');
|
||||
});
|
||||
|
||||
function getJobFairInfo(id,name) {
|
||||
@@ -126,20 +137,43 @@ function getJobFairInfo(id,name) {
|
||||
hasAppointment();
|
||||
});
|
||||
}
|
||||
function getCompanyInfo(id,name) {
|
||||
$api.createRequest(`/app/internal/companyThirdPart/?zphID=${id}&zphmc=${name}`).then((resData) => {
|
||||
companyList.value = resData.rows;
|
||||
function getCompanyList(type='add') {
|
||||
const { jobFairId,jobFairName} = pageOptions.value
|
||||
if (type === 'refresh') {
|
||||
pageState.current = 1;
|
||||
pageState.maxPage = 1;
|
||||
}
|
||||
if (type === 'add' && pageState.current < pageState.maxPage) {
|
||||
pageState.current += 1;
|
||||
}
|
||||
let params = {
|
||||
current: pageState.current,
|
||||
pageSize: pageState.pageSize,
|
||||
};
|
||||
$api.createRequest(`/app/internal/companyThirdPart/?zphID=${jobFairId}&zphmc=${jobFairName}`,params ).then((resData) => {
|
||||
const { rows, total } = resData;
|
||||
if (type === 'add') {
|
||||
const str = pageState.pageSize * (pageState.current - 1);
|
||||
const end = pageState.list.length;
|
||||
const reslist = rows;
|
||||
pageState.list.splice(str, end, ...reslist);
|
||||
} else {
|
||||
pageState.list = rows;
|
||||
}
|
||||
pageState.total = resData.total;
|
||||
pageState.maxPage = Math.ceil(pageState.total / pageState.pageSize);
|
||||
});
|
||||
}
|
||||
|
||||
const hasAppointment = () => {
|
||||
const isTimePassed = (timeStr) => {
|
||||
if(!timeStr) return false
|
||||
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
|
||||
const now = Date.now();
|
||||
return now < targetTime;
|
||||
};
|
||||
|
||||
hasnext.value = isTimePassed(fairInfo.value.startTime);
|
||||
hasnext.value = isTimePassed(fairInfo.value.zphjbsj);
|
||||
};
|
||||
|
||||
function openMap(lat, lng, name = '位置') {
|
||||
@@ -157,16 +191,16 @@ function expand() {
|
||||
|
||||
// 取消/收藏岗位
|
||||
function applyExhibitors() {
|
||||
const fairId = fairInfo.value.jobFairId;
|
||||
const fairId = fairInfo.value.zphID;
|
||||
if (fairInfo.value.isCollection) {
|
||||
// $api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
||||
// getCompanyInfo(fairId);
|
||||
// $api.msg('取消预约成功');
|
||||
// });
|
||||
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
||||
getJobFairInfo(fairId);
|
||||
$api.msg('取消预约成功');
|
||||
});
|
||||
$api.msg('已预约成功');
|
||||
} else {
|
||||
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'POST').then((resData) => {
|
||||
getCompanyInfo(fairId);
|
||||
getJobFairInfo(fairId);
|
||||
$api.msg('预约成功');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -5,6 +5,13 @@
|
||||
<image src="@/static/icon/back-white.png" @click="navBack"></image>
|
||||
</view>
|
||||
</template>
|
||||
<view v-if="userInfo.resumeOcrStatus && showNotice" class="notice-line" :class="userInfo.resumeOcrStatus?.includes('成功')?'green':'blue'">
|
||||
<image v-if="userInfo.resumeOcrStatus?.includes('成功')" class="icon" src="@/static/icon/notice-green.png" />
|
||||
<image v-else class="icon" src="@/static/icon/notice-blue.png" />
|
||||
<view class="text">{{userInfo.resumeOcrStatus}}</view>
|
||||
<image @click="closeNotice" v-if="userInfo.resumeOcrStatus?.includes('成功')" class="close" src="@/static/icon/close-green.png" />
|
||||
<image @click="closeNotice" v-else class="close" src="@/static/icon/close-blue.png" />
|
||||
</view>
|
||||
<view class="mys-container">
|
||||
<!-- 个人信息 -->
|
||||
<view
|
||||
@@ -164,10 +171,15 @@ const { getUserResume } = useUserStore();
|
||||
const { getDictData, oneDictData } = useDictStore();
|
||||
import config from "@/config.js";
|
||||
|
||||
const showNotice = ref(true)
|
||||
onLoad(() => {
|
||||
getUserResume();
|
||||
});
|
||||
|
||||
function closeNotice() {
|
||||
showNotice.value=false
|
||||
}
|
||||
|
||||
function chooseResume() {
|
||||
uni.chooseImage({
|
||||
sizeType: ["original", "compressed"],
|
||||
@@ -254,6 +266,36 @@ function uploadResume(tempFilePath, loading) {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
.notice-line
|
||||
width 100%;
|
||||
height:60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
padding:0 30rpx
|
||||
margin-bottom: 20rpx
|
||||
.icon
|
||||
width:35rpx;
|
||||
height:35rpx;
|
||||
.text
|
||||
flex: 1;
|
||||
overflow hidden
|
||||
padding:0 25rpx
|
||||
.close
|
||||
width:25rpx;
|
||||
height:25rpx;
|
||||
|
||||
.notice-line.blue{
|
||||
background: #E8F1FF
|
||||
color: #1677ff
|
||||
}
|
||||
.notice-line.green{
|
||||
background: #D4FFF1
|
||||
color: #38bb8f
|
||||
}
|
||||
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%
|
||||
|
||||
@@ -6,45 +6,59 @@
|
||||
</view>
|
||||
</template>
|
||||
<template #headerright>
|
||||
<!-- <view class="btnshare">
|
||||
<image src="@/static/icon/share.png" @click="shareJob"></image>
|
||||
</view> -->
|
||||
<view class="btn mar_ri10">
|
||||
<image src="@/static/icon/collect3.png" v-if="!jobInfo.isCollection" @click="jobCollection"></image>
|
||||
<image src="@/static/icon/collect2.png" v-else @click="jobCollection"></image>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<!-- 根据 dataType 显示不同内容 -->
|
||||
<view class="content" v-show="!isEmptyObject(jobInfo)">
|
||||
<!-- 顶部信息区域 -->
|
||||
<view class="content-top btn-feel">
|
||||
<view class="top-salary">
|
||||
<view class="top-salary" v-if="jobInfo.maxSalary">
|
||||
<Salary-Expectation
|
||||
:max-salary="jobInfo.maxSalary"
|
||||
:min-salary="jobInfo.minSalary"
|
||||
:is-month="true"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
<view class="top-name">{{ jobInfo.gwmc }}</view>
|
||||
<view class="top-salary" v-else>
|
||||
<Salary-Expectation
|
||||
:max-salary="jobInfo.maxSalary"
|
||||
:min-salary="jobInfo.minSalary"
|
||||
:is-month="true"
|
||||
></Salary-Expectation>
|
||||
</view>
|
||||
<view class="top-name">{{ dataType === 2 ? jobInfo.gwmc : jobInfo.jobTitle }}</view>
|
||||
<view class="top-info">
|
||||
<view class="info-img"><image src="/static/icon/post12.png"></image></view>
|
||||
<!-- <view class="info-text">
|
||||
<dict-Label dictType="experience" :value="jobInfo.experience"></dict-Label>
|
||||
</view> -->
|
||||
<view class="info-text">
|
||||
<!-- 第三方数据展示 -->
|
||||
<view class="info-text" v-if="dataType === 2">
|
||||
{{jobInfo.xlyq == '不限' ? '学历不限' : jobInfo.xlyq}}
|
||||
</view>
|
||||
<!-- 原数据展示 -->
|
||||
<view class="info-text" v-else>
|
||||
<dict-Label dictType="experience" :value="jobInfo.experience"></dict-Label>
|
||||
</view>
|
||||
|
||||
<view class="info-img mar_le20"><image src="/static/icon/post13.png"></image></view>
|
||||
<!-- <view class="info-text">
|
||||
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
|
||||
</view> -->
|
||||
<view class="info-text">
|
||||
<!-- 第三方数据展示 -->
|
||||
<view class="info-text" v-if="dataType === 2">
|
||||
{{jobInfo.gwgzjy == '不限' ? '经验不限' : jobInfo.gwgzjy}}
|
||||
</view>
|
||||
<!-- 原数据展示 -->
|
||||
<view class="info-text" v-else>
|
||||
<dict-Label dictType="education" :value="jobInfo.education"></dict-Label>
|
||||
</view>
|
||||
</view>
|
||||
<view class="position-source">
|
||||
<text>来源 </text>
|
||||
青岛人才网
|
||||
{{ dataType === 2 ? '青岛人才网' : jobInfo.dataSource }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- AI讲解区域 -->
|
||||
<view class="ai-explain" v-if="jobInfo.isExplain">
|
||||
<view class="exbg">
|
||||
<view class="explain-left btn-shaky">
|
||||
@@ -54,20 +68,24 @@
|
||||
<view class="explain-right button-click" @click="seeExplain">点击查看</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 职位描述区域 -->
|
||||
<view class="content-card">
|
||||
<view class="card-title">
|
||||
<text class="title">职位描述</text>
|
||||
</view>
|
||||
<view class="description" :style="{ whiteSpace: 'pre-wrap' }">
|
||||
{{ jobInfo.gwms }}
|
||||
{{ dataType === 2 ? jobInfo.gwms : jobInfo.description }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 公司信息区域 -->
|
||||
<view class="content-card">
|
||||
<view class="card-title">
|
||||
<text class="title">公司信息</text>
|
||||
<text
|
||||
class="btntext button-click"
|
||||
@click=" navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.gsID}&companyName=${jobInfo.gsmc}&zphId=${jobInfo.zphID}`);"
|
||||
@click="handleCompanyDetail"
|
||||
>
|
||||
单位详情
|
||||
</text>
|
||||
@@ -77,16 +95,20 @@
|
||||
<image src="@/static/icon/companyIcon.png" mode=""></image>
|
||||
</view>
|
||||
<view class="companyinfo-right">
|
||||
<view class="row1">{{ jobInfo.gsmc }}</view>
|
||||
<view class="row1">{{ dataType === 2 ? jobInfo.gsmc : jobInfo.company?.name }}</view>
|
||||
<view class="row2">
|
||||
<dict-tree-Label
|
||||
v-if="jobInfo.company?.industry"
|
||||
v-if="dataType !== 2 && jobInfo.company?.industry"
|
||||
dictType="industry"
|
||||
:value="jobInfo.company?.industry"
|
||||
></dict-tree-Label>
|
||||
<span v-if="jobInfo.company?.industry"> </span>
|
||||
<dict-Label dictType="scale" :value="jobInfo.company?.scale"></dict-Label>
|
||||
<span>{{jobInfo.qyxz}}</span>
|
||||
<span v-if="dataType !== 2 && jobInfo.company?.industry"> </span>
|
||||
<dict-Label
|
||||
v-if="dataType !== 2"
|
||||
dictType="scale"
|
||||
:value="jobInfo.company?.scale"
|
||||
></dict-Label>
|
||||
<span v-if="dataType === 2">{{jobInfo.qyxz}}</span>
|
||||
</view>
|
||||
<view class="row2">
|
||||
<text>在招</text>
|
||||
@@ -104,7 +126,9 @@
|
||||
></map>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content-card">
|
||||
|
||||
<!-- 竞争力分析区域 -->
|
||||
<view class="content-card" v-if="dataType !== 2">
|
||||
<view class="card-title">
|
||||
<text class="title">竞争力分析</text>
|
||||
</view>
|
||||
@@ -132,11 +156,15 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view style="height: 24px"></view>
|
||||
</view>
|
||||
|
||||
<template #footer>
|
||||
<view class="footer">
|
||||
<view class="btn-wq button-click" @click="jobApply">立即前往</view>
|
||||
<view class="btn-wq button-click" @click="jobApply">
|
||||
{{ dataType === 2 ? '立即投递' : '立即前往' }}
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<VideoPlayer ref="videoPalyerRef" />
|
||||
@@ -150,8 +178,10 @@ import { reactive, inject, watch, ref, onMounted, computed } from 'vue';
|
||||
import { onLoad, onShow, onHide } from '@dcloudio/uni-app';
|
||||
import dictLabel from '@/components/dict-Label/dict-Label.vue';
|
||||
import RadarMap from './component/radarMap.vue';
|
||||
|
||||
const { $api, navTo, getLenPx, parseQueryParams, navBack, isEmptyObject } = inject('globalFunction');
|
||||
import config from '@/config.js';
|
||||
|
||||
const matchingDegree = ref(['一般', '良好', '优秀', '极好']);
|
||||
const currentStep = ref(1);
|
||||
const companyCount = ref(0);
|
||||
@@ -162,9 +192,11 @@ const jobIdRef = ref();
|
||||
const raderData = ref({});
|
||||
const videoPalyerRef = ref(null);
|
||||
const explainUrlRef = ref('');
|
||||
const dataType = ref(1); // 1: 原数据, 2: 第三方数据
|
||||
|
||||
onLoad((option) => {
|
||||
if (option.jobId) {
|
||||
dataType.value = option.dataType ? parseInt(option.dataType) : 1;
|
||||
initLoad(option);
|
||||
}
|
||||
});
|
||||
@@ -172,6 +204,7 @@ onLoad((option) => {
|
||||
onShow(() => {
|
||||
const option = parseQueryParams(); // 兼容微信内置浏览器
|
||||
if (option.jobId) {
|
||||
dataType.value = option.dataType ? parseInt(option.dataType) : 1;
|
||||
initLoad(option);
|
||||
}
|
||||
});
|
||||
@@ -187,92 +220,165 @@ function initLoad(option) {
|
||||
function seeExplain() {
|
||||
if (jobInfo.value.explainUrl) {
|
||||
videoPalyerRef.value?.open(jobInfo.value.explainUrl);
|
||||
// console.log(jobInfo.value.explainUrl);
|
||||
// explainUrlRef.value = jobInfo.value.explainUrl;
|
||||
}
|
||||
}
|
||||
|
||||
function getDetail(jobId) {
|
||||
return new Promise((reslove, reject) => {
|
||||
$api.createRequest(`/app/internal/jobThirdPart/${jobId}`).then((resData) => {
|
||||
const { gsID, gsmc, zphID} = resData.data;
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据接口
|
||||
return new Promise((reslove, reject) => {
|
||||
$api.createRequest(`/app/internal/jobThirdPart/${jobId}`).then((resData) => {
|
||||
const { gsID, gsmc, zphID } = resData.data;
|
||||
jobInfo.value = resData.data;
|
||||
reslove(resData.data);
|
||||
getCompanyIsAJobs(gsID, gsmc, zphID);
|
||||
|
||||
if (resData.data.latitude && resData.data.longitude) {
|
||||
initMapCovers(resData.data.latitude, resData.data.longitude, resData.data.gsmc);
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
// 原数据接口
|
||||
$api.createRequest(`/app/job/${jobId}`).then((resData) => {
|
||||
const { latitude, longitude, companyName, companyId } = resData.data;
|
||||
jobInfo.value = resData.data;
|
||||
reslove(resData.data);
|
||||
getCompanyIsAJobs(gsID, gsmc, zphID);
|
||||
// getCompetivetuveness(jobId);
|
||||
return
|
||||
getCompanyIsAJobs(companyId);
|
||||
getCompetivetuveness(jobId);
|
||||
|
||||
if (latitude && longitude) {
|
||||
mapCovers.value = [
|
||||
{
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
iconPath: point,
|
||||
label: {
|
||||
content: companyName,
|
||||
textAlign: 'center',
|
||||
padding: 3,
|
||||
fontSize: 12,
|
||||
bgColor: '#FFFFFF',
|
||||
anchorX: getTextWidth(companyName), // X 轴调整,负数向左
|
||||
borderRadius: 5,
|
||||
},
|
||||
width: 34,
|
||||
},
|
||||
];
|
||||
initMapCovers(latitude, longitude, companyName);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getCompanyIsAJobs(gsID, gsmc, zphID) {
|
||||
$api.createRequest(`/app/internal/jobThirdPart?gsID=${gsID}&gsmc=${gsmc}&zphID=${zphID}`).then((resData) => {
|
||||
companyCount.value = resData.total;
|
||||
});
|
||||
function initMapCovers(latitude, longitude, companyName) {
|
||||
mapCovers.value = [
|
||||
{
|
||||
latitude: latitude,
|
||||
longitude: longitude,
|
||||
iconPath: point,
|
||||
label: {
|
||||
content: companyName,
|
||||
textAlign: 'center',
|
||||
padding: 3,
|
||||
fontSize: 12,
|
||||
bgColor: '#FFFFFF',
|
||||
anchorX: getTextWidth(companyName),
|
||||
borderRadius: 5,
|
||||
},
|
||||
width: 34,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
function getCompanyIsAJobs(...args) {
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据获取公司职位数量
|
||||
const [gsID, gsmc, zphID] = args;
|
||||
$api.createRequest(`/app/internal/jobThirdPart?gsID=${gsID}&gsmc=${gsmc}&zphID=${zphID}`).then((resData) => {
|
||||
companyCount.value = resData.total;
|
||||
});
|
||||
} else {
|
||||
// 原数据获取公司职位数量
|
||||
const [companyId] = args;
|
||||
$api.createRequest(`/app/company/count/${companyId}`).then((resData) => {
|
||||
companyCount.value = resData.data;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getTextWidth(text, size = 12) {
|
||||
const canvas = document.createElement('canvas');
|
||||
const context = canvas.getContext('2d');
|
||||
context.font = `${12}px Arial`;
|
||||
return -(context.measureText(text).width / 2) - 20; // 计算文字中心点
|
||||
return -(context.measureText(text).width / 2) - 20;
|
||||
}
|
||||
|
||||
function getCompetivetuveness(jobId) {
|
||||
$api.createRequest(`/app/job/competitiveness/${jobId}`, {}, 'GET').then((resData) => {
|
||||
raderData.value = resData.data;
|
||||
currentStep.value = resData.data.matchScore * 0.04;
|
||||
});
|
||||
if (dataType.value !== 2) {
|
||||
$api.createRequest(`/app/job/competitiveness/${jobId}`, {}, 'GET').then((resData) => {
|
||||
raderData.value = resData.data;
|
||||
currentStep.value = resData.data.matchScore * 0.04;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 申请岗位
|
||||
function jobApply() {
|
||||
const jobId = jobInfo.value.id;
|
||||
if (jobInfo.value.isApply) {
|
||||
const jobUrl = jobInfo.value.jobUrl;
|
||||
return window.open(jobUrl);
|
||||
} else {
|
||||
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('申请成功');
|
||||
if (dataType.value === 2) {
|
||||
$api.msg('敬请期待');
|
||||
return
|
||||
// 第三方数据申请逻辑
|
||||
const jobId = jobInfo.value.id;
|
||||
if (jobInfo.value.isApply) {
|
||||
const jobUrl = jobInfo.value.jobUrl;
|
||||
return window.open(jobUrl);
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
|
||||
getDetail(jobIdRef.value);
|
||||
$api.msg('投递成功');
|
||||
const jobUrl = jobInfo.value.jobUrl;
|
||||
return window.open(jobUrl);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
// 原数据申请逻辑
|
||||
const jobId = jobInfo.value.jobId;
|
||||
if (jobInfo.value.isApply) {
|
||||
const jobUrl = jobInfo.value.jobUrl;
|
||||
return window.open(jobUrl);
|
||||
} else {
|
||||
$api.createRequest(`/app/job/apply/${jobId}`, {}, 'GET').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('申请成功');
|
||||
const jobUrl = jobInfo.value.jobUrl;
|
||||
return window.open(jobUrl);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 取消/收藏岗位
|
||||
function jobCollection() {
|
||||
const jobId = jobInfo.value.jobId;
|
||||
if (jobInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'DELETE').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('取消收藏成功');
|
||||
});
|
||||
if (dataType.value === 2) {
|
||||
// 第三方数据收藏逻辑
|
||||
const id = jobInfo.value.id;
|
||||
if (jobInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/job/collection/${id}/2`, {}, 'DELETE').then((resData) => {
|
||||
getDetail(jobIdRef.value);
|
||||
$api.msg('取消收藏成功');
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/job/collection/${id}/2`, {}, 'POST').then((resData) => {
|
||||
getDetail(jobIdRef.value);
|
||||
$api.msg('收藏成功');
|
||||
});
|
||||
}
|
||||
} else {
|
||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'POST').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('收藏成功');
|
||||
});
|
||||
// 原数据收藏逻辑
|
||||
const jobId = jobInfo.value.jobId;
|
||||
if (jobInfo.value.isCollection) {
|
||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'DELETE').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('取消收藏成功');
|
||||
});
|
||||
} else {
|
||||
$api.createRequest(`/app/job/collection/${jobId}`, {}, 'POST').then((resData) => {
|
||||
getDetail(jobId);
|
||||
$api.msg('收藏成功');
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 处理公司详情跳转
|
||||
function handleCompanyDetail() {
|
||||
if (dataType.value === 2) {
|
||||
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.value.gsID}&companyName=${jobInfo.value.gsmc}&zphId=${jobInfo.value.zphID}&dataType=2`);
|
||||
} else {
|
||||
navTo(`/packageA/pages/UnitDetails/UnitDetails?companyId=${jobInfo.value.company.companyId}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,6 +399,7 @@ function getClass(index) {
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
/* 样式保持不变,与现在的post页面相同 */
|
||||
.btnback{
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
@@ -316,15 +423,14 @@ image {
|
||||
.progress-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx; /* 间距 */
|
||||
gap: 8rpx;
|
||||
margin-top: 24rpx
|
||||
|
||||
}
|
||||
.progress-text{
|
||||
margin-top: 8rpx
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8rpx; /* 间距 */
|
||||
gap: 8rpx;
|
||||
justify-content: space-around
|
||||
width: 100%
|
||||
font-weight: 400;
|
||||
@@ -343,12 +449,10 @@ image {
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
|
||||
/* 完整激活格子 */
|
||||
.progress-item.active {
|
||||
background: linear-gradient(to right, #256bfa, #8c68ff);
|
||||
}
|
||||
|
||||
/* 当前进度进行中的格子 */
|
||||
for i in 0..100
|
||||
.progress-item.half{i}::before
|
||||
content ''
|
||||
@@ -360,36 +464,12 @@ for i in 0..100
|
||||
background linear-gradient(to right, #256bfa (i)%, #eaeaea (i)%)
|
||||
border-radius 24rpx
|
||||
|
||||
|
||||
|
||||
.card-footer{
|
||||
.footer-title{
|
||||
font-weight: 600;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.footer-content{
|
||||
.content-line{
|
||||
display: grid
|
||||
grid-template-columns: repeat(4, 1fr)
|
||||
background: linear-gradient( to left, #9E74FD 0%, #256BFA 100%);
|
||||
border-radius: 10rpx
|
||||
.line-pargrah{
|
||||
height: 20rpx;
|
||||
position: relative
|
||||
}
|
||||
.line-pargrah::after{
|
||||
position: absolute;
|
||||
content: '';
|
||||
right: 10
|
||||
top: 0
|
||||
width: 6rpx
|
||||
height: 20rpx
|
||||
background: #FFFFFF
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ai
|
||||
.ai-explain{
|
||||
@@ -535,7 +615,6 @@ for i in 0..100
|
||||
margin-right: 24rpx
|
||||
}
|
||||
.companyinfo-right{
|
||||
|
||||
.row1{
|
||||
font-weight: 500;
|
||||
font-size: 32rpx;
|
||||
@@ -573,4 +652,4 @@ for i in 0..100
|
||||
line-height: 90rpx
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
@@ -15,24 +15,24 @@
|
||||
<scroll-view scroll-y>
|
||||
<view v-if="pageState.list.length">
|
||||
<view class="card" v-for="(item, index) in pageState.list" :key="index">
|
||||
<view @click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.jobFairId)">
|
||||
<view @click="navTo('/packageA/pages/exhibitors/exhibitors?jobFairId=' + item.zphID + '&jobFairName=' + item.zphmc)">
|
||||
<view class="card-row">
|
||||
<Countdown startTime="item.startTime" :endTime="item.endTime" />
|
||||
<Countdown :startTime="item.zphjbsj" :endTime="item.zphjzsj" />
|
||||
</view>
|
||||
<view class="card-Title">{{ item.name }}</view>
|
||||
<view class="card-Title">{{ item.zphmc }}</view>
|
||||
<view class="card-row">
|
||||
<view class="rowleft">{{ item.location }}</view>
|
||||
<view class="rowright">
|
||||
<convert-distance
|
||||
<view class="rowleft">{{ item.zphdz }}</view>
|
||||
<view class="rowright" style="white-space: nowrap">
|
||||
<!-- <convert-distance
|
||||
:alat="item.latitude"
|
||||
:along="item.longitude"
|
||||
:blat="latitudeVal"
|
||||
:blong="longitudeVal"
|
||||
></convert-distance>
|
||||
></convert-distance> -->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="footer" v-if="isTimePassed(item.startTime)">
|
||||
<view class="footer" v-if="isTimePassed(item.zphjbsj)">
|
||||
<view class="card_cancel" @click="updateCancel(item)">取消预约</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -72,6 +72,7 @@ const ranOptions = ref([
|
||||
]);
|
||||
|
||||
function isTimePassed(timeStr) {
|
||||
if(!timeStr) return false
|
||||
const targetTime = new Date(timeStr.replace(/-/g, '/')).getTime(); // 兼容格式
|
||||
const now = Date.now();
|
||||
return now < targetTime;
|
||||
@@ -88,11 +89,22 @@ function chnageRanOption(item) {
|
||||
}
|
||||
|
||||
function updateCancel(item) {
|
||||
const fairId = item.jobFairId;
|
||||
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
||||
getList('refresh');
|
||||
$api.msg('取消预约成功');
|
||||
});
|
||||
const fairId = item.zphID;
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '确定要取消预约吗?',
|
||||
showCancel: true,
|
||||
success: ({ confirm, cancel }) => {
|
||||
if(confirm){
|
||||
$api.createRequest(`/app/fair/collection/${fairId}`, {}, 'DELETE').then((resData) => {
|
||||
getList('refresh');
|
||||
$api.msg('取消预约成功');
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
function getList(type = 'add', loading = true) {
|
||||
@@ -166,6 +178,7 @@ function getList(type = 'add', loading = true) {
|
||||
display: flex
|
||||
align-items: center
|
||||
}
|
||||
|
||||
}
|
||||
.card-Title{
|
||||
font-family: 'PingFangSC-Medium', 'PingFang SC', 'Helvetica Neue', Helvetica, Arial, 'Microsoft YaHei', sans-serif;
|
||||
|
||||
Reference in New Issue
Block a user