feat : 新增简历库列表页,详情页待做,
style : 优化招聘数据采集管理下的三个页面样式
This commit is contained in:
@@ -57,7 +57,7 @@ const StorageEdit: React.FC<StorageFormProps> = (props) => {
|
|||||||
column={2}
|
column={2}
|
||||||
dataSource={props.values || {}}
|
dataSource={props.values || {}}
|
||||||
>
|
>
|
||||||
<ProDescriptions.Item dataIndex="detectionId" label="监测ID" />
|
{/* <ProDescriptions.Item dataIndex="detectionId" label="监测ID" /> */}
|
||||||
<ProDescriptions.Item dataIndex="storageDate" label="采集入库日期" />
|
<ProDescriptions.Item dataIndex="storageDate" label="采集入库日期" />
|
||||||
<ProDescriptions.Item dataIndex="storageNumber" label="采集入库数量" />
|
<ProDescriptions.Item dataIndex="storageNumber" label="采集入库数量" />
|
||||||
<ProDescriptions.Item dataIndex="storageResult" label="采集入库结果" />
|
<ProDescriptions.Item dataIndex="storageResult" label="采集入库结果" />
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ function StorageDetectionList() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columns: ProColumns<API.StorageDetection.StorageItem>[] = [
|
const columns: ProColumns<API.StorageDetection.StorageItem>[] = [
|
||||||
{
|
// {
|
||||||
title: '监测ID',
|
// title: '监测ID',
|
||||||
dataIndex: 'detectionId',
|
// dataIndex: 'detectionId',
|
||||||
valueType: 'text',
|
// valueType: 'text',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '采集入库日期',
|
title: '采集入库日期',
|
||||||
dataIndex: 'storageDate',
|
dataIndex: 'storageDate',
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import {
|
|||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Form } from 'antd';
|
import { Form } from 'antd';
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
|
import DictTag from '@/components/DictTag';
|
||||||
|
|
||||||
export type JobIndexFormProps = {
|
export type JobIndexFormProps = {
|
||||||
onCancel: (flag?: boolean, formVals?: unknown) => void;
|
onCancel: (flag?: boolean, formVals?: unknown) => void;
|
||||||
@@ -15,11 +16,12 @@ export type JobIndexFormProps = {
|
|||||||
open: boolean;
|
open: boolean;
|
||||||
values?: Partial<API.JobIndex.JobIndexItem>;
|
values?: Partial<API.JobIndex.JobIndexItem>;
|
||||||
mode?: 'view' | 'edit' | 'create';
|
mode?: 'view' | 'edit' | 'create';
|
||||||
|
isActiveEnum: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
const JobIndexEdit: React.FC<JobIndexFormProps> = (props) => {
|
const JobIndexEdit: React.FC<JobIndexFormProps> = (props) => {
|
||||||
const [form] = Form.useForm<API.JobIndex.JobIndexItem>();
|
const [form] = Form.useForm<API.JobIndex.JobIndexItem>();
|
||||||
const { mode = props.values ? 'edit' : 'create' } = props;
|
const { mode = props.values ? 'edit' : 'create', isActiveEnum } = props;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.open) {
|
if (props.open) {
|
||||||
@@ -53,16 +55,13 @@ const JobIndexEdit: React.FC<JobIndexFormProps> = (props) => {
|
|||||||
submitter={false}
|
submitter={false}
|
||||||
>
|
>
|
||||||
<ProDescriptions<API.JobIndex.JobIndexItem> column={2} dataSource={props.values || {}}>
|
<ProDescriptions<API.JobIndex.JobIndexItem> column={2} dataSource={props.values || {}}>
|
||||||
<ProDescriptions.Item dataIndex="indexId" label="指标ID" />
|
{/* <ProDescriptions.Item dataIndex="indexId" label="指标ID" /> */}
|
||||||
<ProDescriptions.Item dataIndex="indexName" label="指标名称" />
|
<ProDescriptions.Item dataIndex="indexName" label="指标名称" />
|
||||||
<ProDescriptions.Item dataIndex="indexDesc" label="指标描述" span={2} />
|
<ProDescriptions.Item dataIndex="indexDesc" label="指标描述" span={2} />
|
||||||
<ProDescriptions.Item
|
<ProDescriptions.Item
|
||||||
dataIndex="isActive"
|
dataIndex="isActive"
|
||||||
label="是否启用"
|
label="是否启用"
|
||||||
valueEnum={{
|
render={(text) => <DictTag enums={isActiveEnum} value={text as string} />}
|
||||||
'0': { text: '启用' },
|
|
||||||
'2': { text: '未启用' },
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
</ModalForm>
|
</ModalForm>
|
||||||
@@ -95,10 +94,7 @@ const JobIndexEdit: React.FC<JobIndexFormProps> = (props) => {
|
|||||||
width="md"
|
width="md"
|
||||||
name="isActive"
|
name="isActive"
|
||||||
label="是否启用"
|
label="是否启用"
|
||||||
valueEnum={{
|
valueEnum={isActiveEnum}
|
||||||
'0': '启用',
|
|
||||||
'2': '未启用',
|
|
||||||
}}
|
|
||||||
placeholder="请选择状态"
|
placeholder="请选择状态"
|
||||||
rules={[{ required: true, message: '请选择是否启用!' }]}
|
rules={[{ required: true, message: '请选择是否启用!' }]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { Fragment, useRef, useState } from 'react';
|
import React, { Fragment, useRef, useState, useEffect } from 'react';
|
||||||
import { useAccess } from '@umijs/max';
|
import { useAccess } from '@umijs/max';
|
||||||
import {
|
import {
|
||||||
getJobIndexList,
|
getJobIndexList,
|
||||||
@@ -10,6 +10,8 @@ import {
|
|||||||
import { Button, FormInstance, message, Modal } from 'antd';
|
import { Button, FormInstance, message, Modal } from 'antd';
|
||||||
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
import { DeleteOutlined, FormOutlined, PlusOutlined, EyeOutlined } from '@ant-design/icons';
|
import { DeleteOutlined, FormOutlined, PlusOutlined, EyeOutlined } from '@ant-design/icons';
|
||||||
|
import { getDictValueEnum } from '@/services/system/dict';
|
||||||
|
import DictTag from '@/components/DictTag';
|
||||||
import EditJobIndexRow from './edit';
|
import EditJobIndexRow from './edit';
|
||||||
|
|
||||||
function JobIndexList() {
|
function JobIndexList() {
|
||||||
@@ -22,8 +24,14 @@ function JobIndexList() {
|
|||||||
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
||||||
const [mode, setMode] = useState<'view' | 'edit' | 'create'>('create');
|
const [mode, setMode] = useState<'view' | 'edit' | 'create'>('create');
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
|
const [isActiveEnum, setIsActiveEnum] = useState<any>([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getDictValueEnum('enable_status', true).then((data) => {
|
||||||
|
setIsActiveEnum(data);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
// 删除处理
|
|
||||||
const handleRemoveOne = async (indexId: any) => {
|
const handleRemoveOne = async (indexId: any) => {
|
||||||
const hide = message.loading('正在删除');
|
const hide = message.loading('正在删除');
|
||||||
if (!indexId) return true;
|
if (!indexId) return true;
|
||||||
@@ -82,13 +90,13 @@ function JobIndexList() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columns: ProColumns<API.JobIndex.JobIndexItem>[] = [
|
const columns: ProColumns<API.JobIndex.JobIndexItem>[] = [
|
||||||
{
|
// {
|
||||||
title: '指标ID',
|
// title: '指标ID',
|
||||||
dataIndex: 'indexId',
|
// dataIndex: 'indexId',
|
||||||
valueType: 'text',
|
// valueType: 'text',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '指标名称',
|
title: '指标名称',
|
||||||
dataIndex: 'indexName',
|
dataIndex: 'indexName',
|
||||||
@@ -106,17 +114,13 @@ function JobIndexList() {
|
|||||||
dataIndex: 'isActive',
|
dataIndex: 'isActive',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
valueEnum: {
|
valueEnum: isActiveEnum,
|
||||||
'0': { text: '启用' },
|
|
||||||
'2': { text: '未启用' },
|
|
||||||
},
|
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
options: [
|
|
||||||
{ label: '启用', value: '0' },
|
|
||||||
{ label: '未启用', value: '2' },
|
|
||||||
],
|
|
||||||
defaultValue: '0',
|
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
|
defaultValue: '1',
|
||||||
|
},
|
||||||
|
render: (_, record) => {
|
||||||
|
return <DictTag enums={isActiveEnum} value={record.isActive} />;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -200,7 +204,7 @@ function JobIndexList() {
|
|||||||
) => {
|
) => {
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
...params,
|
...params,
|
||||||
isActive: params.isActive || '0', //默认查询启用
|
isActive: params.isActive || '1', //默认查询启用
|
||||||
};
|
};
|
||||||
const res = await getJobIndexList({ ...queryParams } as API.JobIndex.ListParams);
|
const res = await getJobIndexList({ ...queryParams } as API.JobIndex.ListParams);
|
||||||
return {
|
return {
|
||||||
@@ -228,6 +232,7 @@ function JobIndexList() {
|
|||||||
<EditJobIndexRow
|
<EditJobIndexRow
|
||||||
open={modalVisible}
|
open={modalVisible}
|
||||||
mode={mode}
|
mode={mode}
|
||||||
|
isActiveEnum={isActiveEnum}
|
||||||
onSubmit={async (values: API.JobIndex.JobIndexItem) => {
|
onSubmit={async (values: API.JobIndex.JobIndexItem) => {
|
||||||
try {
|
try {
|
||||||
let resData;
|
let resData;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import {
|
|||||||
} from '@ant-design/pro-components';
|
} from '@ant-design/pro-components';
|
||||||
import { Form } from 'antd';
|
import { Form } from 'antd';
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
|
import DictTag from '@/components/DictTag';
|
||||||
|
|
||||||
export type WebsiteFormProps = {
|
export type WebsiteFormProps = {
|
||||||
onCancel: (flag?: boolean, formVals?: unknown) => void;
|
onCancel: (flag?: boolean, formVals?: unknown) => void;
|
||||||
@@ -14,11 +15,12 @@ export type WebsiteFormProps = {
|
|||||||
open: boolean;
|
open: boolean;
|
||||||
values?: Partial<API.Website.WebsiteItem>;
|
values?: Partial<API.Website.WebsiteItem>;
|
||||||
mode?: 'view' | 'edit' | 'create';
|
mode?: 'view' | 'edit' | 'create';
|
||||||
|
isActiveEnum: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
const WebsiteEdit: React.FC<WebsiteFormProps> = (props) => {
|
const WebsiteEdit: React.FC<WebsiteFormProps> = (props) => {
|
||||||
const [form] = Form.useForm<API.Website.WebsiteItem>();
|
const [form] = Form.useForm<API.Website.WebsiteItem>();
|
||||||
const { mode = props.values ? 'edit' : 'create' } = props;
|
const { mode = props.values ? 'edit' : 'create', isActiveEnum } = props;
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (props.open) {
|
if (props.open) {
|
||||||
@@ -52,17 +54,14 @@ const WebsiteEdit: React.FC<WebsiteFormProps> = (props) => {
|
|||||||
submitter={false}
|
submitter={false}
|
||||||
>
|
>
|
||||||
<ProDescriptions<API.Website.WebsiteItem> column={2} dataSource={props.values || {}}>
|
<ProDescriptions<API.Website.WebsiteItem> column={2} dataSource={props.values || {}}>
|
||||||
<ProDescriptions.Item dataIndex="websiteId" label="网站ID" />
|
{/* <ProDescriptions.Item dataIndex="websiteId" label="网站ID" /> */}
|
||||||
<ProDescriptions.Item dataIndex="websiteName" label="网站名称" />
|
<ProDescriptions.Item dataIndex="websiteName" label="网站名称" />
|
||||||
<ProDescriptions.Item dataIndex="websiteUrl" label="网站地址" />
|
<ProDescriptions.Item dataIndex="websiteUrl" label="网站地址" />
|
||||||
<ProDescriptions.Item dataIndex="websiteOwnerCompany" label="归属单位公司" />
|
<ProDescriptions.Item dataIndex="websiteOwnerCompany" label="归属单位公司" />
|
||||||
<ProDescriptions.Item
|
<ProDescriptions.Item
|
||||||
dataIndex="isActive"
|
dataIndex="isActive"
|
||||||
label="是否启用"
|
label="是否启用"
|
||||||
valueEnum={{
|
render={(text) => <DictTag enums={isActiveEnum} value={text as string} />}
|
||||||
'0': { text: '启用' },
|
|
||||||
'2': { text: '未启用' },
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
</ProDescriptions>
|
</ProDescriptions>
|
||||||
</ModalForm>
|
</ModalForm>
|
||||||
@@ -114,10 +113,7 @@ const WebsiteEdit: React.FC<WebsiteFormProps> = (props) => {
|
|||||||
width="md"
|
width="md"
|
||||||
name="isActive"
|
name="isActive"
|
||||||
label="是否启用"
|
label="是否启用"
|
||||||
valueEnum={{
|
valueEnum={isActiveEnum}
|
||||||
'0': '启用',
|
|
||||||
'2': '未启用',
|
|
||||||
}}
|
|
||||||
placeholder="请选择状态"
|
placeholder="请选择状态"
|
||||||
rules={[{ required: true, message: '请选择是否启用!' }]}
|
rules={[{ required: true, message: '请选择是否启用!' }]}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { Fragment, useRef, useState } from 'react';
|
import React, { Fragment, useRef, useState, useEffect } from 'react';
|
||||||
import { useAccess } from '@umijs/max';
|
import { useAccess } from '@umijs/max';
|
||||||
import {
|
import {
|
||||||
getWebsiteList,
|
getWebsiteList,
|
||||||
@@ -7,8 +7,10 @@ import {
|
|||||||
updateWebsite,
|
updateWebsite,
|
||||||
deleteWebsite,
|
deleteWebsite,
|
||||||
} from '@/services/recruitmentDataCollection/sourceManager';
|
} from '@/services/recruitmentDataCollection/sourceManager';
|
||||||
|
import { getDictValueEnum } from '@/services/system/dict';
|
||||||
import { Button, FormInstance, message, Modal } from 'antd';
|
import { Button, FormInstance, message, Modal } from 'antd';
|
||||||
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import DictTag from '@/components/DictTag';
|
||||||
import { DeleteOutlined, FormOutlined, PlusOutlined, EyeOutlined } from '@ant-design/icons';
|
import { DeleteOutlined, FormOutlined, PlusOutlined, EyeOutlined } from '@ant-design/icons';
|
||||||
import EditWebsiteRow from './edit';
|
import EditWebsiteRow from './edit';
|
||||||
|
|
||||||
@@ -22,8 +24,14 @@ function WebsiteList() {
|
|||||||
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
||||||
const [mode, setMode] = useState<'view' | 'edit' | 'create'>('create');
|
const [mode, setMode] = useState<'view' | 'edit' | 'create'>('create');
|
||||||
const [loading, setLoading] = useState<boolean>(false);
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
|
const [isActiveEnum, setIsActiveEnum] = useState<any>([]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
getDictValueEnum('enable_status', true).then((data) => {
|
||||||
|
setIsActiveEnum(data);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
// 删除处理
|
|
||||||
const handleRemoveOne = async (websiteId: any) => {
|
const handleRemoveOne = async (websiteId: any) => {
|
||||||
const hide = message.loading('正在删除');
|
const hide = message.loading('正在删除');
|
||||||
if (!websiteId) return true;
|
if (!websiteId) return true;
|
||||||
@@ -82,13 +90,13 @@ function WebsiteList() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const columns: ProColumns<API.Website.WebsiteItem>[] = [
|
const columns: ProColumns<API.Website.WebsiteItem>[] = [
|
||||||
{
|
// {
|
||||||
title: '网站ID',
|
// title: '网站ID',
|
||||||
dataIndex: 'websiteId',
|
// dataIndex: 'websiteId',
|
||||||
valueType: 'text',
|
// valueType: 'text',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
hideInSearch: true,
|
// hideInSearch: true,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
title: '网站名称',
|
title: '网站名称',
|
||||||
dataIndex: 'websiteName',
|
dataIndex: 'websiteName',
|
||||||
@@ -112,16 +120,13 @@ function WebsiteList() {
|
|||||||
dataIndex: 'isActive',
|
dataIndex: 'isActive',
|
||||||
valueType: 'select',
|
valueType: 'select',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
valueEnum: {
|
valueEnum: isActiveEnum,
|
||||||
'0': { text: '启用' },
|
|
||||||
'2': { text: '未启用' },
|
|
||||||
},
|
|
||||||
fieldProps: {
|
fieldProps: {
|
||||||
options: [
|
|
||||||
{ label: '启用', value: '0' },
|
|
||||||
{ label: '未启用', value: '2' },
|
|
||||||
],
|
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
|
defaultValue: '1',
|
||||||
|
},
|
||||||
|
render: (_, record) => {
|
||||||
|
return <DictTag enums={isActiveEnum} value={record.isActive} />;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -205,7 +210,7 @@ function WebsiteList() {
|
|||||||
) => {
|
) => {
|
||||||
const queryParams = {
|
const queryParams = {
|
||||||
...params,
|
...params,
|
||||||
isActive: params.isActive || '0', //默认查询启用
|
isActive: params.isActive || '1', //默认查询启用
|
||||||
};
|
};
|
||||||
const res = await getWebsiteList({ ...queryParams } as API.Website.ListParams);
|
const res = await getWebsiteList({ ...queryParams } as API.Website.ListParams);
|
||||||
return {
|
return {
|
||||||
@@ -233,6 +238,7 @@ function WebsiteList() {
|
|||||||
<EditWebsiteRow
|
<EditWebsiteRow
|
||||||
open={modalVisible}
|
open={modalVisible}
|
||||||
mode={mode}
|
mode={mode}
|
||||||
|
isActiveEnum={isActiveEnum}
|
||||||
onSubmit={async (values: API.Website.WebsiteItem) => {
|
onSubmit={async (values: API.Website.WebsiteItem) => {
|
||||||
try {
|
try {
|
||||||
let resData;
|
let resData;
|
||||||
|
|||||||
12
src/pages/ResumeLibrary/ResumeList/detail.tsx
Normal file
12
src/pages/ResumeLibrary/ResumeList/detail.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import React, { useEffect, useState } from 'react';
|
||||||
|
export type ResumeDetailProps = {
|
||||||
|
onCancel: (flag?: boolean, formVals?: unknown) => void;
|
||||||
|
open: boolean;
|
||||||
|
values?: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
const ResumeDetail: React.FC<ResumeDetailProps> = (props) => {
|
||||||
|
return <div></div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ResumeDetail;
|
||||||
229
src/pages/ResumeLibrary/ResumeList/index.tsx
Normal file
229
src/pages/ResumeLibrary/ResumeList/index.tsx
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
import React, { Fragment, useRef, useState, useEffect } from 'react';
|
||||||
|
import { useAccess } from '@umijs/max';
|
||||||
|
import { getResumeList, getResumeDetail } from '@/services/resumeLibrary/resumeList';
|
||||||
|
import { Button, FormInstance, message } from 'antd';
|
||||||
|
import { ActionType, ProColumns, ProTable } from '@ant-design/pro-components';
|
||||||
|
import { EyeOutlined } from '@ant-design/icons';
|
||||||
|
import { getDictValueEnum } from '@/services/system/dict';
|
||||||
|
import DictTag from '@/components/DictTag';
|
||||||
|
import ResumeDetail from './detail';
|
||||||
|
|
||||||
|
function ResumeList() {
|
||||||
|
const access = useAccess();
|
||||||
|
|
||||||
|
const formTableRef = useRef<FormInstance>();
|
||||||
|
const actionRef = useRef<ActionType>();
|
||||||
|
|
||||||
|
const [currentRow, setCurrentRow] = useState<API.AppUser.ResumeItem>();
|
||||||
|
const [modalVisible, setModalVisible] = useState<boolean>(false);
|
||||||
|
const [loading, setLoading] = useState<boolean>(false);
|
||||||
|
|
||||||
|
// 字典枚举值
|
||||||
|
const [sexEnum, setSexEnum] = useState<any>([]);
|
||||||
|
const [educationEnum, setEducationEnum] = useState<any>([]);
|
||||||
|
const [politicalEnum, setPoliticalEnum] = useState<any>([]);
|
||||||
|
const [statusEnum, setStatusEnum] = useState<any>([]);
|
||||||
|
const [areaEnum, setAreaEnum] = useState<any>([]);
|
||||||
|
|
||||||
|
// 获取字典数据
|
||||||
|
useEffect(() => {
|
||||||
|
getDictValueEnum('sys_user_sex', true).then((data) => {
|
||||||
|
setSexEnum(data);
|
||||||
|
});
|
||||||
|
getDictValueEnum('education', true, true).then((data) => {
|
||||||
|
setEducationEnum(data);
|
||||||
|
});
|
||||||
|
getDictValueEnum('political_affiliation', true, true).then((data) => {
|
||||||
|
setPoliticalEnum(data);
|
||||||
|
});
|
||||||
|
getDictValueEnum('enable_status', true).then((data) => {
|
||||||
|
setStatusEnum(data);
|
||||||
|
});
|
||||||
|
getDictValueEnum('area', true, true).then((data) => {
|
||||||
|
setAreaEnum(data);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
// 查看详情
|
||||||
|
const handleViewDetail = async (userId: any) => {
|
||||||
|
setLoading(true);
|
||||||
|
try {
|
||||||
|
const res = await getResumeDetail(userId);
|
||||||
|
if (res.code === 200) {
|
||||||
|
setCurrentRow(res.data);
|
||||||
|
setModalVisible(true);
|
||||||
|
} else {
|
||||||
|
message.error(res.msg);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
message.error('获取详情失败');
|
||||||
|
} finally {
|
||||||
|
setLoading(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const columns: ProColumns<API.AppUser.ResumeItem>[] = [
|
||||||
|
// {
|
||||||
|
// title: '用户ID',
|
||||||
|
// dataIndex: 'userId',
|
||||||
|
// valueType: 'text',
|
||||||
|
// align: 'center',
|
||||||
|
// hideInSearch: true,
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
title: '姓名',
|
||||||
|
dataIndex: 'name',
|
||||||
|
valueType: 'text',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '手机号',
|
||||||
|
dataIndex: 'phone',
|
||||||
|
valueType: 'text',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '性别',
|
||||||
|
dataIndex: 'sex',
|
||||||
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
|
valueEnum: sexEnum,
|
||||||
|
render: (_, record) => {
|
||||||
|
return <DictTag enums={sexEnum} value={record.sex} />;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '年龄',
|
||||||
|
dataIndex: 'age',
|
||||||
|
valueType: 'digit',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '出生日期',
|
||||||
|
dataIndex: 'birthDate',
|
||||||
|
valueType: 'date',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '学历',
|
||||||
|
dataIndex: 'education',
|
||||||
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
|
valueEnum: educationEnum,
|
||||||
|
render: (_, record) => {
|
||||||
|
return <DictTag enums={educationEnum} value={record.education} />;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '政治面貌',
|
||||||
|
dataIndex: 'politicalAffiliation',
|
||||||
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
|
valueEnum: politicalEnum,
|
||||||
|
render: (_, record) => {
|
||||||
|
return <DictTag enums={politicalEnum} value={record.politicalAffiliation} />;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '期望薪资',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
render: (_, record) => (
|
||||||
|
<span>
|
||||||
|
{record.salaryMin} - {record.salaryMax}
|
||||||
|
</span>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '地区',
|
||||||
|
dataIndex: 'area',
|
||||||
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
|
valueEnum: areaEnum,
|
||||||
|
render: (_, record) => {
|
||||||
|
return <DictTag enums={areaEnum} value={record.area} />;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
dataIndex: 'status',
|
||||||
|
valueType: 'select',
|
||||||
|
align: 'center',
|
||||||
|
valueEnum: statusEnum,
|
||||||
|
render: (_, record) => {
|
||||||
|
return <DictTag enums={statusEnum} value={record.status} />;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '最后登录',
|
||||||
|
dataIndex: 'loginDate',
|
||||||
|
valueType: 'dateTime',
|
||||||
|
align: 'center',
|
||||||
|
hideInSearch: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
hideInSearch: true,
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'userId',
|
||||||
|
width: 120,
|
||||||
|
render: (userId, record) => (
|
||||||
|
<div style={{ display: 'flex', justifyContent: 'center', gap: 8 }}>
|
||||||
|
<Button
|
||||||
|
type="link"
|
||||||
|
size="small"
|
||||||
|
key="view"
|
||||||
|
icon={<EyeOutlined />}
|
||||||
|
loading={loading}
|
||||||
|
hidden={!access.hasPerms('appUser:resume:view')}
|
||||||
|
onClick={() => handleViewDetail(userId)}
|
||||||
|
>
|
||||||
|
查看简历
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Fragment>
|
||||||
|
<div style={{ width: '100%', float: 'right' }}>
|
||||||
|
<ProTable<API.AppUser.ResumeItem>
|
||||||
|
actionRef={actionRef}
|
||||||
|
formRef={formTableRef}
|
||||||
|
rowKey="userId"
|
||||||
|
key="resumeIndex"
|
||||||
|
columns={columns}
|
||||||
|
search={{
|
||||||
|
labelWidth: 120,
|
||||||
|
}}
|
||||||
|
request={async (
|
||||||
|
params: API.AppUser.ListParams & {
|
||||||
|
pageSize?: number;
|
||||||
|
current?: number;
|
||||||
|
},
|
||||||
|
) => {
|
||||||
|
const res = await getResumeList({ ...params } as API.AppUser.ListParams);
|
||||||
|
return {
|
||||||
|
data: res.rows,
|
||||||
|
total: res.total,
|
||||||
|
success: true,
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<ResumeDetail
|
||||||
|
open={modalVisible}
|
||||||
|
values={currentRow}
|
||||||
|
onCancel={() => {
|
||||||
|
setModalVisible(false);
|
||||||
|
setCurrentRow(undefined);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Fragment>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export default ResumeList;
|
||||||
14
src/services/resumeLibrary/resumeList.ts
Normal file
14
src/services/resumeLibrary/resumeList.ts
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { request } from '@umijs/max';
|
||||||
|
|
||||||
|
export async function getResumeList(params?: API.AppUser.ListParams) {
|
||||||
|
return request<API.AppUser.ResumePageResult>(`/api/cms/appUser/getResumeList`, {
|
||||||
|
method: 'GET',
|
||||||
|
params: params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getResumeDetail(userId: string) {
|
||||||
|
return request<API.AppUser.ResumeDetailResult>(`/api/cms/appUser/getResumeDetail/${userId}`, {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
}
|
||||||
52
src/types/resumeLibrary/resumeList.d.ts
vendored
Normal file
52
src/types/resumeLibrary/resumeList.d.ts
vendored
Normal file
@@ -0,0 +1,52 @@
|
|||||||
|
declare namespace API.AppUser {
|
||||||
|
export interface ResumeItem {
|
||||||
|
userId?: string;
|
||||||
|
name?: string;
|
||||||
|
phone?: string;
|
||||||
|
sex?: string;
|
||||||
|
age?: string;
|
||||||
|
birthDate?: string;
|
||||||
|
education?: string;
|
||||||
|
politicalAffiliation?: string;
|
||||||
|
salaryMin?: string;
|
||||||
|
salaryMax?: string;
|
||||||
|
avatar?: string;
|
||||||
|
area?: string;
|
||||||
|
status?: string;
|
||||||
|
loginDate?: string;
|
||||||
|
loginIp?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ListParams {
|
||||||
|
age?: string;
|
||||||
|
area?: string;
|
||||||
|
avatar?: string;
|
||||||
|
birthDate?: string;
|
||||||
|
education?: string;
|
||||||
|
loginDate?: string;
|
||||||
|
loginIp?: string;
|
||||||
|
name?: string;
|
||||||
|
phone?: string;
|
||||||
|
politicalAffiliation?: string;
|
||||||
|
salaryMax?: string;
|
||||||
|
salaryMin?: string;
|
||||||
|
sex?: string;
|
||||||
|
status?: string;
|
||||||
|
userId?: string;
|
||||||
|
pageSize?: number;
|
||||||
|
current?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ResumePageResult {
|
||||||
|
code: number;
|
||||||
|
msg: string;
|
||||||
|
total: number;
|
||||||
|
rows: Array<ResumeItem>;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ResumeDetailResult {
|
||||||
|
code: number;
|
||||||
|
msg: string;
|
||||||
|
data: ResumeItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user