@@ -23,7 +23,7 @@ export default defineConfig({ | |||
model: {}, | |||
request: {}, | |||
layout: { | |||
title: '菊城人才网', | |||
title: '', | |||
logo: '/images/onlylogo.jpg', | |||
}, | |||
routes: routes, |
@@ -6,18 +6,87 @@ export default [ | |||
component: './Register', | |||
layout: false | |||
}, | |||
// 求职首页 | |||
{ | |||
flatMenu: false, | |||
name: '求职·招聘', | |||
path: '/', | |||
access: 'talent', | |||
routes: [ | |||
{ | |||
path: '/', | |||
redirect: '/talent/home', | |||
}, | |||
{ | |||
name: '求职·招聘', | |||
path: '/talent/home', | |||
component: './Talent/Home', | |||
access: 'talenthome' | |||
}, | |||
{ | |||
name: '搜索·职位·企业', | |||
path: '/talent/search', | |||
component: './Talent/Search', | |||
access: 'talentsearch' | |||
}, | |||
{ | |||
name: '招聘会', | |||
path: '/talent/fair', | |||
component: './Talent/Fair', | |||
access: 'talentfair' | |||
}, | |||
{ | |||
name: '资讯·下载', | |||
path: '/talent/information', | |||
component: './Talent/Information', | |||
access: 'talentinformation' | |||
}, | |||
// { | |||
// name: '下载专区', | |||
// path: '/talent/download', | |||
// component: './Talent/Download', | |||
// access: 'talentdownload' | |||
// }, | |||
{ | |||
name: '关于我们', | |||
path: '/talent/about', | |||
component: './Talent/About', | |||
access: 'talentabout' | |||
}, | |||
{ | |||
path: '/talent/job/detail', | |||
component: './Talent/Detail/Job', | |||
access: 'talentjobdetail' | |||
}, | |||
{ | |||
path: '/talent/company/detail', | |||
component: './Talent/Detail/Company', | |||
access: 'talentCompanydetail' | |||
}, | |||
{ | |||
path: '/talent/resume/detail', | |||
component: './Talent/Detail/Resume', | |||
access: 'talentResumedetail' | |||
}, | |||
{ | |||
path: '/talent/fair/detail', | |||
component: './Talent/Fair/Detail', | |||
access: 'talentfairdetail' | |||
}, | |||
{ | |||
path: '/talent/information/detail', | |||
component: './Talent/Information/Detail', | |||
access: 'talentinformationdetail' | |||
}, | |||
] | |||
}, | |||
// 科创园 | |||
{ | |||
flatMenu: false, | |||
name: '科创园', | |||
path: '/', | |||
path: '/sciencetechnologypark', | |||
access: 'sciencetechnologypark', | |||
routes: [ | |||
{ | |||
path: '/', | |||
redirect: '/sciencetechnologypark/home', | |||
}, | |||
{ | |||
name: '首页', | |||
path: '/sciencetechnologypark/home', | |||
@@ -81,87 +150,13 @@ export default [ | |||
// 合作伙伴 | |||
{ | |||
flatMenu: false, | |||
name: '合作伙伴', | |||
path: '/partner', | |||
component: './Partner/Home', | |||
access: 'partner', | |||
}, | |||
// 求职首页 | |||
{ | |||
flatMenu: false, | |||
name: '求职·招聘', | |||
path: '/', | |||
access: 'talent', | |||
routes: [ | |||
{ | |||
path: '/', | |||
redirect: '/talent/home', | |||
}, | |||
{ | |||
name: '求职·招聘', | |||
path: '/talent/home', | |||
component: './Talent/Home', | |||
access: 'talenthome' | |||
}, | |||
{ | |||
name: '搜索·职位·企业', | |||
path: '/talent/search', | |||
component: './Talent/Search', | |||
access: 'talentsearch' | |||
}, | |||
{ | |||
name: '招聘会', | |||
path: '/talent/fair', | |||
component: './Talent/Fair', | |||
access: 'talentfair' | |||
}, | |||
{ | |||
name: '资讯·下载', | |||
path: '/talent/information', | |||
component: './Talent/Information', | |||
access: 'talentinformation' | |||
}, | |||
// { | |||
// name: '下载专区', | |||
// path: '/talent/download', | |||
// component: './Talent/Download', | |||
// access: 'talentdownload' | |||
// }, | |||
{ | |||
name: '关于我们', | |||
path: '/talent/about', | |||
component: './Talent/About', | |||
access: 'talentabout' | |||
}, | |||
{ | |||
path: '/talent/job/detail', | |||
component: './Talent/Detail/Job', | |||
access: 'talentjobdetail' | |||
}, | |||
{ | |||
path: '/talent/company/detail', | |||
component: './Talent/Detail/Company', | |||
access: 'talentCompanydetail' | |||
}, | |||
{ | |||
path: '/talent/resume/detail', | |||
component: './Talent/Detail/Resume', | |||
access: 'talentResumedetail' | |||
}, | |||
{ | |||
path: '/talent/fair/detail', | |||
component: './Talent/Fair/Detail', | |||
access: 'talentfairdetail' | |||
}, | |||
{ | |||
path: '/talent/information/detail', | |||
component: './Talent/Information/Detail', | |||
access: 'talentinformationdetail' | |||
}, | |||
] | |||
}, | |||
// 求职者管理 | |||
{ |
@@ -8,6 +8,6 @@ | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script src="/umi.e7cc0b41.js"></script> | |||
<script src="/umi.c9ab8c08.js"></script> | |||
</body> | |||
</html> |
@@ -1,6 +1,6 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import type { RequestConfig } from "@umijs/max"; | |||
import { Layout, Modal, Dropdown, Flex, Row, Col, ConfigProvider, Button } from "antd"; | |||
import { Layout, Modal, Dropdown, Image, Flex, Col, ConfigProvider, Button, Space } from "antd"; | |||
import { HomeOutlined, LogoutOutlined, FileTextOutlined } from '@ant-design/icons'; | |||
import { baseUrl } from './constants/index' | |||
import routes from '../config/routes' | |||
@@ -80,6 +80,18 @@ export const layout = () => { | |||
return { | |||
title: '菊城人才网', | |||
logo: '/images/onlylogo.jpg', | |||
headerTitleRender: (logo, title, props) => { | |||
return ( | |||
<> | |||
<a href="/talent/home"> | |||
<Flex align='center' > | |||
{logo} | |||
<div style={{ margin: '0 40px 0 8px', fontSize: 18, color: '#000000' }}>菊城人才网</div> | |||
</Flex> | |||
</a> | |||
</> | |||
); | |||
}, | |||
menuRender: false, | |||
layout: 'top', | |||
token: { | |||
@@ -92,7 +104,7 @@ export const layout = () => { | |||
header: { | |||
colorTextMenuSelected: '#19be6e', | |||
heightLayoutHeader: 90, | |||
}, | |||
}, | |||
onPageChange: (location) => { | |||
@@ -254,20 +266,18 @@ export const layout = () => { | |||
let idx = localStorage.getItem('idx') | |||
if (Number(idx) == 1) { | |||
routes[Number(idx)].flatMenu = true; | |||
routes[3].flatMenu = false; | |||
routes[2].flatMenu = false; | |||
} | |||
if (Number(idx) != 2) { | |||
if (Number(idx) == 2) { | |||
routes[Number(idx)].flatMenu = true; | |||
routes[1].flatMenu = false; | |||
} | |||
if (Number(idx) == 3) { | |||
routes[Number(idx)].flatMenu = true; | |||
routes[1].flatMenu = false; | |||
routes[2].flatMenu = true; | |||
} | |||
} else { | |||
routes[1].flatMenu = false; | |||
routes[2].flatMenu = false; | |||
routes[3].flatMenu = true; | |||
routes[2].flatMenu = true; | |||
} | |||
return [routes[0], routes[1], routes[2], routes[3]] | |||
// return [routes[0], routes[3]] |
@@ -28,6 +28,10 @@ const PartnerNews: React.FC<TitleProps> = ({ id }: any) => { | |||
setList(res.data.articles && res.data.articles.length > 0 ? res.data.articles : []) | |||
setTotal(res.data.total) | |||
}) | |||
} else { | |||
setList([]) | |||
setTotal(0) | |||
} | |||
}, [id]); | |||
@@ -18,15 +18,18 @@ const ScienceTechnologyParkHomeIntroduction: React.FC<TitleProps> = ({ id }: any | |||
const [detail, setDetail] = useState<object | null>(null) | |||
useEffect(() => { | |||
console.log(id) | |||
if (id) { | |||
GetArticleList({ page: 1, pagesize: 10, section_id: id }).then(res => { | |||
if (res.data.articles && res.data.articles.length > 0) { | |||
GetArticleDetail({ id: res.data.articles[0].id }).then(res => { | |||
setDetail(res.data) | |||
}) | |||
} else { | |||
setDetail(null) | |||
} | |||
}) | |||
} else { | |||
setDetail(null) | |||
} | |||
}, [id]); | |||
@@ -46,7 +49,7 @@ const ScienceTechnologyParkHomeIntroduction: React.FC<TitleProps> = ({ id }: any | |||
> | |||
{ | |||
detail && | |||
<div style={{ minHeight: 300, background: '#f2f2f2', borderRadius: 8, padding: 20, lineHeight: 2 }}> | |||
<div style={{ minHeight: 300, background: '#f2f2f2', borderRadius: 8, padding: 20, margin: '20px 0', lineHeight: 2 }}> | |||
<div dangerouslySetInnerHTML={{ __html: he.decode(detail.content) }} /> | |||
</div> | |||
@@ -28,6 +28,9 @@ const PartnerNews: React.FC<TitleProps> = ({ id }: any) => { | |||
setList(res.data.articles && res.data.articles.length > 0 ? res.data.articles : []) | |||
setTotal(res.data.total) | |||
}) | |||
} else { | |||
setList([]) | |||
setTotal(0) | |||
} | |||
}, [id]); | |||
@@ -38,7 +38,7 @@ const ScienceTechnologyParkHomeIntroduction: React.FC = () => { | |||
<Space direction='vertical' size={10} style={{ | |||
width: '100%', | |||
}}> | |||
<TitleIndex title="园区企业" link="/sciencetechnologypark/company"></TitleIndex> | |||
<TitleIndex title="园区企业" link="/sciencetechnologypark/company" hasMore={true}></TitleIndex> | |||
<Row gutter={[16, 16]}> | |||
{ | |||
advertscheduleList && advertscheduleList.length > 0 && advertscheduleList.map((item, index) => ( |
@@ -47,7 +47,7 @@ const HomeNewJob: React.FC = () => { | |||
} | |||
}} | |||
> | |||
<TitleIndex title="合作伙伴" link="/sciencetechnologypark/news"></TitleIndex> | |||
<TitleIndex title="合作伙伴" link="/sciencetechnologypark/news" hasMore={true}></TitleIndex> | |||
<Row gutter={[20, 20]} style={{ marginTop: 10 }}> | |||
{ | |||
@@ -63,13 +63,13 @@ const HomeNewJob: React.FC = () => { | |||
</Space> | |||
</Link> | |||
</Col> | |||
</> | |||
)) | |||
} | |||
{ | |||
!advertscheduleList || advertscheduleList.length == 0 && <Flex justify='center' align='center' style={{ padding: '16px', borderRadius: 8, cursor: 'pointer' }}> | |||
!advertscheduleList || advertscheduleList.length == 0 && <Flex justify='center' align='center' style={{ width: '100%', padding: '16px', borderRadius: 8, cursor: 'pointer' }}> | |||
<EmptyResult description="暂无数据" /> | |||
</Flex> | |||
} |
@@ -1,27 +1,25 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Carousel, Row, Col, Divider, Tag, Card, Avatar, Typography } from 'antd'; | |||
import { SearchOutlined, FireOutlined, MessageOutlined, StarOutlined } from '@ant-design/icons'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Divider, Tag, Card, Avatar, Typography } from 'antd'; | |||
import { SearchOutlined, FireOutlined, MessageOutlined, RightOutlined } from '@ant-design/icons'; | |||
import { useModel, connect, history, Link } from 'umi'; | |||
import { Imageprefix } from '@/constants'; | |||
import { GetAdvertscheduleList } from '@/services/apis/advertschedule'; | |||
import { Imageprefix } from '@/constants'; | |||
const HomeNewJob: React.FC = () => { | |||
const HomeProbation: React.FC = () => { | |||
const [list, setList] = useState<object[]>([]) | |||
const [total, setTotal] = useState<number>(0) | |||
const [page, setPage] = useState<number>(1) | |||
const [pageSize, setPageSize] = useState<number>(12) | |||
const [adposition, setAdposition] = useState({}); | |||
const [adpositionList, setAdpositionList] = useState<any[]>([]); | |||
useEffect(() => { | |||
GetAdvertscheduleList({ pagesize: 20, code: 'RMQYGGT' }).then(res => { | |||
setAdposition(res.data.advertarea) | |||
setAdpositionList(res.data.advertschedules) | |||
setList(res.data.advertschedules) | |||
}) | |||
}, []); | |||
@@ -40,70 +38,46 @@ const HomeNewJob: React.FC = () => { | |||
} | |||
}} | |||
> | |||
<Carousel autoplay arrows dots={false} style={{ background: '#364d79', borderRadius: 8, width: '100%', padding: '30px' }}> | |||
<div style={{ width: '100%' }}> | |||
<Row gutter={[10, 10]}> | |||
{ | |||
adpositionList && adpositionList.length > 0 && adpositionList.map((item: any, index: number) => ( | |||
<> | |||
<Col span={8}> | |||
<Card size="small" | |||
// cover={ | |||
// <Image src={`${Imageprefix}${item.image_url}`} width={adposition.width + 'px'} height={adposition.height + 'px'} preview={false} /> | |||
// } | |||
styles={{ | |||
cover: { | |||
display: 'flex', | |||
justifyContent: 'center', | |||
alignItems: 'center', | |||
paddingTop: '8px', | |||
cursor: 'pointer', | |||
}, | |||
header: { | |||
borderBottom: 'none' | |||
}, | |||
title: { | |||
fontSize: '14px' | |||
}, | |||
}}> | |||
<Card.Meta | |||
avatar={<Avatar src={`${Imageprefix}${item.image_url}`} size={48} shape='square' />} | |||
style={{ marginBottom: 10 }} | |||
title={ | |||
<> | |||
<Link to={{ pathname: `/job/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000', fontSize: '16px' }}> | |||
<Flex > | |||
{item.company_name} | |||
</Flex> | |||
</Link> | |||
</> | |||
} | |||
description={ | |||
<> | |||
<Flex style={{ color: 'gray', fontSize: '12px' }}> | |||
{item.company_nature ? item.company_nature : '性质不限'} | |||
<Divider type="vertical" /> | |||
{item.company_scale ? item.company_scale : '规模不限'} | |||
</Flex> | |||
</>} | |||
/> | |||
<div style={{ minHeight: '120px' }}> | |||
<Typography.Paragraph ellipsis={{ rows: 4, expandable: true, symbol: '详情' }}> | |||
{item.ad_description} | |||
</Typography.Paragraph> | |||
</div> | |||
<Button size='large' block color="primary" variant="filled">21个在招职位</Button> | |||
</Card> | |||
</Col> | |||
</> | |||
)) | |||
} | |||
</Row> | |||
</div> | |||
</Carousel> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>见习基地</Typography.Title> | |||
</Flex> */} | |||
<Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>热门企业</Typography.Title></Divider> | |||
<Row gutter={[10, 10]}> | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<Col span={8}> | |||
<Link to={{ pathname: `/talent/company/detail?id=${item.company_id}` }} target="_blank" style={{ width: '100%' }}> | |||
<Space direction='vertical' size={10} align='center' style={{ width: '100%', paddingBottom: 20, background: '#ffffff', borderRadius: 8 }}> | |||
<Image src={item.image_url ? `${Imageprefix}${item.image_url}` : '/images/logo.jpg'} preview={false} width={'200px'} height={'112px'} style={{ borderRadius: '8px 8px 0 0' }}></Image> | |||
<Typography.Title level={5} style={{ width: '100%', padding: '0 10px' }} | |||
> | |||
{item.company_name} | |||
</Typography.Title> | |||
<Flex justify='flex-end' align='center' style={{ fontSize: 14, color: '#999' }}> | |||
{item.company_nature ? <>{item.company_nature}</> : <>性质不限</>} | |||
{item.industry_text ? <><Divider type='vertical' /> {item.industry_text} </> : <><Divider type='vertical' />行业不限</>} | |||
{item.scale_text ? <><Divider type='vertical' /> {item.scale_text} </> : <><Divider type='vertical' />规模不限</>} | |||
</Flex> | |||
</Space> | |||
</Link> | |||
</Col> | |||
</> | |||
)) | |||
} | |||
</Row> | |||
<Flex justify='center' align='center'> | |||
<Space> | |||
<Link to={{ pathname: '/talent/search' }}> | |||
<Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | |||
</Link> | |||
</Space> | |||
</Flex> | |||
</Space> | |||
</ConfigProvider > | |||
@@ -111,66 +85,5 @@ const HomeNewJob: React.FC = () => { | |||
); | |||
}; | |||
export default HomeNewJob; | |||
{/* <ProList | |||
ghost | |||
grid={{ gutter: 20, column: 2 }} | |||
rowKey="id" | |||
dataSource={list} | |||
request={async (params = {} as Record<string, any>) => | |||
PostJobSearch({ | |||
page: 1, | |||
pagesize: 2, | |||
sort: 'id', | |||
sortby: 'desc', | |||
}).then(res => { | |||
setList(res.data.jobs) | |||
setTotal(res.data.total) | |||
}) | |||
} | |||
showActions="hover" | |||
metas={{ | |||
title: { | |||
dataIndex: 'name' | |||
}, | |||
subTitle: { | |||
}, | |||
actions: { | |||
render: () => [<StarOutlined />] | |||
}, | |||
content: { | |||
render: (text, row) => { | |||
return ( | |||
<> | |||
<Space direction='vertical' style={{ marginBottom: 10 }}> | |||
<Space size={4}> | |||
<Tag> | |||
{row.experience_text ? row.experience_text : '经验不限'} | |||
</Tag> | |||
<Tag> | |||
{row.school_degree_text ? row.school_degree_text : '学历不限'} | |||
</Tag> | |||
<Tag> | |||
{row.profelevel_text ? '职称不限' : '职称不限'} | |||
</Tag> | |||
</Space> | |||
<Space size={10}> | |||
<Avatar src="/images/onlylogo.jpg" style={{ width: 48, height: 48 }} /> | |||
<Space direction='vertical' style={{ height: 48 }}> | |||
<Link to='/'>{row.full_name}</Link> | |||
<div style={{fontSize: 12}}>{row.locations ? row.locations[0].name : '未知地址'}</div> | |||
</Space> | |||
</Space> | |||
</Space> | |||
</> | |||
) | |||
} | |||
} | |||
}} | |||
/> */} | |||
export default HomeProbation; | |||
@@ -1,9 +1,10 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Pagination, Row, Col, Divider, Tag, Card, Avatar, Typography } from 'antd'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Pagination, Row, Col, Divider, Tag, Card, Affix, Typography } from 'antd'; | |||
import { EllipsisOutlined, FireOutlined, LeftOutlined, RightOutlined, StarOutlined } from '@ant-design/icons'; | |||
import { useModel, connect, history, Link } from 'umi'; | |||
import { Imageprefix } from '@/constants'; | |||
import { GetRecruitmentList } from '@/services/apis/fair'; | |||
@@ -39,29 +40,25 @@ const HomeFair: React.FC = () => { | |||
<Typography.Title level={2}>知名企业</Typography.Title> | |||
</Flex> */} | |||
<Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>招聘会</Typography.Title></Divider> | |||
<Row gutter={[10, 10]}> | |||
<Row gutter={[16, 16]}> | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<Col> | |||
<Card size="small" style={{background: '#edfff3'}} | |||
styles={{ | |||
title: { | |||
fontSize: '14px' | |||
}, | |||
}}> | |||
<Card.Meta | |||
title={ | |||
<> | |||
<Link to={{ pathname: `/talent/fair/detail?keyword=${item.title}` }} target="_blank" style={{ color: '#000000', fontSize: '16px' }}> | |||
<Flex justify='center' align='center'> | |||
{item.title} | |||
</Flex> | |||
</Link> | |||
</> | |||
} | |||
/> | |||
</Card> | |||
<Col span={8}> | |||
<Link to={{ pathname: `/talent/fair/detail?keyword=${item.title}` }} target="_blank" style={{ width: '100%' }}> | |||
<Space direction='vertical' size={10} align='center' style={{ width: '100%', background: '#ffffff', borderRadius: 8 }}> | |||
<Image src={item.photo ? `${Imageprefix}${item.photo}` : '/images/bg.jpg'} preview={false} width={'100%'} height={'210px'} style={{ borderRadius: '8px 8px 0 0' }}></Image> | |||
<Affix style={{ position: 'absolute', top: 10, right: 0 }}> | |||
<Tag color="#19be6e">{item.open_date}</Tag> | |||
</Affix> | |||
<Typography.Title level={5} style={{ width: '100%', padding: '0 10px' }} | |||
> | |||
{item.title} | |||
</Typography.Title> | |||
</Space> | |||
</Link> | |||
</Col> | |||
</> | |||
)) | |||
@@ -69,7 +66,7 @@ const HomeFair: React.FC = () => { | |||
</Row> | |||
<Flex justify='center' align='center'> | |||
<Space> | |||
<Link to={{ pathname: '/talent/search' }}> | |||
<Link to={{ pathname: '/talent/fair' }}> | |||
<Button icon={<RightOutlined />} iconPosition='end'>更多招聘会</Button> | |||
</Link> | |||
</Space> |
@@ -4,8 +4,9 @@ import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Pagination, Row, Col, Divider, Tag, Card, Avatar, Typography } from 'antd'; | |||
import { EllipsisOutlined, FireOutlined, LeftOutlined, RightOutlined, StarOutlined } from '@ant-design/icons'; | |||
import { useModel, connect, history, Link } from 'umi'; | |||
import { GetCompanyFamousList } from '@/services/apis/company'; | |||
import { Imageprefix } from '@/constants'; | |||
import { GetCompanyFamousList } from '@/services/apis/company'; | |||
const HomeFamous: React.FC = () => { | |||
const [list, setList] = useState<object[]>([]) | |||
@@ -14,7 +15,7 @@ const HomeFamous: React.FC = () => { | |||
const [pageSize, setPageSize] = useState<number>(12) | |||
useEffect(() => { | |||
GetCompanyFamousList({ page: 1, pagesize: 12 }).then(res => { | |||
GetCompanyFamousList({ page: 1, pagesize: 9 }).then(res => { | |||
setList(res.data.list) | |||
}) | |||
}, []); | |||
@@ -42,25 +43,22 @@ const HomeFamous: React.FC = () => { | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<Col> | |||
<Card size="small" | |||
styles={{ | |||
title: { | |||
fontSize: '14px' | |||
}, | |||
}}> | |||
<Card.Meta | |||
title={ | |||
<> | |||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000', fontSize: '16px' }}> | |||
<Flex justify='center' align='center'> | |||
{item.full_name} | |||
</Flex> | |||
</Link> | |||
</> | |||
} | |||
/> | |||
</Card> | |||
<Col span={8}> | |||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}> | |||
<Space direction='vertical' size={10} align='center' style={{ width: '100%', paddingBottom: 20, background: '#ffffff', borderRadius: 8 }}> | |||
<Image src={item.photo ? `${Imageprefix}${item.photo}` : '/images/logo.jpg'} preview={false} width={'200px'} height={'112px'} style={{ borderRadius: '8px 8px 0 0' }}></Image> | |||
<Typography.Title level={5} style={{ width: '100%', padding: '0 10px' }} | |||
> | |||
{item.full_name} | |||
</Typography.Title> | |||
<Flex justify='flex-end' align='center' style={{ fontSize: 14, color: '#999' }}> | |||
{item.nature_text ? <>{item.nature_text}</> : <>性质不限</>} | |||
{item.industry_text ? <><Divider type='vertical' /> {item.industry_text} </> : <><Divider type='vertical' />行业不限</>} | |||
{item.scale_text ? <><Divider type='vertical' /> {item.scale_text} </> : <><Divider type='vertical' />规模不限</>} | |||
</Flex> | |||
</Space> | |||
</Link> | |||
</Col> | |||
</> | |||
)) |
@@ -3,11 +3,12 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Pagination, Row, Col, Carousel, Tag, Card, Avatar, Typography } from 'antd'; | |||
import { EllipsisOutlined, FireOutlined, LeftOutlined, RightOutlined, StarOutlined } from '@ant-design/icons'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Pagination, Row, Col, Divider, Tag, Card, Avatar, Typography } from 'antd'; | |||
import { EllipsisOutlined, FireOutlined, EnvironmentOutlined, RightOutlined, StarOutlined } from '@ant-design/icons'; | |||
import { useModel, connect, history, Link } from 'umi'; | |||
import { PostJobSearch } from '@/services/apis/post'; | |||
import CommonJob from '@/components/Common/Job' | |||
const HomeNewJob: React.FC = () => { | |||
const [list, setList] = useState<object[]>([]) | |||
const [total, setTotal] = useState<number>(0) | |||
@@ -34,51 +35,17 @@ const HomeNewJob: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={30} style={{ width: '1152px' }}> | |||
<Flex justify='center' align='center'> | |||
<Typography.Title level={2}>高薪职位</Typography.Title> | |||
</Flex> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>热门职位</Typography.Title> | |||
</Flex> */} | |||
{/* <Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>热门职位</Typography.Title></Divider> */} | |||
<Row gutter={[10, 10]}> | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<Col span={12}> | |||
<Card size='small' | |||
title={ | |||
<> | |||
<Link to={{ pathname: `/talent/job/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000', fontSize: 16, marginRight: 10 }}> | |||
{item.name} | |||
</Link> | |||
{item.urgent === 1 && <Tag icon={<FireOutlined />} bordered={false} color="#f50">急招</Tag>} | |||
</> | |||
} | |||
extra={<StarOutlined style={{ fontSize: '24px' }} />} | |||
styles={{ | |||
header: { | |||
padding: '8px 16px ', | |||
borderBottom: 'none' | |||
}, | |||
title: { | |||
fontSize: '14px' | |||
}, | |||
}}> | |||
<Space size={16} direction='vertical'> | |||
<Space size={0}> | |||
<Tag>{item.experience_text ? item.experience_text : '经验不限'}</Tag> | |||
<Tag> {item.school_degree_text ? item.school_degree_text : '学历不限'}</Tag> | |||
<Tag> {item.profelevel_text ? item.profelevel_text : '职称不限'}</Tag> | |||
</Space> | |||
<Space size={16}> | |||
<Avatar src="/images/onlylogo.jpg" size={36} /> | |||
<Space direction='vertical' size={0}> | |||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000', fontSize: '12px' }}> | |||
{item.full_name} | |||
</Link> | |||
<div style={{ fontSize: '12px' }}>{item.locations ? item.locations[0].name : '未知地址'}</div> | |||
</Space> | |||
</Space> | |||
</Space> | |||
</Card> | |||
<Col span={24}> | |||
<CommonJob item={item}></CommonJob> | |||
</Col> | |||
</> | |||
)) | |||
@@ -100,64 +67,3 @@ const HomeNewJob: React.FC = () => { | |||
export default HomeNewJob; | |||
{/* <ProList | |||
ghost | |||
grid={{ gutter: 20, column: 2 }} | |||
rowKey="id" | |||
dataSource={list} | |||
request={async (params = {} as Record<string, any>) => | |||
PostJobSearch({ | |||
page: 1, | |||
pagesize: 2, | |||
sort: 'id', | |||
sortby: 'desc', | |||
}).then(res => { | |||
setList(res.data.jobs) | |||
setTotal(res.data.total) | |||
}) | |||
} | |||
showActions="hover" | |||
metas={{ | |||
title: { | |||
dataIndex: 'name' | |||
}, | |||
subTitle: { | |||
}, | |||
actions: { | |||
render: () => [<StarOutlined />] | |||
}, | |||
content: { | |||
render: (text, row) => { | |||
return ( | |||
<> | |||
<Space direction='vertical' style={{ marginBottom: 10 }}> | |||
<Space size={4}> | |||
<Tag> | |||
{row.experience_text ? row.experience_text : '经验不限'} | |||
</Tag> | |||
<Tag> | |||
{row.school_degree_text ? row.school_degree_text : '学历不限'} | |||
</Tag> | |||
<Tag> | |||
{row.profelevel_text ? '职称不限' : '职称不限'} | |||
</Tag> | |||
</Space> | |||
<Space size={10}> | |||
<Avatar src="/images/onlylogo.jpg" style={{ width: 48, height: 48 }} /> | |||
<Space direction='vertical' style={{ height: 48 }}> | |||
<Link to='/'>{row.full_name}</Link> | |||
<div style={{fontSize: 12}}>{row.locations ? row.locations[0].name : '未知地址'}</div> | |||
</Space> | |||
</Space> | |||
</Space> | |||
</> | |||
) | |||
} | |||
} | |||
}} | |||
/> */} |
@@ -39,7 +39,7 @@ const HomeNewJob: React.FC = () => { | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>热门职位</Typography.Title> | |||
</Flex> */} | |||
<Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>热门职位</Typography.Title></Divider> | |||
{/* <Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>热门职位</Typography.Title></Divider> */} | |||
<Row gutter={[10, 10]}> | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( |
@@ -46,28 +46,25 @@ const HomeProbation: React.FC = () => { | |||
<Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>见习基地</Typography.Title></Divider> | |||
<Row gutter={[10, 10]}> | |||
{ | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<Col> | |||
<Card size="small" | |||
styles={{ | |||
title: { | |||
fontSize: '14px' | |||
}, | |||
}}> | |||
<Card.Meta | |||
title={ | |||
<> | |||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000', fontSize: '16px' }}> | |||
<Flex justify='center' align='center'> | |||
{item.full_name} | |||
</Flex> | |||
</Link> | |||
</> | |||
} | |||
/> | |||
</Card> | |||
<Col span={8}> | |||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}> | |||
<Space direction='vertical' size={10} align='center' style={{ width: '100%', paddingBottom: 20, background: '#ffffff', borderRadius: 8 }}> | |||
<Image src={item.photo ? `${Imageprefix}${item.photo}` : '/images/logo.jpg'} preview={false} width={'200px'} height={'112px'} style={{ borderRadius: '8px 8px 0 0' }}></Image> | |||
<Typography.Title level={5} style={{ width: '100%', padding: '0 10px' }} | |||
> | |||
{item.full_name} | |||
</Typography.Title> | |||
<Flex justify='flex-end' align='center' style={{ fontSize: 14, color: '#999' }}> | |||
{item.nature_text ? <>{item.nature_text}</> : <>性质不限</>} | |||
{item.industry_text ? <><Divider type='vertical' /> {item.industry_text} </> : <><Divider type='vertical' />行业不限</>} | |||
{item.scale_text ? <><Divider type='vertical' /> {item.scale_text} </> : <><Divider type='vertical' />规模不限</>} | |||
</Flex> | |||
</Space> | |||
</Link> | |||
</Col> | |||
</> | |||
)) |
@@ -39,7 +39,7 @@ const HomeNewJob: React.FC = () => { | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>急招职位</Typography.Title> | |||
</Flex> */} | |||
<Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>急招职位</Typography.Title></Divider> | |||
{/* <Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>急招职位</Typography.Title></Divider> */} | |||
<Row gutter={[10, 10]}> | |||
{ |
@@ -1,9 +1,10 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import type { BadgeProps, CalendarProps } from 'antd'; | |||
import { ConfigProvider, Button, Flex, Card, Space, Tabs, Calendar, Row, Col, Descriptions, Statistic, Divider, Avatar, Anchor } from 'antd'; | |||
import { ConfigProvider, Button, Flex, Card, Space, Tabs, Calendar, Row, Col, Descriptions, Statistic, Divider, Modal, Anchor } from 'antd'; | |||
import { SearchOutlined, LikeOutlined, ArrowDownOutlined, CameraOutlined } from '@ant-design/icons'; | |||
import { useModel, connect, history, Link } from 'umi'; | |||
import { findItemById } from '@/utils/dataHelper' | |||
import { GetCompanyDetailInfo, GetCompanyProfile, GetCompanyResumeList, GetCompanyInterviewList, GetCompanyTalentPoolList } from '@/services/apis/company' | |||
import { GetCompanyJobList } from '@/services/apis/post'; | |||
@@ -11,7 +12,7 @@ import { GetCompanyJobList } from '@/services/apis/post'; | |||
import ManageCompanyResumeRecomment from '@/components/Manage/Company/Resume/Recomment' | |||
const HomePage: React.FC = () => { | |||
const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
const [detail, setDetail] = useState({}) | |||
const [detail1, setDetail1] = useState({}) | |||
const [companyJobTotal, setCompanyJobTotal] = useState<number>(0); | |||
@@ -44,6 +45,45 @@ const HomePage: React.FC = () => { | |||
}) | |||
}, []) | |||
useEffect(() => { | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2027, type: 'setIndustryPostList' } }) | |||
}, [dispatch]) | |||
useEffect(() => { | |||
if (dictModel.industryPostList.length > 0 && detail) { | |||
if (detail) { | |||
let allFound = true; // 假设所有 id 都找到了 | |||
let result = findItemById(dictModel.industryPostList, detail.industry); | |||
if(result) { | |||
result = findItemById(dictModel.industryPostList, 11133); | |||
} | |||
if (!result) { | |||
allFound = false; // 找到一个未匹配的 id | |||
} | |||
console.log(allFound) | |||
if (!allFound) { | |||
Modal.confirm({ | |||
title: '更新提示', | |||
content: '行业职位类目已更新,请前往使用到行业职位类目的地方更新资料', | |||
onOk() { | |||
}, | |||
onCancel() { | |||
console.log('Cancel'); | |||
}, | |||
okText: '我知道了', | |||
cancelText: '取消', | |||
centered: true | |||
}); | |||
} | |||
} | |||
} | |||
}, [dictModel.industryPostList, detail]) | |||
return ( | |||
<> | |||
@@ -182,5 +222,7 @@ const HomePage: React.FC = () => { | |||
); | |||
}; | |||
export default HomePage; | |||
export default connect(({ dictModel }: any) => ({ | |||
dictModel | |||
}))(HomePage); | |||
@@ -1,8 +1,10 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import { Link } from '@umijs/max'; | |||
import { Link, history, connect } from '@umijs/max'; | |||
import { HomeOutlined, FormOutlined, CameraOutlined } from '@ant-design/icons' | |||
import { Space, Tabs, Button, Avatar, Row, Col, Progress, Flex, Card, Switch, Statistic, ConfigProvider } from 'antd'; | |||
import { Space, Tabs, Button, Avatar, Row, Col, Modal, Flex, Card, Switch, Statistic, ConfigProvider } from 'antd'; | |||
import { Imageprefix } from '@/constants/index' | |||
import { findItemById } from '@/utils/dataHelper' | |||
import { GetJobseekerDetail, PostJobapplicantUpdate } from '@/services/apis/resume' | |||
@@ -17,20 +19,63 @@ import ManageJobseekerHomeViewhistory from '@/components/Manage/Jobseeker/Home/V | |||
import EmptyResult from '@/components/Common/EmptyResult' | |||
const ManegeJobseekerHome: React.FC = () => { | |||
const ManegeJobseekerHome: React.FC = ({ dispatch, dictModel }: any) => { | |||
const [detail, setDetail] = useState<object | null>(null); | |||
const [favoriteTotal, setFavoriteTotal] = useState<number>(0); | |||
const [applicationTotal, setApplicationTotal] = useState<number>(0); | |||
const [interviewTotal, setInterviewTotal] = useState<number>(0); | |||
const [viewhistoryTotal, setViewhistoryTotal] = useState<number>(0); | |||
useEffect(() => { | |||
GetJobseekerDetail({ customer_id: localStorage.getItem('customerid') }).then((res: any) => { | |||
setDetail(res.data) | |||
}) | |||
setDetail(res.data); | |||
}); | |||
}, []) | |||
useEffect(() => { | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2027, type: 'setIndustryPostList' } }) | |||
}, [dispatch]) | |||
useEffect(() => { | |||
if (dictModel.industryPostList.length > 0 && detail) { | |||
if (detail.desire_industrys && detail.desire_industrys.length > 0) { | |||
let allFound = true; // 假设所有 id 都找到了 | |||
for (const item of detail.desire_industrys) { | |||
console.log('industryPostList:', dictModel.industryPostList); | |||
console.log('industry:', item.industry); | |||
const result = findItemById(dictModel.industryPostList, item.industry); | |||
console.log('result:', result); | |||
console.log('typeof result:', typeof result); | |||
if (!result) { | |||
allFound = false; // 找到一个未匹配的 id | |||
break; // 找到第一个不匹配的 id 后退出循环 | |||
} | |||
} | |||
console.log(allFound) | |||
if (!allFound) { | |||
Modal.confirm({ | |||
title: '更新提示', | |||
content: '行业职位类目已更新,请前往使用到行业职位类目的地方更新资料,提升求职率', | |||
onOk() { | |||
history.push('/manage/jobseeker/resume'); | |||
}, | |||
onCancel() { | |||
console.log('Cancel'); | |||
}, | |||
okText: '更新', | |||
cancelText: '取消', | |||
centered: true | |||
}); | |||
} | |||
} | |||
} | |||
}, [dictModel.industryPostList, detail]) | |||
useEffect(() => { | |||
GetJobseekListapplication({ page: 1, pagesize: 10 }).then((res: any) => { | |||
getApplicationTotal(res.data.total ? res.data.total : 0) | |||
@@ -72,7 +117,7 @@ const ManegeJobseekerHome: React.FC = () => { | |||
<Space direction='vertical' size={30} style={{ minHeight: 800 }}> | |||
{/* 头部 */} | |||
<Space direction='vertical' size={20} style={{ width: '100%', backgroundColor: '#ffffff', borderRadius: 8, padding: 20 }}> | |||
{!detail && <EmptyResult description={<Link to="/manage/jobseeker/resume" style={{color: '#19be6e'}}>前往完善简历</Link>}></EmptyResult>} | |||
{!detail && <EmptyResult description={<Link to="/manage/jobseeker/resume" style={{ color: '#19be6e' }}>前往完善简历</Link>}></EmptyResult>} | |||
{ | |||
detail && <> | |||
<Flex justify="center" align='flex-end'> | |||
@@ -83,9 +128,17 @@ const ManegeJobseekerHome: React.FC = () => { | |||
</Flex> | |||
<Flex justify="center" align="center"> | |||
<Space size={20}> | |||
<Space><HomeOutlined />{detail.age}岁</Space> | |||
<Space><HomeOutlined />{detail.work_experience_txt}</Space> | |||
<Space><HomeOutlined />{detail.desire_positions && detail.desire_positions.length > 0 && detail.desire_positions[0].level2_txt}</Space> | |||
{ | |||
detail.age && <><Space><HomeOutlined />{detail.age}岁</Space></> | |||
} | |||
{ | |||
detail.work_experience_txt && <> <Space><HomeOutlined />{detail.work_experience_txt}</Space></> | |||
} | |||
{ | |||
detail.desire_positions && detail.desire_positions.length > 0 && <> | |||
<Space><HomeOutlined />{detail.desire_positions && detail.desire_positions.length > 0 && detail.desire_positions[0].level2_txt} | |||
</Space></> | |||
} | |||
</Space> | |||
</Flex> | |||
</> | |||
@@ -136,12 +189,12 @@ const ManegeJobseekerHome: React.FC = () => { | |||
<h3>简历是否隐藏</h3> | |||
<Switch checkedChildren="开启" unCheckedChildren="关闭" onChange={async (checked: boolean) => { | |||
if (checked) { | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), hide_resume: 1 }) | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), hide_resume: 1 }) | |||
GetJobseekerDetail({ customer_id: localStorage.getItem('customerid') }).then((res: any) => { | |||
setDetail(res.data) | |||
}) | |||
} else { | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), hide_resume: 2}) | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), hide_resume: 2 }) | |||
GetJobseekerDetail({ customer_id: localStorage.getItem('customerid') }).then((res: any) => { | |||
setDetail(res.data) | |||
}) | |||
@@ -152,7 +205,7 @@ const ManegeJobseekerHome: React.FC = () => { | |||
<h3>简历在家政可见</h3> | |||
<Switch checkedChildren="开启" unCheckedChildren="关闭" onChange={async (checked: boolean) => { | |||
if (checked) { | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), house_keeping_status: 1 }) | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), house_keeping_status: 1 }) | |||
GetJobseekerDetail({ customer_id: localStorage.getItem('customerid') }).then((res: any) => { | |||
setDetail(res.data) | |||
}) | |||
@@ -166,9 +219,9 @@ const ManegeJobseekerHome: React.FC = () => { | |||
</Flex> | |||
<Flex justify='space-between' align="center"> | |||
<h3>接收面试邀请通知</h3> | |||
<Switch checkedChildren="开启" unCheckedChildren="关闭" onChange={async (checked: boolean) => { | |||
<Switch checkedChildren="开启" unCheckedChildren="关闭" onChange={async (checked: boolean) => { | |||
if (checked) { | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), remind_interview: 1 }) | |||
let res = await PostJobapplicantUpdate({ id: detail.id, customer_id: Number(localStorage.getItem('customerid')), remind_interview: 1 }) | |||
GetJobseekerDetail({ customer_id: localStorage.getItem('customerid') }).then((res: any) => { | |||
setDetail(res.data) | |||
}) | |||
@@ -193,4 +246,6 @@ const ManegeJobseekerHome: React.FC = () => { | |||
); | |||
}; | |||
export default ManegeJobseekerHome; | |||
export default connect(({ dictModel }: any) => ({ | |||
dictModel | |||
}))(ManegeJobseekerHome); |
@@ -21,10 +21,10 @@ import { GetAdvertscheduleList } from '@/services/apis/advertschedule'; | |||
const HomePage: React.FC = () => { | |||
const [advertscheduleList, setAdvertscheduleList] = useState<object[]>([]) | |||
const [keyModel, setKeyModel] = useState<object[]>([ | |||
{ title1: '企业', title2: '服务', content: '提供包括政策咨询、资金对接、技术转移和市场拓展在内的全方位企业服务。', icon: <> <HomeOutlined style={{ fontSize: 48, color: '#ffffff' }} /> </> }, | |||
{ title: '产业', title2: '孵化', content: '重点支持电子信息、人工智能、新能源等高新技术产业的发展,推动产业升级。', icon: <> <SyncOutlined style={{ fontSize: 48, color: '#ffffff' }} /> </> }, | |||
{ title: '技术', title2: '支持', content: '为企业提供研发支持和技术解决方案,帮助企业解决技术难题,实现快速发展。', icon: <> <ReadOutlined style={{ fontSize: 48, color: '#ffffff' }} /> </> }, | |||
{ title: '产学研', title2: '合作', content: '构建开放共享的创新平台,促进产学研之间的深度合作,加速科技成果的转化。', icon: <> <TeamOutlined style={{ fontSize: 48, color: '#ffffff' }} /> </> } | |||
{ title1: '企业', title2: '服务', content: '提供包括政策咨询、资金对接、技术转移和市场拓展在内的全方位企业服务。', icon: <> <HomeOutlined style={{ fontSize: 36, color: '#ffffff' }} /> </> }, | |||
{ title: '产业', title2: '孵化', content: '重点支持电子信息、人工智能、新能源等高新技术产业的发展,推动产业升级。', icon: <> <SyncOutlined style={{ fontSize: 36, color: '#ffffff' }} /> </> }, | |||
{ title: '技术', title2: '支持', content: '为企业提供研发支持和技术解决方案,帮助企业解决技术难题,实现快速发展。', icon: <> <ReadOutlined style={{ fontSize: 36, color: '#ffffff' }} /> </> }, | |||
{ title: '产学研', title2: '合作', content: '构建开放共享的创新平台,促进产学研之间的深度合作,加速科技成果的转化。', icon: <> <TeamOutlined style={{ fontSize: 36, color: '#ffffff' }} /> </> } | |||
]) | |||
useEffect(() => { | |||
@@ -53,7 +53,7 @@ const HomePage: React.FC = () => { | |||
<div style={{ | |||
width: '100%', | |||
position: 'relative', | |||
paddingTop: '56.25%', | |||
paddingTop: '33.33%', | |||
overflow: 'hidden' | |||
}}> | |||
<video src={`${Imageprefix}park/661_1740982607.mp4`} controls style={{ | |||
@@ -62,6 +62,9 @@ const HomePage: React.FC = () => { | |||
left: 0, | |||
width: '100%', | |||
height: '100%', | |||
objectFit: 'cover', | |||
overflowClipMargin: 'content-box', | |||
overflow: 'clip' | |||
}} ></video> | |||
</div> | |||
@@ -74,7 +77,7 @@ const HomePage: React.FC = () => { | |||
<div style={{ | |||
width: '100%', | |||
position: 'relative', | |||
paddingTop: '56.25%', /* 16:9 的比例 */ | |||
paddingTop: '33.33%', | |||
overflow: 'hidden' | |||
}}> | |||
<Link to={{ pathname: item.target_url }} target='_blank'> |
@@ -3,6 +3,7 @@ import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Row, Col, Carousel, Tag, Card, Avatar, Typography, Anchor, List, Result, Divider, Descriptions } from 'antd'; | |||
import { PhoneOutlined, MailOutlined, EnvironmentOutlined, ArrowRightOutlined, FireOutlined, StarOutlined, PayCircleOutlined } from '@ant-design/icons'; | |||
import { useSearchParams, connect, history, Link } from 'umi'; | |||
import { Imageprefix } from '@/constants/index' | |||
import { GetCompanyInfo } from '@/services/apis/company'; | |||
@@ -60,7 +61,7 @@ const HomePage: React.FC = () => { | |||
<Flex justify='space-between' align='center' style={{ padding: 20, borderRadius: 8, background: '#ffffff' }}> | |||
<Space direction='vertical' size={30}> | |||
<Space size={20}> | |||
<Image src={detail.photo ? detail.photo : '/images/onlylogo.jpg'} width={48} height={48}></Image> | |||
<Image src={detail.photo ? `${Imageprefix}${detail.photo}` : '/images/onlylogo.jpg'} width={48} height={48}></Image> | |||
<Space direction='vertical'> | |||
<Typography.Title level={4}>{detail.full_name}</Typography.Title> | |||
<div> 成立日期:{detail.situation.establishment_date}</div> | |||
@@ -112,7 +113,7 @@ const HomePage: React.FC = () => { | |||
<Row gutter={[10, 10]} style={{ width: '100%' }}> | |||
<Col span={24}> | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
list && list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<CommonJob item={item}></CommonJob> | |||
</> |
@@ -1,6 +1,6 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Carousel, Card, List, Tag, Cascader, Tabs, Typography, Anchor, Modal } from 'antd'; | |||
import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Carousel, Card, List, Tag, Typography, Tabs, Segmented, Anchor, Modal } from 'antd'; | |||
import { SearchOutlined, EllipsisOutlined, ArrowRightOutlined, EnvironmentOutlined, CaretUpOutlined, RightOutlined } from '@ant-design/icons'; | |||
import { useModel, connect, history, Link } from 'umi'; | |||
@@ -35,7 +35,7 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
const [positionList, setPositionList] = useState<any[]>([]); | |||
const [loginHeight, setLoginHeight] = useState<number>(432) // 获取登录的高度 | |||
const [keywordName, setKeywordName] = useState<string>(''); | |||
const [positionType, setPositionType] = useState<string>('热门职位') | |||
// 切换登录 | |||
const [type, setType] = useState<string>('jobseeker') | |||
@@ -63,6 +63,10 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
components: { | |||
Button: { | |||
colorText: '#19be6e' | |||
}, | |||
Segmented: { | |||
trackBg: '#f0f0f0', | |||
itemSelectedColor: '#19be6e' | |||
} | |||
} | |||
}} | |||
@@ -70,38 +74,41 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
{/* 固定 */} | |||
<Anchor | |||
offsetTop={87} | |||
style={{ position: 'fixed', bottom: 87, background: '#f5f5f5', paddingRight: 20, borderRadius: 10 }} | |||
style={{ position: 'fixed', bottom: 87, background: '#f5f5f5', paddingRight: 20, borderRadius: 10 , zIndex: 99 }} | |||
items={[ | |||
{ title: '热门职位', key: 1, href: '#newjob' }, | |||
{ title: '急招职位', key: 2, href: '#urgentjob' }, | |||
// { title: '热门企业', key: 3, href: '#company' }, | |||
{ title: '高新职位', key: 4, href: '#highjob' }, | |||
{ title: '知名企业', key: 5, href: '#fomaus' }, | |||
{ title: '校园招聘', key: 6, href: '#campusjob' }, | |||
{ title: '见习基地', key: 7, href: '#probation' }, | |||
{ title: '关于我们', key: 8, href: '#about' }, | |||
{ title: (<><h3>热门职位</h3></>), key: 1, href: '#newjob' }, | |||
{ title:(<><h3>热门企业</h3></>), key: 2, href: '#company' }, | |||
{ title:(<><h3>招聘会</h3></>), key: 3, href: '#fair' }, | |||
{ title:(<><h3>知名企业</h3></>), key: 4, href: '#fomaus' }, | |||
{ title:(<><h3>校园招聘</h3></>), key: 5, href: '#campusjob' }, | |||
{ title:(<><h3>见习基地</h3></>), key: 6, href: '#probation' }, | |||
{ title:(<><h3>关于我们</h3></>), key: 7, href: '#about' }, | |||
]} | |||
/> | |||
<PageContainer header={{ title: ' ' }} style={{ background: '#ffffff' }} | |||
> | |||
<Row gutter={[16, 16]}> | |||
<Col span={18}> | |||
<Col span={localStorage.getItem('token') ? 24 : 18}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
<Space.Compact style={{ width: '100%' }}> | |||
<Input | |||
size='large' | |||
prefix={<SearchOutlined style={{ color: '#19be6e' }} />} | |||
placeholder="请输入关键词" | |||
allowClear | |||
value={keywordName} | |||
onChange={(e) => { | |||
setKeywordName(e.target.value) | |||
}} | |||
/> | |||
<Link to={{ pathname: `/talent/search?keyword=${keywordName}` }}> | |||
<Button size='large' type='primary' style={{ width: 200 }}>搜索</Button> | |||
</Link> | |||
</Space.Compact> | |||
<Flex justify='center' align='center'> | |||
<Space.Compact style={{ width: '100%' }}> | |||
<Input | |||
size='large' | |||
prefix={<SearchOutlined style={{ color: '#19be6e' }} />} | |||
placeholder="请输入关键词" | |||
allowClear | |||
value={keywordName} | |||
onChange={(e) => { | |||
setKeywordName(e.target.value) | |||
}} | |||
/> | |||
<Link to={{ pathname: `/talent/search?keyword=${keywordName}` }}> | |||
<Button size='large' type='primary' style={{ width: 200 }}>搜索</Button> | |||
</Link> | |||
</Space.Compact> | |||
</Flex> | |||
<Flex justify='center' align='center'> | |||
<Space size={30} style={{ width: '70%' }}> | |||
<Link to={{ pathname: `/talent/search?keyword=客服` }} style={{ color: 'gray' }}> | |||
@@ -129,18 +136,24 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
</Flex> | |||
</Space> | |||
</Col> | |||
<Col span={2}> | |||
<Button size='large' type='primary' style={{ width: '100%' }} onClick={() => { | |||
setType('jobseeker') | |||
setOpenPreview(true) | |||
}}>登录</Button> | |||
</Col> | |||
<Col span={4}> | |||
<Button size='large' type='primary' style={{ width: '100%' }} onClick={() => { | |||
setType('company') | |||
setOpenPreview(true) | |||
}}>发布一个职位</Button> | |||
</Col> | |||
{ | |||
!localStorage.getItem('token') && <> | |||
<Col span={2}> | |||
<Button size='large' type='primary' style={{ width: '100%' }} onClick={() => { | |||
setType('jobseeker') | |||
setOpenPreview(true) | |||
}}>登录</Button> | |||
</Col> | |||
<Col span={4}> | |||
<Button size='large' type='primary' style={{ width: '100%' }} onClick={() => { | |||
setType('company') | |||
setOpenPreview(true) | |||
}}>发布一个职位</Button> | |||
</Col> | |||
</> | |||
} | |||
</Row> | |||
</PageContainer> | |||
@@ -168,14 +181,33 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
</Flex> | |||
</div> */} | |||
</Flex> | |||
<Space direction='vertical' size={30} style={{ minHeight: 800}}> | |||
<Flex justify='center' align='center' id="newjob"> | |||
<HomeNewJob></HomeNewJob> | |||
<Space direction='vertical' size={30} style={{ minHeight: 800 }}> | |||
<Flex justify='center' align='center' style={{ padding: '40px 0', width: '100%' }} id='newjob'> | |||
<Flex justify='space-between' align='center' style={{ width: '1152px' }}> | |||
<Space direction='vertical' size='small' style={{ width: '100%' }} > | |||
<Segmented | |||
size='large' | |||
block | |||
value={positionType} | |||
options={['热门职位', '急招职位', '高薪职位']} | |||
onChange={(value) => { | |||
setPositionType(value) | |||
}} | |||
/> | |||
<div style={{ paddingTop: 20 }}> | |||
{positionType == '热门职位' && <><HomeNewJob></HomeNewJob></>} | |||
{positionType == '急招职位' && <><HomeUrgentJob></HomeUrgentJob></>} | |||
{positionType == '高薪职位' && <><HomeHighJob></HomeHighJob></>} | |||
</div> | |||
</Space> | |||
</Flex> | |||
</Flex> | |||
<Flex justify='center' align='center' id='urgentjob'> | |||
<HomeUrgentJob></HomeUrgentJob> | |||
<Flex justify='center' align='center' id='company'> | |||
<HomeCompany></HomeCompany> | |||
</Flex> | |||
<Flex justify='center' align='center' id='highjob'> | |||
<Flex justify='center' align='center' id='fair'> | |||
<TalentHomeFair></TalentHomeFair> | |||
</Flex> | |||
@@ -193,31 +225,10 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
</Space> | |||
{/* <Flex justify='center' align='center' style={{ background: '#364d79', marginTop: 40, padding: '40px 0', width: '100%' }}> | |||
<Flex justify='space-between' align='center' style={{ width: '1152px' }}> | |||
<Space direction='vertical' size='small' style={{ width: '100%' }} id='fomaus'> | |||
<Flex justify='center' align='center'> | |||
<Typography.Title level={1} style={{ color: '#ffffff' }}>热门企业</Typography.Title> | |||
</Flex> | |||
<HomeCompany></HomeCompany> | |||
</Space> | |||
</Flex> | |||
</Flex> */} | |||
{/* <Flex justify='center' align='center' style={{ background: '#f5f5f5', padding: '40px 0', width: '100%' }}> | |||
<Flex justify='space-between' align='center' style={{ width: '1152px' }}> | |||
<Space direction='vertical' size='small' style={{ width: '100%' }} id='fomaus'> | |||
<Flex justify='space-between' align='center'> | |||
<Typography.Title level={2}>知名企业</Typography.Title> | |||
<EllipsisOutlined style={{ color: '#19be6e', fontSize: '24px' }} /> | |||
</Flex> | |||
<HomeFamous></HomeFamous> | |||
</Space> | |||
</Flex> | |||
</Flex> */} | |||
<PageContainer | |||
header={{ title: ' ' }} | |||
> | |||
{/* <Space direction='vertical' size={60} style={{ marginTop: 40 }}> | |||
<div style={{ position: 'relative', width: '100%', height: 480, borderRadius: 8, background: '#00574B', zIndex: '99', }}> | |||
<div style={{ position: 'absolute', top: 0, right: 0, bottom: 0, left: 0, clipPath: 'circle(50% at right bottom)', backgroundImage: `url(${require('../../../../public/images/kcy.png')})`, backgroundSize: '100% 480px' }}> |
@@ -66,4 +66,20 @@ export function findAncestorsHanzi (data: any, nativePlaceTxt: string): any { | |||
const ancestors = findAncestors(data, nativePlaceTxt); | |||
return ancestors; | |||
}; | |||
}; | |||
export function findItemById(arr: any[], id: number): any | false { | |||
for (const item of arr) { | |||
if (item.id === id) { | |||
return true; | |||
} | |||
if (item.children && Array.isArray(item.children)) { | |||
const result = findItemById(item.children, id); | |||
if (result) { | |||
return true; | |||
} | |||
} | |||
} | |||
return false; | |||
} |