master
Joe 3 years ago
parent ac8aee97f4
commit 427f96094a

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

@ -4,6 +4,9 @@ export interface TableListItem {
educationList?: any[], educationList?: any[],
ptqList?: any[], ptqList?: any[],
skillLevelList?: any[], skillLevelList?: any[],
sexList?: any[],
departmentList?: any[],
ageList?: any[],
} }
export interface TableListPagination { export interface TableListPagination {

@ -2,7 +2,7 @@ import React, { useState, useEffect } from "react";
import { Card, Button, Row, Col, Form, Select, Checkbox, Spin } from "antd"; import { Card, Button, Row, Col, Form, Select, Checkbox, Spin } from "antd";
import { TableListItem } from "./data"; import { TableListItem } from "./data";
import { queryRule } from "./service"; import { queryRule } from "./service";
import { getAllInfoSettingValueBySettingName } from "../Employee/service"; import { getAllInfoSettingValueBySettingName, getPostListByDept } from "../Employee/service";
const { Option } = Select; const { Option } = Select;
@ -25,13 +25,14 @@ const UserList: React.FC<{}> = () => {
} }
const [postList, setPostList] = useState<any[]>([]); const [postList, setPostList] = useState<any[]>([]);
const [departmentList, setDepartmentList] = useState<any[]>([]);
const [form] = Form.useForm(); const [form] = Form.useForm();
useEffect(() => { useEffect(() => {
async function fetchData() { async function fetchData() {
handleLoadChange(true) handleLoadChange(true)
const res = await handleTableChange({isEdu: 1, isPtq: 1, isSkill: 1}) const res = await handleTableChange({isEdu: 1, isPtq: 1, isSkill: 1, isSex: 1, isDepartment: 1, isAge: 1})
handleLoadChange(false) handleLoadChange(false)
handleDataChange(res.data) handleDataChange(res.data)
} }
@ -40,6 +41,11 @@ const UserList: React.FC<{}> = () => {
setPostList(res.data); setPostList(res.data);
} }
}); });
getAllInfoSettingValueBySettingName({ settingName: '部门' }).then((res) => {
if (res.retcode && res.data) {
setDepartmentList(res.data);
}
});
fetchData() fetchData()
}, []); }, []);
return ( return (
@ -49,8 +55,26 @@ const UserList: React.FC<{}> = () => {
<Row style={{marginBottom: 20}} justify="space-between"> <Row style={{marginBottom: 20}} justify="space-between">
<Col span={20}> <Col span={20}>
<Form form={form} layout="inline"> <Form form={form} layout="inline">
<Form.Item name="postName" label="岗位"> <Form.Item name="departments" label="部门">
<Select style={{ width: 200 }} placeholder="请选择岗位" allowClear> <Select style={{ width: 200 }} placeholder="请选择部门" mode="multiple" onChange={(e) => {
getPostListByDept({departments: e}).then(res => {
const arr = res.data.map((item: any) => {
return {
settingValue: item
}
})
setPostList(arr)
})
}} allowClear>
{departmentList.map((item) => (
<Option value={item.settingValue} key={item.settingValue}>
{item.settingValue}
</Option>
))}
</Select>
</Form.Item>
<Form.Item name="postNames" label="岗位">
<Select style={{ width: 200 }} placeholder="请选择岗位" mode="multiple" allowClear>
{postList.map((item) => ( {postList.map((item) => (
<Option value={item.settingValue} key={item.settingValue}> <Option value={item.settingValue} key={item.settingValue}>
{item.settingValue} {item.settingValue}
@ -58,8 +82,17 @@ const UserList: React.FC<{}> = () => {
))} ))}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item name="isSex" label="" initialValue={true} valuePropName="checked">
<Checkbox></Checkbox>
</Form.Item>
<Form.Item name="isAge" label="" initialValue={true} valuePropName="checked">
<Checkbox></Checkbox>
</Form.Item>
<Form.Item name="isDepartment" label="" initialValue={true} valuePropName="checked">
<Checkbox></Checkbox>
</Form.Item>
<Form.Item name="isEdu" label="" initialValue={true} valuePropName="checked"> <Form.Item name="isEdu" label="" initialValue={true} valuePropName="checked">
<Checkbox></Checkbox> <Checkbox></Checkbox>
</Form.Item> </Form.Item>
<Form.Item name="isSkill" label="" initialValue={true} valuePropName="checked"> <Form.Item name="isSkill" label="" initialValue={true} valuePropName="checked">
<Checkbox></Checkbox> <Checkbox></Checkbox>
@ -75,6 +108,9 @@ const UserList: React.FC<{}> = () => {
const param = { const param = {
...values, ...values,
isEdu: values.isEdu ? 1 : 0, isEdu: values.isEdu ? 1 : 0,
isDepartment: values.isDepartment ? 1 : 0,
isSex: values.isSex ? 1 : 0,
isAge: values.isAge ? 1 : 0,
isSkill: values.isSkill ? 1 : 0, isSkill: values.isSkill ? 1 : 0,
isPtq: values.isPtq ? 1 : 0 isPtq: values.isPtq ? 1 : 0
} }
@ -86,6 +122,24 @@ const UserList: React.FC<{}> = () => {
<Spin spinning={loading}> <Spin spinning={loading}>
{data.map(e => {data.map(e =>
<Card key={e.postName} title={e.postName}> <Card key={e.postName} title={e.postName}>
{e.sexList && e.sexList?.length > 0 ? <>
<div style={{marginBottom: 10, fontSize: 14, fontWeight: 'bold'}}></div>
<Row style={{marginBottom: 20}} gutter={10}>
{e.sexList?.map(item => <Col key={item.analysisName} span={6}>{item.analysisName == 1 ? '男' : item.analysisName == 2 ? '女' : ''}: {item.analysisCount} {(item.analysisCount/item.postCount * 100).toFixed(2)}%</Col>)}
</Row>
</>:null}
{e.ageList && e.ageList?.length > 0 ? <>
<div style={{marginBottom: 10, fontSize: 14, fontWeight: 'bold'}}></div>
<Row style={{marginBottom: 20}} gutter={10}>
{e.ageList?.map(item => <Col key={item.analysisName} span={6}>{item.analysisName}: {item.analysisCount} {(item.analysisCount/item.postCount * 100).toFixed(2)}%</Col>)}
</Row>
</>:null}
{e.departmentList && e.departmentList?.length > 0 ? <>
<div style={{marginBottom: 10, fontSize: 14, fontWeight: 'bold'}}></div>
<Row style={{marginBottom: 20}} gutter={10}>
{e.departmentList?.map(item => <Col key={item.analysisName} span={6}>: {item.postCount} {(item.analysisCount/item.postCount * 100).toFixed(2)}%</Col>)}
</Row>
</>:null}
{e.educationList && e.educationList?.length > 0 ? <> {e.educationList && e.educationList?.length > 0 ? <>
<div style={{marginBottom: 10, fontSize: 14, fontWeight: 'bold'}}></div> <div style={{marginBottom: 10, fontSize: 14, fontWeight: 'bold'}}></div>
<Row style={{marginBottom: 20}} gutter={10}> <Row style={{marginBottom: 20}} gutter={10}>

@ -6,6 +6,9 @@ export interface FormValueType extends Partial<TableListItem> {
education?: string; education?: string;
school?: string; school?: string;
speciality?: string; speciality?: string;
highestEducation?: string;
undergraduateSchools?: string;
undergraduateMajor?: string;
intake?: string; intake?: string;
graduationTime?: string; graduationTime?: string;
} }
@ -25,6 +28,9 @@ const UpdateEducationResumeForm: React.FC<UpdateFormProps> = (props) => {
education: props.values.education, education: props.values.education,
school: props.values.school, school: props.values.school,
speciality: props.values.speciality, speciality: props.values.speciality,
highestEducation: props.values.highestEducation,
undergraduateSchools: props.values.undergraduateSchools,
undergraduateMajor: props.values.undergraduateMajor,
intake: props.values.intake, intake: props.values.intake,
graduationTime: props.values.graduationTime, graduationTime: props.values.graduationTime,
}); });
@ -86,29 +92,46 @@ const UpdateEducationResumeForm: React.FC<UpdateFormProps> = (props) => {
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}> <Col span={12}>
<Form.Item name="education" label="学历"> <Form.Item name="education" label="就业学历">
<Input placeholder="请输入学历" /> <Input placeholder="请输入就业学历" />
</Form.Item> </Form.Item>
</Col> </Col>
<Col span={12}> <Col span={12}>
<Form.Item name="school" label="学校"> <Form.Item name="highestEducation" label="最高学历">
<Input placeholder="请输入学校" /> <Input placeholder="请输入最高学历" />
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}>
<Form.Item name="undergraduateSchools" label="本科学历学校">
<Input placeholder="请输入本科学历学校" />
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="undergraduateMajor" label="本科学历专业">
<Input placeholder="请输入本科学历专业" />
</Form.Item>
</Col>
</Row>
<Row gutter={16}>
<Col span={12}>
<Form.Item name="school" label="最高学历学校">
<Input placeholder="请输入最高学历学校" />
</Form.Item>
</Col>
<Col span={12}> <Col span={12}>
<Form.Item name="speciality" label="专业"> <Form.Item name="speciality" label="专业">
<Input placeholder="请输入专业" /> <Input placeholder="请输入专业" />
</Form.Item> </Form.Item>
</Col> </Col>
</Row>
<Row gutter={16}>
<Col span={12}> <Col span={12}>
<Form.Item name="intake" label="入学日期"> <Form.Item name="intake" label="入学日期">
<Input placeholder="请输入入学日期" /> <Input placeholder="请输入入学日期" />
</Form.Item> </Form.Item>
</Col> </Col>
</Row>
<Row gutter={16}>
<Col span={12}> <Col span={12}>
<Form.Item name="graduationTime" label="毕业日期"> <Form.Item name="graduationTime" label="毕业日期">
<Input placeholder="请输入毕业日期" /> <Input placeholder="请输入毕业日期" />

@ -11,6 +11,8 @@ import {
Modal, Modal,
Popconfirm, Popconfirm,
message, message,
Image,
InputNumber,
} from 'antd'; } from 'antd';
import { TableListItem } from '../data'; import { TableListItem } from '../data';
import { import {
@ -18,6 +20,7 @@ import {
delFamilyMembers, delFamilyMembers,
delHonor, delHonor,
delWorkExperience, delWorkExperience,
exportEmployeeDetail,
getAllEducationResume, getAllEducationResume,
getAllFamilyMembers, getAllFamilyMembers,
getAllHonor, getAllHonor,
@ -36,6 +39,7 @@ import UpdateHonorForm from './UpdateHonorForm';
import { useReactToPrint } from 'react-to-print'; import { useReactToPrint } from 'react-to-print';
//@ts-ignore //@ts-ignore
import Html2Pdf from 'js-html2pdf'; import Html2Pdf from 'js-html2pdf';
import EmptyImage from '@/assets/empty.png'
const { Option } = Select; const { Option } = Select;
export interface FormValueType extends Partial<TableListItem> {} export interface FormValueType extends Partial<TableListItem> {}
@ -47,6 +51,23 @@ export interface UpdateFormProps {
values: Partial<TableListItem>; values: Partial<TableListItem>;
} }
/**
*
* @param selectedRows
*/
const handleExportEmployeeDetail = async ({ ...params }: any) => {
const hide = message.loading('正在导出');
try {
await exportEmployeeDetail(params);
hide();
return true;
} catch (error) {
hide();
message.error('处理失败,请重试');
return false;
}
};
/** /**
* *
* @param fields * @param fields
@ -175,6 +196,10 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
employeeName: props.values.employeeName, employeeName: props.values.employeeName,
employeeNo: props.values.employeeNo, employeeNo: props.values.employeeNo,
unitId: props.values.unitId, unitId: props.values.unitId,
age: props.values.age,
departmentId: props.values.departmentId,
sex: props.values.sex,
photo: props.values.photo,
postId: props.values.postId, postId: props.values.postId,
groupsId: props.values.groupsId, groupsId: props.values.groupsId,
ptqId: props.values.ptqId, ptqId: props.values.ptqId,
@ -192,6 +217,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
const [ptqList, setPtqList] = useState<any[]>([]); const [ptqList, setPtqList] = useState<any[]>([]);
const [skillLevelList, setSkillLevelList] = useState<any[]>([]); const [skillLevelList, setSkillLevelList] = useState<any[]>([]);
const [highestEducationList, setHighestEducationList] = useState<any[]>([]); const [highestEducationList, setHighestEducationList] = useState<any[]>([]);
const [departmentList, setDepartmentList] = useState<any[]>([]);
const [educationResumeList, setEducationResumeList] = useState<any[]>([]); const [educationResumeList, setEducationResumeList] = useState<any[]>([]);
const [familyMembersList, setFamilyMembersList] = useState<any[]>([]); const [familyMembersList, setFamilyMembersList] = useState<any[]>([]);
@ -207,17 +233,29 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
const educationResumeColumns: ColumnsType<any> = [ const educationResumeColumns: ColumnsType<any> = [
{ {
title: '学历', title: '最高学历',
dataIndex: 'education', dataIndex: 'highestEducation',
}, },
{ {
title: '学校', title: '最高学历学校',
dataIndex: 'school', dataIndex: 'school',
}, },
{ {
title: '专业', title: '专业',
dataIndex: 'speciality', dataIndex: 'speciality',
}, },
{
title: '就业学历',
dataIndex: 'education',
},
{
title: '本科学历学校',
dataIndex: 'undergraduateSchools',
},
{
title: '本科学历专业',
dataIndex: 'undergraduateMajor',
},
{ {
title: '时间', title: '时间',
dataIndex: 'intake', dataIndex: 'intake',
@ -228,17 +266,29 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
]; ];
const educationResumeColumns1: ColumnsType<any> = [ const educationResumeColumns1: ColumnsType<any> = [
{ {
title: '学历', title: '最高学历',
dataIndex: 'education', dataIndex: 'highestEducation',
}, },
{ {
title: '学校', title: '最高学历学校',
dataIndex: 'school', dataIndex: 'school',
}, },
{ {
title: '专业', title: '专业',
dataIndex: 'speciality', dataIndex: 'speciality',
}, },
{
title: '就业学历',
dataIndex: 'education',
},
{
title: '本科学历学校',
dataIndex: 'undergraduateSchools',
},
{
title: '本科学历专业',
dataIndex: 'undergraduateMajor',
},
{ {
title: '入学时间', title: '入学时间',
dataIndex: 'intake', dataIndex: 'intake',
@ -457,10 +507,14 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
let ptq; let ptq;
let skillLevel; let skillLevel;
let highestEducation; let highestEducation;
let department;
if (fieldsValue.unitId) { if (fieldsValue.unitId) {
unit = unitList.find((e) => e.id === fieldsValue.unitId).settingValue; unit = unitList.find((e) => e.id === fieldsValue.unitId).settingValue;
} }
if (fieldsValue.departmentId) {
department = departmentList.find((e) => e.id === fieldsValue.departmentId).settingValue;
}
if (fieldsValue.postId) { if (fieldsValue.postId) {
post = postList.find((e) => e.id === fieldsValue.postId).settingValue; post = postList.find((e) => e.id === fieldsValue.postId).settingValue;
} }
@ -490,6 +544,7 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
ptq, ptq,
skillLevel, skillLevel,
highestEducation, highestEducation,
department
}); });
}; };
@ -524,6 +579,11 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
setUnitList(res.data); setUnitList(res.data);
} }
}); });
getAllInfoSettingValueBySettingName({ settingName: '部门' }).then((res) => {
if (res.retcode && res.data) {
setDepartmentList(res.data);
}
});
}, []); }, []);
const getData = (employeeNo: string, type: number) => { const getData = (employeeNo: string, type: number) => {
@ -652,6 +712,11 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
PDF PDF
</Button> </Button>
) : null} ) : null}
{values.id ? (
<Button style={{ marginRight: 8 }} onClick={() => handleExportEmployeeDetail({employeeNo: values.employeeNo})} type="primary">
Excel
</Button>
) : null}
<Button onClick={handleSubmit} type="primary"> <Button onClick={handleSubmit} type="primary">
</Button> </Button>
@ -660,6 +725,13 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
> >
<div id="print" style={{padding: 20}} ref={componentRef}> <div id="print" style={{padding: 20}} ref={componentRef}>
<div style={{ fontSize: 16, marginBottom: 10, fontWeight: 'bold' }}></div> <div style={{ fontSize: 16, marginBottom: 10, fontWeight: 'bold' }}></div>
<div style={{marginBottom: 10 }}>
<Image
width={200}
src="12"
fallback={EmptyImage}
/>
</div>
<Form form={form} labelAlign="left" labelCol={{ span: 7 }} initialValues={formVals}> <Form form={form} labelAlign="left" labelCol={{ span: 7 }} initialValues={formVals}>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}> <Col span={12}>
@ -697,9 +769,24 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}> <Col span={12}>
<Form.Item name="unitId" label="单位"> <Form.Item name="sex" label="性别">
<Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择单位" allowClear> <Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择性别" allowClear>
{unitList.map((item) => ( <Option value={1} key={1}></Option>
<Option value={2} key={2}></Option>
</Select>
</Form.Item>
</Col>
<Col span={12}>
<Form.Item name="age" label="年龄">
<InputNumber bordered={!isPrint} placeholder="请输入年龄" />
</Form.Item>
</Col>
</Row>
<Row gutter={16}>
<Col span={12}>
<Form.Item name="departmentId" label="部门">
<Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择部门" allowClear>
{departmentList.map((item) => (
<Option value={item.id} key={item.id}> <Option value={item.id} key={item.id}>
{item.settingValue} {item.settingValue}
</Option> </Option>
@ -721,9 +808,9 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}> <Col span={12}>
<Form.Item name="groupsId" label="班组"> <Form.Item name="unitId" label="单位">
<Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择班组" allowClear> <Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择单位" allowClear>
{groupsList.map((item) => ( {unitList.map((item) => (
<Option value={item.id} key={item.id}> <Option value={item.id} key={item.id}>
{item.settingValue} {item.settingValue}
</Option> </Option>
@ -745,9 +832,9 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={12}> <Col span={12}>
<Form.Item name="ptqId" label="专业技术资格"> <Form.Item name="groupsId" label="班组">
<Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择专业技术资格" allowClear> <Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择班组" allowClear>
{ptqList.map((item) => ( {groupsList.map((item) => (
<Option value={item.id} key={item.id}> <Option value={item.id} key={item.id}>
{item.settingValue} {item.settingValue}
</Option> </Option>
@ -767,6 +854,19 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
</Form.Item> </Form.Item>
</Col> </Col>
</Row> </Row>
<Row gutter={16}>
<Col span={12}>
<Form.Item name="ptqId" label="专业技术资格">
<Select bordered={!isPrint} showArrow={!isPrint} placeholder="请选择专业技术资格" allowClear>
{ptqList.map((item) => (
<Option value={item.id} key={item.id}>
{item.settingValue}
</Option>
))}
</Select>
</Form.Item>
</Col>
</Row>
</Form> </Form>
{values.id ? ( {values.id ? (
<> <>
@ -787,6 +887,9 @@ const UpdateForm: React.FC<UpdateFormProps> = (props) => {
<Table <Table
bordered bordered
size="middle" size="middle"
scroll={{
x: 'max-content'
}}
columns={educationResumeColumns} columns={educationResumeColumns}
rowKey="id" rowKey="id"
dataSource={educationResumeList} dataSource={educationResumeList}

@ -2,12 +2,17 @@ export interface TableListItem {
id?: number, id?: number,
employeeName?: string, employeeName?: string,
employeeNo?: string, employeeNo?: string,
department?: string,
age?: number,
photo?: string,
sex?: number,
unit?: string, unit?: string,
post?: string, post?: string,
groups?: string, groups?: string,
ptq?: string, ptq?: string,
skillLevel?: string, skillLevel?: string,
unitId?: number, unitId?: number,
departmentId?: number,
postId?: number, postId?: number,
groupsId?: number, groupsId?: number,
ptqId?: number, ptqId?: number,

@ -1,5 +1,5 @@
import React, { useState, useRef } from "react"; import React, { useState, useRef } from "react";
import { message, Button, Popconfirm, FormInstance } from "antd"; import { message, Button, Popconfirm, FormInstance, InputNumber, Input } from "antd";
import { TableListItem, TableListPagination } from "./data"; import { TableListItem, TableListPagination } from "./data";
import { queryRule, updateRule, removeRule, addRule, getAllInfoSettingValueBySettingName, exportEmployee } from "./service"; import { queryRule, updateRule, removeRule, addRule, getAllInfoSettingValueBySettingName, exportEmployee } from "./service";
import UpdateForm, { FormValueType } from './components/UpdateForm'; import UpdateForm, { FormValueType } from './components/UpdateForm';
@ -120,10 +120,114 @@ const UserList: React.FC<{}> = () => {
title: '手机号', title: '手机号',
dataIndex: 'mobile', dataIndex: 'mobile',
}, },
{
title: '性别',
dataIndex: 'sex',
valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'sexes'
},
valueEnum: {
1: '男',
2: '女'
}
},
{
title: '年龄',
dataIndex: 'age',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'ages'
},
renderFormItem: (_, { type }, form) => {
if (type === 'form') {
return null;
}
let value1 = form.getFieldValue('ages') ? form.getFieldValue('ages')[0] : '';
let value2 = form.getFieldValue('ages') ? form.getFieldValue('ages')[1] : '';
return (
<Input.Group compact>
<InputNumber
{...{
value: value1,
min: 0,
onChange: (e) => {
value1 = e;
const newValues: any = {};
newValues.ages = [value1, value2];
form.setFieldsValue(newValues);
},
}}
style={{ width: 100, textAlign: 'center' }}
/>
<Input
style={{
width: 30,
borderLeft: 0,
borderRight: 0,
pointerEvents: 'none',
}}
placeholder="~"
disabled
/>
<InputNumber
{...{
value: value2,
min: 0,
onChange: (e) => {
value2 = e;
const newValues: any = {};
newValues.ages = [value1, value2];
form.setFieldsValue(newValues);
},
}}
style={{
width: 100,
textAlign: 'center',
}}
/>
</Input.Group>
);
},
},
{
title: '部门',
dataIndex: 'departmentId',
valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'departmentIds'
},
request: async () => {
const msg = await getAllInfoSettingValueBySettingName({settingName: '部门'})
if (msg.retcode && msg.data) {
return msg.data.map((e: any) => {
return {
label: e.settingValue,
value: e.id
}
})
}
return []
}
},
{ {
title: '单位', title: '单位',
dataIndex: 'unitId', dataIndex: 'unitId',
valueType: 'select', valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'unitIds'
},
request: async () => { request: async () => {
const msg = await getAllInfoSettingValueBySettingName({settingName: '单位'}) const msg = await getAllInfoSettingValueBySettingName({settingName: '单位'})
if (msg.retcode && msg.data) { if (msg.retcode && msg.data) {
@ -141,6 +245,12 @@ const UserList: React.FC<{}> = () => {
title: '现岗位', title: '现岗位',
dataIndex: 'postId', dataIndex: 'postId',
valueType: 'select', valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'postIds'
},
request: async () => { request: async () => {
const msg = await getAllInfoSettingValueBySettingName({settingName: '岗位'}) const msg = await getAllInfoSettingValueBySettingName({settingName: '岗位'})
if (msg.retcode && msg.data) { if (msg.retcode && msg.data) {
@ -158,6 +268,12 @@ const UserList: React.FC<{}> = () => {
title: '班组', title: '班组',
dataIndex: 'groupsId', dataIndex: 'groupsId',
valueType: 'select', valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'groupsIds'
},
request: async () => { request: async () => {
const msg = await getAllInfoSettingValueBySettingName({settingName: '班组'}) const msg = await getAllInfoSettingValueBySettingName({settingName: '班组'})
if (msg.retcode && msg.data) { if (msg.retcode && msg.data) {
@ -175,6 +291,12 @@ const UserList: React.FC<{}> = () => {
title: '最高学历', title: '最高学历',
dataIndex: 'highestEducationId', dataIndex: 'highestEducationId',
valueType: 'select', valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'highestEducationIds'
},
request: async () => { request: async () => {
const msg = await getAllInfoSettingValueBySettingName({settingName: '学历'}) const msg = await getAllInfoSettingValueBySettingName({settingName: '学历'})
if (msg.retcode && msg.data) { if (msg.retcode && msg.data) {
@ -215,6 +337,12 @@ const UserList: React.FC<{}> = () => {
title: '技能等级', title: '技能等级',
dataIndex: 'skillLevelId', dataIndex: 'skillLevelId',
valueType: 'select', valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'skillLevelIds'
},
request: async () => { request: async () => {
const msg = await getAllInfoSettingValueBySettingName({settingName: '技能等级'}) const msg = await getAllInfoSettingValueBySettingName({settingName: '技能等级'})
if (msg.retcode && msg.data) { if (msg.retcode && msg.data) {
@ -232,6 +360,12 @@ const UserList: React.FC<{}> = () => {
title: '奖惩等级', title: '奖惩等级',
dataIndex: 'honorLevel', dataIndex: 'honorLevel',
valueType: 'select', valueType: 'select',
fieldProps: {
mode: "multiple"
},
formItemProps: {
name: 'honorLevels'
},
hideInTable: true, hideInTable: true,
request: async () => { request: async () => {
const msg = await getAllInfoSettingValueBySettingName({settingName: '奖惩等级'}) const msg = await getAllInfoSettingValueBySettingName({settingName: '奖惩等级'})
@ -279,6 +413,9 @@ const UserList: React.FC<{}> = () => {
rowKey="id" rowKey="id"
options={false} options={false}
formRef={ref} formRef={ref}
search={{
labelWidth: 'auto'
}}
toolBarRender={() => [ toolBarRender={() => [
<Button <Button
type="primary" type="primary"

@ -25,6 +25,16 @@ export async function exportEmployee(params: object) {
}); });
} }
export async function exportEmployeeDetail(params: object) {
return request(`/api/employee/exportEmployeeDetail`, {
params: {employeeVal: JSON.stringify(params)},
responseType: 'blob',
getResponse: true,
parseResponse: false,
data: { fileName: '员工明细导出' },
});
}
export async function updateRule(params: TableListItem) { export async function updateRule(params: TableListItem) {
return request('/api/employee/saveEmployee', { return request('/api/employee/saveEmployee', {
method: 'POST', method: 'POST',
@ -39,6 +49,13 @@ export async function removeRule(params: TableListItem) {
}); });
} }
export async function getPostListByDept(params: any) {
return request('/api/employee/getPostListByDept', {
method: 'POST',
data: params,
});
}
export async function getAllInfoSettingValueBySettingName(params: any) { export async function getAllInfoSettingValueBySettingName(params: any) {
return request('/api/infoSettingValue/getAllInfoSettingValueBySettingName', { return request('/api/infoSettingValue/getAllInfoSettingValueBySettingName', {
method: 'POST', method: 'POST',

Loading…
Cancel
Save