</head> | </head> | ||||
<body> | <body> | ||||
<div id="root"></div> | <div id="root"></div> | ||||
<script src="/umi.1b04ba6b.js"></script> | |||||
<script src="/umi.23f5ba2d.js"></script> | |||||
</body> | </body> | ||||
</html> | </html> |
} | } | ||||
const role = localStorage.getItem('role'); | const role = localStorage.getItem('role'); | ||||
console.log(routes) | |||||
switch (role) { | switch (role) { | ||||
case 'personal': | case 'personal': | ||||
routes[4].flatMenu = true; | routes[4].flatMenu = true; | ||||
case 'company': | case 'company': | ||||
routes[5].flatMenu = true; | routes[5].flatMenu = true; | ||||
setInitialState((s) => ({ | setInitialState((s) => ({ | ||||
...s, | ...s, | ||||
permissions: { | permissions: { | ||||
partner: true, | partner: true, | ||||
}, | }, | ||||
})); | })); | ||||
if (localStorage.getItem('idx') != null && localStorage.getItem('idx') != -1) { | |||||
if (localStorage.getItem('idx') != null && localStorage.getItem('idx') != '-1') { | |||||
let idx = localStorage.getItem('idx') | let idx = localStorage.getItem('idx') | ||||
if (Number(idx) == 1) { | if (Number(idx) == 1) { | ||||
routes[Number(idx)].flatMenu = true; | routes[Number(idx)].flatMenu = true; |
import { useState, useEffect, useRef } from 'react'; | |||||
import { ProTable, PageContainer, EditableProTable, ProList } from '@ant-design/pro-components'; | |||||
import type { ActionType, EditableFormInstance } from '@ant-design/pro-components'; | |||||
import { ConfigProvider, Button, Popconfirm, Card, Space, Tabs, Avatar, Tag, Col, Descriptions, Statistic, Divider, Pagination, Anchor } from 'antd'; | |||||
import { SearchOutlined, LikeOutlined, ArrowRightOutlined, StarOutlined } from '@ant-design/icons'; | |||||
import { useModel, connect, history, Link } from 'umi'; | |||||
import { Imageprefix } from '@/constants/index' | |||||
import { GetCompanyRecommentResume } from '@/services/apis/company'; | |||||
interface SearchFilterProps { | |||||
list: any, | |||||
type: string | |||||
} | |||||
const HomePage: React.FC<SearchFilterProps> = ({ list, type }) => { | |||||
const actionRef = useRef<ActionType>(); | |||||
return ( | |||||
<> | |||||
<ConfigProvider | |||||
theme={{ | |||||
token: { | |||||
colorPrimary: '#19be6e', | |||||
}, | |||||
components: { | |||||
Button: { | |||||
colorText: '#19be6e' | |||||
}, | |||||
} | |||||
}} | |||||
> | |||||
<div style={{ minHeight: '800px' }}> | |||||
<ProList | |||||
actionRef={actionRef} | |||||
headerTitle={type} | |||||
rowKey="id" | |||||
dataSource={list} | |||||
showActions="hover" | |||||
metas={{ | |||||
title: { | |||||
render: (text, row) => ( | |||||
<> | |||||
<Link to={{ pathname: `/talent/resume/detail?id=${row.customer_id}` }} style={{ color: '#000000', fontSize: 16, fontWeight: 'bold' }}> | |||||
{row.seekername} | |||||
</Link> | |||||
</> | |||||
) | |||||
}, | |||||
avatar: { | |||||
render: (text, row) => ( | |||||
<Avatar size={48} src={row.photo ? `${Imageprefix}${row.photo}` : '/images/onlylogo.jpg'} /> | |||||
) | |||||
}, | |||||
subTitle: { | |||||
render: (text, row) => { | |||||
return ( | |||||
<Space size={0}> | |||||
{ | |||||
row.age && <><Tag color="#cccccc">{row.age}岁</Tag></> | |||||
} | |||||
{ | |||||
row.gender && row.gender == '男' && <><Tag color="blue">{row.gender}</Tag></> | |||||
} | |||||
{ | |||||
row.gender && row.gender == '女' && <><Tag color="pink">{row.gender}</Tag></> | |||||
} | |||||
{ | |||||
row.education_txt && row.education_txt != 0 && <><Tag color="#19be6e">{row.education_txt}</Tag></> | |||||
} | |||||
{ | |||||
row.work_experience_txt && row.work_experience_txt != 0 && <> <Tag color="#5BD8A6">工作经验:{row.work_experience_txt}年</Tag></> | |||||
} | |||||
</Space> | |||||
); | |||||
}, | |||||
}, | |||||
description: { | |||||
dataIndex: 'introduction' | |||||
}, | |||||
// actions: { | |||||
// render: () => [<StarOutlined />] | |||||
// }, | |||||
}} | |||||
/> | |||||
</div> | |||||
{/* <ProTable | |||||
headerTitle="推荐简历" | |||||
actionRef={actionRef} | |||||
dataSource={list} | |||||
rowKey="id" | |||||
loading={false} | |||||
search={false} | |||||
columns={[ | |||||
{ | |||||
title: '求职者', | |||||
dataIndex: 'content' | |||||
}, | |||||
{ | |||||
title: '放入时间', | |||||
dataIndex: 'content' | |||||
}, | |||||
{ | |||||
title: '操作', | |||||
valueType: 'option', | |||||
render: (text, record, _, action) => [ | |||||
<Popconfirm | |||||
title="是否删除" | |||||
onConfirm={(e) => { | |||||
// PostJobapplicantDelintro({ id: record.id }).then(res => { | |||||
// message.success('删除成功') | |||||
// actionRef.current.reload(); | |||||
// }) | |||||
}} | |||||
okText="删除" | |||||
cancelText="取消" | |||||
> | |||||
<a | |||||
key="delete" | |||||
> | |||||
恢复 | |||||
</a> | |||||
</Popconfirm> | |||||
], | |||||
}, | |||||
]} | |||||
/> */} | |||||
</ConfigProvider > | |||||
</> | |||||
); | |||||
}; | |||||
export default HomePage; | |||||
import { GetCompanyRecommentResume } from '@/services/apis/company'; | import { GetCompanyRecommentResume } from '@/services/apis/company'; | ||||
const HomePage: React.FC = ({list}) => { | |||||
const HomePage: React.FC = () => { | |||||
const actionRef = useRef<ActionType>(); | const actionRef = useRef<ActionType>(); | ||||
// const [list, setList] = useState<object[]>([]) | |||||
// const [page, setPage] = useState<number>(1) | |||||
// const [pageSize, setPageSize] = useState<number>(10) | |||||
// const [total, setTotal] = useState<number>(0) | |||||
const [list, setList] = useState<object[]>([]) | |||||
const [page, setPage] = useState<number>(1) | |||||
const [pageSize, setPageSize] = useState<number>(10) | |||||
const [total, setTotal] = useState<number>(0) | |||||
return ( | return ( | ||||
<> | <> | ||||
headerTitle="推荐简历" | headerTitle="推荐简历" | ||||
rowKey="id" | rowKey="id" | ||||
dataSource={list} | dataSource={list} | ||||
// request={async (params = {} as Record<string, any>) => | |||||
// GetCompanyRecommentResume({ | |||||
// page: page, | |||||
// pagesize: pageSize, | |||||
// sort: 'id', | |||||
// sortby: 'desc', | |||||
// }).then((res: any) => { | |||||
// setList(res.data.list) | |||||
// setTotal(res.data.total) | |||||
// }) | |||||
// } | |||||
// pagination={{ | |||||
// current: page, | |||||
// pageSize: pageSize, | |||||
// total: total, | |||||
// hideOnSinglePage: true, | |||||
// onChange(page, pageSize) { | |||||
// setPage(page) | |||||
// setPageSize(pageSize) | |||||
// }, | |||||
// onShowSizeChange(current, size) { | |||||
// setPage(current) | |||||
// setPageSize(size) | |||||
// } | |||||
// }} | |||||
request={async (params = {} as Record<string, any>) => | |||||
GetCompanyRecommentResume({ | |||||
page: page, | |||||
pagesize: pageSize, | |||||
sort: 'id', | |||||
sortby: 'desc', | |||||
}).then((res: any) => { | |||||
setList(res.data.list) | |||||
setTotal(res.data.total) | |||||
}) | |||||
} | |||||
pagination={{ | |||||
current: page, | |||||
pageSize: pageSize, | |||||
total: total, | |||||
hideOnSinglePage: true, | |||||
align: 'center', | |||||
onChange(page, pageSize) { | |||||
setPage(page) | |||||
setPageSize(pageSize) | |||||
}, | |||||
onShowSizeChange(current, size) { | |||||
setPage(current) | |||||
setPageSize(size) | |||||
} | |||||
}} | |||||
showActions="hover" | showActions="hover" | ||||
metas={{ | metas={{ | ||||
title: { | title: { |
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>校园招聘</Typography.Title> | <Typography.Title level={2}>校园招聘</Typography.Title> | ||||
</Flex> */} | </Flex> */} |
const [list, setList] = useState<object[]>([]) | const [list, setList] = useState<object[]>([]) | ||||
const [total, setTotal] = useState<number>(0) | const [total, setTotal] = useState<number>(0) | ||||
const [page, setPage] = useState<number>(1) | const [page, setPage] = useState<number>(1) | ||||
const [pageSize, setPageSize] = useState<number>(12) | |||||
const [pageSize, setPageSize] = useState<number>(9) | |||||
useEffect(() => { | useEffect(() => { | ||||
GetAdvertscheduleList({ pagesize: 20, code: 'RMQYGGT' }).then(res => { | |||||
GetAdvertscheduleList({ pagesize: 9, code: 'RMQYGGT' }).then(res => { | |||||
setList(res.data.advertschedules) | setList(res.data.advertschedules) | ||||
}) | }) | ||||
}, []); | }, []); | ||||
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>见习基地</Typography.Title> | <Typography.Title level={2}>见习基地</Typography.Title> | ||||
</Flex> */} | </Flex> */} | ||||
</Row> | </Row> | ||||
<Flex justify='center' align='center'> | <Flex justify='center' align='center'> | ||||
<Space> | <Space> | ||||
<Link to={{ pathname: '/talent/search' }}> | |||||
<Link to={{ pathname: '/talent/search/company' }}> | |||||
<Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | <Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | ||||
</Link> | </Link> | ||||
</Space> | </Space> |
const [list, setList] = useState<object[]>([]) | const [list, setList] = useState<object[]>([]) | ||||
const [total, setTotal] = useState<number>(0) | const [total, setTotal] = useState<number>(0) | ||||
const [page, setPage] = useState<number>(1) | const [page, setPage] = useState<number>(1) | ||||
const [pageSize, setPageSize] = useState<number>(12) | |||||
const [pageSize, setPageSize] = useState<number>(6) | |||||
useEffect(() => { | useEffect(() => { | ||||
GetRecruitmentList({ page: 1, pagesize: 12, sortby: 'desc' }).then(res => { | |||||
GetRecruitmentList({ page: 1, pagesize: 6, sortby: 'desc' }).then(res => { | |||||
setList(res.data.recruitments) | setList(res.data.recruitments) | ||||
setTotal(res.data.total) | setTotal(res.data.total) | ||||
}) | }) | ||||
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>知名企业</Typography.Title> | <Typography.Title level={2}>知名企业</Typography.Title> | ||||
</Flex> */} | </Flex> */} |
import { useModel, connect, history, Link } from 'umi'; | import { useModel, connect, history, Link } from 'umi'; | ||||
import { Imageprefix } from '@/constants'; | import { Imageprefix } from '@/constants'; | ||||
import { GetCompanyFamousList } from '@/services/apis/company'; | |||||
import { PostCompanySearch } from '@/services/apis/company'; | |||||
const HomeFamous: React.FC = () => { | const HomeFamous: React.FC = () => { | ||||
const [list, setList] = useState<object[]>([]) | const [list, setList] = useState<object[]>([]) | ||||
const [total, setTotal] = useState<number>(0) | const [total, setTotal] = useState<number>(0) | ||||
const [page, setPage] = useState<number>(1) | const [page, setPage] = useState<number>(1) | ||||
const [pageSize, setPageSize] = useState<number>(12) | |||||
const [pageSize, setPageSize] = useState<number>(9) | |||||
useEffect(() => { | useEffect(() => { | ||||
GetCompanyFamousList({ page: 1, pagesize: 9 }).then(res => { | |||||
PostCompanySearch({ | |||||
page: 1, | |||||
pagesize: 9, | |||||
sort: 'updated_at', | |||||
sortby: 'desc', | |||||
famous: 1 | |||||
}).then(res => { | |||||
setList(res.data.list) | setList(res.data.list) | ||||
}) | }) | ||||
}, []); | }, []); | ||||
return ( | return ( | ||||
<> | <> | ||||
<ConfigProvider | <ConfigProvider | ||||
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>知名企业</Typography.Title> | <Typography.Title level={2}>知名企业</Typography.Title> | ||||
</Flex> */} | </Flex> */} | ||||
<> | <> | ||||
<Col span={8}> | <Col span={8}> | ||||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}> | <Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}> | ||||
<Space direction='vertical' size={10} align='center' style={{ width: '100%',paddingTop: 20, paddingBottom: 20, background: '#ffffff', borderRadius: 8 }}> | |||||
<Space direction='vertical' size={10} align='center' style={{ width: '100%', paddingTop: 20, 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' }}></Image> | <Image src={item.photo ? `${Imageprefix}${item.photo}` : '/images/logo.jpg'} preview={false} width={'200px'} height={'112px'} style={{ borderRadius: '8px' }}></Image> | ||||
<Typography.Title level={5} style={{ width: '100%', padding: '0 10px' }} | <Typography.Title level={5} style={{ width: '100%', padding: '0 10px' }} | ||||
> | > | ||||
</Row> | </Row> | ||||
<Flex justify='center' align='center'> | <Flex justify='center' align='center'> | ||||
<Space> | <Space> | ||||
<Link to={{ pathname: '/talent/search' }}> | |||||
<Link to={{ pathname: '/talent/search/company?famous=1' }}> | |||||
<Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | <Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | ||||
</Link> | </Link> | ||||
</Space> | </Space> |
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>热门职位</Typography.Title> | <Typography.Title level={2}>热门职位</Typography.Title> | ||||
</Flex> */} | </Flex> */} |
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>热门职位</Typography.Title> | <Typography.Title level={2}>热门职位</Typography.Title> | ||||
</Flex> */} | </Flex> */} |
import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Divider, Tag, Card, Avatar, Typography } from 'antd'; | 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 { SearchOutlined, FireOutlined, MessageOutlined, RightOutlined } from '@ant-design/icons'; | ||||
import { useModel, connect, history, Link } from 'umi'; | import { useModel, connect, history, Link } from 'umi'; | ||||
import { GetCompanyProbationList } from '@/services/apis/company'; | |||||
import { PostCompanySearch } from '@/services/apis/company'; | |||||
import { Imageprefix } from '@/constants'; | import { Imageprefix } from '@/constants'; | ||||
const [list, setList] = useState<object[]>([]) | const [list, setList] = useState<object[]>([]) | ||||
const [total, setTotal] = useState<number>(0) | const [total, setTotal] = useState<number>(0) | ||||
const [page, setPage] = useState<number>(1) | const [page, setPage] = useState<number>(1) | ||||
const [pageSize, setPageSize] = useState<number>(12) | |||||
const [pageSize, setPageSize] = useState<number>(6) | |||||
useEffect(() => { | useEffect(() => { | ||||
GetCompanyProbationList({ page: 1, pagesize: 12 }).then(res => { | |||||
PostCompanySearch({ | |||||
page: 1, | |||||
pagesize: 6, | |||||
sort: 'updated_at', | |||||
sortby: 'desc', | |||||
probation: 1 | |||||
}).then(res => { | |||||
setList(res.data.list) | setList(res.data.list) | ||||
}) | }) | ||||
}, []); | }, []); | ||||
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>见习基地</Typography.Title> | <Typography.Title level={2}>见习基地</Typography.Title> | ||||
</Flex> */} | </Flex> */} | ||||
> | > | ||||
{item.full_name} | {item.full_name} | ||||
</Typography.Title> | </Typography.Title> | ||||
<Flex justify='flex-end' align='center' style={{ fontSize: 14, color: '#999' }}> | |||||
{/* <Flex justify='flex-end' align='center' style={{ fontSize: 14, color: '#999' }}> | |||||
{item.nature_text ? <>{item.nature_text}</> : <>性质不限</>} | {item.nature_text ? <>{item.nature_text}</> : <>性质不限</>} | ||||
{item.industry_text ? <><Divider type='vertical' /> {item.industry_text} </> : <><Divider type='vertical' />行业不限</>} | {item.industry_text ? <><Divider type='vertical' /> {item.industry_text} </> : <><Divider type='vertical' />行业不限</>} | ||||
{item.scale_text ? <><Divider type='vertical' /> {item.scale_text} </> : <><Divider type='vertical' />规模不限</>} | {item.scale_text ? <><Divider type='vertical' /> {item.scale_text} </> : <><Divider type='vertical' />规模不限</>} | ||||
</Flex> | |||||
</Flex> */} | |||||
</Space> | </Space> | ||||
</Link> | </Link> | ||||
</Row> | </Row> | ||||
<Flex justify='center' align='center'> | <Flex justify='center' align='center'> | ||||
<Space> | <Space> | ||||
<Link to={{ pathname: '/talent/search' }}> | |||||
<Link to={{ pathname: '/talent/search/company?probation=1' }}> | |||||
<Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | <Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | ||||
</Link> | </Link> | ||||
</Space> | </Space> |
} | } | ||||
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||||
{/* <Flex justify='center' align='center'> | {/* <Flex justify='center' align='center'> | ||||
<Typography.Title level={2}>急招职位</Typography.Title> | <Typography.Title level={2}>急招职位</Typography.Title> | ||||
</Flex> */} | </Flex> */} |
interface SearchFilterProps { | interface SearchFilterProps { | ||||
getSearchParams: (value: any) => void, | getSearchParams: (value: any) => void, | ||||
keyword: any, | |||||
famous: any, | |||||
probation: any, | |||||
page: number, | page: number, | ||||
pagesize: number, | pagesize: number, | ||||
} | } | ||||
const SearchFilter: React.FC<SearchFilterProps> = ({ dispatch, dictModel, getSearchParams, keyword, page, pagesize }: any) => { | |||||
const SearchFilter: React.FC<SearchFilterProps> = ({ dispatch, dictModel, getSearchParams, famous, page, pagesize, probation }: any) => { | |||||
const [showSearch, setShowSearch] = useState<boolean>(false); | const [showSearch, setShowSearch] = useState<boolean>(false); | ||||
const [openMore, setOpenMore] = useState<boolean>(false); | const [openMore, setOpenMore] = useState<boolean>(false); | ||||
const [keywordName, setKeywordName] = useState<string>(keyword ? keyword : ''); | |||||
const [keywordName, setKeywordName] = useState<string>(''); | |||||
const [searchJobParams, setSearchJobParams] = useState<object>({ | const [searchJobParams, setSearchJobParams] = useState<object>({ | ||||
keyword: keyword ? keyword : '', | |||||
keyword: '', | |||||
"location": 0, | "location": 0, | ||||
probation: 0, | |||||
famous: 0, | |||||
probation: probation ? Number(probation) : 0, | |||||
famous: famous ? Number(famous) : 0, | |||||
"industry": 0, | "industry": 0, | ||||
"nature": 0, | "nature": 0, | ||||
"scale": 0, | "scale": 0, | ||||
setSearchJobParams(prevState => ({ | setSearchJobParams(prevState => ({ | ||||
...prevState, | ...prevState, | ||||
location: item.id | location: item.id | ||||
})); | })); | ||||
} | } | ||||
}; | }; | ||||
useEffect(() => { | useEffect(() => { | ||||
setSearchJobParams(prevState => ({ | setSearchJobParams(prevState => ({ | ||||
...prevState, | ...prevState, | ||||
})); | })); | ||||
}, [keywordName]); | }, [keywordName]); | ||||
useEffect(() => { | |||||
if(famous) { | |||||
setFamousItem({name: '是'}); | |||||
setFamousTags(['是']); | |||||
setSearchJobParams(prevState => ({ | |||||
...prevState, | |||||
famous: Number(famous) | |||||
})); | |||||
} else { | |||||
setFamousItem(null); | |||||
setFamousTags(['不限']); | |||||
setSearchJobParams(prevState => ({ | |||||
...prevState, | |||||
famous: 0 | |||||
})); | |||||
} | |||||
}, [famous]); | |||||
useEffect(() => { | |||||
if(probation) { | |||||
setProbationItem({name: '是'}); | |||||
setProbationTags(['是']); | |||||
setSearchJobParams(prevState => ({ | |||||
...prevState, | |||||
probation: Number(probation) | |||||
})); | |||||
} else { | |||||
setProbationItem(null); | |||||
setProbationTags(['不限']); | |||||
setSearchJobParams(prevState => ({ | |||||
...prevState, | |||||
probation: 0 | |||||
})); | |||||
} | |||||
}, [probation]); | |||||
useEffect(() => { | useEffect(() => { | ||||
setSearchJobParams(prevState => ({ | setSearchJobParams(prevState => ({ | ||||
...prevState, | ...prevState, | ||||
{/* 地区选择 */} | {/* 地区选择 */} | ||||
<Descriptions.Item span={24} label="地区选择"> | <Descriptions.Item span={24} label="地区选择"> | ||||
<Space direction='vertical' size='small' style={{ maxWidth: 800, minWidth: 600 }}> | |||||
<Space direction='vertical' size='small'> | |||||
<Flex wrap style={{ width: '100%' }}> | <Flex wrap style={{ width: '100%' }}> | ||||
{ | { | ||||
dictModel.xiaolanzhenList.map((item, index) => ( | dictModel.xiaolanzhenList.map((item, index) => ( | ||||
)) | )) | ||||
} | } | ||||
</Flex> | </Flex> | ||||
<Cascader style={{ width: '50%' }} placeholder="请选择地区" options={dictModel.areaList} fieldNames={cascaderfieldNames} /> | |||||
<Cascader style={{ width: '50%' }} placeholder="请选择地区" options={dictModel.areaList} fieldNames={cascaderfieldNames} onChange={(value) => { | |||||
setSearchJobParams(prevState => ({ | |||||
...prevState, | |||||
location: value && value.length > 0 ? value[length - 1] : 0, | |||||
})); | |||||
}} /> | |||||
</Space> | </Space> | ||||
</Descriptions.Item> | </Descriptions.Item> | ||||
import { useState, useEffect, useRef } from 'react'; | import { useState, useEffect, useRef } from 'react'; | ||||
import { ProList, PageContainer } from '@ant-design/pro-components'; | import { ProList, PageContainer } from '@ant-design/pro-components'; | ||||
import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Pagination, Tag, Card, Avatar, Typography, Anchor } from 'antd'; | |||||
import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Pagination, Tag, Card, Avatar, Segmented, Switch } from 'antd'; | |||||
import { SearchOutlined, LikeOutlined, ArrowRightOutlined, StarOutlined } from '@ant-design/icons'; | import { SearchOutlined, LikeOutlined, ArrowRightOutlined, StarOutlined } from '@ant-design/icons'; | ||||
import { useModel, connect, history, Link, useSearchParams } from 'umi'; | import { useModel, connect, history, Link, useSearchParams } from 'umi'; | ||||
import { Imageprefix } from '@/constants/index' | import { Imageprefix } from '@/constants/index' | ||||
import SearchFilter from '@/components/Talent/Search/Filter/Jobseeker'; | import SearchFilter from '@/components/Talent/Search/Filter/Jobseeker'; | ||||
import SearchJob from '@/components/Talent/Search/Job/index'; | import SearchJob from '@/components/Talent/Search/Job/index'; | ||||
import ManageCompanyResumeRecomment from '@/components/Manage/Company/Resume/Recomment' | import ManageCompanyResumeRecomment from '@/components/Manage/Company/Resume/Recomment' | ||||
import EmptyResult from '@/components/Common/EmptyResult' | import EmptyResult from '@/components/Common/EmptyResult' | ||||
import CommonJob from '@/components/Common/Job' | |||||
import CommonJobseeker from '@/components/Common/Jobseeker' | |||||
import { PostJobseekerList } from '@/services/apis/resume'; | |||||
import { GetCompanyRecommentResume } from '@/services/apis/company'; | |||||
const HomePage: React.FC = () => { | const HomePage: React.FC = () => { | ||||
const [searchParams, setSearchParams] = useSearchParams(); | const [searchParams, setSearchParams] = useSearchParams(); | ||||
const [list, setList] = useState<object[]>([]) | const [list, setList] = useState<object[]>([]) | ||||
const [total, setTotal] = useState<number>(0) | const [total, setTotal] = useState<number>(0) | ||||
const [page, setPage] = useState<number>(1) | const [page, setPage] = useState<number>(1) | ||||
const [pagesize, setPageSize] = useState<number>(12) | const [pagesize, setPageSize] = useState<number>(12) | ||||
const [jobseekerType, setJobseekerType] = useState<string>('推荐简历') | |||||
useEffect(() => { | |||||
if (jobseekerType == '应届毕业生') { | |||||
PostJobseekerList({ | |||||
page: page, | |||||
pagesize: pagesize, | |||||
sort: 'updated_at', | |||||
sortby: 'desc', | |||||
type: 1001028 | |||||
}).then(res => { | |||||
setList(res.data.seekers) | |||||
getTotal(res.data.total) | |||||
}) | |||||
// useEffect(() => { | |||||
// PostJobSearch({ | |||||
// page: 1, | |||||
// pagesize: 12, | |||||
// sort: 'updated_at', | |||||
// sortby: 'desc' | |||||
// }).then(res => { | |||||
// setList(res.data.jobs) | |||||
// getTotal(res.data.total) | |||||
// }) | |||||
// }, []); | |||||
const getSearchParams = async (value) => { | |||||
setPage(value.page) | |||||
setPageSize(value.pagesize) | |||||
if (value.keyword) { | |||||
setSearchParams({ keyword: value.keyword }) | |||||
} else { | |||||
setSearchParams({ keyword: '' }) | |||||
} | } | ||||
let res = await GetCompanyRecommentResume(value ? value : { | |||||
page: page, | |||||
pagesize: pagesize, | |||||
sort: 'updated_at', | |||||
sortby: 'desc', | |||||
}) | |||||
setList(res.data.list) | |||||
getTotal(res.data.total) | |||||
}, [jobseekerType, page, pagesize]) | |||||
const onSearchParams = async (value) => { | |||||
if (jobseekerType == '搜索结果') { | |||||
setPage(value.page) | |||||
setPageSize(value.pagesize) | |||||
console.log(value) | |||||
let res = await PostJobseekerList(value ? value : { | |||||
page: page, | |||||
pagesize: pagesize, | |||||
sort: 'updated_at', | |||||
sortby: 'desc' | |||||
}) | |||||
setList(res.data.seekers) | |||||
getTotal(res.data.total) | |||||
} | |||||
} | } | ||||
const getTotal = (value) => { | const getTotal = (value) => { | ||||
components: { | components: { | ||||
Button: { | Button: { | ||||
colorText: '#19be6e' | colorText: '#19be6e' | ||||
}, | |||||
Segmented: { | |||||
trackBg: '#f0f0f0', | |||||
itemSelectedColor: '#19be6e' | |||||
} | } | ||||
} | } | ||||
}} | }} | ||||
> | > | ||||
<Space direction='vertical' size={30} style={{ minHeight: '800px' }}> | <Space direction='vertical' size={30} style={{ minHeight: '800px' }}> | ||||
{/* <SearchFilter getSearchParams={getSearchParams} | |||||
keyword={searchParams.get('keyword') ? searchParams.get('keyword') : ''} | |||||
page={page} | |||||
pagesize={pagesize} | |||||
></SearchFilter> */} | |||||
{jobseekerType == '搜索结果' ? (<> | |||||
<SearchFilter getSearchParams={onSearchParams} | |||||
page={page} | |||||
pagesize={pagesize} | |||||
></SearchFilter> | |||||
</>) : (<> | |||||
<Flex justify='flex-end' align='center'> | |||||
<Switch checkedChildren="关闭搜索" unCheckedChildren="开启搜索" onChange={async (checked: boolean) => { | |||||
if (checked) { | |||||
setJobseekerType('搜索结果') | |||||
} else { | |||||
setJobseekerType('推荐简历') | |||||
} | |||||
}}></Switch> | |||||
</Flex> | |||||
</>)} | |||||
<Row gutter={[16, 16]}> | <Row gutter={[16, 16]}> | ||||
<Col span={24}> | <Col span={24}> | ||||
<ManageCompanyResumeRecomment list={list}></ManageCompanyResumeRecomment> | |||||
<Flex justify='center' align='center' style={{ margin: '40px 0' }}> | |||||
<Pagination | |||||
hideOnSinglePage | |||||
total={total} | |||||
showTotal={(total) => `总共${total}条`} | |||||
current={page} | |||||
pageSize={pagesize} | |||||
pageSizeOptions={['12', '24', '36']} | |||||
onChange={(page, pageSize) => { | |||||
setPage(page) | |||||
setPageSize(pageSize) | |||||
<Space direction='vertical' size='small' style={{ width: '100%' }} > | |||||
<Segmented | |||||
size='large' | |||||
block | |||||
value={jobseekerType} | |||||
options={['推荐简历', '应届毕业生', '搜索结果']} | |||||
onChange={(value) => { | |||||
setJobseekerType(value) | |||||
setPage(1) | |||||
setPageSize(12) | |||||
}} | }} | ||||
/> | /> | ||||
</Flex> | |||||
<div style={{ paddingTop: 20 }}> | |||||
{jobseekerType == '推荐简历' && (<><ManageCompanyResumeRecomment></ManageCompanyResumeRecomment></>)} | |||||
{jobseekerType == '应届毕业生' && (<> | |||||
{ | |||||
list && list.length > 0 && (<> | |||||
<CommonJobseeker list={list} type="应届毕业生"></CommonJobseeker> | |||||
<Flex justify='center' align='center' style={{ margin: '40px 0' }}> | |||||
<Pagination | |||||
hideOnSinglePage | |||||
total={total} | |||||
showTotal={(total) => `总共${total}条`} | |||||
current={page} | |||||
pageSize={pagesize} | |||||
pageSizeOptions={['12', '24', '36']} | |||||
onChange={(page, pageSize) => { | |||||
setPage(page) | |||||
setPageSize(pageSize) | |||||
}} | |||||
/> | |||||
</Flex> | |||||
</>) | |||||
} | |||||
{ | |||||
!list || list.length == 0 && <Flex justify='center' align='center' style={{ padding: '16px', borderRadius: 8, cursor: 'pointer' }}> | |||||
<EmptyResult description="暂无数据" /> | |||||
</Flex> | |||||
} | |||||
</>)} | |||||
{jobseekerType == '搜索结果' && (<> | |||||
{ | |||||
list && list.length > 0 && (<> | |||||
<CommonJobseeker list={list} type="搜索结果"></CommonJobseeker> | |||||
<Flex justify='center' align='center' style={{ margin: '40px 0' }}> | |||||
<Pagination | |||||
hideOnSinglePage | |||||
total={total} | |||||
showTotal={(total) => `总共${total}条`} | |||||
current={page} | |||||
pageSize={pagesize} | |||||
pageSizeOptions={['12', '24', '36']} | |||||
onChange={(page, pageSize) => { | |||||
setPage(page) | |||||
setPageSize(pageSize) | |||||
}} | |||||
/> | |||||
</Flex> | |||||
</>) | |||||
} | |||||
{ | |||||
!list || list.length == 0 && <Flex justify='center' align='center' style={{ padding: '16px', borderRadius: 8, cursor: 'pointer' }}> | |||||
<EmptyResult description="暂无数据" /> | |||||
</Flex> | |||||
} | |||||
</>)} | |||||
</div> | |||||
</Space> | |||||
</Col> | </Col> | ||||
</Row> | </Row> | ||||
</Space> | </Space> |
const [type, setType] = useState<string>('jobseeker') | const [type, setType] = useState<string>('jobseeker') | ||||
const [openPreview, setOpenPreview] = useState(false); | const [openPreview, setOpenPreview] = useState(false); | ||||
dispatch({ type: 'dictModel/getList', payload: { code: 2027, type: 'setIndustryPostList' } }) | |||||
// useEffect(() => { | // useEffect(() => { | ||||
// PostJobSearch({ page: 1, pagesize: 3, keyword: '文员' }).then(res => { | // PostJobSearch({ page: 1, pagesize: 3, keyword: '文员' }).then(res => { | ||||
{/* 固定 */} | {/* 固定 */} | ||||
<Anchor | <Anchor | ||||
offsetTop={87} | offsetTop={87} | ||||
style={{ position: 'fixed', bottom: 87, background: '#f5f5f5', paddingRight: 20, borderRadius: 10 , zIndex: 99 }} | |||||
style={{ position: 'fixed', bottom: 87, background: '#f5f5f5', paddingRight: 20, borderRadius: 10, zIndex: 99 }} | |||||
items={[ | items={[ | ||||
{ title: (<><h3>知名企业</h3></>), key: 4, href: '#fomaus' }, | |||||
{ title: (<><h3>热门企业</h3></>), key: 2, href: '#company' }, | |||||
{ title: (<><h3>热门职位</h3></>), key: 1, href: '#newjob' }, | { 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' }, | |||||
{ title: (<><h3>校园招聘</h3></>), key: 5, href: '#campusjob' }, | |||||
{ title: (<><h3>招聘会</h3></>), key: 3, href: '#fair' }, | |||||
{ title: (<><h3>见习基地</h3></>), key: 6, href: '#probation' }, | |||||
{ title: (<><h3>关于我们</h3></>), key: 7, href: '#about' }, | |||||
]} | ]} | ||||
/> | /> | ||||
<PageContainer header={{ title: ' ' }} style={{ background: '#ffffff' }} | <PageContainer header={{ title: ' ' }} style={{ background: '#ffffff' }} | ||||
> | > | ||||
<Row gutter={[16, 16]}> | <Row gutter={[16, 16]}> | ||||
<Col span={localStorage.getItem('token') ? 24 : 18}> | <Col span={localStorage.getItem('token') ? 24 : 18}> | ||||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | <Space direction='vertical' size={20} style={{ width: '100%' }}> | ||||
<Flex justify='center' align='center'> | <Flex justify='center' align='center'> | ||||
<Space.Compact style={{ width: '100%' }}> | |||||
<Space.Compact style={{ width: '80%' }}> | |||||
<Input | <Input | ||||
size='large' | size='large' | ||||
prefix={<SearchOutlined style={{ color: '#19be6e' }} />} | prefix={<SearchOutlined style={{ color: '#19be6e' }} />} | ||||
{/* 未登录的登录页 */} | {/* 未登录的登录页 */} | ||||
<Flex vertical justify='center' align='center' style={{ background: '#ffffff', width: '100%', marginBottom: 40, position: 'relative' }}> | <Flex vertical justify='center' align='center' style={{ background: '#ffffff', width: '100%', marginBottom: 40, position: 'relative' }}> | ||||
<Flex vertical justify='center' align='center' style={{ background: '#edfff3', padding: '40px 0', width: '100%' }}> | |||||
<Flex justify='space-bewteen' style={{ width: '1152px' }}> | |||||
<Flex vertical justify='center' align='center' style={{ background: '#edfff3', padding: '40px 314px', width: '100%' }}> | |||||
<Flex justify='space-bewteen' style={{ width: '100%' }}> | |||||
<Row gutter={[16, 16]}> | <Row gutter={[16, 16]}> | ||||
<Col span={16}> | |||||
<Col span={6}> | |||||
<Tabs | |||||
size='small' | |||||
style={{ height: '300px', zIndex: 99 , background: '#ffffff' }} | |||||
tabPosition='left' | |||||
items={dictModel.industryPostList.map((item, index) => { | |||||
return { | |||||
key: item.id, | |||||
label: item.name, | |||||
children: (<> | |||||
<Space direction='vertical' style={{ height: '600px', overflow: 'auto' }}> | |||||
{ | |||||
item.children.map((childrenItem, childrenIndex) => ( | |||||
<> | |||||
<Typography.Title level={5}> | |||||
{ | |||||
childrenItem.name | |||||
} | |||||
</Typography.Title> | |||||
<Space wrap> | |||||
{ | |||||
childrenItem.children.map((thirdItem, thirdIndex) => ( | |||||
<> | |||||
<Space> | |||||
{thirdItem.name} | |||||
</Space> | |||||
</> | |||||
)) | |||||
} | |||||
</Space> | |||||
</> | |||||
)) | |||||
} | |||||
</Space> | |||||
</>) | |||||
} | |||||
})} | |||||
/> | |||||
</Col> | |||||
<Col span={12}> | |||||
<TalentHomeBanner getHeight={getHeight}></TalentHomeBanner> | <TalentHomeBanner getHeight={getHeight}></TalentHomeBanner> | ||||
</Col> | </Col> | ||||
<Col span={8} style={{ height: loginHeight, width: '100%' }}> | |||||
<Col span={6} style={{ height: loginHeight, width: '100%' }}> | |||||
<Flex justify='flex-end' style={{ height: loginHeight, width: '100%' }}> | <Flex justify='flex-end' style={{ height: loginHeight, width: '100%' }}> | ||||
<TalentHomeInformation height={loginHeight}></TalentHomeInformation> | <TalentHomeInformation height={loginHeight}></TalentHomeInformation> | ||||
</Flex> | </Flex> | ||||
</div> */} | </div> */} | ||||
</Flex> | </Flex> | ||||
<Space direction='vertical' size={30} style={{ minHeight: 800 }}> | <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' }}> | |||||
<Flex justify='center' align='center' id='fomaus' style={{ padding: '40px 314px', width: '100%' }}> | |||||
<HomeFamous></HomeFamous> | |||||
</Flex> | |||||
<Flex justify='center' align='center' id='company' style={{ padding: '40px 314px', width: '100%' }}> | |||||
<HomeCompany></HomeCompany> | |||||
</Flex> | |||||
<Flex justify='center' align='center' style={{ padding: '40px 314px', width: '100%' }} id='newjob'> | |||||
<Flex justify='space-between' align='center' style={{ width: '100%' }}> | |||||
<Space direction='vertical' size='small' style={{ width: '100%' }} > | <Space direction='vertical' size='small' style={{ width: '100%' }} > | ||||
<Segmented | <Segmented | ||||
size='large' | size='large' | ||||
</Space> | </Space> | ||||
</Flex> | </Flex> | ||||
</Flex> | </Flex> | ||||
<Flex justify='center' align='center' id='company'> | |||||
<HomeCompany></HomeCompany> | |||||
<Flex justify='center' align='center' id='campusjob' style={{ padding: '40px 314px', width: '100%' }}> | |||||
<HomeCampusJob></HomeCampusJob> | |||||
</Flex> | </Flex> | ||||
<Flex justify='center' align='center' id='fair'> | |||||
<Flex justify='center' align='center' id='fair' style={{ padding: '40px 314px', width: '100%' }}> | |||||
<TalentHomeFair></TalentHomeFair> | <TalentHomeFair></TalentHomeFair> | ||||
</Flex> | </Flex> | ||||
<Flex justify='center' align='center' id='fomaus'> | |||||
<HomeFamous></HomeFamous> | |||||
</Flex> | |||||
<Flex justify='center' align='center' id='campusjob'> | |||||
<HomeCampusJob></HomeCampusJob> | |||||
</Flex> | |||||
<Flex justify='center' align='center' id='probation'> | |||||
<Flex justify='center' align='center' id='probation' style={{ padding: '40px 314px', width: '100%' }}> | |||||
<HomeProbation></HomeProbation> | <HomeProbation></HomeProbation> | ||||
</Flex> | </Flex> | ||||
</Space> | </Space> |
const getSearchParams = async (value) => { | const getSearchParams = async (value) => { | ||||
setPage(value.page) | setPage(value.page) | ||||
setPageSize(value.pagesize) | setPageSize(value.pagesize) | ||||
if (value.keyword) { | |||||
setSearchParams({ keyword: value.keyword }) | |||||
} else { | |||||
setSearchParams({ keyword: '' }) | |||||
} | |||||
let res = await PostCompanySearch(value ? value : { | let res = await PostCompanySearch(value ? value : { | ||||
page: page, | page: page, | ||||
> | > | ||||
<Space direction='vertical' size={30} style={{ minHeight: '800px' }}> | <Space direction='vertical' size={30} style={{ minHeight: '800px' }}> | ||||
<SearchFilter getSearchParams={getSearchParams} | |||||
keyword={searchParams.get('keyword') ? searchParams.get('keyword') : ''} | |||||
page={page} | |||||
pagesize={pagesize}></SearchFilter> | |||||
<SearchFilter getSearchParams={getSearchParams} | |||||
famous={searchParams.get('famous') ? searchParams.get('famous') : 0} | |||||
probation={searchParams.get('probation') ? searchParams.get('probation') : 0} | |||||
page={page} | |||||
pagesize={pagesize}></SearchFilter> | |||||
<Row gutter={[16, 16]}> | <Row gutter={[16, 16]}> | ||||
<Col span={18}> | <Col span={18}> | ||||
<Row gutter={[16, 16]}> | <Row gutter={[16, 16]}> | ||||
{ | { | ||||
list && list.length > 0 && list.map((item: any, index: number) => ( | |||||
list && list.length > 0 && list.map((item: any, index: number) => ( | |||||
<> | <> | ||||
<Col span={8}> | <Col span={8}> | ||||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}> | <Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}> |
import { ResumeUrl } from '../url/resume'; | import { ResumeUrl } from '../url/resume'; | ||||
export const GetJobseekerDetail = GetModel(ResumeUrl.JobseekerDetail); | export const GetJobseekerDetail = GetModel(ResumeUrl.JobseekerDetail); | ||||
export const PostJobseekerList = PostModel(ResumeUrl.JobseekerList); | |||||
// 基础资料 | // 基础资料 | ||||
export const PostJobapplicantAdd = PostModel(ResumeUrl.JobapplicantAdd); | export const PostJobapplicantAdd = PostModel(ResumeUrl.JobapplicantAdd); | ||||
export const PostJobapplicantDel = PostModel(ResumeUrl.JobapplicantDel); | export const PostJobapplicantDel = PostModel(ResumeUrl.JobapplicantDel); |
interface Resume { | interface Resume { | ||||
JobseekerDetail?: string; | JobseekerDetail?: string; | ||||
JobseekerList? : string; | |||||
// 基础资料 | // 基础资料 | ||||
JobapplicantAdd?: string; | JobapplicantAdd?: string; | ||||
JobapplicantDel?: string; | JobapplicantDel?: string; |
export const ResumeUrl: Url.Resume = { | export const ResumeUrl: Url.Resume = { | ||||
JobseekerDetail: web + '/jobseeker/detail', | JobseekerDetail: web + '/jobseeker/detail', | ||||
JobseekerList: web + '/jobseeker/list', | |||||
// 基础资料 | // 基础资料 | ||||
JobapplicantAdd: web + '/jobapplicant/add', | JobapplicantAdd: web + '/jobapplicant/add', | ||||
JobapplicantDel: web + '/jobapplicant/del', | JobapplicantDel: web + '/jobapplicant/del', |