急聘功能开发
Some checks failed
Node CI / build (14.x, macOS-latest) (push) Has been cancelled
Node CI / build (14.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (14.x, windows-latest) (push) Has been cancelled
Node CI / build (16.x, macOS-latest) (push) Has been cancelled
Node CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node CI / build (16.x, windows-latest) (push) Has been cancelled
CodeQL / Analyze (javascript) (push) Has been cancelled
coverage CI / build (push) Has been cancelled
Node pnpm CI / build (16.x, macOS-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, ubuntu-latest) (push) Has been cancelled
Node pnpm CI / build (16.x, windows-latest) (push) Has been cancelled

This commit is contained in:
冯辉
2026-06-26 23:54:33 +08:00
parent aae3be810e
commit f248d9a409
5 changed files with 50 additions and 3 deletions

View File

@@ -714,7 +714,12 @@ const JobListPage: React.FC = () => {
loading={loading}
>
<div className="job-card-header">
<Title level={4} className="job-title">{job.jobTitle || job.title}</Title>
<Title level={4} className="job-title">
{job.isUrgent === 1 && (
<Tag color="red" style={{ marginRight: 8, fontSize: 12, lineHeight: '20px' }}></Tag>
)}
{job.jobTitle || job.title}
</Title>
<Text className="job-salary">
{job.minSalary && job.maxSalary ? formatSalary(job.minSalary, job.maxSalary) : (job.salary || '面议')}
</Text>
@@ -775,6 +780,9 @@ const JobListPage: React.FC = () => {
<div className="job-detail-header">
<div className="job-header-info">
<Title level={3} className="job-detail-title">
{selectedJob?.isUrgent === 1 && (
<Tag color="red" style={{ marginRight: 8, fontSize: 12, lineHeight: '20px' }}></Tag>
)}
{selectedJob?.jobTitle || selectedJob?.title || '请选择职位'}
</Title>
<Text className="salary-text">

View File

@@ -274,7 +274,12 @@ const JobPortalPage: React.FC = () => {
onClick={() => handleJobClick(job)}
>
<div className="job-header">
<Title level={4} className="job-title">{job.jobTitle}</Title>
<Title level={4} className="job-title">
{job.isUrgent === 1 && (
<Tag color="red" style={{ marginRight: 8, fontSize: 12, lineHeight: '20px' }}></Tag>
)}
{job.jobTitle}
</Title>
<Text className="job-salary">{formatSalary(job.minSalary, job.maxSalary)}</Text>
</div>
<Text className="job-company">{job.companyName}</Text>

View File

@@ -3,11 +3,12 @@ import {
ProForm,
ProFormDigit,
ProFormSelect,
ProFormSwitch,
ProFormText,
ProFormTextArea,
ProDescriptions,
} from '@ant-design/pro-components';
import { Form, Button, Input, TreeSelect } from 'antd';
import { Form, Button, Input, TreeSelect, Switch } from 'antd';
import { PlusOutlined, MinusCircleOutlined } from '@ant-design/icons';
import React, { useEffect, useRef, useState } from 'react';
import { DictValueEnumObj } from '@/components/DictTag';
@@ -117,6 +118,7 @@ const listEdit: React.FC<ListFormProps> = (props) => {
position: item.position,
})),
jobCategory: values.jobCategory,
isUrgent: values.isUrgent ? 1 : 0,
};
if (mode === 'edit' && values.jobId) {
payload.jobId = values.jobId;
@@ -144,6 +146,11 @@ const listEdit: React.FC<ListFormProps> = (props) => {
>
<ProDescriptions.Item dataIndex="jobTitle" label="岗位名称" />
<ProDescriptions.Item dataIndex="companyName" label="招聘公司" />
<ProDescriptions.Item
dataIndex="isUrgent"
label="是否急聘"
valueEnum={{ 0: '否', 1: '是' }}
/>
<ProDescriptions.Item dataIndex="minSalary" label="最低薪资(元/月)" />
<ProDescriptions.Item dataIndex="maxSalary" label="最高薪资(元/月)" />
<ProDescriptions.Item
@@ -325,6 +332,15 @@ const listEdit: React.FC<ListFormProps> = (props) => {
<ProFormText width="md" hidden name="jobId" />
<ProFormText width="md" hidden name="companyName" />
<ProFormText width="md" name="jobTitle" label="岗位名称" placeholder="请输入岗位名称" />
<ProFormSwitch
width="md"
name="isUrgent"
label="是否急聘"
checkedChildren="是"
unCheckedChildren="否"
initialValue={0}
fieldProps={{ defaultChecked: false }}
/>
<ProFormSelect
showSearch
width="md"

View File

@@ -222,6 +222,22 @@ function ManagementList() {
valueType: 'text',
hideInTable:true
},
{
title: '是否急聘',
dataIndex: 'isUrgent',
valueType: 'select',
align: 'center',
valueEnum: { 0: '否', 1: '是' },
render: (text, record) => (
<Switch checked={record.isUrgent === 1} onChange={async () => {
await updateCmsJobList({
jobId: record.jobId,
isUrgent: record.isUrgent === 1 ? 0 : 1,
});
actionRef.current?.reload();
}} />
),
},
{
title: '是否发布',
dataIndex: 'isPublish',

View File

@@ -14,6 +14,7 @@ declare namespace API.ManagementList {
isApply?: number;
isCollection?: number;
isHot?: number;
isUrgent?: number;
jobId?: number;
jobLocation?: string;
jobLocationAreaCode?: string;
@@ -42,6 +43,7 @@ declare namespace API.ManagementList {
isApply?: number;
isCollection?: number;
isHot?: number;
isUrgent?: number;
jobId?: number;
jobLocation?: string;
jobLocationAreaCode?: string;