提交 357536f5 authored 作者: matian's avatar matian

chore:岗位管理开发

上级 2016823d
export interface AlumniType {
id: string
project_prefix: 'sofia' | 'kelley' | 'marywood' | 'marywood_plus' | 'cbu_plus' | 'sbu_plus'
project_prefix: string
sso_id: string
username: string
sex: '0' | '1' | '2'
sex: string
birthday: string
graduating_institution: string
specialty: string
......
......@@ -93,6 +93,14 @@ const listOptions = {
{ label: '城市', prop: 'city', align: 'center' },
{ label: '所在行业', prop: 'industry', align: 'center' },
{ label: '工作单位', prop: 'workplace', align: 'center' },
{
label: '是否已注册',
prop: 'is_registered_company',
align: 'center',
computed(row: any) {
return row.row.is_registered_company === true ? '是' : '否'
}
},
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' }
]
}
......
<script setup lang="ts">
import { getAlumniView } from '../api'
import type { AlumniType } from '../types'
import { allPrefixList, highGraduation, sexList } from '../prefix'
const route = useRoute()
const detailList: any = ref({})
// let detailList: AlumniType = reactive({
// id: '',
// project_prefix: '',
// sso_id: '',
// username: '',
// sex: '',
// birthday: '',
// graduating_institution: '',
// specialty: '',
// highest_qualification: '',
// province: '',
// city: '',
// industry: '',
// workplace: '',
// department: '',
// position: '',
// class: []
// })
let project: any = ref([])
const detailList: any = ref({})
onMounted(() => {
getAlumniDetail()
})
......@@ -43,13 +61,21 @@ const getAlumniDetail = () => {
<el-descriptions-item label="城市:">{{ detailList?.city }}</el-descriptions-item>
<el-descriptions-item label="项目:">{{ project.length ? project[0].name : '' }}</el-descriptions-item>
<el-descriptions-item label="班级:">
<span v-for="(item, index) in detailList.class" :key="index">{{ item.name }}</span>
{{ detailList?.class?.name }}
</el-descriptions-item>
<el-descriptions-item label="工作单位:">{{ detailList?.workplace }}</el-descriptions-item>
<el-descriptions-item label="行业类别:">{{ detailList?.industry }}</el-descriptions-item>
<el-descriptions-item label="工作部门:">{{ detailList?.department }}</el-descriptions-item>
<el-descriptions-item label="工作职位:">{{ detailList?.position }}</el-descriptions-item>
</el-descriptions>
<el-divider />
<el-descriptions :column="3" title="企业信息">
<el-descriptions-item label="状态:">{{
detailList?.company?.is_registered_company === true ? '已注册' : '未注册'
}}</el-descriptions-item>
<el-descriptions-item label="工作单位:">{{ detailList?.company?.company_name || '暂无' }}</el-descriptions-item>
<el-descriptions-item label="岗位数量:">{{ detailList?.company?.position_count }}</el-descriptions-item>
</el-descriptions>
</AppCard>
</template>
<style lang="scss" scoped>
......
<script setup lang="ts">
import { natureList, adultStatus, statusMap } from '../map'
import { getCompanyList, getCompanyStatus } from '../api'
const router = useRouter()
const appList = ref()
const appList = ref()
const listOptions = {
remote: {
httpRequest: getCompanyList,
......@@ -34,25 +33,28 @@ const listOptions = {
}
],
columns: [
{ label: '编号', prop: 'id' },
{ label: '企业名称', prop: 'name' },
{ label: '企业邮箱', prop: 'email' },
{ label: '编号', prop: 'id', align: 'center' },
{ label: '企业名称', prop: 'name', align: 'center' },
{ label: '企业邮箱', prop: 'email', align: 'center' },
{
label: '公司运营性质',
prop: 'nature',
computed(row: any) {
return natureList.filter(item => item.value === row.row.nature)[0]?.label
}
},
align: 'center'
},
{ label: '社会统一信用代码', prop: 'code' },
{ label: '社会统一信用代码', prop: 'code', align: 'center' },
{
label: '启用状态',
prop: 'status',
slots: 'status'
slots: 'status',
align: 'center'
},
{
label: '审核状态',
prop: 'audit_status',
align: 'center',
computed(row: any) {
return adultStatus.filter(item => item.value === row.row.audit_status)[0]?.label
}
......@@ -70,15 +72,6 @@ const handleStatus = (row: any) => {
appList.value.refetch()
})
}
const handleDetail = (row: any) => {
router.push({
path: '/company/view',
query: {
id: row.id,
status: row.audit_status
}
})
}
</script>
<template>
......@@ -100,7 +93,9 @@ const handleDetail = (row: any) => {
</template>
<template #table-operate="{ row }">
<el-space>
<el-link type="primary" @click="handleDetail(row)">{{ row.audit_status !== 3 ? '查看' : '审批' }}</el-link>
<router-link :to="`/company/view?id=${row.id}&status=${row.audit_status}`" target="_blank">
<el-link type="primary">{{ row.audit_status !== 3 ? '查看' : '审核' }}</el-link>
</router-link>
</el-space>
</template>
</AppList>
......
......@@ -12,7 +12,7 @@ const handleAdultSuccess = () => {
status: 1
}
getCompanyAdult(params).then(() => {
ElMessage.success('审通过')
ElMessage.success('审通过')
router.push('/company')
})
}
......@@ -23,7 +23,7 @@ const handleAdultFailed = () => {
status: 2
}
getCompanyAdult(params).then(() => {
ElMessage.success('审不通过')
ElMessage.success('审不通过')
router.push('/company')
})
}
......@@ -62,8 +62,8 @@ onMounted(() => {
</el-descriptions-item>
</el-descriptions>
<el-row justify="end" v-if="route.query.status === '3'" style="margin-top: 20px">
<el-button type="primary" @click="handleAdultSuccess">通过</el-button>
<el-button type="warning" @click="handleAdultFailed"> 审批不通过</el-button>
<el-button type="primary" @click="handleAdultSuccess">通过</el-button>
<el-button type="warning" @click="handleAdultFailed">审核不通过</el-button>
</el-row>
</AppCard>
</template>
......
import httpRequest from '@/utils/axios'
// 获取视频列表
export function getVideoList(params?: { type?: string; page?: number; page_size?: number }) {
return httpRequest.get('/api/psp/backend/video/index', { params })
}
// 创建视频
export function createVideo(data: { course_name: string; cover_page: string; type: string; weight?: string }) {
return httpRequest.post('/api/psp/backend/video/create', data)
}
// 更新视频
export function updateVideo(data: {
id: string
course_name: string
cover_page: string
type: string
weight?: string
// 获取岗位列表
export function getPositionList(params?: {
name?: string
type?: string
education?: string
work_locations?: string
status?: string
audit_status?: string
company_name?: string
company_email?: string
page?: number
limit?: number
}) {
return httpRequest.post('/api/psp/backend/video/update', data)
return httpRequest.get('/api/hr/admin/v1/positions', { params })
}
// 获取视频详情
export function getVideo(params: { id: string }) {
return httpRequest.get('/api/psp/backend/video/view', { params })
// 获取岗位详情
export function getPositionDetails(params: { id: string }) {
return httpRequest.get(`/api/hr/admin/v1/position/${params.id}/detail`, { params })
}
// 删除视频
export function deleteVideo(data: { id: string }) {
return httpRequest.post('/api/psp/backend/video/delete', data)
// 岗位审核
export function getPositionAdult(data: { id: string; status: number }) {
return httpRequest.post(`/api/hr/admin/v1/position/${data.id}/audit`, data)
}
// 启用禁用
export function getPositionStatus(data: { id: string; status: number }) {
return httpRequest.post(`/api/hr/admin/v1/position/${data.id}/enable`, data)
}
export const positionType = [
{ label: '管理类', value: 1 },
{ label: '专业技术类', value: 2 },
{ label: '专业支持类', value: 3 },
{ label: '营销类', value: 4 },
{ label: '操作类', value: 5 }
]
export const adultStatusMap = [
{ value: 1, label: '审核通过' },
{ value: 2, label: '审核不通过' },
{ value: 3, label: '待审核' }
]
// 学历
export const highGraduation = [
{ value: 1, label: '高中或以下' },
{ value: 2, label: '大专' },
{ value: 3, label: '本科' },
{ value: 4, label: '硕士研究生' },
{ value: 5, label: '博士' }
]
<script setup lang="ts">
// import { getVideoList } from '../api'
import { positionType, adultStatusMap } from '../map'
import { getPositionList, getPositionStatus } from '../api'
const router = useRouter()
const appList = ref()
const listOptions = {
remote: {
// httpRequest: getVideoList,
params: { type: '', adultStatus: '', openStatus: '' }
httpRequest: getPositionList,
params: {
name: '',
type: '',
education: '',
work_locations: '',
status: '',
audit_status: '',
company_name: '',
company_email: ''
}
},
filters: [
{ type: 'input', prop: 'company_name', placeholder: '企业名称' },
{ type: 'input', prop: 'email', placeholder: '企业邮箱' },
{ type: 'input', prop: 'company_name', placeholder: '企业名称', align: 'center' },
{ type: 'input', prop: 'company_email', placeholder: '企业邮箱', align: 'center' },
{
type: 'select',
prop: 'education',
placeholder: '学历要求',
options: [
{ label: '高中或以下', value: '1' },
{ label: '大专', value: '2' },
{ label: '本科', value: '3' },
{ label: '硕士研究生', value: '4' },
{ label: '博士', value: '5' }
]
{ label: '高中或以下', value: 1 },
{ label: '大专', value: 2 },
{ label: '本科', value: 3 },
{ label: '硕士研究生', value: 4 },
{ label: '博士', value: 5 }
],
align: 'center'
},
{ type: 'input', prop: 'workplace', placeholder: '工作地点' },
{ type: 'input', prop: 'work_locations', placeholder: '工作地点' },
{ type: 'input', prop: 'name', placeholder: '岗位名称' },
{
type: 'select',
prop: 'type',
placeholder: '岗位类型',
options: [
{ label: '管理类', value: '1' },
{ label: '专业技术类', value: '2' },
{ label: '专业支持类', value: '3' },
{ label: '营销类', value: '4' },
{ label: '操作类', value: '5' }
]
options: positionType
},
{
type: 'select',
prop: 'adultStatus',
prop: 'audit_status',
placeholder: '审核状态',
options: [
{ value: '0', label: '待审核' },
{ value: '1', label: '通过' },
{ value: '2', label: '不通过' }
]
options: adultStatusMap
},
{
type: 'select',
prop: 'openStatus',
prop: 'status',
placeholder: '启用状态',
options: [
{ value: '0', label: '启用' },
{ value: '1', label: '禁用' }
{ value: 1, label: '启用' },
{ value: 2, label: '禁用' }
]
}
],
columns: [
{ label: '编号', prop: 'id', width: 224 },
{ label: '岗位名称', prop: 'name' },
{ label: '岗位类型', prop: 'type' },
{ label: '地点', prop: 'work_locations' },
{ label: '学历要求', prop: 'education' },
{ label: '编号', prop: 'id', width: 224, align: 'center' },
{ label: '岗位名称', prop: 'name', align: 'center' },
{
label: '岗位类型',
prop: 'type',
computed(row: any) {
return positionType.filter(item => item.value === row.row.type)[0]?.label
},
align: 'center'
},
{ label: '地点', prop: 'work_locations', align: 'center' },
{ label: '学历要求', prop: 'education', align: 'center' },
{
label: '薪酬范围',
prop: 'salary',
computed(row: any) {
return row.row.salary_min + '-' + row.row.salary_max
}
},
align: 'center'
},
{ label: '企业名称', prop: 'company_name' },
{ label: '企业邮箱', prop: 'email' },
{ label: '企业名称', prop: 'company.name', align: 'center' },
{ label: '企业邮箱', prop: 'company.email', align: 'center' },
{
label: '启用状态',
prop: 'openStatus',
slots: 'status'
prop: 'status',
slots: 'status',
align: 'center'
},
{
label: '审核状态',
prop: 'adultStatus',
prop: 'audit_status',
computed(row: any) {
if (row.status === 3) {
return '待审核'
} else if (row.status === 4) {
return '不通过'
} else {
return '通过'
}
}
return adultStatusMap.filter(item => item.value === row.row.audit_status)[0]?.label
},
align: 'center'
},
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' }
],
data: [{ id: '111', name: '岗位名称', salary_min: '1000', salary_max: '2000' }]
]
}
const handleStatus = (row: any) => {
console.log(row)
const params: any = {
id: row.id,
status: row.status
}
getPositionStatus(params).then(() => {
appList.value.refetch()
})
}
const handleDetail = (row: any) => {
router.push({
path: '/project/view',
query: {
id: row.id,
status: row.audit_status
}
})
}
</script>
......@@ -113,13 +132,19 @@ const handleStatus = (row: any) => {
inactive-text="禁用"
inline-prompt
style="--el-switch-on-color: #aa1941"
:disabled="row.audit_status === 2 || row.audit_status === 3 || row.company.status === 2"
></el-switch>
</template>
<template #table-operate="{ row }">
<el-space>
<router-link :to="`/company/view?id=${row.id}&status=${row.status}`">
<el-link type="primary">{{ row.status !== 3 ? '查看' : '审批' }}</el-link>
<router-link
:to="`/job/view?id=${row.id}&status=${row.audit_status}`"
target="_blank"
v-if="row.audit_status !== 3"
>
<el-link type="primary">查看</el-link>
</router-link>
<el-link type="primary" v-else @click="handleDetail(row)" :disabled="row.company.status === 2">审核</el-link>
</el-space>
</template>
</AppList>
......
<script setup lang="ts">
import { ElMessage } from 'element-plus'
import { positionType, highGraduation } from '../map'
import { getPositionDetails, getPositionAdult } from '../api'
const route = useRoute()
const router = useRouter()
//审核通过
const handleAdultSuccess = () => {
console.log('审核通过')
history.go(-1)
const params: any = {
id: route.query.id,
status: 1
}
getPositionAdult(params).then(() => {
ElMessage.success('审核通过')
router.push('/job')
})
}
//审核不通过
const handleAdultFailed = () => {
console.log('审核不通过')
history.go(-1)
const params: any = {
id: route.query.id,
status: 2
}
getPositionAdult(params).then(() => {
ElMessage.success('审核不通过')
router.push('/job')
})
}
const detailList = reactive({
name: '北京奔驰技术工人',
type: '专业技术类',
work_locations: '北京',
company_name: '北京奔驰汽车销售有限公司',
education: '本科',
salary_min: '8000',
salary_max: '10000',
desc: '紫荆教育全称是清控紫荆(北京)教育科技股份有限公司,是清华控股有限公司2015年以清华大学五道口金融学院教研成果为基础发起设立。“紫荆”二字取自清华大学校花“紫荆花”,寓意“自强不息,向美而行”。'
const detailList: any = ref({})
const handleDetail = () => {
const params: any = {
id: route.query.id
}
getPositionDetails(params).then((res: any) => {
detailList.value = res.data.detail
})
}
onMounted(() => {
handleDetail()
})
</script>
<template>
<AppCard title="岗位详情">
<el-descriptions :column="2">
<el-descriptions-item label="岗位名称:">{{ detailList.name }}</el-descriptions-item>
<el-descriptions-item label="岗位类型:">{{ detailList.type }}</el-descriptions-item>
<el-descriptions-item label="岗位地点:">{{ detailList.work_locations }}</el-descriptions-item>
<el-descriptions-item label="岗位名称:">{{ detailList?.name }}</el-descriptions-item>
<el-descriptions-item label="岗位类型:">
{{ positionType.filter(item => item.value === detailList?.type)[0]?.label }}
</el-descriptions-item>
<el-descriptions-item label="岗位地点:">{{ detailList?.work_locations }}</el-descriptions-item>
<el-descriptions-item label="学历要求:">
{{ detailList.education }}
{{ highGraduation.filter(item => item.value === detailList?.education)[0]?.label }}
</el-descriptions-item>
<el-descriptions-item label="公司名称:">
{{ detailList.company_name }}
{{ detailList?.company?.name }}
</el-descriptions-item>
<el-descriptions-item label="薪资范围:">
{{ detailList.salary_min }}-{{ detailList.salary_max }}
{{ detailList?.salary_min }}-{{ detailList?.salary_max }}
</el-descriptions-item>
<el-descriptions-item label="岗位介绍:">
<div class="project_intro">{{ detailList.desc }}</div></el-descriptions-item
<div class="project_intro">{{ detailList?.desc }}</div></el-descriptions-item
>
</el-descriptions>
<el-row justify="end" v-if="route.query.status === '3'">
<el-button type="primary" @click="handleAdultSuccess">通过</el-button>
<el-button type="warning" @click="handleAdultFailed"> 审批不通过</el-button>
<el-button type="primary" @click="handleAdultSuccess">通过</el-button>
<el-button type="warning" @click="handleAdultFailed">审核不通过</el-button>
</el-row>
</AppCard>
</template>
......
......@@ -7,7 +7,7 @@ export function getProjectList(params?: {
status?: string
audit_status?: string
page?: number
page_size?: number
limit?: number
}) {
return httpRequest.get('/api/hr/admin/v1/projects', { params })
}
......
......@@ -3,7 +3,6 @@ import { getProjectList, getProjectStatus } from '../api'
import { typeMap, adultStatus, statusMap } from '../map'
const appList = ref()
const router = useRouter()
const listOptions = {
remote: {
httpRequest: getProjectList,
......@@ -44,17 +43,19 @@ const listOptions = {
{ label: '开始时间', prop: 'start_time', align: 'center' },
{ label: '结束时间', prop: 'end_time', align: 'center' },
{ label: '联系人', prop: 'contact', align: 'center' },
{ label: '项目所属公司 ', prop: 'company.name', align: 'center' }, // 待修改
{ label: '项目所属公司 ', prop: 'company.name', align: 'center', align: 'center' },
{
label: '启用状态',
prop: 'status',
slots: 'status'
slots: 'status',
align: 'center'
},
{
label: '审核状态',
prop: 'audit_status',
align: 'center',
computed(row: any) {
return adultStatus.filter(item => item.value === row.row.type)[0]?.label
return adultStatus.filter(item => item.value === row.row.audit_status)[0]?.label
}
},
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' }
......@@ -70,7 +71,6 @@ const handleStatus = (row: any) => {
appList.value.refetch()
})
}
const handleDetail = (row: any) => {
router.push({
path: '/project/view',
......@@ -96,12 +96,20 @@ const handleDetail = (row: any) => {
inactive-text="禁用"
inline-prompt
style="--el-switch-on-color: #aa1941"
:disabled="row.audit_status === 2 || row.audit_status === 3"
:disabled="row.audit_status === 2 || row.audit_status === 3 || row.company.status === 2"
></el-switch>
</template>
<template #table-operate="{ row }">
<el-space>
<el-link type="primary" @click="handleDetail(row)">{{ row.audit_status !== 3 ? '查看' : '审批' }}</el-link>
<router-link
:to="`/project/view?id=${row.id}&status=${row.audit_status}`"
target="_blank"
v-if="row.audit_status !== 3"
>
<el-link type="primary">查看</el-link>
</router-link>
<el-link type="primary" v-else @click="handleDetail(row)" :disabled="row.company.status === 2">审核</el-link>
</el-space>
</template>
</AppList>
......
<script setup lang="ts">
import { ElMessage } from 'element-plus'
import { Picture } from '@element-plus/icons-vue'
import { getProjectDetails, getProjectAdult } from '../api'
import { typeMap } from '../map'
......@@ -14,7 +16,7 @@ const handleAdultSuccess = () => {
status: 1
}
getProjectAdult(params).then(() => {
ElMessage.success('审通过')
ElMessage.success('审通过')
router.push('/project')
})
}
......@@ -25,7 +27,7 @@ const handleAdultFailed = () => {
status: 2
}
getProjectAdult(params).then(() => {
ElMessage.success('审不通过')
ElMessage.success('审不通过')
router.push('/project')
})
}
......@@ -67,17 +69,17 @@ onMounted(() => {
</div>
<div class="project_intro_title">项目文件</div>
<div class="dataList">
<a target="_blank" :href="item" v-for="(item, index) in detailList.documents" :key="index">
<a target="_blank" :href="item.url || item" v-for="(item, index) in detailList.documents" :key="index">
<div class="item">
<img :src="item" alt="" style="width: 30px; height: 30px" />
<!-- <p class="doc">{{ item }}</p> -->
<el-icon><Picture /></el-icon>
<p class="doc">{{ item.name || '' }}</p>
<p class="p1">预览</p>
</div>
</a>
</div>
<el-row justify="end" v-if="route.query.status === '3'">
<el-button type="primary" @click="handleAdultSuccess">通过</el-button>
<el-button type="warning" @click="handleAdultFailed"> 审批不通过</el-button>
<el-button type="primary" @click="handleAdultSuccess">通过</el-button>
<el-button type="warning" @click="handleAdultFailed">审核不通过</el-button>
</el-row>
</AppCard>
</template>
......@@ -121,6 +123,7 @@ onMounted(() => {
font-weight: 400;
color: #2b2b2b;
margin-top: 14px;
margin-left: 30px;
}
.p1 {
font-size: 16px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论