您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.tsx 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. import { useState, useEffect, useRef } from 'react';
  2. import { ProList, PageContainer } from '@ant-design/pro-components';
  3. import { ConfigProvider, Button, Flex, Input, Space, Image, Select, Row, Col, Divider, Tag, Card, Avatar, Typography } from 'antd';
  4. import { SearchOutlined, FireOutlined, MessageOutlined, RightOutlined } from '@ant-design/icons';
  5. import { useModel, connect, history, Link } from 'umi';
  6. import { PostCompanySearch } from '@/services/apis/company';
  7. import { Imageprefix } from '@/constants';
  8. const HomeProbation: React.FC = () => {
  9. const [list, setList] = useState<object[]>([])
  10. const [total, setTotal] = useState<number>(0)
  11. const [page, setPage] = useState<number>(1)
  12. const [pageSize, setPageSize] = useState<number>(8)
  13. useEffect(() => {
  14. PostCompanySearch({
  15. page: 1,
  16. pagesize: 8,
  17. sort: 'updated_at',
  18. sortby: 'desc',
  19. probation: 1
  20. }).then(res => {
  21. setList(res.data.list)
  22. })
  23. }, []);
  24. return (
  25. <>
  26. <ConfigProvider
  27. theme={{
  28. token: {
  29. colorPrimary: '#19be6e',
  30. },
  31. components: {
  32. Button: {
  33. colorText: '#19be6e',
  34. }
  35. }
  36. }}
  37. >
  38. <Space direction='vertical' size={20} style={{ width: '100%' }}>
  39. {/* <Flex justify='center' align='center'>
  40. <Typography.Title level={2}>见习基地</Typography.Title>
  41. </Flex> */}
  42. <Divider orientation="left" orientationMargin="0"><Typography.Title level={2}>见习基地</Typography.Title></Divider>
  43. <Row gutter={[10, 10]}>
  44. {
  45. list.length > 0 && list.map((item: any, index: number) => (
  46. <>
  47. <Col span={6}>
  48. <Link to={{ pathname: `/talent/company/detail?id=${item.id}` }} target="_blank" style={{ width: '100%' }}>
  49. <Flex vertical align='center' justify='center' className='company-item'>
  50. <Image src={item.photo ? `${Imageprefix}${item.photo}` : '/images/logo.jpg'} preview={false} width={100} height={100} style={{ borderRadius: '4px', objectFit: 'contain' }}></Image>
  51. <Typography.Paragraph
  52. ellipsis={{ rows: 1 }}
  53. style={{ fontSize: 16, textAlign: 'center', whiteSpace: 'nowrap', marginTop: 8, width: '100%' }}
  54. >
  55. {item.full_name}
  56. </Typography.Paragraph>
  57. {/* <Typography.Paragraph
  58. ellipsis={{ rows: 1 }}
  59. style={{ fontSize: 12, color: '#999', textAlign: 'center', whiteSpace: 'nowrap', width: '100%' }}
  60. >
  61. {item.nature_text ? item.nature_text : '性质不限'}
  62. {item.industry_text ? <><Divider type='vertical' />{item.industry_text}</> : <><Divider type='vertical' />行业不限</>}
  63. {item.scale_text ? <><Divider type='vertical' />{item.scale_text}</> : <><Divider type='vertical' />规模不限</>}
  64. </Typography.Paragraph> */}
  65. </Flex >
  66. </Link>
  67. </Col>
  68. </>
  69. ))
  70. }
  71. </Row>
  72. <Flex justify='center' align='center'>
  73. <Space>
  74. <Link to={{ pathname: '/talent/search/company?probation=1' }}>
  75. <Button icon={<RightOutlined />} iconPosition='end'>更多企业</Button>
  76. </Link>
  77. </Space>
  78. </Flex>
  79. </Space>
  80. </ConfigProvider >
  81. </>
  82. );
  83. };
  84. export default HomeProbation;