@@ -8,6 +8,6 @@ | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script src="/umi.1b04ba6b.js"></script> | |||
<script src="/umi.23f5ba2d.js"></script> | |||
</body> | |||
</html> |
@@ -202,7 +202,6 @@ export const layout = () => { | |||
} | |||
const role = localStorage.getItem('role'); | |||
console.log(routes) | |||
switch (role) { | |||
case 'personal': | |||
routes[4].flatMenu = true; | |||
@@ -222,7 +221,6 @@ export const layout = () => { | |||
case 'company': | |||
routes[5].flatMenu = true; | |||
setInitialState((s) => ({ | |||
...s, | |||
permissions: { | |||
@@ -266,7 +264,7 @@ export const layout = () => { | |||
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') | |||
if (Number(idx) == 1) { | |||
routes[Number(idx)].flatMenu = true; |
@@ -0,0 +1,141 @@ | |||
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; | |||
@@ -9,12 +9,12 @@ import { Imageprefix } from '@/constants/index' | |||
import { GetCompanyRecommentResume } from '@/services/apis/company'; | |||
const HomePage: React.FC = ({list}) => { | |||
const HomePage: React.FC = () => { | |||
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 ( | |||
<> | |||
@@ -37,31 +37,32 @@ const HomePage: React.FC = ({list}) => { | |||
headerTitle="推荐简历" | |||
rowKey="id" | |||
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" | |||
metas={{ | |||
title: { |
@@ -34,7 +34,7 @@ const CampusJob: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>校园招聘</Typography.Title> | |||
</Flex> */} |
@@ -14,11 +14,11 @@ 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 [pageSize, setPageSize] = useState<number>(9) | |||
useEffect(() => { | |||
GetAdvertscheduleList({ pagesize: 20, code: 'RMQYGGT' }).then(res => { | |||
GetAdvertscheduleList({ pagesize: 9, code: 'RMQYGGT' }).then(res => { | |||
setList(res.data.advertschedules) | |||
}) | |||
}, []); | |||
@@ -39,7 +39,7 @@ const HomeProbation: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>见习基地</Typography.Title> | |||
</Flex> */} | |||
@@ -72,7 +72,7 @@ const HomeProbation: React.FC = () => { | |||
</Row> | |||
<Flex justify='center' align='center'> | |||
<Space> | |||
<Link to={{ pathname: '/talent/search' }}> | |||
<Link to={{ pathname: '/talent/search/company' }}> | |||
<Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | |||
</Link> | |||
</Space> |
@@ -12,10 +12,10 @@ const HomeFair: 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 [pageSize, setPageSize] = useState<number>(6) | |||
useEffect(() => { | |||
GetRecruitmentList({ page: 1, pagesize: 12, sortby: 'desc' }).then(res => { | |||
GetRecruitmentList({ page: 1, pagesize: 6, sortby: 'desc' }).then(res => { | |||
setList(res.data.recruitments) | |||
setTotal(res.data.total) | |||
}) | |||
@@ -35,7 +35,7 @@ const HomeFair: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>知名企业</Typography.Title> | |||
</Flex> */} |
@@ -6,19 +6,26 @@ import { EllipsisOutlined, FireOutlined, LeftOutlined, RightOutlined, StarOutlin | |||
import { useModel, connect, history, Link } from 'umi'; | |||
import { Imageprefix } from '@/constants'; | |||
import { GetCompanyFamousList } from '@/services/apis/company'; | |||
import { PostCompanySearch } from '@/services/apis/company'; | |||
const HomeFamous: 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 [pageSize, setPageSize] = useState<number>(9) | |||
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) | |||
}) | |||
}, []); | |||
return ( | |||
<> | |||
<ConfigProvider | |||
@@ -34,7 +41,7 @@ const HomeFamous: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>知名企业</Typography.Title> | |||
</Flex> */} | |||
@@ -45,7 +52,7 @@ const HomeFamous: React.FC = () => { | |||
<> | |||
<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%',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> | |||
<Typography.Title level={5} style={{ width: '100%', padding: '0 10px' }} | |||
> | |||
@@ -66,7 +73,7 @@ const HomeFamous: React.FC = () => { | |||
</Row> | |||
<Flex justify='center' align='center'> | |||
<Space> | |||
<Link to={{ pathname: '/talent/search' }}> | |||
<Link to={{ pathname: '/talent/search/company?famous=1' }}> | |||
<Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | |||
</Link> | |||
</Space> |
@@ -35,7 +35,7 @@ const HomeNewJob: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>热门职位</Typography.Title> | |||
</Flex> */} |
@@ -35,7 +35,7 @@ const HomeNewJob: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>热门职位</Typography.Title> | |||
</Flex> */} |
@@ -6,7 +6,7 @@ import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
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 { GetCompanyProbationList } from '@/services/apis/company'; | |||
import { PostCompanySearch } from '@/services/apis/company'; | |||
import { Imageprefix } from '@/constants'; | |||
@@ -15,10 +15,16 @@ 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 [pageSize, setPageSize] = useState<number>(6) | |||
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) | |||
}) | |||
}, []); | |||
@@ -39,7 +45,7 @@ const HomeProbation: React.FC = () => { | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>见习基地</Typography.Title> | |||
</Flex> */} | |||
@@ -57,11 +63,11 @@ const HomeProbation: React.FC = () => { | |||
> | |||
{item.full_name} | |||
</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.industry_text ? <><Divider type='vertical' /> {item.industry_text} </> : <><Divider type='vertical' />行业不限</>} | |||
{item.scale_text ? <><Divider type='vertical' /> {item.scale_text} </> : <><Divider type='vertical' />规模不限</>} | |||
</Flex> | |||
</Flex> */} | |||
</Space> | |||
</Link> | |||
@@ -72,7 +78,7 @@ const HomeProbation: React.FC = () => { | |||
</Row> | |||
<Flex justify='center' align='center'> | |||
<Space> | |||
<Link to={{ pathname: '/talent/search' }}> | |||
<Link to={{ pathname: '/talent/search/company?probation=1' }}> | |||
<Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button> | |||
</Link> | |||
</Space> |
@@ -35,7 +35,7 @@ const HomeNewJob: React.FC = () => { | |||
} | |||
}} | |||
> | |||
<Space direction='vertical' size={20} style={{ width: '1152px' }}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
{/* <Flex justify='center' align='center'> | |||
<Typography.Title level={2}>急招职位</Typography.Title> | |||
</Flex> */} |
@@ -8,21 +8,22 @@ const cascaderfieldNames = { label: 'name', value: 'id', children: 'children' }; | |||
interface SearchFilterProps { | |||
getSearchParams: (value: any) => void, | |||
keyword: any, | |||
famous: any, | |||
probation: any, | |||
page: 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 [openMore, setOpenMore] = useState<boolean>(false); | |||
const [keywordName, setKeywordName] = useState<string>(keyword ? keyword : ''); | |||
const [keywordName, setKeywordName] = useState<string>(''); | |||
const [searchJobParams, setSearchJobParams] = useState<object>({ | |||
keyword: keyword ? keyword : '', | |||
keyword: '', | |||
"location": 0, | |||
probation: 0, | |||
famous: 0, | |||
probation: probation ? Number(probation) : 0, | |||
famous: famous ? Number(famous) : 0, | |||
"industry": 0, | |||
"nature": 0, | |||
"scale": 0, | |||
@@ -157,7 +158,6 @@ const SearchFilter: React.FC<SearchFilterProps> = ({ dispatch, dictModel, getSea | |||
setSearchJobParams(prevState => ({ | |||
...prevState, | |||
location: item.id | |||
})); | |||
} | |||
@@ -245,9 +245,6 @@ const SearchFilter: React.FC<SearchFilterProps> = ({ dispatch, dictModel, getSea | |||
}; | |||
useEffect(() => { | |||
setSearchJobParams(prevState => ({ | |||
...prevState, | |||
@@ -255,6 +252,45 @@ const SearchFilter: React.FC<SearchFilterProps> = ({ dispatch, dictModel, getSea | |||
})); | |||
}, [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(() => { | |||
setSearchJobParams(prevState => ({ | |||
...prevState, | |||
@@ -379,7 +415,7 @@ const SearchFilter: React.FC<SearchFilterProps> = ({ dispatch, dictModel, getSea | |||
{/* 地区选择 */} | |||
<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%' }}> | |||
{ | |||
dictModel.xiaolanzhenList.map((item, index) => ( | |||
@@ -413,7 +449,12 @@ const SearchFilter: React.FC<SearchFilterProps> = ({ dispatch, dictModel, getSea | |||
)) | |||
} | |||
</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> | |||
</Descriptions.Item> | |||
@@ -1,20 +1,18 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
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 { useModel, connect, history, Link, useSearchParams } from 'umi'; | |||
import { Imageprefix } from '@/constants/index' | |||
import SearchFilter from '@/components/Talent/Search/Filter/Jobseeker'; | |||
import SearchJob from '@/components/Talent/Search/Job/index'; | |||
import ManageCompanyResumeRecomment from '@/components/Manage/Company/Resume/Recomment' | |||
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 [searchParams, setSearchParams] = useSearchParams(); | |||
const [list, setList] = useState<object[]>([]) | |||
@@ -23,38 +21,37 @@ const HomePage: React.FC = () => { | |||
const [total, setTotal] = useState<number>(0) | |||
const [page, setPage] = useState<number>(1) | |||
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) => { | |||
@@ -72,38 +69,110 @@ const HomePage: React.FC = () => { | |||
components: { | |||
Button: { | |||
colorText: '#19be6e' | |||
}, | |||
Segmented: { | |||
trackBg: '#f0f0f0', | |||
itemSelectedColor: '#19be6e' | |||
} | |||
} | |||
}} | |||
> | |||
<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]}> | |||
<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> | |||
</Row> | |||
</Space> |
@@ -41,6 +41,7 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
const [type, setType] = useState<string>('jobseeker') | |||
const [openPreview, setOpenPreview] = useState(false); | |||
dispatch({ type: 'dictModel/getList', payload: { code: 2027, type: 'setIndustryPostList' } }) | |||
// useEffect(() => { | |||
// PostJobSearch({ page: 1, pagesize: 3, keyword: '文员' }).then(res => { | |||
@@ -74,25 +75,24 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
{/* 固定 */} | |||
<Anchor | |||
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={[ | |||
{ 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: 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' }} | |||
> | |||
<Row gutter={[16, 16]}> | |||
<Col span={localStorage.getItem('token') ? 24 : 18}> | |||
<Space direction='vertical' size={20} style={{ width: '100%' }}> | |||
<Flex justify='center' align='center'> | |||
<Space.Compact style={{ width: '100%' }}> | |||
<Space.Compact style={{ width: '80%' }}> | |||
<Input | |||
size='large' | |||
prefix={<SearchOutlined style={{ color: '#19be6e' }} />} | |||
@@ -159,13 +159,53 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
{/* 未登录的登录页 */} | |||
<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]}> | |||
<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> | |||
</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%' }}> | |||
<TalentHomeInformation height={loginHeight}></TalentHomeInformation> | |||
</Flex> | |||
@@ -182,8 +222,14 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
</div> */} | |||
</Flex> | |||
<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%' }} > | |||
<Segmented | |||
size='large' | |||
@@ -203,23 +249,13 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
</Space> | |||
</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 justify='center' align='center' id='fair'> | |||
<Flex justify='center' align='center' id='fair' style={{ padding: '40px 314px', width: '100%' }}> | |||
<TalentHomeFair></TalentHomeFair> | |||
</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> | |||
</Flex> | |||
</Space> |
@@ -43,11 +43,7 @@ const HomePage: React.FC = () => { | |||
const getSearchParams = async (value) => { | |||
setPage(value.page) | |||
setPageSize(value.pagesize) | |||
if (value.keyword) { | |||
setSearchParams({ keyword: value.keyword }) | |||
} else { | |||
setSearchParams({ keyword: '' }) | |||
} | |||
let res = await PostCompanySearch(value ? value : { | |||
page: page, | |||
@@ -80,15 +76,17 @@ const HomePage: React.FC = () => { | |||
> | |||
<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]}> | |||
<Col span={18}> | |||
<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}> | |||
<Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}> |
@@ -2,6 +2,8 @@ import { PostModel, GetModel } from '@/utils/ReqHelper'; | |||
import { ResumeUrl } from '../url/resume'; | |||
export const GetJobseekerDetail = GetModel(ResumeUrl.JobseekerDetail); | |||
export const PostJobseekerList = PostModel(ResumeUrl.JobseekerList); | |||
// 基础资料 | |||
export const PostJobapplicantAdd = PostModel(ResumeUrl.JobapplicantAdd); | |||
export const PostJobapplicantDel = PostModel(ResumeUrl.JobapplicantDel); |
@@ -30,6 +30,7 @@ declare namespace Url { | |||
interface Resume { | |||
JobseekerDetail?: string; | |||
JobseekerList? : string; | |||
// 基础资料 | |||
JobapplicantAdd?: string; | |||
JobapplicantDel?: string; |
@@ -2,6 +2,7 @@ import { web } from '@/constants/index'; | |||
export const ResumeUrl: Url.Resume = { | |||
JobseekerDetail: web + '/jobseeker/detail', | |||
JobseekerList: web + '/jobseeker/list', | |||
// 基础资料 | |||
JobapplicantAdd: web + '/jobapplicant/add', | |||
JobapplicantDel: web + '/jobapplicant/del', |