Commit 26bfdb80 by zhangleyuan

Merge branch 'feature/zhangleyuan/20210812/opzi-organize' into gray

parents 0e8caf65 816c728b
......@@ -20,7 +20,7 @@
}
.container-left-body-table{
width: 300px;
height: 330px;
height: 360px;
overflow: scroll;
.ant-table {
border: none;
......
......@@ -142,6 +142,7 @@ function EmployeeManage() {
{
title: "员工",
dataIndex: "weChatAccount",
fixed:'left',
render: (val: string, record: RecordTypes) => {
return (
<div className="employee-info">
......@@ -200,6 +201,7 @@ function EmployeeManage() {
{
title: "操作",
dataIndex: "operation",
fixed:'right',
render: (val: string, record: RecordTypes) => {
return record.role === "学院管理员" ||
record.userId === User.getUserId() ? (
......@@ -470,12 +472,12 @@ function EmployeeManage() {
添加员工
</Button>
<Button className="update-user-btn" onClick={()=>{updateListData()}}>更新列表数据</Button>
<span className="origin-text">数据来源企业微信通讯录</span>
<span className="origin-text">系统实时同步企业微信可见范围的员工信息,如需修改请前往企微管理后台通讯录中操作</span>
<a
href="https://www.yuque.com/docs/share/8c66333f-ed62-469d-909e-b36389a115ea?#"
target="_blank"
>
<span className="view-text">查看数据更新说明</span>
<span className="view-text">查看说明</span>
</a>
</>
}
......@@ -487,6 +489,7 @@ function EmployeeManage() {
image: college,
description: '暂无数据'
}}
scroll={{ x: 1200 }}
size={"middle"}
pagination={false}
dataSource={employeeList}
......
/*
* @Author: wufan
* @Date: 2020-11-30 10:47:38
* @LastEditors: wufan
* @LastEditTime: 2021-06-21 11:13:15
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-08-13 16:52:16
* @Description: 学员管理页面
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......
......@@ -8,6 +8,7 @@ import college from "@/common/lottie/college.json";
import WWOpenDataCom from '@/components/WWOpenDataCom';
import StoreService from "@/domains/store-domain/storeService";
import { DepType } from "@/domains/store-domain/constants";
import Platform from '@/common/js/platform';
import User from "@/common/js/user";
import moment from "moment";
import "./DepartMentTabCon.less";
......@@ -31,11 +32,13 @@ function DepartMentTabCon(props) {
useEffect(()=>{
setSelectUser([]);
},[selectDep]);
const columns = [
{
title: "学员",
dataIndex: "nickName",
width: 220,
fixed:!Platform.isWorkWx(),
render: (val, item) => {
return (
<div>
......@@ -59,7 +62,6 @@ function DepartMentTabCon(props) {
{
title: "真实姓名",
dataIndex: "realName",
width: 180,
render: (val, record) => {
return <span>{val}</span>
},
......@@ -352,17 +354,21 @@ function DepartMentTabCon(props) {
{(props.currentTab === "postGrouptab" || props.currentTab === "customGroupTab") &&
<Button className="del-user-btn" onClick={()=>delUser('multiple')}>删除学员</Button>
}
{ selectDep.depId !== '10000' &&
{ selectDep.depId !== '10000' ?
<>
<Button className="update-user-btn" onClick={()=>{updateListData()}}>更新列表数据</Button>
<span className="origin-text">数据来源企业微信通讯录</span>
<a
href="https://www.yuque.com/docs/share/8c66333f-ed62-469d-909e-b36389a115ea?#"
target="_blank"
>
<span className="view-text">查看数据更新说明</span>
</a>
<div style={{marginTop:'12px'}}>
<span className="origin-text">系统实时同步企业微信可见范围的学员信息,如需修改请前往企微管理后台通讯录中操作</span>
<a
href="https://www.yuque.com/docs/share/8c66333f-ed62-469d-909e-b36389a115ea?#"
target="_blank"
>
<span className="view-text">查看说明</span>
</a>
</div>
</>
:
<span className="origin-text">微信学员通过授权或扫码登录后,数据自动同步到系统。</span>
}
</div>
)}
......@@ -422,19 +428,21 @@ function DepartMentTabCon(props) {
},
}}
/>
<div className="box-footer">
<PageControl
current={query.current - 1}
pageSize={query.size}
total={total}
toPage={(page) => {
const queryStates = _.clone(query);
queryStates.current = page + 1;
setQuery(queryStates);
getUserList(null,null,queryStates.current);
}}
/>
</div>
{total > 0 &&
<div className="box-footer">
<PageControl
current={query.current - 1}
pageSize={query.size}
total={total}
toPage={(page) => {
const queryStates = _.clone(query);
queryStates.current = page + 1;
setQuery(queryStates);
getUserList(null,null,queryStates.current);
}}
/>
</div>
}
</div>
</div>
{chooseMembersModalVisible && (
......
......@@ -503,7 +503,7 @@ function LeftStructureTree(props) {
function selectUserList(record, e) {
const _selectKeys = [];
if(e.selectedNodes){
if(e.selectedNodes && e.selectedNodes.length>0){
_selectKeys.push(e.selectedNodes[0].id)
}
setSelectedKeys(_selectKeys);
......
......@@ -100,6 +100,9 @@
text-align:right;
}
}
.ant-select-item-option-grouped{
padding-left:12px;
}
.empty-con{
text-align:center;
.empty-img{
......
import React, { useEffect, useState } from "react";
import { withRouter } from "react-router-dom";
import { Tree} from "antd";
import { Tree,Tooltip} from "antd";
import StoreService from "@/domains/store-domain/storeService";
import User from '@/common/js/user';
import WWOpenDataCom from '@/components/WWOpenDataCom';
......@@ -82,15 +82,20 @@ function MemberTree(props) {
className="node-title-con"
>
{nodeData.userId ?
<div>
<>
<span className="icon iconfont title-icon">&#xe603;</span>
<span><WWOpenDataCom type="userName" openid={nodeData.userName}/></span>
</div>
<Tooltip title={<WWOpenDataCom type="userName" openid={nodeData.userName}/>}>
<span className="name"><WWOpenDataCom type="userName" openid={nodeData.userName}/></span>
</Tooltip>
</>
:
<div>
<>
<span className="icon iconfont title-icon">&#xe604;</span>
<span><WWOpenDataCom type="departmentName" openid={nodeData.name}/></span>
</div>
<Tooltip title={<WWOpenDataCom type="departmentName" openid={nodeData.name}/>}>
<span className="name"><WWOpenDataCom type="departmentName" openid={nodeData.name}/></span>
</Tooltip>
<span>({nodeData.departmentCount || 0})</span>
</>
}
</div>
);
......
......@@ -2,16 +2,29 @@
.node-title-con{
color:#666;
font-size:14px;
display: flex;
.name{
display: inline-block;
vertical-align: middle;
max-width:190px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.title-icon{
font-size:14px;
color:#999;
margin-right:8px;
}
}
.ant-tree .ant-tree-treenode {
padding: 8px 0 14px 0;
}
.ant-tree.ant-tree-directory .ant-tree-treenode-selected:hover::before, .ant-tree.ant-tree-directory .ant-tree-treenode-selected::before{
background:transparent;
}
.ant-tree.ant-tree-directory .ant-tree-treenode-selected .ant-tree-switcher{
color:#000;
}
}
\ No newline at end of file
......@@ -18,6 +18,7 @@ function SearchUser(props) {
}
function onChange(e){
setDropDownVisible(true);
props.onChange(e.target.value)
}
function selectuser(e,item){
......@@ -36,9 +37,34 @@ function SearchUser(props) {
}
}
function selectDep(e,item){
console.log('item',item);
if(e.target.checked){
console.log('item',item);
props.onSelect(item,'department');
let _record = props.selectList;
let _userList = [];
_record.push(item); // 将当前选中的部门塞进来
if(item.departmentUserVOList){
_userList = item.departmentUserVOList; //获取当前选中的人
}
_record = [..._record,..._userList];
props.onSelect(_record,'department');
}else{
let _record = [];
let _userList = [];
props.selectList.map((_item,index)=>{
if(_item.id !== item.id){ //取消选择后将当前的部门移除也要将父部门也移除
_record.push(_item);
}
})
if(item.departmentUserVOList){
_userList = item.departmentUserVOList; //获取当前选中的人
}
const new_arr = _record.filter((x) => {return !_userList.some((item) => x.id === item.id)});
// _userList.map((_item,index)=>{
// if(_item.id === item.id){
// _record.splice(_item,index);
// }
// })
props.onSelect(new_arr,'department');
}
}
function documentClick(){
......@@ -108,10 +134,14 @@ function SearchUser(props) {
<div className="drop-down__item__con">
<div>
{props.data.departmentVOList.map((item,index)=>{
return <div><Checkbox onChange={(e)=>{selectDep(e,item)}}>
return <div><Checkbox onChange={(e)=>{selectDep(e,item)}} checked={_.pluck(props.selectList, 'id').indexOf(item.id)=== -1?false:true}>
<div className="drop-down__item__con__item">
<div className="drop-down__item__con__item__left">
<WWOpenDataCom type="departmentName" openid={item.name}/>
<Tooltip title={ <WWOpenDataCom type="departmentName" openid={item.name}/>}>
<span className="departmentName">
<WWOpenDataCom type="departmentName" openid={item.name}/>
</span>
</Tooltip>
</div>
</div>
</Checkbox>
......
......@@ -34,6 +34,14 @@
color:#999;
margin-right:3px;
}
.departmentName{
display: inline-block;
vertical-align: middle;
max-width:190px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
}
.drop-down__item__con__item__right{
width:84px;
......
......@@ -109,7 +109,7 @@ class NewChooseMembersModal extends React.Component {
if(item.userId !== record.userId && item.id !==record.departmentId){
_selectList.push(item);
}
});
}); //字部门移除时将其对应的父部门也移除
console.log('_selectList',_selectList);
this.setState({
selectList:_selectList,
......@@ -271,15 +271,16 @@ class NewChooseMembersModal extends React.Component {
confirmSearchSelect=(record,type)=>{
const { selectUserList,selectList} = this.state;
if(type==='user'){
this.setState({selectList:[...record],selectUserList:this.handleSelectUserList(record)});
}else{
let _list = [];
if(record.departmentUserVOList){
_list = record.departmentUserVOList;
}
this.setState({selectList:[...selectList,..._list],selectUserList:[...selectUserList,..._list]});
}
this.setState({selectList:record,selectUserList:this.handleSelectUserList(record)});
// if(type==='user'){
// this.setState({selectList:[...record],selectUserList:this.handleSelectUserList(record)});
// }else{
// let _userList = [];
// if(record.departmentUserVOList){
// _userList = record.departmentUserVOList;
// }
// this.setState({selectList:[...selectList,..._userList],selectUserList:[...selectUserList,..._userList]});
// }
}
render() {
......
......@@ -23,7 +23,7 @@
}
.container-left-body-table{
width: 300px;
max-height: 380px;
max-height: 360px;
overflow: scroll;
.ant-table {
border: none;
......
/*
* @Author: yuananting
* @Date: 2021-02-25 11:23:47
* @LastEditors: yuananting
* @LastEditTime: 2021-06-03 17:12:01
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-08-13 17:05:37
* @Description: 助学工具-题库-题目列表数据
* @Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment