|
@ -1,17 +1,13 @@ |
|
|
import React, { useEffect, useState, useRef, useMemo } from 'react'; |
|
|
import React, { useEffect, useState, useRef, useMemo } from 'react'; |
|
|
import { connect } from 'react-redux'; |
|
|
import { connect } from 'react-redux'; |
|
|
import moment from 'moment' |
|
|
import { Table, Button, Pagination, Skeleton, Popconfirm, Tooltip } from '@douyinfe/semi-ui'; |
|
|
import { Table, Button, Pagination, Skeleton, Form, Tooltip } from '@douyinfe/semi-ui'; |
|
|
|
|
|
import { IconSearch } from '@douyinfe/semi-icons'; |
|
|
|
|
|
import { SkeletonScreen, Setup } from "$components"; |
|
|
import { SkeletonScreen, Setup } from "$components"; |
|
|
import { UserAttribute } from '$utils'; |
|
|
|
|
|
import ImportPositionRatingModal from '../components/importPositionRating'; |
|
|
import ImportPositionRatingModal from '../components/importPositionRating'; |
|
|
import '../style.less'; |
|
|
import '../style.less'; |
|
|
|
|
|
|
|
|
const PositionRating = (props) => { |
|
|
const PositionRating = (props) => { |
|
|
const { dispatch, actions, memberList, history, user, loading, socket, xqMembers } = props |
|
|
const { dispatch, actions, memberList } = props |
|
|
const { humanAffairs } = actions; |
|
|
const { getMemberList, getPositionRating, postPositionRating, delPositionRating } = actions.humanAffairs; |
|
|
const { getMemberList, getPositionRating } = actions.humanAffairs; |
|
|
|
|
|
|
|
|
|
|
|
const form = useRef();//表单 |
|
|
const form = useRef();//表单 |
|
|
let [archivesList, setArchivesList] = useState([]);//人员列表 |
|
|
let [archivesList, setArchivesList] = useState([]);//人员列表 |
|
@ -25,8 +21,8 @@ const PositionRating = (props) => { |
|
|
getMainList() |
|
|
getMainList() |
|
|
}, [query]) |
|
|
}, [query]) |
|
|
|
|
|
|
|
|
function getMainList() { |
|
|
function getMainList(queryObj) { |
|
|
dispatch(getPositionRating(query)).then((res) => { |
|
|
dispatch(getPositionRating(queryObj || query)).then((res) => { |
|
|
if (res.success) { |
|
|
if (res.success) { |
|
|
setArchivesList(res.payload?.data?.rows) |
|
|
setArchivesList(res.payload?.data?.rows) |
|
|
setLimits(res.payload?.data?.count) |
|
|
setLimits(res.payload?.data?.count) |
|
@ -103,45 +99,50 @@ const PositionRating = (props) => { |
|
|
width: 120, |
|
|
width: 120, |
|
|
dataIndex: "userPost", |
|
|
dataIndex: "userPost", |
|
|
key: "userPost", |
|
|
key: "userPost", |
|
|
render: (_, r, index) => { |
|
|
|
|
|
return r.userPost || '-'; |
|
|
|
|
|
}, |
|
|
|
|
|
}, { |
|
|
}, { |
|
|
title: '评级时间', |
|
|
title: '评级时间', |
|
|
width: 100, |
|
|
width: 120, |
|
|
dataIndex: "ratingTime", |
|
|
dataIndex: "ratingTime", |
|
|
key: "ratingTime", |
|
|
key: "ratingTime", |
|
|
render: (_, r, index) => <span>-</span>, |
|
|
|
|
|
}, { |
|
|
}, { |
|
|
title: '理论基础测评成绩', |
|
|
title: '理论基础测评成绩', |
|
|
width: 150, |
|
|
width: 150, |
|
|
dataIndex: "theoryBasicScore", |
|
|
dataIndex: "theoryBasicScore", |
|
|
key: "theoryBasicScore", |
|
|
key: "theoryBasicScore", |
|
|
render: (_, r, index) => <span>-</span>, |
|
|
|
|
|
}, { |
|
|
}, { |
|
|
title: '理论基础测评是否通过(≥60)', |
|
|
title: '理论基础测评是否通过(≥60)', |
|
|
width: 150, |
|
|
width: 130, |
|
|
dataIndex: "theoryPassed", |
|
|
dataIndex: "theoryPassed", |
|
|
key: "theoryPassed", |
|
|
key: "theoryPassed", |
|
|
render: (_, r, index) => <span>-</span>, |
|
|
|
|
|
}, { |
|
|
}, { |
|
|
title: '评级总成绩', |
|
|
title: '评级总成绩', |
|
|
width: 150, |
|
|
width: 100, |
|
|
dataIndex: "totalScore", |
|
|
dataIndex: "totalScore", |
|
|
key: "totalScore", |
|
|
key: "totalScore", |
|
|
render: (_, r, index) => <span>-</span>, |
|
|
|
|
|
}, { |
|
|
}, { |
|
|
title: '评级总成绩是否通过(K≥60)', |
|
|
title: '评级总成绩是否通过(K≥60)', |
|
|
width: 150, |
|
|
width: 130, |
|
|
dataIndex: "totalRatingPassed", |
|
|
dataIndex: "totalRatingPassed", |
|
|
key: "totalRatingPassed", |
|
|
key: "totalRatingPassed", |
|
|
render: (_, r, index) => <span>-</span>, |
|
|
|
|
|
}, { |
|
|
}, { |
|
|
title: '技术职级等级', |
|
|
title: '技术职级等级', |
|
|
width: 150, |
|
|
width: 150, |
|
|
dataIndex: "technicalGrade", |
|
|
dataIndex: "technicalGrade", |
|
|
key: "technicalGrade", |
|
|
key: "technicalGrade", |
|
|
render: (_, r, index) => <span>-</span>, |
|
|
}, { |
|
|
|
|
|
title: '操作', |
|
|
|
|
|
width: 100, |
|
|
|
|
|
dataIndex: "action", |
|
|
|
|
|
key: "action", |
|
|
|
|
|
render: (text, record) => <div style={{ color: "#1890FF" }}><Popconfirm |
|
|
|
|
|
style={{ minWidth: "max-content" }} |
|
|
|
|
|
title="提示" |
|
|
|
|
|
content="确认删除条信息?" |
|
|
|
|
|
onConfirm={() => { handleDel(record.id) }} |
|
|
|
|
|
position={"leftBottom"} |
|
|
|
|
|
> |
|
|
|
|
|
<a style={{ cursor: 'pointer' }}>删除</a> |
|
|
|
|
|
</Popconfirm></div> |
|
|
}]; |
|
|
}]; |
|
|
|
|
|
|
|
|
function handleRow(record, index) {//斑马条纹 |
|
|
function handleRow(record, index) {//斑马条纹 |
|
@ -162,6 +163,20 @@ const PositionRating = (props) => { |
|
|
} |
|
|
} |
|
|
setImportModal(true); |
|
|
setImportModal(true); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const handleImportOk = (dataToSave) => { |
|
|
|
|
|
dispatch(postPositionRating(dataToSave)).then(res => { |
|
|
|
|
|
setImportModal(false); |
|
|
|
|
|
setQuery({ limit: 10, page: 0 }); |
|
|
|
|
|
getMainList({ limit: 10, page: 0 }); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
const handleDel = (id) => { |
|
|
|
|
|
dispatch(delPositionRating(id)).then(res => { |
|
|
|
|
|
setQuery({ limit: 10, page: 0 }); |
|
|
|
|
|
getMainList({ limit: 10, page: 0 }); |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
const scroll = useMemo(() => ({}), []); |
|
|
const scroll = useMemo(() => ({}), []); |
|
|
return ( |
|
|
return ( |
|
|
<> |
|
|
<> |
|
@ -266,6 +281,7 @@ const PositionRating = (props) => { |
|
|
{importModal ? |
|
|
{importModal ? |
|
|
<ImportPositionRatingModal |
|
|
<ImportPositionRatingModal |
|
|
memberList={memberList} |
|
|
memberList={memberList} |
|
|
|
|
|
onOk={handleImportOk} |
|
|
onCancel={() => { setImportModal(false) }} |
|
|
onCancel={() => { setImportModal(false) }} |
|
|
/> : ''} |
|
|
/> : ''} |
|
|
</div> |
|
|
</div> |
|
|