123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186 |
- <template>
- <resume-search @searchData="searchData" @clearData="clearData" :search_params="commomParams.search"></resume-search>
- <a-c-operation @refresh="clearData" :need_add="false"></a-c-operation>
- <a-c-table :data="commomParams.table.data" :columns="commomParams.table.columns" :pagination="commomParams.page"
- @page="getPage" :loading="loading">
- <template #status="{ record }">
- {{record.status_txt}}
- <span v-if="record.audit_memo">({{record.audit_memo}})</span>
- </template>
- <template #default="{ record }">
- <a-row :gutter="10">
- <a-col><a-button type="primary" size="small" primary @click="edit(record)">编辑</a-button></a-col>
- <a-col><a-button type="primary" size="small" primary @click="detail(record)">预览</a-button></a-col>
- <a-popconfirm title="该简历通过审核?" @confirm="pass(record)">
- <a-col v-if="record.status == 1"><a-button type="primary" size="small">通过</a-button></a-col>
- </a-popconfirm>
- <a-col v-if="record.status == 1"><a-button type="primary" size="small" @click="interview(record)"
- danger>不通过</a-button></a-col>
- <!-- <a-popconfirm title="是否要推送该简历到ES?" @confirm="pushEs(record.customer_id)">
- <a-col><a-button type="primary" size="small" primary>推送该简历到ES</a-button></a-col>
- </a-popconfirm> -->
-
- </a-row>
- </template>
- </a-c-table>
- <resume-add v-if="openForm" :edit_record="edit_record" @successAdd="successAdd" @closeAdd="closeAdd"></resume-add>
- <resume-detail :detail_record="detail_record" @closeAdd="closePermission"></resume-detail>
- <a-modal v-model:open="openInterview" centered title="不通过原因" @ok="unpass">
- <a-textarea v-model:value="form.aduit_memo" placeholder="请输入不通过原因" />
- </a-modal>
-
-
- </template>
-
- <script lang="ts" setup>
- import { ref, onMounted, watch, computed, createVNode } from 'vue';
- import ResumeSearch from '@/views/jobSeeker/resume/search/index.vue';
- import ResumeAdd from '@/views/jobSeeker/resume/add/add.vue';
- import ResumeDetail from '@/views/jobSeeker/resume/detail/detail.vue';
- import { PostJobseekerList, PostJobapplicantUpdate, PostEsJobseeker, GetCustomerUpdate } from '@/apis/models';
- import { useCommon } from '@/hooks/useCommon';
- import { cols } from '@/views/jobSeeker/resume/columns';
- import { UserOutlined, DownOutlined } from '@ant-design/icons-vue';
- let { store, commomParams, showModal, showOtherModal1, message, ExclamationCircleOutlined, Modal } = useCommon();
- let loading = ref<Boolean>(true);
- let openForm = ref<Boolean>(false);
-
-
-
- onMounted(() => {
- commomParams.value.search.rand = false
- commomParams.value.search.sort = 'refreshtime'
- getData();
- })
-
- const searchData = (data : object) => {
- commomParams.value.search = data
- getData();
- }
-
- const clearData = (data : object) => {
- commomParams.value.search.rand = false
- if (data) {
- commomParams.value.search = data
- } else {
- commomParams.value.search = {
- page: 1,
- pagesize: 10,
- sort: 'refreshtime',
- sortby: 'desc',
- keyword: '',
- rand: false
- }
- }
- getData();
- }
-
-
- const getPage = (data : object) => {
- commomParams.value.search.page = data.current;
- commomParams.value.search.pagesize = data.pageSize;
- getData();
- }
- const getData = async () => {
- try {
- loading.value = true;
- let res = await PostJobseekerList(commomParams.value.search);
- loading.value = false;
- commomParams.value.table.data = res.data.seekers;
- commomParams.value.table.columns = cols;
- commomParams.value.page = {
- current: commomParams.value.search.page,
- pageSize: commomParams.value.search.pagesize,
- total: res.data.total,
- pageSizeOptions: ['10', '20', '30', '40'],
- hideOnSinglePage: false,
- showSizeChanger: true
- };
- } catch {
- loading.value = false;
- }
- }
-
-
- // 编辑
- let edit_record = ref<Object>(null)
- const edit = (record : object) => {
- openForm.value = true
- edit_record.value = record;
- showModal()
- }
- const successAdd = () => {
- getData();
- }
- const closeAdd = () => {
- openForm.value = false
- edit_record.value = null;
- }
-
- // 删除
- // const delOneRole = (id : number) => {
- // commomParams.value.delRecord = { id: id };
- // PostRoleDel(commomParams.value.delRecord).then(res => {
- // message.success('删除成功');
- // getData();
- // })
- // }
-
- // 审核
- const pass = (record) => {
- PostJobapplicantUpdate({ customer_id: record.customer_id, id: record.id, status: 2 }).then(res => {
- message.success('审核通过');
- })
- }
-
- // 邀请面试
- let openInterview = ref<Boolean>(false);
- let form = {
- id: 0,
- customer_id: 0,
- status: 3,
- aduit_memo: ''
- }
-
- const interview = (record : Object) => {
- openInterview.value = true
- form.id = record.id;
- form.customer_id = record.customer_id;
- form.status = 3
- form.aduit_memo = record.audit_memo ? record.audit_memo : '不通过'
- }
-
-
- const unpass = () => {
- PostJobapplicantUpdate(form).then(res => {
- message.success('审核不通过');
- openInterview.value = false
- getData();
- })
- }
-
- const pushEs = (customer_id) => {
- PostEsJobseeker({ customer_ids: [customer_id] }).then(res => {
- message.success('推送成功');
- })
- }
-
-
-
- let detail_record = ref<Object>(null)
- const detail = (record) => {
- detail_record.value = record;
- showOtherModal1()
- }
- const successPermission = () => {
- detail_record.value = null;
- }
-
- const closePermission = () => {
- detail_record.value = null;
- }
- </script>
-
- <style lang="less" scoped>
-
- </style>
|