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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. <template>
  2. <resume-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></resume-search>
  3. <a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
  4. <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
  5. @page="getPage" :loading="loading">
  6. <template #status="{ record }">
  7. {{record.status_txt}}
  8. <span v-if="record.audit_memo">({{record.audit_memo}})</span>
  9. </template>
  10. <template #default="{ record }">
  11. <a-row :gutter="10">
  12. <a-col><a-button type="primary" size="small" primary @click="edit(record)">编辑</a-button></a-col>
  13. <a-col><a-button type="primary" size="small" primary @click="detail(record)">预览</a-button></a-col>
  14. <a-popconfirm title="该简历通过审核?" @confirm="pass(record)">
  15. <a-col v-if="record.status == 1"><a-button type="primary" size="small">通过</a-button></a-col>
  16. </a-popconfirm>
  17. <a-col v-if="record.status == 1"><a-button type="primary" size="small" @click="interview(record)"
  18. danger>不通过</a-button></a-col>
  19. <!-- <a-popconfirm title="是否要推送该简历到ES?" @confirm="pushEs(record.customer_id)">
  20. <a-col><a-button type="primary" size="small" primary>推送该简历到ES</a-button></a-col>
  21. </a-popconfirm> -->
  22. </a-row>
  23. </template>
  24. </a-c-table>
  25. <resume-add v-if="openForm" :edit_record="edit_record" @successAdd="successAdd" @closeAdd="closeAdd"></resume-add>
  26. <resume-detail :detail_record="detail_record" @closeAdd="closePermission"></resume-detail>
  27. <a-modal v-model:open="openInterview" centered title="不通过原因" @ok="unpass">
  28. <a-textarea v-model:value="form.aduit_memo" placeholder="请输入不通过原因" />
  29. </a-modal>
  30. </template>
  31. <script lang="ts" setup>
  32. import { ref, onMounted, watch, computed, createVNode } from 'vue';
  33. import ResumeSearch from '@/views/jobSeeker/resume/search/index.vue';
  34. import ResumeAdd from '@/views/jobSeeker/resume/add/add.vue';
  35. import ResumeDetail from '@/views/jobSeeker/resume/detail/detail.vue';
  36. import { PostJobseekerList, PostJobapplicantUpdate, PostEsJobseeker, GetCustomerUpdate } from '@/apis/models';
  37. import { useCommon } from '@/hooks/useCommon';
  38. import { cols } from '@/views/jobSeeker/resume/columns';
  39. import { UserOutlined, DownOutlined } from '@ant-design/icons-vue';
  40. let { store, commomParams, showModal, showOtherModal1, message, ExclamationCircleOutlined, Modal } = useCommon();
  41. let loading = ref<Boolean>(true);
  42. let openForm = ref<Boolean>(false);
  43. onMounted(() => {
  44. commomParams.value.search.rand = false
  45. commomParams.value.search.sort = 'refreshtime'
  46. getData();
  47. })
  48. const searchData = (data : object) => {
  49. commomParams.value.search = data
  50. getData();
  51. }
  52. const clearData = (data : object) => {
  53. commomParams.value.search.rand = false
  54. if (data) {
  55. commomParams.value.search = data
  56. } else {
  57. commomParams.value.search = {
  58. page: 1,
  59. pagesize: 10,
  60. sort: 'refreshtime',
  61. sortby: 'desc',
  62. keyword: '',
  63. rand: false
  64. }
  65. }
  66. getData();
  67. }
  68. const getPage = (data : object) => {
  69. commomParams.value.search.page = data.current;
  70. commomParams.value.search.pagesize = data.pageSize;
  71. getData();
  72. }
  73. const getData = async () => {
  74. try {
  75. loading.value = true;
  76. let res = await PostJobseekerList(commomParams.value.search);
  77. loading.value = false;
  78. commomParams.value.table.data = res.data.seekers;
  79. commomParams.value.table.columns = cols;
  80. commomParams.value.page = {
  81. current: commomParams.value.search.page,
  82. pageSize: commomParams.value.search.pagesize,
  83. total: res.data.total,
  84. pageSizeOptions: ['10', '20', '30', '40'],
  85. hideOnSinglePage: false,
  86. showSizeChanger: true
  87. };
  88. } catch {
  89. loading.value = false;
  90. }
  91. }
  92. // 编辑
  93. let edit_record = ref<Object>(null)
  94. const edit = (record : object) => {
  95. openForm.value = true
  96. edit_record.value = record;
  97. showModal()
  98. }
  99. const successAdd = () => {
  100. getData();
  101. }
  102. const closeAdd = () => {
  103. openForm.value = false
  104. edit_record.value = null;
  105. }
  106. // 删除
  107. // const delOneRole = (id : number) => {
  108. // commomParams.value.delRecord = { id: id };
  109. // PostRoleDel(commomParams.value.delRecord).then(res => {
  110. // message.success('删除成功');
  111. // getData();
  112. // })
  113. // }
  114. // 审核
  115. const pass = (record) => {
  116. PostJobapplicantUpdate({ customer_id: record.customer_id, id: record.id, status: 2 }).then(res => {
  117. message.success('审核通过');
  118. })
  119. }
  120. // 邀请面试
  121. let openInterview = ref<Boolean>(false);
  122. let form = {
  123. id: 0,
  124. customer_id: 0,
  125. status: 3,
  126. aduit_memo: ''
  127. }
  128. const interview = (record : Object) => {
  129. openInterview.value = true
  130. form.id = record.id;
  131. form.customer_id = record.customer_id;
  132. form.status = 3
  133. form.aduit_memo = record.audit_memo ? record.audit_memo : '不通过'
  134. }
  135. const unpass = () => {
  136. PostJobapplicantUpdate(form).then(res => {
  137. message.success('审核不通过');
  138. openInterview.value = false
  139. getData();
  140. })
  141. }
  142. const pushEs = (customer_id) => {
  143. PostEsJobseeker({ customer_ids: [customer_id] }).then(res => {
  144. message.success('推送成功');
  145. })
  146. }
  147. let detail_record = ref<Object>(null)
  148. const detail = (record) => {
  149. detail_record.value = record;
  150. showOtherModal1()
  151. }
  152. const successPermission = () => {
  153. detail_record.value = null;
  154. }
  155. const closePermission = () => {
  156. detail_record.value = null;
  157. }
  158. </script>
  159. <style lang="less" scoped>
  160. </style>