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,135 +0,0 @@
|
|||||||
<template>
|
|
||||||
<c-table :option="option">
|
|
||||||
<template #menuLeft="{ record }">
|
|
||||||
<button class="delivery-button" @click="handleClick">简历</button>
|
|
||||||
</template>
|
|
||||||
</c-table>
|
|
||||||
<a-modal v-model:visible="visible" @ok="handleOk" @cancel="handleCancel" fullscreen>
|
|
||||||
<template #title> 简历审核 </template>
|
|
||||||
<div>
|
|
||||||
<c-table :option="option"></c-table>
|
|
||||||
</div>
|
|
||||||
</a-modal>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, onMounted } from 'vue'
|
|
||||||
import option from './option'
|
|
||||||
// 引入封装的接口方法
|
|
||||||
import {
|
|
||||||
pageRes,
|
|
||||||
getPositionList,
|
|
||||||
addPosition,
|
|
||||||
updatePosition,
|
|
||||||
deletePosition,
|
|
||||||
getResumesByPositionId
|
|
||||||
} from '@/api/upms/position'
|
|
||||||
|
|
||||||
// 模拟分页对象
|
|
||||||
const page = {
|
|
||||||
current: 1,
|
|
||||||
size: 10
|
|
||||||
}
|
|
||||||
|
|
||||||
// 模拟职位实体类对象,修改和删除是根据id
|
|
||||||
const entity = {
|
|
||||||
id: '165646957334757381',
|
|
||||||
jobName: '测试岗6666',
|
|
||||||
jobContent: '岗位描述166666'
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查询岗位下的id
|
|
||||||
const getResumeById = async () => {
|
|
||||||
try {
|
|
||||||
const response = await getResumesByPositionId(id)
|
|
||||||
console.log('岗位下的简历查询结果:', response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('岗位下的简历查询失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试分页查询,第二个参数的条件不传就是查全部
|
|
||||||
const testPageRes = async () => {
|
|
||||||
try {
|
|
||||||
const response = await pageRes(page, null)
|
|
||||||
console.log('分页查询结果:', response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('分页查询失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试获取职位列表
|
|
||||||
const testGetPositionList = async () => {
|
|
||||||
try {
|
|
||||||
const response = await getPositionList(entity)
|
|
||||||
console.log('获取职位列表结果:', response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取职位列表失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试新增职位
|
|
||||||
const testAddPosition = async () => {
|
|
||||||
try {
|
|
||||||
const response = await addPosition(entity)
|
|
||||||
console.log('新增职位结果:', response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('新增职位失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试修改职位
|
|
||||||
const testUpdatePosition = async () => {
|
|
||||||
try {
|
|
||||||
const response = await updatePosition(entity)
|
|
||||||
console.log('修改职位结果:', response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('修改职位失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 测试删除职位
|
|
||||||
const testDeletePosition = async () => {
|
|
||||||
try {
|
|
||||||
const response = await deletePosition({ id: '53734efd-ef77-11ef-be44-0242c0a81002' }) // id
|
|
||||||
console.log('删除职位结果:', response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('删除职位失败:', error)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 在组件挂载时进行测试
|
|
||||||
onMounted(async () => {
|
|
||||||
// await testPageRes()
|
|
||||||
// await testGetPositionList()
|
|
||||||
// await testAddPosition()
|
|
||||||
// await testUpdatePosition()
|
|
||||||
// await testDeletePosition()
|
|
||||||
})
|
|
||||||
|
|
||||||
const openDialog = () => {
|
|
||||||
// 投递按钮点击事件逻辑
|
|
||||||
console.log('投递按钮被点击')
|
|
||||||
}
|
|
||||||
|
|
||||||
// 新增代码:控制模态框显示隐藏的逻辑
|
|
||||||
const visible = ref(false)
|
|
||||||
|
|
||||||
const handleClick = () => {
|
|
||||||
visible.value = true
|
|
||||||
}
|
|
||||||
const handleOk = () => {
|
|
||||||
visible.value = false
|
|
||||||
}
|
|
||||||
const handleCancel = () => {
|
|
||||||
visible.value = false
|
|
||||||
}
|
|
||||||
</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,110 +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 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)
|
|
||||||
console.log('投递结果:', response.data)
|
|
||||||
} catch (error) {
|
|
||||||
console.error('投递失败:', 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