Browse Source

(*)查看详情完善

master
Archer_cdm 2 years ago
parent
commit
48f5f3527d
  1. 94
      web/client/src/sections/humanAffairs/containers/communication/detailModal.js
  2. 22
      web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx

94
web/client/src/sections/humanAffairs/containers/communication/detailModal.js

@ -1,14 +1,10 @@
import React, { useEffect, useRef, useState } from 'react';
import { connect } from "react-redux";
import { Modal, Button, Row, Col, Input } from "@douyinfe/semi-ui";
import moment from 'moment'
import { Modal, Button, Row, Col, Input, Tooltip, TextArea } from "@douyinfe/semi-ui";
const DetailModal = (props) => {
const { dispatch, actions, user, onCancel, dataToDetail, close } = props;
const { humanAffairs } = actions;
const [options, setOptions] = useState([]);
//初始化
useEffect(() => {
}, []);
const { onCancel, dataToDetail } = props;
console.log(dataToDetail, 'dataToDetaildataToDetail');
return (
<Modal title='员工沟通详情'
@ -24,87 +20,99 @@ const DetailModal = (props) => {
>
<Row style={{ marginBottom: '30px' }}>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >被沟通人</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >被沟通人</span>
<Input value={dataToDetail.personalName} style={{ width: '68%', float: 'left' }} disabled />
</Col>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >岗位</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >岗位</span>
<Input value={dataToDetail.job} style={{ width: '68%', float: 'left' }} disabled />
</Col>
</Row>
<Row style={{ marginBottom: '30px' }}>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >部门</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >部门</span>
<Input value={dataToDetail.departmentName} style={{ width: '68%', float: 'left' }} disabled />
</Col>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通截止时间</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通截止时间</span>
<Input value={moment(dataToDetail.communicateEndDate).format('YYYY-MM-DD')} style={{ width: '68%', float: 'left' }} disabled />
</Col>
</Row>
<Row style={{ marginBottom: '30px' }}>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通主题</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通主题</span>
<Tooltip content={dataToDetail.topic}>
<div style={{
textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', width: '68%', height: '32px', lineHeight: '32px', background: 'rgba(243,243,243,0.7)', fontSize: '14px', padding: '0 12px', borderRadius: '2px', cursor: 'not-allowed', color: 'rgba(0,0,0,0.3)'
}}>{dataToDetail.topic}</div>
</Tooltip>
</Col>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通背景</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通背景</span>
<Tooltip content={dataToDetail.background}>
<div style={{
textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', width: '68%', height: '32px', lineHeight: '32px', background: 'rgba(243,243,243,0.7)', fontSize: '14px', padding: '0 12px', borderRadius: '2px', cursor: 'not-allowed', color: 'rgba(0,0,0,0.3)'
}}>{dataToDetail.background}</div>
</Tooltip>
</Col>
</Row>
<div style={{ fontWeight: 'bold',marginBottom:15 }}>面谈的主要内容</div>
<div style={{ fontWeight: 'bold', marginBottom: 15 }}>面谈的主要内容</div>
<Row style={{ marginBottom: '30px' }}>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >实际沟通时间</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >实际沟通时间</span>
<Input value={moment(dataToDetail.communicateDate).format('YYYY-MM-DD')} style={{ width: '68%', float: 'left' }} disabled />
</Col>
<Col span={12}>
<span style={{ width:'28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通内容</span>
<Input style={{ width: '68%', float: 'left' }} disabled />
<span style={{ width: '28%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通内容</span>
<Tooltip content={dataToDetail.communicateContent}>
<div style={{
textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', width: '68%', height: '32px', lineHeight: '32px', background: 'rgba(243,243,243,0.7)', fontSize: '14px', padding: '0 12px', borderRadius: '2px', cursor: 'not-allowed', color: 'rgba(0,0,0,0.3)'
}}>{dataToDetail.communicateContent}</div>
</Tooltip>
</Col>
</Row>
<div style={{ fontWeight: 'bold',marginBottom:15 }}>沟通人意见反馈</div>
<div style={{ fontWeight: 'bold', marginBottom: 15 }}>沟通人意见反馈</div>
<Row style={{ marginBottom: '30px' }}>
<Col span={24}>
<span style={{ width:'25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >反馈获取的信息与处理建议</span>
<Input style={{ width: '73%', float: 'left' }} disabled />
<span style={{ width: '25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >反馈获取的信息与处理建议</span>
<TextArea autosize rows={1} value={dataToDetail.suggestion} style={{ width: '73%', float: 'left' }} disabled />
</Col>
</Row>
<Row style={{ marginBottom: '30px' }}>
<Col span={24}>
<span style={{ width:'25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通成果</span>
<Input style={{ width: '73%', float: 'left' }} disabled />
<span style={{ width: '25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通成果</span>
<TextArea autosize rows={1} value={dataToDetail.communicateResult} style={{ width: '73%', float: 'left' }} disabled />
</Col>
</Row>
<Row style={{ marginBottom: '30px' }}>
<Col span={24}>
<span style={{ width:'25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >对被沟通人近期表现的评价</span>
<Input style={{ width: '73%', float: 'left' }} disabled />
<span style={{ width: '25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >对被沟通人近期表现的评价</span>
<TextArea autosize rows={1} value={dataToDetail.valuation} style={{ width: '73%', float: 'left' }} disabled />
</Col>
</Row>
<Row style={{ marginBottom: '30px' }}>
<Col span={24}>
<span style={{ width:'25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >给予被沟通人的改进建议</span>
<Input style={{ width: '73%', float: 'left' }} disabled />
<span style={{ width: '25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >给予被沟通人的改进建议</span>
<TextArea autosize rows={1} value={dataToDetail.toPersonSugges} style={{ width: '73%', float: 'left' }} disabled />
</Col>
</Row>
<div style={{ fontWeight: 'bold',marginBottom:15 }}>被沟通人意见反馈</div>
<div style={{ fontWeight: 'bold', marginBottom: 15 }}>被沟通人意见反馈</div>
<Row style={{ marginBottom: '30px' }}>
<Col span={24}>
<span style={{ width:'25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通情况反馈</span>
<Input style={{ width: '73%', float: 'left' }} disabled />
<span style={{ width: '25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >沟通情况反馈</span>
<TextArea autosize rows={1} value={dataToDetail.communicateCondition} style={{ width: '73%', float: 'left' }} disabled />
</Col>
</Row>
<Row style={{ marginBottom: '30px' }}>
<Col span={24}>
<span style={{ width:'25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >培训需求</span>
<Input style={{ width: '73%', float: 'left' }} disabled />
<span style={{ width: '25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >培训需求</span>
<TextArea autosize rows={1} value={dataToDetail.training} style={{ width: '73%', float: 'left' }} disabled />
</Col>
</Row>
<Row style={{ marginBottom: '30px' }}>
<Col span={24}>
<span style={{ width:'25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >下一步工作计划活提升方向</span>
<Input style={{ width: '73%', float: 'left' }} disabled />
<span style={{ width: '25%', float: 'left', textAlign: 'right', color: 'rgba(0, 0, 0, 0.85)', lineHeight: '32px' }} >下一步工作计划活提升方向</span>
<TextArea autosize rows={1} value={dataToDetail.nextPlan} style={{ width: '73%', float: 'left' }} disabled />
</Col>
</Row>
</Modal >
@ -112,11 +120,9 @@ const DetailModal = (props) => {
}
function mapStateToProps(state) {
const { auth, global } = state;
const { auth } = state;
return {
user: auth.user,
actions: global.actions,
apiRoot: global.apiRoot
};
}

22
web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx

@ -15,7 +15,7 @@ const EmployeeCommunication = (props) => {
const [timeRange, setTimeRange] = useState('');//
const [limits, setLimits] = useState()//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [modalV, setModalV] = useState(true);
const [modalV, setModalV] = useState(false);
const [dataToDetail, setDataToDetail] = useState(null);
const [tableData, setTableData] = useState([]);
const page = useRef(query.page);
@ -64,27 +64,17 @@ const EmployeeCommunication = (props) => {
title: '岗位',
dataIndex: 'job',
key: 'job',
width: 100,
width: 120,
}, {
title: '部门',
dataIndex: 'departmentName',
key: 'departmentName',
width: 120,
render: (t, r) => {
return (<Tooltip content={r.departmentName} style={{ lineHeight: 2 }}>
<div style={{
textOverflow: 'ellipsis',
overflow: 'hidden',
whiteSpace: 'nowrap',
width: 120
}}>{r.departmentName}</div>
</Tooltip>)
}
}, {
title: '沟通时间',
dataIndex: 'communicateDate',
key: 'communicateDate',
width: 120,
width: 120,
render: (text, record) => <span>{text ? moment(text).format("YYYY-MM-DD") : '-'}</span>
}, {
title: '沟通内容',
@ -191,9 +181,9 @@ const EmployeeCommunication = (props) => {
setModalV(false)
}
function handleChange (date) {
function handleChange(date) {
if (date.length > 1) {
setTimeRange(moment(date[0]).format('YYYY-MM-DD 00:00:00')+','+moment(date[1]).format('YYYY-MM-DD 23:59:59'))
setTimeRange(moment(date[0]).format('YYYY-MM-DD 00:00:00') + ',' + moment(date[1]).format('YYYY-MM-DD 23:59:59'))
}
else {
setTimeRange('');
@ -305,7 +295,7 @@ const EmployeeCommunication = (props) => {
}
function mapStateToProps(state) {
const { auth, global, SalesMemberList } = state;
const { auth, global } = state;
return {
user: auth.user,
actions: global.actions,

Loading…
Cancel
Save