Browse Source

(*)员工沟通统计列表查询展示修改

master
zmh 2 years ago
parent
commit
16ce2985d4
  1. 15
      web/client/src/sections/humanAffairs/actions/employeeCommunication.js
  2. 4
      web/client/src/sections/humanAffairs/actions/index.js
  3. 39
      web/client/src/sections/humanAffairs/containers/communication/employeeCommunication.jsx
  4. 6
      web/client/src/utils/webapi.js

15
web/client/src/sections/humanAffairs/actions/employeeCommunication.js

@ -0,0 +1,15 @@
'use strict';
import { ApiTable, basicAction } from '$utils'
export function getEmployeeCommunicate(query) {//查询
return (dispatch) => basicAction({
type: "get",
dispatch: dispatch,
actionType: "GET_EMPLOYEE_COMMUNICATE",
query: query,
url: `${ApiTable.getEmployeeCommunicate}`,
msg: { option: "查询员工沟通统计数据" },
reducer: { name: "employeeCommunicate", params: { noClear: true } },
});
}

4
web/client/src/sections/humanAffairs/actions/index.js

@ -6,6 +6,7 @@ import * as salesDistribution from './salesDistribution'
import * as departmentTrain from './departmentTrain'
import * as personalTrainRecord from './personalTrainRecord'
import * as resourceRepository from './resourceRepository'
import * as employeeCommunication from './employeeCommunication'
export default {
...personnelFiles,
@ -13,5 +14,6 @@ export default {
...salesDistribution,
...departmentTrain,
...personalTrainRecord,
...resourceRepository
...resourceRepository,
...employeeCommunication
}

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

@ -10,38 +10,31 @@ import '../../style.less'
const EmployeeCommunication = (props) => {
const { dispatch, actions } = props
const { humanAffairs } = actions;
const [keywordTarget, setKeywordTarget] = useState('person');
const [keywordTarget, setKeywordTarget] = useState('personalName');
const [keyword, setKeyword] = useState('');//
const [limits, setLimits] = useState()//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [modalV, setModalV] = useState(false);
const [dataToDetail, setDataToDetail] = useState(null);
const [tableData, setTableData] = useState([{ id: 1, personalName: '危大伟', job: '软件前端开发工程师', departmentName: '软件开发部,软件开发部,软件开发部,软件开发部,软件开发部', communicateDate: '2022-12-29 14:21:33', communicateContent: '阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴阿巴', communicateResult: '啊啊啊啊啊啊啊啊啊啊是大大说所所所', valuation: '123当前时区无无群', communicateCondition: '驱蚊器翁群的法人', nextPlan: '呜呜呜呜呜呜呜呜呜呜呜我' }]);
const [tableData, setTableData] = useState([]);
const page = useRef(query.page);
function seachValueChange(value) {
setKeyword(value)
}
useEffect(() => {
// dispatch(humanAffairs.getMemberList())
// getMemberSearchList()
getEmployeeCommunicateData();
}, []);
useEffect(() => {
// getMemberSearchList()//
}, [query])
// function getMemberSearchList() {
// let kt = keywordTarget == 'place' ? '' : keywordTarget;
// let k = keywordTarget == 'place' ? '' : keyword;
// let placeSearch = keywordTarget == 'place' ? keyword : '';
// dispatch(humanAffairs.getSalesList({ keywordTarget: kt, keyword: k, placeSearch, ...query })).then(r => {
// if (r.success) {
// setTableData(r.payload?.data?.rows);
// setLimits(r.payload?.data?.count)
// }
// })
// }
function getEmployeeCommunicateData(param) {
let queryParam = param || query;
dispatch(humanAffairs.getEmployeeCommunicate({ keywordTarget, keyword, ...queryParam })).then(r => {
if (r.success) {
setTableData(r.payload?.data?.rows);
setLimits(r.payload?.data?.count);
}
})
}
function handleRow(record, index) {//
if (index % 2 === 0) {
@ -218,9 +211,9 @@ const EmployeeCommunication = (props) => {
<div style={{ display: 'flex' }}>
<div>
<Select value={keywordTarget} onChange={setKeywordTarget} style={{ width: 120 }} >
<Select.Option value='person'>被沟通人</Select.Option>
<Select.Option value='post'>岗位</Select.Option>
<Select.Option value='dept'>部门</Select.Option>
<Select.Option value='personalName'>被沟通人</Select.Option>
<Select.Option value='job'>岗位</Select.Option>
<Select.Option value='departmentName'>部门</Select.Option>
</Select>
</div>
<div style={{ margin: '0px 18px' }}>
@ -241,6 +234,7 @@ const EmployeeCommunication = (props) => {
<Button theme='solid' type='primary' style={{ width: 80, borderRadius: 2, height: 32, background: '#DBECFF', color: '#005ABD' }}
onClick={() => {
setQuery({ limit: 10, page: 0 })
getEmployeeCommunicateData({ limit: 10, page: 0 });
}}>查询</Button>
</div>
<div style={{ display: 'flex', marginRight: 20 }}>
@ -283,6 +277,7 @@ const EmployeeCommunication = (props) => {
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, page: currentPage - 1 });
getEmployeeCommunicateData({ limit: pageSize, page: currentPage - 1 });
page.current = currentPage - 1
}}
/>

6
web/client/src/utils/webapi.js

@ -58,8 +58,10 @@ export const ApiTable = {
delResourceClassify: 'train/trainFiles/resourceRepository/classify',
getResourceFileList: 'train/trainFiles/resourceRepository/fileList',
postResourceFile: 'train/trainFiles/resourceRepository/file',
delResourceFile: 'train/trainFiles/resourceRepository/file/{id}'
delResourceFile: 'train/trainFiles/resourceRepository/file/{id}',
//员工沟通统计
getEmployeeCommunicate:'employee/communicate/list'
};
export const RouteTable = {

Loading…
Cancel
Save