vitae.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <div class="card-search">
  3. <div class="jl-content">
  4. <!-- 头像等信息 -->
  5. <div class="avt-content">
  6. <!--头像 -->
  7. <div class="avt-image">
  8. <a-avatar :size="72" :src="avtImg"></a-avatar>
  9. </div>
  10. <!-- 姓名 -->
  11. <h1>{{ jobUserInfo.name }}</h1>
  12. <!-- 性别,年龄,民族 -->
  13. <div class="age-info">
  14. <span>
  15. <man-outlined v-if="jobUserInfo.genderName === '男'"/>
  16. <woman-outlined v-if="jobUserInfo.genderName === '女'"/>
  17. {{ jobUserInfo.genderName }}
  18. </span>
  19. <span>
  20. {{ jobUserInfo.age }}岁
  21. </span>
  22. <span>
  23. {{ jobUserInfo.nation }}
  24. </span>
  25. </div>
  26. <!-- 政治面貌,学历,手机 -->
  27. <div class="politics-info">
  28. <span class="label-span">
  29. 政治面貌:
  30. </span>
  31. <span>
  32. {{ jobUserInfo.politicsStatusName }}
  33. </span>
  34. <span class="label-span">
  35. 学历:
  36. </span>
  37. <span>
  38. {{ jobUserInfo.cultureName }}
  39. </span>
  40. <span class="label-span">
  41. 手机:
  42. </span>
  43. <span>
  44. {{ jobUserInfo.userMobile }}
  45. </span>
  46. </div>
  47. </div>
  48. <!-- 基本信息与学历,工作经历 -->
  49. <div class="info-content">
  50. <a-divider orientation="left">基本信息</a-divider>
  51. <a-descriptions :column="2" bordered style="margin-left: 25px;">
  52. <a-descriptions-item label="出生地">{{ jobUserInfo.birthPlace }}</a-descriptions-item>
  53. <a-descriptions-item label="身份证号">{{ jobUserInfo.identityNumber }}</a-descriptions-item>
  54. <a-descriptions-item label="重点人员类别">{{ jobUserInfo.keyTypeName }}</a-descriptions-item>
  55. <a-descriptions-item label="健康状况">{{ jobUserInfo.healthName }}</a-descriptions-item>
  56. <a-descriptions-item label="就业状态">{{ jobUserInfo.jobStatusName }}</a-descriptions-item>
  57. <a-descriptions-item label="户口性质">{{ jobUserInfo.familyNatureName }}</a-descriptions-item>
  58. <a-descriptions-item :span="2" label="住址">{{ jobUserInfo.familyAddress }}</a-descriptions-item>
  59. <a-descriptions-item :span="2" label="兴趣爱好">{{ jobUserInfo.hobby }}</a-descriptions-item>
  60. <a-descriptions-item :span="2" label="专业技术特长">{{ jobUserInfo.personalSkills }}</a-descriptions-item>
  61. </a-descriptions>
  62. <a-divider orientation="left">教育经历</a-divider>
  63. <a-table :columns="educationColumns" :data-source="educationData" :pagination="false" bordered
  64. style="margin-left: 11px;">
  65. <template #bodyCell="{ column, index, record}">
  66. <template v-if="column.key === 'cultureRank'">
  67. <div>
  68. {{
  69. getCultureName(record.cultureRank)
  70. }}
  71. </div>
  72. </template>
  73. <template v-if="column.key === 'schoolTime'">
  74. <div>
  75. {{
  76. dayjs(record.schoolTime).format('YYYY-MM-DD')
  77. }}
  78. </div>
  79. </template>
  80. <template v-if="column.key === 'overTime'">
  81. <div>
  82. {{
  83. dayjs(record.overTime).format('YYYY-MM-DD')
  84. }}
  85. </div>
  86. </template>
  87. </template>
  88. </a-table>
  89. <a-divider orientation="left">工作经历</a-divider>
  90. <a-timeline style="margin-left: 25px;">
  91. <a-timeline-item v-for="(item, key) in experienceData" :key="key" position="left">
  92. <p>{{ dayjs(item.startTime).format('YYYY-MM-DD') }}至{{ dayjs(item.endTime).format('YYYY-MM-DD') }}</p>
  93. <h1>{{ item.workAddress }}</h1>
  94. <h1>{{ item.duties }}</h1>
  95. </a-timeline-item>
  96. </a-timeline>
  97. </div>
  98. </div>
  99. </div>
  100. </template>
  101. <script setup lang="ts">
  102. import {onMounted, reactive, ref} from "vue";
  103. import {getDataById, getEducationList, getExperienceList} from "@/api/jobUserManager/jobuser";
  104. import avtImg from "@/assets/images/jl-avt.png"
  105. import {ManOutlined, WomanOutlined} from '@ant-design/icons-vue';
  106. import type {SelectProps, TableColumnsType} from "ant-design-vue";
  107. import dayjs from "dayjs";
  108. import {getSysDictionaryList} from "@/api/system/dictionary";
  109. // 求职人员信息
  110. const jobUserInfo = reactive({
  111. name: "",
  112. genderName: "",
  113. age: null,
  114. nation: "",
  115. politicsStatusName: "",
  116. cultureName: "",
  117. userMobile: "",
  118. birthPlace: "",
  119. identityNumber: "",
  120. keyTypeName: "",
  121. healthName: "",
  122. jobStatusName: "",
  123. familyNatureName: "",
  124. familyAddress: "",
  125. hobby: "",
  126. personalSkills: ""
  127. })
  128. // 受教育经历
  129. const educationData = ref<Array<any>>([]);
  130. // 受教育经历表格定义
  131. const educationColumns: TableColumnsType = [
  132. {
  133. title: '序号',
  134. align: "center",
  135. key: 'educationID',
  136. width: 120,
  137. customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`
  138. },
  139. {
  140. title: '学校名',
  141. dataIndex: 'schoolName',
  142. key: 'schoolName',
  143. align: "center",
  144. width: 120
  145. },
  146. {
  147. title: '文化程度',
  148. dataIndex: 'cultureRank',
  149. key: 'cultureRank',
  150. align: "center",
  151. width: 120
  152. },
  153. {
  154. title: '就读时间',
  155. dataIndex: 'schoolTime',
  156. key: 'schoolTime',
  157. align: "center",
  158. width: 120
  159. },
  160. {
  161. title: '毕业时间',
  162. dataIndex: 'overTime',
  163. key: 'overTime',
  164. align: "center",
  165. width: 120
  166. },
  167. {
  168. title: '专业',
  169. dataIndex: 'major',
  170. key: 'major',
  171. align: "center",
  172. width: 120
  173. },
  174. ];
  175. const searchParams = reactive({
  176. pageIndex: 1,
  177. pageSize: 99
  178. });
  179. // 工作经验数据
  180. const experienceData = ref<Array<any>>([]);
  181. // 教育经历数据
  182. const cultureList = ref<SelectProps['options']>();
  183. // 加载求职人员数据
  184. const loadData = (id: any) => {
  185. getDataById(id).then(data => {
  186. Object.keys(jobUserInfo).forEach(key => {
  187. jobUserInfo[key] = data[key];
  188. })
  189. });
  190. };
  191. // 加载教育经历
  192. const loadEducation = (id: any) => {
  193. getEducationList(id).then(data => {
  194. if (data) {
  195. educationData.value = data;
  196. }
  197. });
  198. }
  199. // 加载工作经历
  200. const loadExperienceData = (id: any) => {
  201. getExperienceList(id).then(data => {
  202. if (data) {
  203. data.sort((a, b) => {
  204. // 将 startTime 字段转换为日期对象进行比较
  205. const startTimeA = new Date(a.startTime);
  206. const startTimeB = new Date(b.startTime);
  207. return startTimeB - startTimeA;
  208. })
  209. experienceData.value = data;
  210. }
  211. })
  212. }
  213. // 获取教育经历数据
  214. const getCultureList = () => {
  215. getSysDictionaryList('CultureLevel').then((data) => {
  216. cultureList.value = data;
  217. });
  218. };
  219. function getCultureName(value: any) {
  220. let filter = cultureList.value?.filter(item => item.value == value);
  221. if (filter && filter.length > 0) {
  222. return filter[0].name
  223. }
  224. return "";
  225. }
  226. // 页面初始化
  227. onMounted(() => {
  228. const id = history.state.params?.id;
  229. loadData(id);
  230. loadEducation(id);
  231. loadExperienceData(id)
  232. getCultureList()
  233. })
  234. </script>
  235. <style lang="less" scoped>
  236. .card-search {
  237. .jl-content {
  238. min-height: calc(100vh - 240px);
  239. width: 100%;
  240. display: flex;
  241. .avt-content {
  242. width: 20%;
  243. background-color: #e7e7e7;
  244. padding: 10px;
  245. .avt-image {
  246. display: flex;
  247. flex-wrap: wrap;
  248. justify-content: center;
  249. }
  250. .age-info {
  251. width: 100%;
  252. display: flex;
  253. justify-content: space-between;
  254. margin-top: 15px;
  255. padding: 0 20%;
  256. }
  257. .politics-info {
  258. margin-top: 25px;
  259. display: grid;
  260. row-gap: 22px;
  261. grid-template-columns: repeat(2, minmax(0, 1fr));
  262. .label-span {
  263. text-align: right;
  264. }
  265. }
  266. h1 {
  267. margin-top: 1rem;
  268. text-align: center;
  269. font-size: 20px;
  270. font-weight: 700;
  271. }
  272. }
  273. .info-content {
  274. width: 80%;
  275. height: 100%;
  276. margin-left: 10px;
  277. }
  278. }
  279. }
  280. </style>