@@ -8,6 +8,6 @@ | |||
</head> | |||
<body> | |||
<div id="root"></div> | |||
<script src="/umi.053d2904.js"></script> | |||
<script src="/umi.c3114048.js"></script> | |||
</body> | |||
</html> |
@@ -4,7 +4,7 @@ import { Layout, Modal, Dropdown, Image, Flex, Col, ConfigProvider, Button, Spac | |||
import { HomeOutlined, LogoutOutlined, FileTextOutlined } from '@ant-design/icons'; | |||
import { baseUrl } from './constants/index' | |||
import routes from '../config/routes' | |||
import { history, useModel } from '@umijs/max'; | |||
import { history, useModel, Link } from '@umijs/max'; | |||
import { filterRoutesByAccess, findAccessIndex } from './utils/RouteHelper' | |||
import LoginIndex from '@/components/Login/Index/index' | |||
@@ -83,12 +83,18 @@ export const layout = () => { | |||
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> | |||
<div style={{cursor: 'pointer'}} onClick={() => { | |||
localStorage.setItem('role', 'common') | |||
history.replace('/talent/home'); | |||
window.location.reload() | |||
} | |||
}> | |||
<Flex align='center' > | |||
{logo} | |||
<div style={{ margin: '0 40px 0 8px', fontSize: 18, color: '#000000' }}>菊城人才网</div> | |||
</Flex> | |||
</div> | |||
</> | |||
); | |||
}, | |||
@@ -176,7 +182,7 @@ export const layout = () => { | |||
}, | |||
menuDataRender: () => { | |||
if (localStorage.getItem('path') == '/talent/search/job' || | |||
localStorage.getItem('path') == '/talent/search/company' || | |||
localStorage.getItem('path') == '/talent/search/company' || | |||
localStorage.getItem('path') == '/talent/home' || | |||
localStorage.getItem('path') == '/talent/fair' || | |||
localStorage.getItem('path') == '/talent/information' || |
@@ -1,7 +1,7 @@ | |||
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 { ConfigProvider, Button, Popconfirm, Card, Space, Row, Avatar,Flex, 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' | |||
@@ -32,105 +32,74 @@ const HomePage: React.FC<SearchFilterProps> = ({ list, type }) => { | |||
}} | |||
> | |||
<div style={{ minHeight: '800px' }}> | |||
<ProList | |||
actionRef={actionRef} | |||
headerTitle={type} | |||
rowKey="id" | |||
dataSource={list} | |||
<Row gutter={[20, 20]}> | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<Col span={24}> | |||
<Link to={{ pathname: `/talent/resume/detail?id=${item.customer_id}` }} target="_blank" style={{ color: '#000000' }}> | |||
<Space direction='vertical' style={{ background: '#ffffff', padding: '20px', width: '100%', borderRadius: 10, cursor: 'pointer' }}> | |||
<Space size={10} align='start'> | |||
<Flex justify='center' align='center' style={{ width: 88 }}> | |||
<Space direction='vertical' align='center'> | |||
<Avatar size={68} src={item.photo ? `${Imageprefix}${item.photo}` : '/images/onlylogo.jpg'} /> | |||
<Tag color='#19be6e'> {item.salary_range_txt}</Tag> | |||
</Space> | |||
</Flex> | |||
<Space direction='vertical' > | |||
<Space align='center'> | |||
<div style={{ fontWeight: 'bold', fontSize: 18 }}>{item.seekername}</div> | |||
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></> | |||
} | |||
{ | |||
item.age && <><Tag >{item.age}岁</Tag></> | |||
} | |||
{ | |||
item.gender && item.gender == '男' && <><Tag color="blue">{item.gender}</Tag></> | |||
} | |||
{ | |||
item.gender && item.gender == '女' && <><Tag color="pink">{item.gender}</Tag></> | |||
} | |||
</Space> | |||
<Space> | |||
<div> | |||
{ | |||
item.education_txt && item.education_txt != 0 && <>{item.education_txt}</> | |||
} | |||
</div> | |||
<div> | |||
{ | |||
item.work_experience && item.work_experience != 0 && <> <Divider type='vertical'></Divider> 工作经验:{item.work_experience}年</> | |||
} | |||
</div> | |||
</Space> | |||
<Descriptions size='small' style={{ width: '100%' }}> | |||
<Descriptions.Item label="求职期望" span={24}> {item.other_positions}{ | |||
item.desire_positions && item.desire_positions.length > 0 && <>{item.desire_positions[0].name}</> | |||
}</Descriptions.Item> | |||
<Descriptions.Item label="个人简介" span={24}>{ | |||
item.introduction ? <><div style={{ lineHeight: 1.5 }} dangerouslySetInnerHTML={{ | |||
__html: item?.introduction | |||
}} ></div></> | |||
: <><div style={{ lineHeight: 1.5 }} >无</div></> | |||
}</Descriptions.Item> | |||
</Space> | |||
); | |||
}, | |||
}, | |||
description: { | |||
dataIndex: 'introduction' | |||
}, | |||
// actions: { | |||
// render: () => [<StarOutlined />] | |||
// }, | |||
}} | |||
/> | |||
</div> | |||
</Descriptions> | |||
</Space> | |||
</Space> | |||
{/* <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> | |||
</Space> | |||
</Link > | |||
], | |||
}, | |||
]} | |||
/> */} | |||
</Col > | |||
</> | |||
)) | |||
} | |||
</Row > | |||
</div> | |||
</ConfigProvider > | |||
</> |
@@ -113,7 +113,7 @@ const HomePage: React.FC = () => { | |||
setTotal(res.data.total) | |||
}) | |||
} | |||
headerTitle="已查看简历" | |||
headerTitle="已获取联系方式" | |||
/> | |||
</ConfigProvider > | |||
</> |
@@ -1,12 +1,13 @@ | |||
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 { ConfigProvider, Button, Popconfirm, Card, Space, Tabs, Avatar, Tag, Col, Row, Flex, Descriptions, Pagination, Divider } from 'antd'; | |||
import { SearchOutlined, LikeOutlined, EnvironmentOutlined, FieldTimeOutlined } from '@ant-design/icons'; | |||
import { useModel, connect, history, Link } from 'umi'; | |||
import { Imageprefix } from '@/constants/index' | |||
import { GetCompanyRecommentResume } from '@/services/apis/company'; | |||
import EmptyResult from '@/components/Common/EmptyResult' | |||
const HomePage: React.FC = () => { | |||
@@ -16,6 +17,14 @@ const HomePage: React.FC = () => { | |||
const [pageSize, setPageSize] = useState<number>(10) | |||
const [total, setTotal] = useState<number>(0) | |||
useEffect(() => { | |||
GetCompanyRecommentResume({ page: 1, pagesize: 10, sortby: 'desc' }).then(res => { | |||
setList(res.data.list) | |||
setTotal(res.data.total) | |||
}) | |||
}, []); | |||
return ( | |||
<> | |||
<ConfigProvider | |||
@@ -31,119 +40,94 @@ const HomePage: React.FC = () => { | |||
}} | |||
> | |||
<div style={{ minHeight: '800px' }}> | |||
<ProList | |||
actionRef={actionRef} | |||
headerTitle="推荐简历" | |||
rowKey="id" | |||
dataSource={list} | |||
request={async (params = {} as Record<string, any>) => | |||
GetCompanyRecommentResume({ | |||
page: page, | |||
pagesize: pageSize, | |||
sort: 'id', | |||
sortby: 'desc', | |||
}).then((res: any) => { | |||
<Row gutter={[20, 20]}> | |||
{ | |||
list.length > 0 && list.map((item: any, index: number) => ( | |||
<> | |||
<Col span={24}> | |||
<Link to={{ pathname: `/talent/resume/detail?id=${item.customer_id}` }} target="_blank" style={{ color: '#000000' }}> | |||
<Space direction='vertical' style={{ background: '#ffffff', padding: '20px', width: '100%', borderRadius: 10, cursor: 'pointer' }}> | |||
<Space size={10} align='start'> | |||
<Flex justify='center' align='center' style={{ width: 88 }}> | |||
<Space direction='vertical' align='center'> | |||
<Avatar size={68} src={item.photo ? `${Imageprefix}${item.photo}` : '/images/onlylogo.jpg'} /> | |||
<Tag color='#19be6e'> {item.salary_range_txt}</Tag> | |||
</Space> | |||
</Flex> | |||
<Space direction='vertical' > | |||
<Space align='center'> | |||
<div style={{ fontWeight: 'bold', fontSize: 18 }}>{item.seekername}</div> | |||
{ | |||
item.age && <><Tag >{item.age}岁</Tag></> | |||
} | |||
{ | |||
item.gender && item.gender == '男' && <><Tag color="blue">{item.gender}</Tag></> | |||
} | |||
{ | |||
item.gender && item.gender == '女' && <><Tag color="pink">{item.gender}</Tag></> | |||
} | |||
</Space> | |||
<Space> | |||
<div> | |||
{ | |||
item.education_text && item.education_text != 0 && <>{item.education_text}</> | |||
} | |||
</div> | |||
{ | |||
item.work_experience && item.work_experience != 0 ? <><div> <Divider type='vertical'></Divider> 工作经验:{item.work_experience}年</div></> : '' | |||
} | |||
</Space> | |||
<Descriptions size='small' style={{ width: '100%' }}> | |||
<Descriptions.Item label="求职期望" span={24}> {item.other_positions}{ | |||
item.desire_positions && item.desire_positions.length > 0 && <>{item.desire_positions[0].name}</> | |||
}</Descriptions.Item> | |||
<Descriptions.Item label="个人简介" span={24}>{ | |||
item.introduction ? <><div style={{ lineHeight: 1.5 }} dangerouslySetInnerHTML={{ | |||
__html: item?.introduction | |||
}} ></div></> | |||
: <><div style={{ lineHeight: 1.5 }} >无</div></> | |||
}</Descriptions.Item> | |||
</Descriptions> | |||
</Space> | |||
</Space> | |||
</Space> | |||
</Link > | |||
</Col > | |||
</> | |||
)) | |||
} | |||
</Row > | |||
{ | |||
!list || list.length == 0 && <EmptyResult description="没有找到符合条件的简历" /> | |||
} | |||
<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) | |||
GetCompanyRecommentResume({ page: page, pagesize: pageSize, sortby: 'desc' }).then(res => { | |||
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: { | |||
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}> | |||
<Tag color="#5BD8A6">{row.age}岁</Tag> | |||
<Tag color="blue">{row.gender}</Tag> | |||
<Tag color="#5BD8A6">{row.education_text}</Tag> | |||
<Tag color="#5BD8A6">工作经验:{row.work_experience}年</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> | |||
], | |||
}, | |||
]} | |||
/> */} | |||
</Flex> | |||
</ConfigProvider > | |||
</> |
@@ -118,7 +118,7 @@ const ManageCompanyResumeRecycle: React.FC<ManageCompanyResumeRecycleProps> = ({ | |||
setTotal(res.data.total) | |||
}) | |||
} | |||
headerTitle="待看简历" | |||
headerTitle="回收站" | |||
/> | |||
</ConfigProvider > | |||
</> |
@@ -127,7 +127,7 @@ const ManageCompanyResumeTalent: React.FC<ManageCompanyResumeTalentProps> = ({ch | |||
setTotal(res.data.total) | |||
}) | |||
} | |||
headerTitle="待看简历" | |||
headerTitle="人才库" | |||
/> | |||
</ConfigProvider > | |||
</> |
@@ -116,11 +116,11 @@ const ManageJobseekerHomeInterview: React.FC = () => { | |||
cardActionProps: 'actions', | |||
render: (text, row) => [<> | |||
<div style={{ width: '100%', display: 'flex', justifyContent: 'space-around' }}> | |||
<Button size='small' onClick={async () => { | |||
<Button onClick={async () => { | |||
setDetail(row) | |||
setOpenPreview(true); | |||
}}>编辑</Button>, | |||
<Button size='small' onClick={() => { | |||
<Button onClick={() => { | |||
Modal.confirm({ | |||
title: '删除部门', | |||
content: '确定删除部门吗?', |
@@ -111,8 +111,8 @@ const HomePage: React.FC = ({ dispatch, dictModel }: any) => { | |||
title={<Link to={{ pathname: `/talent/company/detail?id=${localStorage.getItem('companyid')}` }} target="_blank" style={{ color: '#000000', fontSize: 16, marginRight: 10 }}> | |||
{detail.full_name} | |||
</Link>} | |||
extra={<Link to={{ pathname: `/manage/company/info` }} style={{ color: '#19be6e', fontSize: 14, marginRight: 10 }}> | |||
编辑资料 | |||
extra={<Link to={{ pathname: `/manage/company/info` }} style={{ color: '#19be6e', fontSize: 14, marginRight: 10 }}> | |||
<Button >编辑资料</Button> | |||
</Link>} | |||
style={{ boxShadow: '0 8px 20px #f0f0f0' }}> | |||
<Space direction='vertical' style={{ borderRadius: 10, width: '100%' }}> |
@@ -1,7 +1,7 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import { Link } from '@umijs/max'; | |||
import { HomeOutlined, FormOutlined, CameraOutlined } from '@ant-design/icons' | |||
import { Space, Tabs, Button, Avatar, Row, Col, Image, Flex, Card, Descriptions, Modal } from 'antd'; | |||
import { Space, Tabs, Button, Avatar, Row, Col, Image, Flex, Card, Descriptions, Modal, ConfigProvider } from 'antd'; | |||
import { Imageprefix } from '@/constants/index' | |||
@@ -50,95 +50,111 @@ const ManegeJobseekerHome: React.FC = () => { | |||
return ( | |||
<> | |||
<Space direction='vertical' size={30} style={{minHeight: '800px'}}> | |||
{/* 头部 */} | |||
<Space direction='vertical' size={20} style={{ width: '100%', backgroundColor: '#fff', borderRadius: 8, padding: 20 }}> | |||
<Space> | |||
<Flex justify="center" align='flex-end' onClick={() => { setOpenPhotoPreview(true) }}> | |||
<Avatar size={88} src={Imageprefix + detail.photo} shape='square' /><CameraOutlined /> | |||
</Flex> | |||
<Flex justify="center" align="center"> | |||
<Flex justify="center" align='center' onClick={() => { setOpenPreview(true) }}> | |||
<h1>{detail.full_name}</h1><FormOutlined /> | |||
<ConfigProvider | |||
theme={{ | |||
token: { | |||
colorPrimary: '#19be6e', | |||
}, | |||
components: { | |||
Button: { | |||
colorText: '#19be6e' | |||
}, | |||
} | |||
}} | |||
> | |||
<Space direction='vertical' size={30} style={{ minHeight: '800px' }}> | |||
{/* 头部 */} | |||
<Space direction='vertical' size={20} style={{ width: '100%', backgroundColor: '#fff', borderRadius: 8, padding: 20 }}> | |||
<Space> | |||
<Flex justify="center" align='flex-end' onClick={() => { setOpenPhotoPreview(true) }}> | |||
<Avatar size={88} src={Imageprefix + detail.photo} shape='square' /><CameraOutlined style={{ color: '#19be6e', fontSize: 20 }} /> | |||
</Flex> | |||
</Flex> | |||
<Flex justify="center" align="center"> | |||
<Flex justify="center" align='center' onClick={() => { setOpenPreview(true) }}> | |||
<h1>{detail.full_name}</h1><FormOutlined style={{ color: '#19be6e', fontSize: 20 }} /> | |||
</Flex> | |||
</Flex> | |||
</Space> | |||
<Descriptions style={{ width: '100%' }}> | |||
<Descriptions.Item label="社会统一信用代码">{detail.registration_number}</Descriptions.Item> | |||
<Descriptions.Item label="注册时间">{detail.establishment_date}</Descriptions.Item> | |||
<Descriptions.Item label="手机号">{detail.mobile}</Descriptions.Item> | |||
<Descriptions.Item label="联系固话">{detail.phone}</Descriptions.Item> | |||
<Descriptions.Item label="联系人">{detail.contact}</Descriptions.Item> | |||
<Descriptions.Item label="地址">{detail.address}</Descriptions.Item> | |||
<Descriptions.Item label="企业官网">{detail.website}</Descriptions.Item> | |||
<Descriptions.Item label="所属行业">{detail.industry_text}{detail.industry2_text}</Descriptions.Item> | |||
<Descriptions.Item label="企业性质">{detail.nature_text}</Descriptions.Item> | |||
<Descriptions.Item label="企业规模">{detail.scale_text}</Descriptions.Item> | |||
<Descriptions.Item label="企业介绍"> | |||
<div dangerouslySetInnerHTML={{ | |||
__html: detail?.introduction | |||
}} ></div> | |||
</Descriptions.Item> | |||
</Descriptions> | |||
</Space> | |||
<Descriptions style={{ width: '100%' }}> | |||
<Descriptions.Item label="社会统一信用代码">{detail.registration_number}</Descriptions.Item> | |||
<Descriptions.Item label="注册时间">{detail.establishment_date}</Descriptions.Item> | |||
<Descriptions.Item label="手机号">{detail.mobile}</Descriptions.Item> | |||
<Descriptions.Item label="联系固话">{detail.phone}</Descriptions.Item> | |||
<Descriptions.Item label="联系人">{detail.contact}</Descriptions.Item> | |||
<Descriptions.Item label="地址">{detail.address}</Descriptions.Item> | |||
<Descriptions.Item label="企业官网">{detail.website}</Descriptions.Item> | |||
<Descriptions.Item label="所属行业">{detail.industry_text}{detail.industry2_text}</Descriptions.Item> | |||
<Descriptions.Item label="企业性质">{detail.nature_text}</Descriptions.Item> | |||
<Descriptions.Item label="企业规模">{detail.scale_text}</Descriptions.Item> | |||
<Descriptions.Item label="企业介绍"> | |||
<div dangerouslySetInnerHTML={{ | |||
__html: detail?.introduction | |||
}} ></div> | |||
</Descriptions.Item> | |||
</Descriptions> | |||
<Row gutter={[16, 16]}> | |||
<Col span={12}> | |||
<Card title="企业Logo" extra={<Button onClick={() => { setOpenPhotoPreview(true) }}>编辑</Button>}> | |||
<Image src={Imageprefix + detail.photo} width={200} height={200} /> | |||
</Card> | |||
</Col> | |||
<Col span={12}> | |||
<Card title="营业执照" extra={<Button onClick={() => { setOpenLicensePreview(true) }}>编辑</Button>}> | |||
<Image src={Imageprefix + detail.license_path} width={200} height={200} /> | |||
</Card> | |||
</Col> | |||
</Row> | |||
</Space> | |||
<Row gutter={[16, 16]}> | |||
<Col span={12}> | |||
<Card title="企业Logo" extra={<Button type='text' onClick={() => { setOpenPhotoPreview(true) }}>编辑</Button>}> | |||
<Image src={Imageprefix + detail.photo} width={200} height={200} /> | |||
</Card> | |||
</Col> | |||
<Col span={12}> | |||
<Card title="营业执照" extra={<Button type='text' onClick={() => { setOpenLicensePreview(true) }}>编辑</Button>}> | |||
<Image src={Imageprefix + detail.license_path} width={200} height={200} /> | |||
</Card> | |||
</Col> | |||
</Row> | |||
</Space> | |||
<Modal | |||
open={openPreview} | |||
title='编辑企业信息' | |||
centered | |||
maskClosable={false} | |||
footer={null} | |||
destroyOnClose | |||
width={1000} | |||
onCancel={() => { | |||
setOpenPreview(false) | |||
}} | |||
> | |||
<ManageCompanyInfoBasic detail={detail} closeModel={closeModel}></ManageCompanyInfoBasic> | |||
</Modal> | |||
{/* 企业Logo */} | |||
<Modal | |||
open={openPhotoPreview} | |||
title='上传企业Logo' | |||
centered | |||
maskClosable={false} | |||
footer={null} | |||
destroyOnClose | |||
width={1000} | |||
onCancel={() => { | |||
setOpenPhotoPreview(false) | |||
}} | |||
> | |||
<ManageCompanyInfoPhoto detail={detail} closeModel={closePhotoModel}></ManageCompanyInfoPhoto> | |||
</Modal> | |||
{/* 企业营业执照 */} | |||
<Modal | |||
open={openLicensePreview} | |||
title='上传营业执照' | |||
centered | |||
maskClosable={false} | |||
footer={null} | |||
destroyOnClose | |||
width={1000} | |||
onCancel={() => { | |||
setOpenLicensePreview(false) | |||
}} | |||
> | |||
<ManageCompanyInfoLicense detail={detail} closeModel={closeLicenseModel}></ManageCompanyInfoLicense> | |||
</Modal> | |||
<Modal | |||
open={openPreview} | |||
title='编辑企业信息' | |||
centered | |||
maskClosable={false} | |||
footer={null} | |||
destroyOnClose | |||
width={1000} | |||
onCancel={() => { | |||
setOpenPreview(false) | |||
}} | |||
> | |||
<ManageCompanyInfoBasic detail={detail} closeModel={closeModel}></ManageCompanyInfoBasic> | |||
</Modal> | |||
{/* 企业Logo */} | |||
<Modal | |||
open={openPhotoPreview} | |||
title='上传企业Logo' | |||
centered | |||
maskClosable={false} | |||
footer={null} | |||
destroyOnClose | |||
width={1000} | |||
onCancel={() => { | |||
setOpenPhotoPreview(false) | |||
}} | |||
> | |||
<ManageCompanyInfoPhoto detail={detail} closeModel={closePhotoModel}></ManageCompanyInfoPhoto> | |||
</Modal> | |||
{/* 企业营业执照 */} | |||
<Modal | |||
open={openLicensePreview} | |||
title='上传营业执照' | |||
centered | |||
maskClosable={false} | |||
footer={null} | |||
destroyOnClose | |||
width={1000} | |||
onCancel={() => { | |||
setOpenLicensePreview(false) | |||
}} | |||
> | |||
<ManageCompanyInfoLicense detail={detail} closeModel={closeLicenseModel}></ManageCompanyInfoLicense> | |||
</Modal> | |||
</ConfigProvider> | |||
</> | |||
); | |||
}; |
@@ -1,8 +1,8 @@ | |||
import { useState, useEffect, useRef } from 'react'; | |||
import type { ActionType, EditableFormInstance } from '@ant-design/pro-components'; | |||
import { ProList, PageContainer } from '@ant-design/pro-components'; | |||
import { HomeOutlined, FormOutlined, FireOutlined } from '@ant-design/icons' | |||
import { Space, Tabs, Button, Descriptions, Row, Col, Tag, Flex, Card, Pagination, Modal, ConfigProvider } from 'antd'; | |||
import { HomeOutlined, SearchOutlined, FireOutlined } from '@ant-design/icons' | |||
import { Space, Tabs, Button, Descriptions, Row, Col, Tag, Flex, Card, Input, Modal, ConfigProvider } from 'antd'; | |||
import { Link } from '@umijs/max'; | |||
import { Imageprefix } from '@/constants/index' | |||
@@ -14,14 +14,15 @@ import ManageCompanyPost from '@/components/Manage/Company/Post' | |||
const ManegeJobseekerHome: React.FC = () => { | |||
const actionRef = useRef<ActionType>(); | |||
const [statuslist, setStatuslist] = useState<object[]>([{ name: '发布中', id: '1' }, { name: '未发布', id: '2' }, { name: '已暂停', id: '3' }, { name: '已锁定', id: '4' }, { name: '回收站', id: '5' }, { name: '已过期', id: '6' }]) | |||
const [activeKey, setActiveKey] = useState<string>('1') | |||
const [statuslist, setStatuslist] = useState<object[]>([{ name: '全部', id: '0' }, { name: '发布中', id: '1' }, { name: '未发布', id: '2' }, { name: '已暂停', id: '3' }, { name: '已锁定', id: '4' }, { name: '回收站', id: '5' }, { name: '已过期', id: '6' }]) | |||
const [activeKey, setActiveKey] = useState<string>('0') | |||
const [list, setList] = useState<object[]>([]) | |||
const [total, setTotal] = useState<number>(0) | |||
const [page, setPage] = useState<number>(1) | |||
const [pageSize, setPageSize] = useState<number>(12) | |||
const [openPreview, setOpenPreview] = useState(false); | |||
const [detail, setDetail] = useState<any>({}); | |||
const [keywordName, setKeywordName] = useState<string>(''); | |||
const closeModel = (value: boolean) => { | |||
@@ -53,7 +54,8 @@ const ManegeJobseekerHome: React.FC = () => { | |||
pagesize: pageSize, | |||
sort: 'id', | |||
sortby: 'desc', | |||
status: Number(activeKey) | |||
status: Number(activeKey), | |||
keyword: keywordName | |||
}).then((res: any) => { | |||
setList(res.data.list) | |||
setTotal(res.data.total) | |||
@@ -103,12 +105,12 @@ const ManegeJobseekerHome: React.FC = () => { | |||
cardActionProps: 'actions', | |||
render: (text, row) => [<> | |||
<div style={{ width: '100%', display: 'flex', justifyContent: 'space-around' }}> | |||
<Button size='small' disabled={row.status == 4 || row.status == 5} onClick={async () => { | |||
<Button type='primary' disabled={row.status == 4 || row.status == 5} onClick={async () => { | |||
let res = await GetCompanyJobInfo({ id: row.id }) | |||
setDetail(res) | |||
setOpenPreview(true); | |||
}}>编辑</Button> | |||
<Button size='small' disabled={row.status == 3 || row.status == 4 || row.status == 5 || row.status == 6} onClick={() => { | |||
<Button color="cyan" variant="solid" disabled={row.status == 3 || row.status == 4 || row.status == 5 || row.status == 6} onClick={() => { | |||
Modal.confirm({ | |||
title: '暂停招聘', | |||
content: '确定暂停招聘吗?', | |||
@@ -125,7 +127,7 @@ const ManegeJobseekerHome: React.FC = () => { | |||
centered: true | |||
}); | |||
}}>暂停招聘</Button> | |||
<Button size='small' disabled={row.status === 1 || row.status == 4 || row.status == 5} onClick={() => { | |||
<Button color="cyan" variant="solid" disabled={row.status === 1 || row.status == 4 || row.status == 5} onClick={() => { | |||
Modal.confirm({ | |||
title: '重新发布', | |||
content: '确定重新发布吗?', | |||
@@ -143,7 +145,7 @@ const ManegeJobseekerHome: React.FC = () => { | |||
centered: true | |||
}); | |||
}} >重新发布</Button> | |||
<Button size='small' disabled={row.status === 5 || row.status == 4} onClick={() => { | |||
<Button disabled={row.status === 5 || row.status == 4} onClick={() => { | |||
Modal.confirm({ | |||
title: '放入回收站', | |||
content: '确定放入回收站吗?', | |||
@@ -161,7 +163,7 @@ const ManegeJobseekerHome: React.FC = () => { | |||
centered: true | |||
}); | |||
}} >放入回收站</Button> | |||
<Button size='small' disabled={row.status === 1 || row.status === 3 || row.status === 2 || row.status == 4 || row.status == 6} onClick={() => { | |||
<Button disabled={row.status === 1 || row.status === 3 || row.status === 2 || row.status == 4 || row.status == 6} onClick={() => { | |||
Modal.confirm({ | |||
title: '移出回收站', | |||
content: '确定移出回收站吗?', | |||
@@ -179,14 +181,13 @@ const ManegeJobseekerHome: React.FC = () => { | |||
centered: true | |||
}); | |||
}} >移出回收站</Button> | |||
<Button size='small' disabled={row.status == 4 || row.status == 5} onClick={() => { | |||
<Button danger disabled={row.status == 4 || row.status == 5} onClick={() => { | |||
Modal.confirm({ | |||
title: '删除职位', | |||
content: '确定删除职位吗?', | |||
onOk() { | |||
PostCompanyJobDel({ id: row.id }).then(res => { | |||
actionRef.current?.reload() | |||
}) | |||
}, | |||
onCancel() { | |||
@@ -295,9 +296,24 @@ const ManegeJobseekerHome: React.FC = () => { | |||
> | |||
<Flex justify='flex-end' align='center'> | |||
<Button size='large' type='primary' onClick={() => { | |||
setOpenPreview(true) | |||
}}>发布一个职位</Button> | |||
<Space> | |||
<Space.Compact > | |||
<Input | |||
size='large' | |||
prefix={<SearchOutlined style={{ color: '#19be6e' }} />} | |||
placeholder="请输入关键词" | |||
allowClear | |||
value={keywordName} | |||
onChange={(e) => { | |||
setKeywordName(e.target.value) | |||
}} | |||
/> | |||
<Button size='large' type='primary' style={{ width: 100 }} onClick={() => {actionRef.current?.reload() }}>搜索</Button> | |||
</Space.Compact> | |||
<Button size='large' type='primary' onClick={() => { | |||
setOpenPreview(true) | |||
}}>发布一个职位</Button> | |||
</Space> | |||
</Flex> | |||
<Space direction='vertical' size={30}> | |||
<Row gutter={[20, 20]}> | |||
@@ -327,7 +343,7 @@ const ManegeJobseekerHome: React.FC = () => { | |||
</Space> | |||
<Modal | |||
open={openPreview} | |||
title='编辑简历信息' | |||
title='职位信息' | |||
centered | |||
maskClosable={false} | |||
footer={null} |
@@ -32,7 +32,7 @@ const HomePage: React.FC = () => { | |||
sortby: 'desc', | |||
type: 1001028 | |||
}).then(res => { | |||
setList(res.data.seekers) | |||
setList(res.data.seekers ? res.data.seekers : []) | |||
getTotal(res.data.total) | |||
}) | |||
@@ -49,7 +49,7 @@ const HomePage: React.FC = () => { | |||
sort: 'updated_at', | |||
sortby: 'desc' | |||
}) | |||
setList(res.data.seekers) | |||
setList(res.data.seekers ? res.data.seekers : []) | |||
getTotal(res.data.total) | |||
} | |||
} |