投诉功能开发
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
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:
@@ -22,7 +22,8 @@ import {
|
||||
UserOutlined,
|
||||
TrophyOutlined,
|
||||
FireOutlined,
|
||||
StarOutlined
|
||||
StarOutlined,
|
||||
FlagOutlined
|
||||
} from '@ant-design/icons';
|
||||
import { Radar } from '@ant-design/charts';
|
||||
import JobPortalHeader from '@/components/JobPortalHeader';
|
||||
@@ -35,6 +36,7 @@ import { isJobPortalLoggedIn } from '@/utils/jobPortalAuth';
|
||||
import { favoriteJob, unfavoriteJob, applyJob, browseJob, getJobDetail } from '@/services/jobportal/user';
|
||||
import { ensureJobPortalLogin, requireJobPortalUserId } from '@/utils/jobPortalAuth';
|
||||
import { getDictLabel, resolveIndustryLabel } from '@/utils/jobPortalDict';
|
||||
import JobComplaintModal from '@/components/JobComplaintModal';
|
||||
import { getDictValueEnum } from '@/services/system/dict';
|
||||
import { getCmsIndustryTreeList } from '@/services/classify/industry';
|
||||
import type { DictValueEnumObj } from '@/components/DictTag';
|
||||
@@ -190,6 +192,7 @@ const JobDetailPage: React.FC = () => {
|
||||
]);
|
||||
const [scaleEnum, setScaleEnum] = useState<DictValueEnumObj>({});
|
||||
const [industryTree, setIndustryTree] = useState<any[]>([]);
|
||||
const [complaintVisible, setComplaintVisible] = useState(false);
|
||||
|
||||
useEffect(() => {
|
||||
Promise.all([
|
||||
@@ -450,7 +453,7 @@ const JobDetailPage: React.FC = () => {
|
||||
{/* 职位头部信息 */}
|
||||
<Card className="job-header-card">
|
||||
<Row gutter={24}>
|
||||
<Col span={18}>
|
||||
<Col span={16}>
|
||||
<div className="job-title-section">
|
||||
<Space direction="vertical" size={8}>
|
||||
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: '16px', flexWrap: 'wrap' }}>
|
||||
@@ -458,25 +461,6 @@ const JobDetailPage: React.FC = () => {
|
||||
<Title level={2} className="job-title" style={{ marginBottom: 0 }}>{jobDetail.title}</Title>
|
||||
<Text className="job-salary-display">{jobDetail.salary}</Text>
|
||||
</Space>
|
||||
<Button
|
||||
icon={isFavorited ? <HeartFilled /> : <HeartOutlined />}
|
||||
danger={isFavorited}
|
||||
onClick={handleCollect}
|
||||
size="middle"
|
||||
style={{
|
||||
borderRadius: '6px',
|
||||
fontWeight: 500,
|
||||
height: '32px',
|
||||
padding: '0 12px',
|
||||
fontSize: '14px',
|
||||
...(isFavorited ? {} : {
|
||||
borderColor: '#1890ff',
|
||||
color: '#1890ff'
|
||||
})
|
||||
}}
|
||||
>
|
||||
{isFavorited ? '已收藏' : '收藏'}
|
||||
</Button>
|
||||
</div>
|
||||
<Space size={16}>
|
||||
<Text className="job-meta">
|
||||
@@ -497,17 +481,33 @@ const JobDetailPage: React.FC = () => {
|
||||
</Space>
|
||||
</div>
|
||||
</Col>
|
||||
<Col span={6}>
|
||||
<div className="job-actions">
|
||||
<Col span={8}>
|
||||
<div className="job-actions" style={{ display: 'flex', justifyContent: 'space-between', gap: 8 }}>
|
||||
<Button
|
||||
icon={isFavorited ? <HeartFilled /> : <HeartOutlined />}
|
||||
danger={isFavorited}
|
||||
onClick={handleCollect}
|
||||
size="large"
|
||||
style={isFavorited ? {} : { borderColor: '#1890ff', color: '#1890ff' }}
|
||||
>
|
||||
{isFavorited ? '已收藏' : '收藏'}
|
||||
</Button>
|
||||
<Button
|
||||
type="primary"
|
||||
size="large"
|
||||
block
|
||||
disabled={originalJobData?.isApply === 1}
|
||||
onClick={handleApply}
|
||||
>
|
||||
{originalJobData?.isApply === 1 ? '已投递' : '立即申请'}
|
||||
</Button>
|
||||
<Button
|
||||
danger
|
||||
icon={<FlagOutlined />}
|
||||
size="large"
|
||||
onClick={() => setComplaintVisible(true)}
|
||||
>
|
||||
投诉
|
||||
</Button>
|
||||
</div>
|
||||
</Col>
|
||||
</Row>
|
||||
@@ -643,6 +643,13 @@ const JobDetailPage: React.FC = () => {
|
||||
</Col>
|
||||
</Row>
|
||||
</div>
|
||||
|
||||
{/* 岗位投诉弹窗 */}
|
||||
<JobComplaintModal
|
||||
open={complaintVisible}
|
||||
jobId={originalJobData?.jobId || originalJobData?.id || id || ''}
|
||||
onCancel={() => setComplaintVisible(false)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user