Compare commits
No commits in common. "main" and "wjx" have entirely different histories.
@ -276,13 +276,6 @@
|
|||||||
"watchThrottled": true,
|
"watchThrottled": true,
|
||||||
"watchTriggerable": true,
|
"watchTriggerable": true,
|
||||||
"watchWithFilter": true,
|
"watchWithFilter": true,
|
||||||
"whenever": true,
|
"whenever": true
|
||||||
"DirectiveBinding": true,
|
|
||||||
"MaybeRef": true,
|
|
||||||
"MaybeRefOrGetter": true,
|
|
||||||
"onWatcherCleanup": true,
|
|
||||||
"useId": true,
|
|
||||||
"useModel": true,
|
|
||||||
"useTemplateRef": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
"xlsx": "^0.18.5"
|
"xlsx": "^0.18.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@arco-design/web-vue": "~2.55.3",
|
"@arco-design/web-vue": "~2.55.1",
|
||||||
"@commitlint/cli": "~17.3.0",
|
"@commitlint/cli": "~17.3.0",
|
||||||
"@commitlint/config-conventional": "~17.3.0",
|
"@commitlint/config-conventional": "~17.3.0",
|
||||||
"@iconify/json": "^2.2.144",
|
"@iconify/json": "^2.2.144",
|
||||||
|
3473
pnpm-lock.yaml
generated
3473
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -1,68 +0,0 @@
|
|||||||
import axios from '@/utils/axios'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询职位
|
|
||||||
* @param {Object} page - 分页对象
|
|
||||||
* @param {Object} entity - 职位实体类对象
|
|
||||||
* @returns {Promise} - 返回一个 Promise 对象
|
|
||||||
*/
|
|
||||||
export function pageRes(page, entity) {
|
|
||||||
return axios.post('/recruit/position/page/res', {
|
|
||||||
...page,
|
|
||||||
...entity
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取职位列表
|
|
||||||
* @param {Object|null} entity - 职位实体类对象,可为空
|
|
||||||
* @returns {Promise} - 返回一个 Promise 对象
|
|
||||||
*/
|
|
||||||
export function getPositionList(entity = null) {
|
|
||||||
return axios.post('/recruit/position/list', entity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增职位
|
|
||||||
* @param {Object} entity - 职位实体类对象
|
|
||||||
* @returns {Promise} - 返回一个 Promise 对象
|
|
||||||
*/
|
|
||||||
export function addPosition(entity) {
|
|
||||||
return axios.post('/recruit/position/add', entity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改职位
|
|
||||||
* @param {Object} entity - 职位实体类对象
|
|
||||||
* @returns {Promise} - 返回一个 Promise 对象
|
|
||||||
*/
|
|
||||||
export function updatePosition(entity) {
|
|
||||||
return axios.post('/recruit/position/edit', entity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 删除职位
|
|
||||||
* @param {Object} entity - 职位实体类对象,需包含 id
|
|
||||||
* @returns {Promise} - 返回一个 Promise 对象
|
|
||||||
*/
|
|
||||||
export function deletePosition(entity) {
|
|
||||||
return axios.post('/recruit/position/del', entity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 投递简历给职位
|
|
||||||
* @param {Object} entity - 简历实体类对象
|
|
||||||
* @returns {Promise} - 返回一个 Promise 对象
|
|
||||||
*/
|
|
||||||
export function addDelivery(entity) {
|
|
||||||
return axios.post('/recruit/resume/add_delivery', entity)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据岗位id去查询该岗位下面的简历
|
|
||||||
* @param {String} positionId - 岗位的id
|
|
||||||
* @returns {Promise} - 返回一个 Promise 对象
|
|
||||||
*/
|
|
||||||
export function getResumesByPositionId(positionId) {
|
|
||||||
return axios.get(`/recruit/resume/getResumesByPositionId?positionId=${positionId}`)
|
|
||||||
}
|
|
@ -1,117 +0,0 @@
|
|||||||
<template>
|
|
||||||
<c-table :option="option">
|
|
||||||
<template #menuLeft="{ record }">
|
|
||||||
<!-- 传递 record.id 给 handleClick 方法 -->
|
|
||||||
<button class="delivery-button" @click="handleClick(record.id)">简历</button>
|
|
||||||
</template>
|
|
||||||
</c-table>
|
|
||||||
<a-modal v-model:visible="visible" @ok="handleOk" @cancel="handleCancel" fullscreen>
|
|
||||||
<template #title> 简历审核 </template>
|
|
||||||
<a-table :data-source="resumes" :columns="columns" bordered>
|
|
||||||
<template #status="{ record }">
|
|
||||||
<a-select v-model="record.status" :disabled="!record.isAuditing" placeholder="请选择状态">
|
|
||||||
<a-option value="待审核">待审核</a-option>
|
|
||||||
<a-option value="审核通过">审核通过</a-option>
|
|
||||||
<a-option value="审核未通过">审核未通过</a-option>
|
|
||||||
</a-select>
|
|
||||||
</template>
|
|
||||||
<template #action="{ record }">
|
|
||||||
<a-button @click="handleAudit(record)">
|
|
||||||
{{ record.isAuditing ? '保存审核结果' : '审核' }}
|
|
||||||
</a-button>
|
|
||||||
</template>
|
|
||||||
</a-table>
|
|
||||||
</a-modal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref } from 'vue'
|
|
||||||
import option from './option'
|
|
||||||
// 引入封装的接口方法
|
|
||||||
import { getResumesByPositionId } from '@/api/upms/position'
|
|
||||||
|
|
||||||
// 控制模态框显示隐藏的逻辑
|
|
||||||
const visible = ref(false)
|
|
||||||
|
|
||||||
// 初始写死的简历数据
|
|
||||||
const resumes = ref([])
|
|
||||||
|
|
||||||
// 表格列配置
|
|
||||||
const columns = [
|
|
||||||
{
|
|
||||||
title: '姓名',
|
|
||||||
dataIndex: 'id',
|
|
||||||
key: 'id'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '简历来源',
|
|
||||||
dataIndex: 'status',
|
|
||||||
key: 'status',
|
|
||||||
slots: { customRender: 'status' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '附件',
|
|
||||||
key: 'action',
|
|
||||||
slots: { customRender: 'action' }
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '审核状态'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: '操作'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
|
|
||||||
// 查询岗位下的简历,接收 id 作为参数
|
|
||||||
const getResumeById = async (id: string) => {
|
|
||||||
try {
|
|
||||||
console.log('接收到的岗位id', id)
|
|
||||||
const response = await getResumesByPositionId(id)
|
|
||||||
console.log('岗位下的简历查询结果:', response)
|
|
||||||
// 检查 response 是否为数组
|
|
||||||
if (Array.isArray(response)) {
|
|
||||||
resumes.value = response.map((item) => ({
|
|
||||||
...item,
|
|
||||||
isAuditing: false,
|
|
||||||
status: item.status || '待审核' // 确保有状态字段,默认待审核
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('岗位下的简历查询失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 接收 id 作为参数
|
|
||||||
const handleClick = async (id: string) => {
|
|
||||||
visible.value = true
|
|
||||||
// 调用 getResumeById 方法并传递 id
|
|
||||||
await getResumeById(id)
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleOk = () => {
|
|
||||||
visible.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleCancel = () => {
|
|
||||||
visible.value = false
|
|
||||||
}
|
|
||||||
|
|
||||||
// 审核按钮点击事件
|
|
||||||
const handleAudit = (record) => {
|
|
||||||
if (record.isAuditing) {
|
|
||||||
console.log(`简历 ${record.id} 已审核,状态为:${record.status}`)
|
|
||||||
|
|
||||||
record.isAuditing = false
|
|
||||||
} else {
|
|
||||||
record.isAuditing = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.arco-modal-fullscreen {
|
|
||||||
top: 20%;
|
|
||||||
width: 60%;
|
|
||||||
height: 60%;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,55 +0,0 @@
|
|||||||
import { useUserStore } from '@/store/user'
|
|
||||||
import { TableOption } from '@/types'
|
|
||||||
import { onBeforeRemove } from '@/utils/upload-event'
|
|
||||||
|
|
||||||
const userStore = useUserStore()
|
|
||||||
const option: TableOption = {
|
|
||||||
api: {
|
|
||||||
base: '/recruit/position',
|
|
||||||
page: '/page/res'
|
|
||||||
},
|
|
||||||
permissionPrefix: 'recruit_position_',
|
|
||||||
permissions: userStore.permissions,
|
|
||||||
columns: [
|
|
||||||
{
|
|
||||||
name: '职位',
|
|
||||||
prop: 'jobName',
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '职位不能为空' },
|
|
||||||
{ minLength: 2, message: '职位不少于2个字符' },
|
|
||||||
{ maxLength: 40, message: '不能超过40个字符' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '职位地点',
|
|
||||||
prop: 'positionLocation',
|
|
||||||
type: 'input',
|
|
||||||
rules: [
|
|
||||||
{ required: true, message: '职位地点不能为空' },
|
|
||||||
{ minLength: 2, message: '职位不少于2个字符' },
|
|
||||||
{ maxLength: 60, message: '不能超过60个字符' }
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '企业联系人',
|
|
||||||
prop: 'enterpriseContactPerson',
|
|
||||||
type: 'input',
|
|
||||||
rules: [{ required: true, message: '企业联系人不能为空' }]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '联系人手机号',
|
|
||||||
prop: 'enterprisePhone',
|
|
||||||
type: 'input',
|
|
||||||
rules: [{ required: true, message: '联系人手机号' }]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '附件',
|
|
||||||
prop: 'files',
|
|
||||||
type: 'upload',
|
|
||||||
action: '/sys/file/upload',
|
|
||||||
onBeforeRemove,
|
|
||||||
stringify: true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
export default option
|
|
@ -1,116 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<c-table :option="option">
|
<c-table :option="option"> </c-table>
|
||||||
<template #menuLeft="{ record }">
|
|
||||||
<button class="delivery-button" @click="() => handleClick(record)">投递</button>
|
|
||||||
</template>
|
|
||||||
</c-table>
|
|
||||||
<a-modal
|
|
||||||
v-model:visible="visible"
|
|
||||||
title="请选择投递的职位"
|
|
||||||
@cancel="handleCancel"
|
|
||||||
@before-ok="handleBeforeOk"
|
|
||||||
>
|
|
||||||
<a-form :model="form">
|
|
||||||
<a-form-item field="post" label="职位">
|
|
||||||
<a-select v-model="form.post">
|
|
||||||
<!-- 动态渲染职位选项 -->
|
|
||||||
<a-option v-for="job in jobList" :key="job.id" :value="job.id">{{
|
|
||||||
job.jobName
|
|
||||||
}}</a-option>
|
|
||||||
</a-select>
|
|
||||||
</a-form-item>
|
|
||||||
</a-form>
|
|
||||||
</a-modal>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref } from 'vue'
|
|
||||||
import { Message } from '@arco-design/web-vue'
|
|
||||||
import option from './option'
|
import option from './option'
|
||||||
import { addDelivery, getPositionList } from '@/api/upms/position'
|
|
||||||
|
|
||||||
// 模态框显示状态
|
|
||||||
const visible = ref(false)
|
|
||||||
// 表单数据
|
|
||||||
const form = reactive({
|
|
||||||
name: '',
|
|
||||||
post: ''
|
|
||||||
})
|
|
||||||
// 存储职位列表
|
|
||||||
const jobList = ref([])
|
|
||||||
|
|
||||||
// 存储当前选中行的记录
|
|
||||||
const currentRecord = ref(null)
|
|
||||||
|
|
||||||
// 点击投递按钮
|
|
||||||
const handleClick = async (record) => {
|
|
||||||
// 保存当前选中行的记录
|
|
||||||
currentRecord.value = record
|
|
||||||
// 调用获取职位的方法
|
|
||||||
await getDeliverys()
|
|
||||||
visible.value = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取职位投递
|
|
||||||
const getDeliverys = async () => {
|
|
||||||
try {
|
|
||||||
// 根据当前选中行的记录构建请求体
|
|
||||||
const entity2 = {
|
|
||||||
fullName: '',
|
|
||||||
resumeSource: '',
|
|
||||||
positionId: ''
|
|
||||||
}
|
|
||||||
const response = await getPositionList(entity2)
|
|
||||||
console.log('职位投递获取结果:', response)
|
|
||||||
// 将获取到的职位数据赋值给 jobList
|
|
||||||
jobList.value = response
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取职位失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 点击确定后进行一个投递操作
|
|
||||||
const addDeliverys = async () => {
|
|
||||||
try {
|
|
||||||
// 根据当前选中行的记录和表单选择的职位构建请求体
|
|
||||||
// console.log(`获取到的当前行是${JSON.stringify(currentRecord.value)}`)
|
|
||||||
const entity = {
|
|
||||||
fullName: currentRecord.value?.fullName || '',
|
|
||||||
resumeSource: currentRecord.value?.resumeSource || '',
|
|
||||||
positionId: form.post,
|
|
||||||
id: currentRecord.value.id
|
|
||||||
}
|
|
||||||
const response = await addDelivery(entity)
|
|
||||||
// 如果成功,基本什么都不会返回,结果undefined
|
|
||||||
if (response === undefined) {
|
|
||||||
// 弹出消息提示
|
|
||||||
Message.success('投递成功')
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('投递失败:', error)
|
|
||||||
Message.error('投递失败,请稍后重试')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 模态框确认前的处理函数,确认按钮
|
|
||||||
const handleBeforeOk = async (done) => {
|
|
||||||
console.log(form)
|
|
||||||
// 调用 addDeliverys 方法
|
|
||||||
await addDeliverys()
|
|
||||||
window.setTimeout(() => {
|
|
||||||
done()
|
|
||||||
// 窗口关闭时间,单位毫秒
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
|
|
||||||
// 模态框取消按钮处理函数
|
|
||||||
const handleCancel = () => {
|
|
||||||
visible.value = false
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.arco-modal-footer {
|
|
||||||
text-align: center !important;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
@ -20,6 +20,14 @@ const option: TableOption = {
|
|||||||
{ maxLength: 20, message: '不能超过20个字符' }
|
{ maxLength: 20, message: '不能超过20个字符' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: '附件',
|
||||||
|
prop: 'files',
|
||||||
|
type: 'upload',
|
||||||
|
action: '/sys/file/upload',
|
||||||
|
onBeforeRemove,
|
||||||
|
stringify: true
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: '简历来源',
|
name: '简历来源',
|
||||||
prop: 'resumeSource',
|
prop: 'resumeSource',
|
||||||
@ -29,26 +37,14 @@ const option: TableOption = {
|
|||||||
{
|
{
|
||||||
name: '创建人',
|
name: '创建人',
|
||||||
prop: 'createName',
|
prop: 'createName',
|
||||||
type: 'input',
|
addDisplay: false,
|
||||||
rules: [
|
editDisplay: false
|
||||||
{ required: true, message: '创建人不能为空' },
|
|
||||||
{ minLength: 2, message: '创建人不少于2个字符' },
|
|
||||||
{ maxLength: 20, message: '不能超过20个字符' }
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '创建人手机号',
|
name: '创建人手机号',
|
||||||
prop: 'createPhone',
|
prop: 'createPhone',
|
||||||
type: 'input',
|
addDisplay: false,
|
||||||
rules: [{ required: true, message: '创建人手机号不能为空' }]
|
editDisplay: false
|
||||||
},
|
|
||||||
{
|
|
||||||
name: '附件',
|
|
||||||
prop: 'files',
|
|
||||||
type: 'upload',
|
|
||||||
action: '/sys/file/upload',
|
|
||||||
onBeforeRemove,
|
|
||||||
stringify: true
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user