|
@@ -9,12 +9,12 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="求职人姓名" :label-col="{ span: 8 }" name="name">
|
|
|
- <a-input v-model:value="searchParamsState.name" placeholder="" />
|
|
|
+ <a-input v-model:value="searchParamsState.name" placeholder=""/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="企业名称" :label-col="{ span: 8 }" name="companyName">
|
|
|
- <a-input v-model:value="searchParamsState.companyName" placeholder="" />
|
|
|
+ <a-input v-model:value="searchParamsState.companyName" placeholder=""/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
@@ -40,14 +40,14 @@
|
|
|
loadData();
|
|
|
}
|
|
|
"
|
|
|
- >重置
|
|
|
+ >重置
|
|
|
</a-button>
|
|
|
<a style="font-size: 12px" @click="expand = !expand">
|
|
|
<template v-if="expand">
|
|
|
- <UpOutlined />
|
|
|
+ <UpOutlined/>
|
|
|
</template>
|
|
|
<template v-else>
|
|
|
- <DownOutlined />
|
|
|
+ <DownOutlined/>
|
|
|
</template>
|
|
|
{{ expand ? '收缩' : '展开' }}
|
|
|
</a>
|
|
@@ -69,12 +69,12 @@
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="推送人" :label-col="{ span: 8 }" name="pushName">
|
|
|
- <a-input v-model:value="searchParamsState.pushName" placeholder="" />
|
|
|
+ <a-input v-model:value="searchParamsState.pushName" placeholder=""/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-form-item label="岗位" :label-col="{ span: 8 }" name="professionId">
|
|
|
- <a-input v-model:value="searchParamsState.professionId" placeholder="" />
|
|
|
+ <a-input v-model:value="searchParamsState.professionId" placeholder=""/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
@@ -94,133 +94,163 @@
|
|
|
bordered
|
|
|
@change="handleTableChange"
|
|
|
>
|
|
|
+ <template #bodyCell="{ column, text, record }">
|
|
|
+ <template v-if="column.key === 'operation'">
|
|
|
+ <div class="table-operation">
|
|
|
+ <a-button type="link" size="small" v-show="record.entryState!=1" functioncode="T01030203"
|
|
|
+ @click='onSetEntryState(record.recommendMgtID, 1)'>已入职
|
|
|
+ </a-button>
|
|
|
+ <a-button type="link" size="small" v-show="record.entryState==1" functioncode="T01030203"
|
|
|
+ @click='onSetEntryState(record.recommendMgtID, 0)'>已离职
|
|
|
+ </a-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
</a-table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
- import { reactive, ref, computed, defineComponent } from 'vue';
|
|
|
- import type { FormInstance, TableColumnsType, TableProps, SelectProps } from 'ant-design-vue';
|
|
|
- import { getList } from '@/api/jobUserManager/recommendMgt';
|
|
|
- import { getSysDictionaryList } from '@/api/system/dictionary';
|
|
|
- import { getPaginationTotalTitle } from '@/utils/common';
|
|
|
- import dayjs from "dayjs";
|
|
|
+import {reactive, ref, computed, defineComponent} from 'vue';
|
|
|
+import type {FormInstance, TableColumnsType, TableProps, SelectProps} from 'ant-design-vue';
|
|
|
+import {getList, setEntryState} from '@/api/jobUserManager/recommendMgt';
|
|
|
+import {getSysDictionaryList} from '@/api/system/dictionary';
|
|
|
+import {getPaginationTotalTitle} from '@/utils/common';
|
|
|
+import dayjs from "dayjs";
|
|
|
|
|
|
- export default defineComponent({
|
|
|
- name: 'recommendMgtList',
|
|
|
- setup() {
|
|
|
- const expand = ref(false);
|
|
|
- const modalRoleUserRef = ref();
|
|
|
- const modalRoleEditRef = ref();
|
|
|
- const formRef = ref<FormInstance>();
|
|
|
- const searchParamsState = reactive({ page: 1, limit: 20, post: '', name: '', companyName: '', recommendType:null, entryState:null, pushName:'', professionId : null });
|
|
|
- const formState = reactive({
|
|
|
- total: 0,
|
|
|
- selectedRowKeys: [],
|
|
|
- loading: false,
|
|
|
- });
|
|
|
- const columns: TableColumnsType = [
|
|
|
- {
|
|
|
- title: '序号',
|
|
|
- align: 'center',
|
|
|
- width: 80,
|
|
|
- key: 'recommendMgtID',
|
|
|
- customRender: (item) =>
|
|
|
- `${searchParamsState.limit * (searchParamsState.page - 1) + item.index + 1}`,
|
|
|
- },
|
|
|
- { title: '企业', dataIndex: 'companyName', key: 'companyName', width: 150 },
|
|
|
- { title: '企业电话', dataIndex: 'companyMobile', key: 'companyMobile', width: 150 },
|
|
|
- { title: '求职者', dataIndex: 'name', key: 'name', width: 100 },
|
|
|
- { title: '求职者电话', dataIndex: 'userMobile', key: 'userMobile', width: 150 },
|
|
|
- { title: '岗位', dataIndex: 'professionName', key: 'professionName', width: 150 },
|
|
|
- { title: '类型', dataIndex: 'recommendTypeName', key: 'recommendTypeName', width: 100 },
|
|
|
- { title: '入职状态', dataIndex: 'entryStateName', key: 'entryStateName' },
|
|
|
- { title: '推送人', dataIndex: 'pushName', key: 'pushName' },
|
|
|
- { title: '推送时间', dataIndex: 'createTime', key: 'createTime',
|
|
|
- customRender: ({ record }) => dayjs(record.endDate).format('YYYY-MM-DD'),
|
|
|
- },
|
|
|
- { title: '操作', key: 'operation', width: 100, align: 'center' },
|
|
|
- ];
|
|
|
- const pagination = computed(() => ({
|
|
|
- total: formState.total,
|
|
|
- current: searchParamsState.page,
|
|
|
- pageSize: searchParamsState.limit,
|
|
|
- showSizeChanger: true,
|
|
|
- showTotal: (total) => getPaginationTotalTitle(total),
|
|
|
- }));
|
|
|
+export default defineComponent({
|
|
|
+ name: 'recommendMgtList',
|
|
|
+ setup() {
|
|
|
+ const expand = ref(false);
|
|
|
+ const modalRoleUserRef = ref();
|
|
|
+ const modalRoleEditRef = ref();
|
|
|
+ const formRef = ref<FormInstance>();
|
|
|
+ const searchParamsState = reactive({
|
|
|
+ page: 1,
|
|
|
+ limit: 20,
|
|
|
+ post: '',
|
|
|
+ name: '',
|
|
|
+ companyName: '',
|
|
|
+ recommendType: null,
|
|
|
+ entryState: null,
|
|
|
+ pushName: '',
|
|
|
+ professionId: null
|
|
|
+ });
|
|
|
+ const formState = reactive({
|
|
|
+ total: 0,
|
|
|
+ selectedRowKeys: [],
|
|
|
+ loading: false,
|
|
|
+ });
|
|
|
+ const columns: TableColumnsType = [
|
|
|
+ {
|
|
|
+ title: '序号',
|
|
|
+ align: 'center',
|
|
|
+ width: 80,
|
|
|
+ key: 'recommendMgtID',
|
|
|
+ customRender: (item) =>
|
|
|
+ `${searchParamsState.limit * (searchParamsState.page - 1) + item.index + 1}`,
|
|
|
+ },
|
|
|
+ {title: '企业', dataIndex: 'companyName', key: 'companyName', width: 150},
|
|
|
+ {title: '企业电话', dataIndex: 'companyMobile', key: 'companyMobile', width: 150},
|
|
|
+ {title: '求职者', dataIndex: 'name', key: 'name', width: 100},
|
|
|
+ {title: '求职者电话', dataIndex: 'userMobile', key: 'userMobile', width: 150},
|
|
|
+ {title: '岗位', dataIndex: 'professionName', key: 'professionName', width: 150},
|
|
|
+ {title: '类型', dataIndex: 'recommendTypeName', key: 'recommendTypeName', width: 100},
|
|
|
+ {title: '入职状态', dataIndex: 'entryStateName', key: 'entryStateName'},
|
|
|
+ {title: '推送人', dataIndex: 'pushName', key: 'pushName'},
|
|
|
+ {
|
|
|
+ title: '推送时间', dataIndex: 'createTime', key: 'createTime',
|
|
|
+ customRender: ({record}) => dayjs(record.endDate).format('YYYY-MM-DD'),
|
|
|
+ },
|
|
|
+ {title: '操作', key: 'operation', width: 100, align: 'center'},
|
|
|
+ ];
|
|
|
+ const pagination = computed(() => ({
|
|
|
+ total: formState.total,
|
|
|
+ current: searchParamsState.page,
|
|
|
+ pageSize: searchParamsState.limit,
|
|
|
+ showSizeChanger: true,
|
|
|
+ showTotal: (total) => getPaginationTotalTitle(total),
|
|
|
+ }));
|
|
|
|
|
|
- const dataList = ref([]);
|
|
|
- const recommendTypeList = ref<SelectProps['options']>();
|
|
|
- const entryStateList = ref<SelectProps['options']>();
|
|
|
+ const dataList = ref([]);
|
|
|
+ const recommendTypeList = ref<SelectProps['options']>();
|
|
|
+ const entryStateList = ref<SelectProps['options']>();
|
|
|
|
|
|
- const onSelectChange = (selectedRowKeys: any) => {
|
|
|
- formState.selectedRowKeys = selectedRowKeys;
|
|
|
- };
|
|
|
+ const onSelectChange = (selectedRowKeys: any) => {
|
|
|
+ formState.selectedRowKeys = selectedRowKeys;
|
|
|
+ };
|
|
|
|
|
|
- const handleTableChange: TableProps['onChange'] = (pag: {
|
|
|
- pageSize: number;
|
|
|
- current: number;
|
|
|
- }) => {
|
|
|
- searchParamsState.page = pag.current;
|
|
|
- searchParamsState.limit = pag.pageSize;
|
|
|
- loadData();
|
|
|
- };
|
|
|
+ const handleTableChange: TableProps['onChange'] = (pag: {
|
|
|
+ pageSize: number;
|
|
|
+ current: number;
|
|
|
+ }) => {
|
|
|
+ searchParamsState.page = pag.current;
|
|
|
+ searchParamsState.limit = pag.pageSize;
|
|
|
+ loadData();
|
|
|
+ };
|
|
|
|
|
|
- const onFinish = () => {
|
|
|
- loadData();
|
|
|
- };
|
|
|
+ const onFinish = () => {
|
|
|
+ loadData();
|
|
|
+ };
|
|
|
+
|
|
|
+ const loadData = async function () {
|
|
|
+ formState.loading = true;
|
|
|
+ const result: any = await getList(searchParamsState);
|
|
|
|
|
|
- const loadData = async function () {
|
|
|
- formState.loading = true;
|
|
|
- const result: any = await getList(searchParamsState);
|
|
|
+ dataList.value = result.list;
|
|
|
+ formState.total = result.total;
|
|
|
+ formState.loading = false;
|
|
|
+ };
|
|
|
|
|
|
- dataList.value = result.list;
|
|
|
- formState.total = result.total;
|
|
|
- formState.loading = false;
|
|
|
- };
|
|
|
+ const onSetEntryState = async (recommendMgtID, entryState) => {
|
|
|
+ setEntryState({recommendMgtID: recommendMgtID, entryState: entryState}).then(()=>{
|
|
|
+ loadData();
|
|
|
+ });
|
|
|
+ }
|
|
|
|
|
|
- const getRecommendTypeList = () => {
|
|
|
- getSysDictionaryList('RecommendType').then((data) => {
|
|
|
- recommendTypeList.value = data;
|
|
|
- });
|
|
|
- };
|
|
|
+ const getRecommendTypeList = () => {
|
|
|
+ getSysDictionaryList('RecommendType').then((data) => {
|
|
|
+ recommendTypeList.value = data;
|
|
|
+ });
|
|
|
+ };
|
|
|
|
|
|
- const getEntryStateList = () => {
|
|
|
- getSysDictionaryList('EntryState').then((data) => {
|
|
|
- entryStateList.value = data;
|
|
|
- });
|
|
|
- };
|
|
|
+ const getEntryStateList = () => {
|
|
|
+ getSysDictionaryList('EntryState').then((data) => {
|
|
|
+ entryStateList.value = data;
|
|
|
+ });
|
|
|
+ };
|
|
|
|
|
|
- return {
|
|
|
- modalRoleUserRef,
|
|
|
- modalRoleEditRef,
|
|
|
- formRef,
|
|
|
- loadData,
|
|
|
- searchParamsState,
|
|
|
- formState,
|
|
|
- columns,
|
|
|
- pagination,
|
|
|
- dataList,
|
|
|
- recommendTypeList,
|
|
|
- entryStateList,
|
|
|
- onSelectChange,
|
|
|
- handleTableChange,
|
|
|
- onFinish,
|
|
|
- getRecommendTypeList,
|
|
|
- getEntryStateList,
|
|
|
- expand
|
|
|
- };
|
|
|
- },
|
|
|
- created() {
|
|
|
- this.loadData();
|
|
|
- this.getRecommendTypeList();
|
|
|
- this.getEntryStateList();
|
|
|
- },
|
|
|
- activated() {
|
|
|
- if (history.state.params?.reload) this.loadData();
|
|
|
- },
|
|
|
- });
|
|
|
+ return {
|
|
|
+ modalRoleUserRef,
|
|
|
+ modalRoleEditRef,
|
|
|
+ formRef,
|
|
|
+ loadData,
|
|
|
+ searchParamsState,
|
|
|
+ formState,
|
|
|
+ columns,
|
|
|
+ pagination,
|
|
|
+ dataList,
|
|
|
+ recommendTypeList,
|
|
|
+ entryStateList,
|
|
|
+ onSetEntryState,
|
|
|
+ onSelectChange,
|
|
|
+ handleTableChange,
|
|
|
+ onFinish,
|
|
|
+ getRecommendTypeList,
|
|
|
+ getEntryStateList,
|
|
|
+ expand
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.loadData();
|
|
|
+ this.getRecommendTypeList();
|
|
|
+ this.getEntryStateList();
|
|
|
+ },
|
|
|
+ activated() {
|
|
|
+ if (history.state.params?.reload) this.loadData();
|
|
|
+ },
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style lang="less" scoped></style>
|