You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.tsx 9.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. import { useState, useEffect, useRef } from 'react';
  2. import { ProList, PageContainer } from '@ant-design/pro-components';
  3. import { ConfigProvider, Button, Flex, Card, Space, Tag, Avatar, Row, Col, Modal, Typography, Divider, Upload, Pagination, Anchor } from 'antd';
  4. import { VideoCameraAddOutlined, PlusOutlined, EditOutlined, DownloadOutlined, FolderViewOutlined } from '@ant-design/icons';
  5. import { useModel, connect, history, Link } from 'umi';
  6. import './index.module.less'
  7. import he from 'he'
  8. import { Imageprefix } from '@/constants/index'
  9. import { GetJobseekerDetail, GetJobapplicantContactdetail } from '@/services/apis/resume'
  10. const HomeNewJob: React.FC = ({ bgcolor, fontcolor, id }: any) => {
  11. const [detail, setDetail] = useState({ mobile: '13215816085', email: '12131313@126.com', seekername: 'XXX' })
  12. const [list, setList] = useState<object[]>([{}, {}])
  13. const [total, setTotal] = useState<number>(0)
  14. const [page, setPage] = useState<number>(1)
  15. const [pageSize, setPageSize] = useState<number>(7)
  16. const [bgColor, setBgColor] = useState<string>(bgcolor)
  17. const [fontColor, setFontColor] = useState<string>(fontcolor)
  18. useEffect(() => {
  19. GetJobseekerDetail({ customer_id: id ? id : Number(localStorage.getItem('customerid')) }).then(res => {
  20. res.data.introduction = he.decode(res.data.introduction)
  21. setDetail(res.data)
  22. })
  23. }, []);
  24. useEffect(() => {
  25. setBgColor(bgcolor)
  26. }, [bgcolor]);
  27. useEffect(() => {
  28. setFontColor(fontcolor)
  29. }, [fontcolor]);
  30. return (
  31. <>
  32. <ConfigProvider
  33. theme={{
  34. token: {
  35. colorPrimary: '#19be6e',
  36. },
  37. components: {
  38. }
  39. }}
  40. >
  41. <Card >
  42. <div id='resume-box'>
  43. <h1 style={{ color: bgColor }}>{detail.seekername}</h1>
  44. <h3 style={{ color: bgColor }}>
  45. 求职意向: {detail.other_positions}、{
  46. detail.desire_positions && detail.desire_positions.length > 0 && detail.desire_positions.map((item, index) => item.level2_txt).join('、')
  47. }
  48. </h3>
  49. <table border={0} style={{ width: '100%', borderCollapse: 'collapse', border: '1px solid #ffffff' }}>
  50. <tbody>
  51. <tr>
  52. <td style={{ border: '1px solid #ffffff' }}>年龄:{detail.age}岁</td>
  53. <td style={{ border: '1px solid #ffffff' }}>民族: {detail.ethnicity_txt}</td>
  54. <td style={{ border: '1px solid #ffffff' }}>联系方式: {detail.mobile}
  55. {
  56. localStorage.getItem('role') == 'company' &&
  57. <Button type='link' onClick={() => {
  58. Modal.confirm({
  59. title: '获取联系方式',
  60. content: '获取联系方式需要扣除一个点数,是否要获取联系方式',
  61. centered: true,
  62. okText: '获取',
  63. cancelText: '取消',
  64. onOk() {
  65. GetJobapplicantContactdetail({ customer_id: detail.customer_id }).then(res => {
  66. GetJobseekerDetail({ customer_id: detail.customer_id }).then(res => {
  67. setDetail(res.data)
  68. })
  69. })
  70. },
  71. onCancel() {
  72. },
  73. });
  74. }}>获取详细</Button>
  75. }
  76. </td>
  77. <td rowSpan={5} style={{ textAlign: 'center', verticalAlign: 'middle', border: '1px solid #ffffff' }}>
  78. <img src={`${Imageprefix}${detail.photo}`} alt="" width="90" height="150" />
  79. </td>
  80. </tr>
  81. <tr>
  82. <td style={{ border: '1px solid #ffffff' }}>籍贯:{detail.native_place_txt}</td>
  83. <td style={{ border: '1px solid #ffffff' }}>政治面貌: {detail.political_status_txt}</td>
  84. <td style={{ border: '1px solid #ffffff' }} >邮箱:{detail.email}</td>
  85. </tr>
  86. <tr>
  87. <td style={{ border: '1px solid #ffffff' }}>英语:{detail.english_txt}</td>
  88. <td style={{ border: '1px solid #ffffff' }}>粤语:{detail.mandarin_txt}</td>
  89. <td style={{ border: '1px solid #ffffff' }}>国语:{detail.cantonese_txt}</td>
  90. </tr>
  91. <tr>
  92. <td style={{ border: '1px solid #ffffff' }}>计算机能力:{detail.computer_skills}</td>
  93. <td style={{ border: '1px solid #ffffff' }}>交通工具:{detail.vehicle_type_txt}</td>
  94. <td style={{ border: '1px solid #ffffff' }}>驾照类型:{detail.drive_type}</td>
  95. </tr>
  96. <tr>
  97. <td style={{ border: '1px solid #ffffff' }}>到岗日期: {detail.available_date_txt}</td>
  98. <td style={{ border: '1px solid #ffffff' }} >薪资要求: {detail.salary_range_txt}</td>
  99. <td style={{ border: '1px solid #ffffff' }}>工作经验: {detail.work_experience}年</td>
  100. </tr>
  101. </tbody>
  102. </table>
  103. <h3 style={{ padding: '10px 0', color: bgColor, borderBottom: '0.25px solid #cccccc' }}>个人简介</h3>
  104. <div>
  105. {<div dangerouslySetInnerHTML={{ __html: detail.introduction }} />}
  106. </div>
  107. <h3 style={{ padding: '10px 0', color: bgColor, borderBottom: '0.25px solid #cccccc' }}>教育经历</h3>
  108. <table border={0} style={{ width: '100%', borderCollapse: 'collapse', border: 'none' }}>
  109. <tbody>
  110. {
  111. detail.trainings && detail.trainings.map((item, index) => (
  112. <tr style={{ height: '30px', textAlign: 'center' }}>
  113. <td style={{ width: '33.33%' }}> {item.start_year}.{item.start_month}至{item.end_year}.{item.end_month}</td>
  114. <td style={{ width: '33.33%' }}>{item.school_or_institution}</td>
  115. <td style={{ width: '33.33%' }}>{item.major}</td>
  116. </tr>
  117. ))
  118. }
  119. </tbody>
  120. </table>
  121. <h3 style={{ padding: '10px 0', color: bgColor, borderBottom: '0.25px solid #cccccc' }}>工作经历</h3>
  122. <table border={0} style={{ width: '100%', borderCollapse: 'collapse', border: 'none' }}>
  123. <tbody>
  124. {
  125. detail.experiences && detail.experiences.length > 0 && detail.experiences.map((item, index) => (
  126. <tr style={{ height: '30px', textAlign: 'center' }}>
  127. <td style={{ width: '25%' }}> {item.start_year}.{item.start_month}至{item.end_year}.{item.end_month}</td>
  128. <td style={{ width: '25%' }}>{item.company_name}</td>
  129. <td style={{ width: '25%' }}>{item.position}</td>
  130. <td style={{ width: '25%' }}>{item.reason_for_leaving}</td>
  131. </tr>
  132. ))
  133. }
  134. </tbody>
  135. </table>
  136. <h3 style={{ padding: '10px 0', color: bgColor, borderBottom: '0.25px solid #cccccc' }}>荣誉证书</h3>
  137. <div>
  138. {
  139. detail.certificates && detail.certificates.map((item, index) => item.name).join('、')
  140. }
  141. </div>
  142. </div>
  143. </Card>
  144. </ConfigProvider >
  145. </>
  146. );
  147. };
  148. export default HomeNewJob;