Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xiaomai-cloud-class-web
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiaomai-cloud-class
xiaomai-cloud-class-web
Commits
723ff1bd
Commit
723ff1bd
authored
Aug 05, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Plain Diff
feat:解决合并代码后的冲突
parents
0eb159a0
91a3f720
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
18 deletions
+82
-18
src/modules/college-manage/EmployeeManage.less
+7
-0
src/modules/college-manage/EmployeeManage.tsx
+19
-5
src/modules/college-manage/components/DepartMentTabCon.jsx
+21
-5
src/modules/college-manage/components/LeftStructureTree.jsx
+26
-4
src/modules/college-manage/components/LeftStructureTree.less
+2
-1
src/modules/college-manage/components/MemberTree.jsx
+1
-0
src/modules/college-manage/modal/AddOrEditPostGroupModal.jsx
+2
-1
src/modules/college-manage/modal/ChooseMembersModal.jsx
+1
-1
src/modules/college-manage/modal/SetEmployeeModal.jsx
+3
-1
No files found.
src/modules/college-manage/EmployeeManage.less
View file @
723ff1bd
...
@@ -17,4 +17,10 @@
...
@@ -17,4 +17,10 @@
font-size:14px;
font-size:14px;
color:#5289FA;
color:#5289FA;
}
}
.post-name{
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
\ No newline at end of file
src/modules/college-manage/EmployeeManage.tsx
View file @
723ff1bd
...
@@ -9,7 +9,7 @@ import React, { useEffect, useState } from "react";
...
@@ -9,7 +9,7 @@ import React, { useEffect, useState } from "react";
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
_
from
"underscore"
;
import
_
from
"underscore"
;
import
{
CheckBox
,
PageControl
}
from
"@/components"
;
import
{
CheckBox
,
PageControl
}
from
"@/components"
;
import
{
Button
,
Table
,
Modal
,
message
,
Input
}
from
"antd"
;
import
{
Button
,
Table
,
Modal
,
message
,
Input
,
Tooltip
}
from
"antd"
;
import
{
XMTable
}
from
'@/components'
;
import
{
XMTable
}
from
'@/components'
;
import
college
from
'@/common/lottie/college.json'
;
import
college
from
'@/common/lottie/college.json'
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
...
@@ -182,10 +182,17 @@ function EmployeeManage() {
...
@@ -182,10 +182,17 @@ function EmployeeManage() {
if
(
!
record
.
depNameList
){
if
(
!
record
.
depNameList
){
return
<
span
>
-
</
span
>
return
<
span
>
-
</
span
>
}
}
return
record
.
depNameList
.
map
((
item
,
index
)
=>
{
if
(
record
.
depNameList
.
length
===
0
){
return
<
span
><
WWOpenDataCom
type=
"departmentName"
openid=
{
item
}
/>
{
index
<
(
record
.
depNameList
.
length
-
1
)?
'、'
:
''
}
</
span
>;
return
<
span
>
-
</
span
>
})
}
// return record.depNameList.map((item,index)=>{
// return <span><WWOpenDataCom type="departmentName" openid={item}/>{index<(record.depNameList.length -1)?';':''}</span>;
// })
return
<
Tooltip
title=
{
<
div
>
{
handleDepName
(
record
.
depNameList
)
}
</
div
>
}
placement=
'top'
arrowPointAtCenter
><
div
className=
"post-name"
>
{
record
.
depNameList
.
map
((
item
,
index
)
=>
{
return
<
span
><
WWOpenDataCom
type=
"departmentName"
openid=
{
item
}
/>
{
index
<
(
record
.
depNameList
.
length
-
1
)?
';'
:
''
}
</
span
>
})
}
</
div
>
</
Tooltip
>
},
},
},
},
{
{
...
@@ -237,6 +244,13 @@ function EmployeeManage() {
...
@@ -237,6 +244,13 @@ function EmployeeManage() {
return
columns
;
return
columns
;
}
}
function
handleDepName
(
depArray
:
any
):
any
{
const
depArrayDom
=
depArray
.
map
((
item
:
any
,
index
:
any
)
=>
{
return
<
WWOpenDataCom
type=
"departmentName"
openid=
{
item
}
/>
});
return
depArrayDom
;
};
function
handleEditEmployee
(
record
:
RecordTypes
)
{
function
handleEditEmployee
(
record
:
RecordTypes
)
{
const
{
nickName
,
phone
,
roleCodes
,
avatar
,
id
,
weChatAccount
}
=
record
;
const
{
nickName
,
phone
,
roleCodes
,
avatar
,
id
,
weChatAccount
}
=
record
;
const
_choosesItem
=
{
const
_choosesItem
=
{
...
...
src/modules/college-manage/components/DepartMentTabCon.jsx
View file @
723ff1bd
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
React
,
{
useEffect
,
useState
}
from
"react"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
withRouter
}
from
"react-router-dom"
;
import
{
Button
,
Input
,
message
,
Modal
}
from
"antd"
;
import
{
Button
,
Input
,
message
,
Modal
,
Tooltip
}
from
"antd"
;
import
NewChooseMembersModal
from
"@/modules/college-manage/modal/NewChooseMembersModal"
;
import
NewChooseMembersModal
from
"@/modules/college-manage/modal/NewChooseMembersModal"
;
import
LeftStructureTree
from
"./LeftStructureTree"
;
import
LeftStructureTree
from
"./LeftStructureTree"
;
import
{
XMTable
,
PageControl
}
from
"@/components"
;
import
{
XMTable
,
PageControl
}
from
"@/components"
;
...
@@ -80,10 +80,11 @@ function DepartMentTabCon(props) {
...
@@ -80,10 +80,11 @@ function DepartMentTabCon(props) {
if
(
record
.
depNameList
.
length
===
0
){
if
(
record
.
depNameList
.
length
===
0
){
return
<
span
>
-
</
span
>
return
<
span
>
-
</
span
>
}
}
return
<
div
className=
"post-name"
>
{
record
.
depNameList
.
map
((
item
,
index
)
=>
{
return
<
Tooltip
title=
{
handleDepName
(
record
.
depNameList
)
}
placement=
'top'
arrowPointAtCenter
><
div
className=
"post-name"
>
{
record
.
depNameList
.
map
((
item
,
index
)
=>
{
return
<
span
>
{
item
}{
index
!==
record
.
depNameList
.
length
-
1
&&
<
span
>
、
</
span
>
}
</
span
>;
return
<
span
>
{
item
}{
index
!==
record
.
depNameList
.
length
-
1
&&
<
span
>
;
</
span
>
}
</
span
>
})
}
})
}
</
div
>
</
div
>
</
Tooltip
>
}
}
}
}
...
@@ -92,7 +93,11 @@ function DepartMentTabCon(props) {
...
@@ -92,7 +93,11 @@ function DepartMentTabCon(props) {
title
:
"手机号"
,
title
:
"手机号"
,
dataIndex
:
"phone"
,
dataIndex
:
"phone"
,
render
:
(
val
,
item
)
=>
{
render
:
(
val
,
item
)
=>
{
return
<
span
>
{
val
}
</
span
>;
if
(
!
val
){
return
<
span
>
-
</
span
>
}
else
{
return
<
span
>
{
item
.
phone
}
</
span
>
}
},
},
},
},
{
{
...
@@ -119,6 +124,17 @@ function DepartMentTabCon(props) {
...
@@ -119,6 +124,17 @@ function DepartMentTabCon(props) {
},
},
},
},
];
];
function
handleDepName
(
depArray
){
let
depStr
=
''
;
depArray
.
forEach
((
item
,
index
)
=>
{
if
(
index
<
depArray
.
length
-
1
)
{
depStr
=
depStr
+
item
+
'、'
;
}
else
{
depStr
=
depStr
+
item
;
}
});
return
depStr
;
};
function
closeChooseMembersModal
()
{
function
closeChooseMembersModal
()
{
setChooseMembersModalVisible
(
false
);
setChooseMembersModalVisible
(
false
);
}
}
...
@@ -205,7 +221,7 @@ function DepartMentTabCon(props) {
...
@@ -205,7 +221,7 @@ function DepartMentTabCon(props) {
StoreService
.
delDepartmentUser
(
params
).
then
((
res
)
=>
{
StoreService
.
delDepartmentUser
(
params
).
then
((
res
)
=>
{
message
.
success
(
`删除成功`
);
message
.
success
(
`删除成功`
);
getUserList
();
getUserList
();
Bus
.
trigger
(
"changeTreeData"
);
Bus
.
trigger
(
"changeTreeData"
,{
treeType
:
props
.
currentTab
}
);
});
});
}
}
function
handleSelectUserList
(
record
,
selected
){
function
handleSelectUserList
(
record
,
selected
){
...
...
src/modules/college-manage/components/LeftStructureTree.jsx
View file @
723ff1bd
...
@@ -185,7 +185,7 @@ function LeftStructureTree(props) {
...
@@ -185,7 +185,7 @@ function LeftStructureTree(props) {
Bus
.
bind
(
"addCustomer"
,(
record
)
=>
{
addCustomer
(
record
.
treeType
,
record
.
query
)})
Bus
.
bind
(
"addCustomer"
,(
record
)
=>
{
addCustomer
(
record
.
treeType
,
record
.
query
)})
},[]);
},[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
Bus
.
bind
(
"changeTreeData"
,(
record
)
=>
{
getTreeData
()})
Bus
.
bind
(
"changeTreeData"
,(
record
)
=>
{
getTreeData
(
record
.
treeType
)})
},[]);
},[]);
async
function
addCustomer
(
treeType
,
query
){
async
function
addCustomer
(
treeType
,
query
){
await
getTreeData
(
treeType
);
await
getTreeData
(
treeType
);
...
@@ -214,6 +214,7 @@ function LeftStructureTree(props) {
...
@@ -214,6 +214,7 @@ function LeftStructureTree(props) {
}
}
function
handleData
(
dataArray
){
function
handleData
(
dataArray
){
const
_dataArray
=
dataArray
.
map
((
item
,
index
)
=>
{
const
_dataArray
=
dataArray
.
map
((
item
,
index
)
=>
{
item
.
title
=
item
.
name
;
item
.
key
=
item
.
id
;
item
.
key
=
item
.
id
;
if
(
item
.
sonDepartmentVOList
){
if
(
item
.
sonDepartmentVOList
){
item
.
children
=
item
.
sonDepartmentVOList
;
item
.
children
=
item
.
sonDepartmentVOList
;
...
@@ -260,10 +261,21 @@ function LeftStructureTree(props) {
...
@@ -260,10 +261,21 @@ function LeftStructureTree(props) {
//添加岗位组/岗位
//添加岗位组/岗位
function
addPostGroup
(
level
,
record
)
{
function
addPostGroup
(
level
,
record
)
{
if
(
treeData
.
length
===
10
)
{
if
(
level
===
0
){
if
(
treeData
.
length
>
9
)
{
message
.
error
(
"岗位组数量已达10个上限"
);
message
.
error
(
"岗位组数量已达10个上限"
);
return
;
return
;
}
}
}
if
(
level
===
1
){
if
(
record
.
sonDepartmentVOList
){
if
(
record
.
sonDepartmentVOList
.
length
>
19
){
message
.
error
(
"岗位数量已达20个上限"
);
return
;
}
}
}
setCurrentGroupData
({});
setCurrentGroupData
({});
setAddOrEditPostGroupShow
(
true
);
setAddOrEditPostGroupShow
(
true
);
setOperatePostGroupModalType
(
"add"
);
setOperatePostGroupModalType
(
"add"
);
...
@@ -336,10 +348,20 @@ function LeftStructureTree(props) {
...
@@ -336,10 +348,20 @@ function LeftStructureTree(props) {
//添加自定义分组集合/分组
//添加自定义分组集合/分组
function
addCustomGroup
(
level
,
record
)
{
function
addCustomGroup
(
level
,
record
)
{
if
(
treeData
.
length
===
10
)
{
if
(
level
===
0
){
message
.
error
(
"岗位组数量已达10个上限"
);
if
(
treeData
.
length
>
9
)
{
message
.
error
(
"自定义分组集合数量已达10个上限"
);
return
;
return
;
}
}
}
if
(
level
===
1
){
if
(
record
.
sonDepartmentVOList
){
if
(
record
.
sonDepartmentVOList
.
lenght
>
19
){
message
.
error
(
"自定义分组数量已达20个上限"
);
return
;
}
}
}
setCurrentGroupData
({});
setCurrentGroupData
({});
setAddOrEditPostGroupShow
(
true
);
setAddOrEditPostGroupShow
(
true
);
setOperatePostGroupModalType
(
"add"
);
setOperatePostGroupModalType
(
"add"
);
...
...
src/modules/college-manage/components/LeftStructureTree.less
View file @
723ff1bd
.left-structure-tree {
.left-structure-tree {
margin-right: 24px;
margin-right: 24px;
width:2
5
0px;
width:2
6
0px;
height: calc(~'100vh - 260px');
height: calc(~'100vh - 260px');
overflow-y: scroll;
.organization{
.organization{
overflow: scroll;
overflow: scroll;
.search-con{
.search-con{
...
...
src/modules/college-manage/components/MemberTree.jsx
View file @
723ff1bd
...
@@ -38,6 +38,7 @@ function MemberTree(props) {
...
@@ -38,6 +38,7 @@ function MemberTree(props) {
}
}
function
handleData
(
dataArray
){
function
handleData
(
dataArray
){
const
_dataArray
=
dataArray
.
map
((
item
,
index
)
=>
{
const
_dataArray
=
dataArray
.
map
((
item
,
index
)
=>
{
item
.
title
=
item
.
name
||
item
.
userName
;
item
.
key
=
item
.
id
;
item
.
key
=
item
.
id
;
item
.
children
=
[]
item
.
children
=
[]
if
(
item
.
departmentUserVOList
){
if
(
item
.
departmentUserVOList
){
...
...
src/modules/college-manage/modal/AddOrEditPostGroupModal.jsx
View file @
723ff1bd
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: wufan
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @Date: 2020-11-27 16:21:49
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @LastEditTime: 2021-08-0
3 17:23:40
* @LastEditTime: 2021-08-0
5 18:24:06
* @Description: Description
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
*/
...
@@ -48,6 +48,7 @@ function AddOrEditPostGroupModal(props) {
...
@@ -48,6 +48,7 @@ function AddOrEditPostGroupModal(props) {
return
;
return
;
}
}
const
{
postGroupModalLevel
,
currentTab
,
currentGroupData
,
label
}
=
props
const
{
postGroupModalLevel
,
currentTab
,
currentGroupData
,
label
}
=
props
let
parmas
=
{
let
parmas
=
{
depLevel
:
postGroupModalLevel
,
depLevel
:
postGroupModalLevel
,
depType
:
DepType
[
currentTab
],
depType
:
DepType
[
currentTab
],
...
...
src/modules/college-manage/modal/ChooseMembersModal.jsx
View file @
723ff1bd
...
@@ -18,7 +18,6 @@ import WechatApi from '@/common/js/wechatApi';
...
@@ -18,7 +18,6 @@ import WechatApi from '@/common/js/wechatApi';
import
WWOpenDataCom
from
'@/components/WWOpenDataCom'
;
import
WWOpenDataCom
from
'@/components/WWOpenDataCom'
;
const
{
Search
}
=
Input
;
const
{
Search
}
=
Input
;
class
ChooseMembersModal
extends
React
.
Component
{
class
ChooseMembersModal
extends
React
.
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
super
(
props
);
super
(
props
);
...
@@ -204,6 +203,7 @@ class ChooseMembersModal extends React.Component {
...
@@ -204,6 +203,7 @@ class ChooseMembersModal extends React.Component {
})
})
}
}
})
})
}
}
addCustomer
=
()
=>
{
addCustomer
=
()
=>
{
...
...
src/modules/college-manage/modal/SetEmployeeModal.jsx
View file @
723ff1bd
...
@@ -22,6 +22,7 @@ export default class SetEmployeeModal extends React.Component {
...
@@ -22,6 +22,7 @@ export default class SetEmployeeModal extends React.Component {
list
,
list
,
selected
:
selectedData
.
userId
,
selected
:
selectedData
.
userId
,
roleCode
:
selectedData
.
roleCode
,
roleCode
:
selectedData
.
roleCode
,
submit
:
false
}
}
}
}
...
@@ -41,6 +42,7 @@ export default class SetEmployeeModal extends React.Component {
...
@@ -41,6 +42,7 @@ export default class SetEmployeeModal extends React.Component {
list
,
list
,
roleCode
,
roleCode
,
selected
,
selected
,
submit
}
=
this
.
state
;
}
=
this
.
state
;
return
(
return
(
<
Modal
<
Modal
...
@@ -55,7 +57,7 @@ export default class SetEmployeeModal extends React.Component {
...
@@ -55,7 +57,7 @@ export default class SetEmployeeModal extends React.Component {
<
div
className=
"modal-footer"
>
<
div
className=
"modal-footer"
>
<
Button
style=
{
{
float
:
'left'
}
}
onClick=
{
()
=>
this
.
props
.
onClose
()
}
>
上一步
</
Button
>
<
Button
style=
{
{
float
:
'left'
}
}
onClick=
{
()
=>
this
.
props
.
onClose
()
}
>
上一步
</
Button
>
<
Button
onClick=
{
()
=>
this
.
props
.
onCancel
()
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
this
.
props
.
onCancel
()
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
this
.
props
.
onOk
(
list
)
}
type=
"primary"
>
确定
</
Button
>
<
Button
onClick=
{
()
=>
{
this
.
setState
({
submit
:
true
},()
=>
this
.
props
.
onOk
(
list
))}
}
type=
"primary"
disabled=
{
submit
}
>
确定
</
Button
>
</
div
>
</
div
>
}
}
>
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment