Commit a61f8e84 authored by 石建新(贵阳日报)'s avatar 石建新(贵阳日报)
parents cbd10a5b fcbe0593
......@@ -8,7 +8,7 @@
"files.eol": "\n",
"typescript.tsdk": "node_modules/typescript/lib",
"[vue]": {
"editor.defaultFormatter": "octref.vetur"
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
......
......@@ -4,7 +4,7 @@ import instance from "@/utils/request";
export const createJobApi = params => instance.post("/b/position/add", params);
//更新岗位
export const updateJobApi = params => instance.post("/company/job/update", params);
export const updateJobApi = params => instance.post("/b/position/update", params);
// 职位列表
export const getJobListApi = params => instance.post("/company/job/list", params);
......@@ -13,10 +13,10 @@ export const getJobListApi = params => instance.post("/company/job/list", params
export const getResumeRecommendListApi = params => instance.post("/company/job/getResumeRecommendList", params);
// 查询职位信息
export const getJobByIdApi = id => instance.post(`/company/job/${id}`);
export const getJobByIdApi = id => instance.post(`/b/position/${id}`);
// 统计职位投递信息
export const getListStatisticsApi = params => instance.post("/company/job/listStatistics", params);
export const getListStatisticsApi = params => instance.post("/b/position/statistics", params);
//获取投递信息通过id
export const getApplicationByIdApi = id => instance.post(`/company/job/getApplication/${id}`);
......@@ -31,14 +31,14 @@ export const getApplicationListApi = params => instance.post("/company/job/getAp
export const getUserResumeApi = params => instance.post(`/company/job/getUserResume`, params);
// 职位发布(上线)
export const jobReleaseApi = id => instance.post(`/company/job/release/${id}`);
export const jobReleaseApi = id => instance.post(`/b/position/release/${id}`);
// 职位下线
export const jobOfflineApi = id => instance.post(`/company/job/offline/${id}`);
export const jobOfflineApi = id => instance.post(`/b/position/offline/${id}`);
// 职位置顶
export const jobOfftopApi = id => instance.post(`/company/job/top/${id}`);
export const jobOfftopApi = id => instance.post(`/b/position/top/${id}`);
// 职位置顶
export const jobOffuntopApi = id => instance.post(`/company/job/untop/${id}`);
export const jobOffuntopApi = id => instance.post(`/b/position/untop/${id}`);
// 拒绝申请
export const rejectApplicationApi = id => instance.post(`/company/job/rejectApplication/${id}`);
......@@ -86,6 +86,12 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/user/positionManagement/index",
"style": {
"navigationBarTitleText": "职位管理"
}
},
{
"path": "pages/dynamic/index",
"style": {
......@@ -233,7 +239,7 @@
"borderStyle": "black",
"backgroundColor": "#FFFFFF",
"position": "bottom",
"iconWidth":"52rpx",
"iconWidth": "52rpx",
"list": [
{
"pagePath": "pages/recommend/index",
......
......@@ -584,7 +584,6 @@ const editJob = ({ id, status }) => {
display: flex;
flex-direction: column;
flex-grow: 1;
.release-postion {
position: fixed;
right: 22rpx;
......@@ -862,7 +861,6 @@ const editJob = ({ id, status }) => {
width: 28rpx;
height: 28rpx;
}
.top {
width: 20rpx;
height: 20rpx;
......
<template>
<div class="page">
<NavBar :showIcon="true" :showTitle="false" title="" backgroundBox="#FFFFFF"></NavBar>
<!-- <Filter /> -->
<!-- <Filter /> -->
<view class="title">
<view class="t1">1/5填写职位信息</view>
<view class="t2">选择对应的职位并填写职位信息</view>
......@@ -110,14 +110,14 @@ const columnChange = ({ selectedItem, resolve, finish }) => {
};
const handleConfirm = ({ selectedItems, value }) => {
pinias.setFormDataKey("jobTypeName", selectedItems[1].name);
pinias.setFormDataKey("jobTypePid", selectedItems[1].id);
pinias.setFormDataKey("jobTypeParentId", selectedItems[0].id);
pinias.setFormDataKey("jobTypeId", selectedItems[1].id);
pinias.setFormDataKey("jobTypePid", selectedItems[0].id);
};
const next = () => {
xma.hideKeyboard();
console.log(pinias.formData);
if (validateForm(pinias.formData, ["jobTypePid", "jobTypeName", "name", "positionDesc"])) {
if (validateForm(pinias.formData, ["jobTypeId", "jobTypeName", "name", "positionDesc"])) {
uni.navigateTo({
url: "/pages/recommend/releasePostion/step2"
});
......
......@@ -72,24 +72,23 @@ const columnChangeCity = ({ selectedItem, resolve, finish }) => {
}
};
const handleConfirmCity = ({ selectedItems }) => {
cityText.value = selectedItems.map(v => v.name||'').join("-");
cityText.value = selectedItems.map(v => v.name || "").join("-");
citySelectedItems = selectedItems;
const [city, district, street] = selectedItems;
pinias.formData.address = selectedItems.map(v => v.name||'').join("");
pinias.formData.address = selectedItems.map(v => v.name || "").join("");
pinias.formData.provinceCode = 520000;
pinias.formData.cityCode = city.code;
pinias.formData.cityName = district.name;
pinias.formData.districtCode = district.code;
pinias.formData.street = street?street.name:'';
/*params.provinceCode = province.code;
params.provinceName = province.name;
params.cityCode = city.code;
params.cityName = city.name;
params.districtCode = district.code;
params.districtName = district.name;
console.log(cityValue); */
pinias.formData.street = street ? street.name : "";
};
// 数据回显
const reviewData = () => {
if (pinias.formData.id) cityText.value = pinias.formData.address;
};
onLoad(() => {
reviewData();
});
const next = () => {
if (validateForm(pinias.formData, ["address"])) {
uni.navigateTo({
......
......@@ -210,13 +210,24 @@ const specialLicenseValue = ref("");
/* 初始化页面数据 */
const initViewData = async () => {
if (pinias.formData.id) {
// 编辑
identityText.value = await getEnumText("EnumIdentityRequirement", pinias.formData.identityRequirement);
educationText.value = await getEnumText("EnumEducationRequirement", pinias.formData.educationRequirement);
// 年龄
if (pinias.formData.maxAgeRequirement) {
ageText.value = `${pinias.formData.minAgeRequirement}~${pinias.formData.maxAgeRequirement}`;
} else {
ageText.value = "不限";
}
// 证书
/* positionalTitle majorInputValue.value + "-" + majorSelectValue.value
professionalCertificates certificateInputValue.value + "-" + certificateSelectValue.value */
const [majorInputValue1, majorSelectValue1] = pinias.formData.positionalTitle.split("-");
const [certificateInputValue1, certificateSelectValue1] = pinias.formData.professionalCertificates.split("-");
majorInputValue.value = majorInputValue1;
majorSelectValue.value = majorSelectValue1;
certificateInputValue.value = certificateInputValue1;
certificateSelectValue.value = certificateSelectValue1;
}
};
initViewData();
......
......@@ -70,7 +70,7 @@ const submit = () => {
}, 2000);
setTimeout(() => {
uni.switchTab({
url: "/pages/recommend/index"
url: "/pages/user/positionManagement/index"
});
}, 3000);
} else {
......
......@@ -49,6 +49,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", () =
recruitmentNumber: 1,
accommodation: 0,
provinceCode: "",
cityName: "",
cityCode: "",
districtCode: "",
street: "",
......@@ -84,6 +85,7 @@ export const useReleasePostionStore = defineStore("useReleasePostionStore", () =
accommodation: 0,
provinceCode: "",
cityCode: "",
cityName: "",
districtCode: "",
street: "",
address: "",
......
......@@ -103,7 +103,20 @@ const navList = reactive([
subText: "",
auditStatus: ""
},
{
icon: new URL("@/static/image/user/history.png", import.meta.url).href,
url: "/pages/user/positionManagement/index",
text: "职位管理",
subText: "",
auditStatus: ""
},
{
icon: new URL("@/static/image/user/history.png", import.meta.url).href,
url: "/pages/recommend/releasePostion/step1",
text: "岗位发布",
subText: "",
auditStatus: ""
},
{
icon: new URL("@/static/image/user/question.png", import.meta.url).href,
url: "/pages/user/problemRecord/index",
......@@ -214,7 +227,6 @@ onShow(() => {
.user-container {
padding-top: 1rpx;
}
.popup-wrapper {
display: flex;
align-items: center;
......@@ -281,16 +293,16 @@ onShow(() => {
justify-content: center;
height: 100%;
.sumbit-error {
position: relative;
box-sizing: border-box;
display: flex;
flex-direction: column;
align-items: center;
width: 600rpx;
min-height: 668rpx;
padding: 0 32rpx 32rpx;
background-color: #ffffff;
border-radius: 10rpx;
min-height: 668rpx;
display: flex;
flex-direction: column;
position: relative;
align-items: center;
image {
position: absolute;
width: 448rpx;
......@@ -298,12 +310,12 @@ onShow(() => {
}
.title {
padding: 32rpx 0;
margin-top: 300rpx;
font-size: 28rpx;
font-weight: 600;
line-height: 54rpx;
color: #1b2026;
text-align: center;
margin-top: 300rpx;
}
.txt {
width: 400rpx;
......@@ -321,13 +333,13 @@ onShow(() => {
border-radius: 12rpx;
}
.cancel-button {
background: rgba(31, 134, 255, 0.1);
color: #1f86ff;
background: rgb(31 134 255 / 10%);
}
.tz-btn {
background: #1f86ff;
color: #fff;
margin-left: 72rpx;
color: #ffffff;
background: #1f86ff;
}
}
}
......
<template>
<view class="management">
<view class="filter flex-between">
<view
class="item"
:class="{ active: activeTopFilter === v.code }"
v-for="v in topFilter"
:key="v.code"
@click="filterJobList(v.code)"
>{{ v.text }}</view
>
</view>
<scroll-view class="management-list" :scroll-y="true">
<view class="item" v-for="(v, i) in jobList" :key="i">
<view class="flex-between">
<view class="info">
<view class="name">{{ v.name }}</view>
<view class="other"> {{ v.cityName }}{{ v.workModeText }}{{ v.jobTypeName }} </view>
</view>
<view class="state" :class="`style${v.status}`"> {{ v.statusText }} </view>
</view>
<view class="data flex-between">
<view bind:tap="jumpDeliveryManagement" @click="jumpDeliveryManagement(v.id, '0')">
<view class="t1">{{ v.pendingNum || 0 }}</view>
<view class="t2">新投递</view>
</view>
<view bind:tap="jumpDeliveryManagement" @click="jumpDeliveryManagement(v.id, '2')">
<view class="t1">{{ v.interviewNum || 0 }}</view>
<view class="t2">待面试</view>
</view>
<view bind:tap="jumpDeliveryManagement" @click="jumpDeliveryManagement(v.id, '')">
<view class="t1">{{ v.totalNum || 0 }}</view>
<view class="t2">总投递</view>
</view>
</view>
<view class="btn-list flex-between">
<view class="flex-center" @click="jobOffuntopApiFn(v)" v-if="v.top == 1">
<image src="@/static/image/icon/cancelUpload.png" mode="" />
取消置顶
</view>
<view class="flex-center" @click="jobOfftopApiFn(v)" v-else>
<image class="top" src="@/static/image/icon/top.png" mode="" />
置顶
</view>
<view class="flex-center" @click="switchJobStatus(v)">
<image :class="{ rotate: v.status != 3 }" src="@/static/image/icon/download.png" mode="" />
{{ v.status == 3 ? "下线" : "上线" }}
</view>
<view class="flex-center" @click="editJob(v)">
<image src="@/static/image/icon/edit.png" mode="" />
编辑
</view>
</view>
</view>
<wd-status-tip v-if="!jobList.length" image="content" tip="暂无内容" />
</scroll-view>
</view>
</template>
<script setup>
import { getListStatisticsApi, jobReleaseApi, jobOfflineApi, getJobByIdApi, jobOfftopApi, jobOffuntopApi } from "@/api/postion";
import { useReleasePostionStore } from "@/pages/recommend/releasePostion/store";
import { getEumData, getEnumText } from "@/utils/utils";
import { ref } from "vue";
import { useAsync } from "@/hooks/useAsync";
import _ from "lodash";
const pinias = useReleasePostionStore();
const topFilter = ref([]);
const activeTopFilter = ref("");
const jobList = ref([]);
const filterJobList = code => {
activeTopFilter.value = code;
getJobList(code);
};
const getTopFilter = async () => {
const data = await getEumData("EnumJobStatus");
data.unshift({
code: "",
text: "全部"
});
topFilter.value = data;
};
const getJobList = (status = "") => {
xma.showLoading({
title: "加载中..."
});
getListStatisticsApi({ status }).then(res => {
xma.hideLoading();
res.data.forEach(v => {
const { data: workModeText } = useAsync(getEnumText("EnumWorkMode", v.workMode));
const { data: statusText } = useAsync(getEnumText("EnumJobStatus", v.status));
v.workModeText = workModeText;
v.statusText = statusText;
});
jobList.value = [...res.data];
});
};
onLoad(() => {
xma.xh.getSystemInfo({
success(res) {
// console.log('设备信息', res); // 设备信息
}
});
xma.xh.getMenuButtonBoundingClientRect({
success(res) {
contentHeight.value = (res.top + res.bottom) / 2 + 25 + "px";
}
});
});
onShow(() => {
getTopFilter();
getJobList();
});
/* 职位上下线 */
const switchJobStatus = async v => {
let res = null;
if (v.status == 3) {
res = await jobOfflineApi(v.id);
if (res.code === 200) v.status = 4;
} else if (v.status == 4 || v.status == 1) {
res = await jobReleaseApi(v.id);
if (res.code === 200) v.status = 3;
} else {
uni.showToast({
title: "该状态不能操作",
icon: "none"
});
}
if (res && res.code === 200) {
uni.showToast({
title: "操作成功",
icon: "none"
});
// getJobList();
} else {
uni.showToast({
title: res.message,
icon: "none"
});
}
};
/* 跳转职位管理 */
const jumpDeliveryManagement = (jobId, status) => {
uni.navigateTo({
url: `/pages/recommend/deliveryManagement/index?jobId=${jobId}&status=${status}`
});
};
/* 编辑职位 */
const editJob = ({ id, status }) => {
if (status == 3) {
uni.showToast({
title: "该职位已上线,不能编辑",
icon: "none"
});
return;
}
getJobByIdApi(id).then(res => {
/* const {
workMode,
jobName,
jobType,
jobTypeText,
jobDesc,
negotiableSalary,
settlementType,
minSalary,
maxSalary,
benefits,
identityRequirement,
educationRequirement,
minAgeRequirement,
maxAgeRequirement,
recruitmentNumber,
accommodation,
provinceCode,
cityCode,
districtCode,
town,
street,
address,
locationLongitude,
locationLatitude,
contactPerson,
contactPhone
} = res.data;
pinias.setForm({
workMode,
jobName,
jobType,
jobTypeText,
jobDesc,
negotiableSalary,
settlementType,
minSalary,
maxSalary,
benefits,
identityRequirement,
educationRequirement,
minAgeRequirement,
maxAgeRequirement,
recruitmentNumber,
accommodation,
provinceCode,
cityCode,
districtCode,
town,
street,
address,
locationLongitude,
locationLatitude,
contactPerson,
contactPhone
}); */
pinias.formData = res.data;
pinias.setFormDataKey("id", id);
uni.navigateTo({
url: `/pages/recommend/releasePostion/step1?id=${id}`
});
});
};
/* 置顶 */
function jobOfftopApiFn(v) {
jobOfftopApi(v.id).then(res => {
if (res.code == 200) {
getJobList(activeTopFilter.value);
}
});
}
function jobOffuntopApiFn(v) {
jobOffuntopApi(v.id).then(res => {
if (res.code == 200) {
getJobList(activeTopFilter.value);
}
});
}
</script>
<style lang="scss" scoped>
.management {
position: relative;
display: flex;
flex-direction: column;
height: 100%;
.filter {
padding: 20rpx 32rpx;
font-size: 28rpx;
line-height: 44rpx;
color: #77818f;
text-align: center;
border-bottom: 16rpx solid #f3f4f8;
.item.active {
position: relative;
font-weight: 500;
color: #1f86ff;
&::after {
position: absolute;
bottom: -20rpx;
left: 50%;
display: block;
width: 48rpx;
height: 4rpx;
content: "";
background-color: #1f86ff;
transform: translateX(-50%);
}
}
}
.management-list {
flex-grow: 1;
height: 200rpx;
.item {
padding: 32rpx;
padding-bottom: 0;
border-bottom: 16rpx solid #f3f4f8;
.info {
.name {
font-size: 32rpx;
font-weight: 500;
color: #1b2026;
}
.other {
font-size: 24rpx;
font-weight: normal;
line-height: 36rpx;
color: #77818f;
}
}
.state {
padding: 8rpx 16rpx;
font-size: 20rpx;
font-weight: 500;
line-height: 28rpx;
color: #1f86ff;
background: rgb(31 134 255 / 10%);
border-radius: 4rpx;
&.style1 {
color: #18c69c;
background: rgb(31 255 80 / 10%);
}
&.style2 {
color: #f05a25;
background: rgb(240 90 37 / 10%);
}
}
.data {
padding: 16rpx 0;
border-bottom: 2rpx solid rgb(31 35 41 / 15%);
& > view {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 214rpx;
height: 120rpx;
text-align: center;
background: #1f86ff10;
border-radius: 8rpx;
.t1 {
font-size: 48rpx;
font-weight: bold;
line-height: 36rpx;
color: #1f86ff;
}
.t2 {
font-size: 24rpx;
line-height: 36rpx;
color: #77818f;
}
}
}
.btn-list {
margin: 12rpx 0;
.rotate {
transform: rotateZ(180deg);
}
image {
width: 28rpx;
height: 28rpx;
}
.top {
width: 20rpx;
height: 20rpx;
margin-right: 3rpx;
}
view {
flex: 1;
font-size: 24rpx;
font-weight: normal;
line-height: 36rpx;
color: #77818f;
&:not(:first-child) {
border-left: 2rpx solid #77818f;
}
}
}
}
.wd-status-tip {
padding-top: 280rpx;
}
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment