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
bef8f520
Commit
bef8f520
authored
Aug 09, 2021
by
zhangleyuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:处理员工编辑的显示
parent
14445fa0
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
52 additions
and
27 deletions
+52
-27
src/modules/college-manage/EmployeeManage.tsx
+7
-4
src/modules/college-manage/components/DepartMentTabCon.jsx
+7
-7
src/modules/college-manage/components/LeftStructureTree.jsx
+0
-1
src/modules/college-manage/modal/NewChooseMembersModal.jsx
+7
-1
src/modules/store-manage/EmployeeAddOrEditModal.tsx
+31
-14
No files found.
src/modules/college-manage/EmployeeManage.tsx
View file @
bef8f520
...
...
@@ -33,7 +33,7 @@ interface RecordTypes {
phone
:
string
;
avatar
?:
string
;
weChatAccount
?:
string
;
depNameList
:
Array
<
string
>
depNameList
:
any
}
interface
RoleItemType
{
...
...
@@ -58,6 +58,7 @@ interface ChoosedItemType {
avatar
?:
string
;
storeUserId
?:
string
;
weChatAccount
?:
string
;
depNameList
?:
any
;
}
function
EmployeeManage
()
{
...
...
@@ -248,14 +249,15 @@ function EmployeeManage() {
};
function
handleEditEmployee
(
record
:
RecordTypes
)
{
const
{
nickName
,
phone
,
roleCodes
,
avatar
,
id
,
weChatAccount
}
=
record
;
const
{
nickName
,
phone
,
roleCodes
,
avatar
,
id
,
weChatAccount
,
depNameList
}
=
record
;
const
_choosesItem
=
{
nickName
:
nickName
,
phone
:
phone
,
role
:
roleCodes
,
avatar
:
avatar
,
storeUserId
:
id
,
weChatAccount
weChatAccount
,
depNameList
:
depNameList
};
setChooseItem
(
_choosesItem
);
const
model
:
React
.
ReactNode
=
(
...
...
@@ -270,7 +272,8 @@ function EmployeeManage() {
role
:
[],
avatar
:
""
,
storeUserId
:
""
,
weChatAccount
:
""
weChatAccount
:
""
,
depNameList
:[]
});
}
}
isWorkWechat=
{
isWorkWechat
}
...
...
src/modules/college-manage/components/DepartMentTabCon.jsx
View file @
bef8f520
...
...
@@ -212,11 +212,11 @@ function DepartMentTabCon(props) {
storeId
:
User
.
getStoreId
()
}
console
.
log
(
'selectDep'
,
selectDep
)
if
(
selectDep
.
id
===
'100'
){
params
.
userType
=
'WE_CHAT'
;
}
else
{
params
.
userType
=
'WORK_WE_CHAT'
;
}
//
if(selectDep.id==='100'){
//
params.userType='WE_CHAT';
//
}else{
//
params.userType='WORK_WE_CHAT';
//
}
StoreService
.
delDepartmentUser
(
params
).
then
((
res
)
=>
{
message
.
success
(
`删除成功`
);
getUserList
();
...
...
@@ -296,7 +296,7 @@ function DepartMentTabCon(props) {
<
div
className=
"table-con"
>
{
props
.
currentTab
===
"departMentTab"
&&
(
<
div
className=
"operate-area"
>
{
selectDep
.
id
!==
'1
00'
&&
{
selectDep
.
depId
!==
'100
00'
&&
<
Button
type=
"primary"
className=
"add-user-btn"
...
...
@@ -308,7 +308,7 @@ function DepartMentTabCon(props) {
</
Button
>
}
<
Button
className=
"del-user-btn"
onClick=
{
()
=>
delUser
(
'multiple'
)
}
>
删除学员
</
Button
>
{
selectDep
.
id
!==
'1
00'
&&
{
selectDep
.
depId
!==
'100
00'
&&
<>
<
Button
className=
"update-user-btn"
onClick=
{
()
=>
{
updateListData
()}
}
>
更新列表数据
</
Button
>
<
span
className=
"origin-text"
>
数据来源企业微信通讯录
</
span
>
...
...
src/modules/college-manage/components/LeftStructureTree.jsx
View file @
bef8f520
...
...
@@ -362,7 +362,6 @@ function LeftStructureTree(props) {
return
;
}
}
console
.
log
(
"record.sonDepartmentVOList"
,
record
.
sonDepartmentVOList
)
if
(
level
===
1
){
if
(
record
.
sonDepartmentVOList
){
if
(
record
.
sonDepartmentVOList
.
length
>
19
){
...
...
src/modules/college-manage/modal/NewChooseMembersModal.jsx
View file @
bef8f520
...
...
@@ -119,9 +119,15 @@ class NewChooseMembersModal extends React.Component {
_item
.
departmentId
=
item
.
departmentId
;
_item
.
enterpriseVisibleUserId
=
item
.
userId
;
}
else
{
if
(
item
.
depId
===
'10000'
){
_item
.
depUserType
=
'WE_CHART_USER'
;
// depid=10000代表是微信学员
_item
.
userId
=
item
.
userId
;
}
else
{
_item
.
depUserType
=
'STORE_USER'
;
_item
.
departmentId
=
this
.
props
.
selectDep
.
id
;
}
_item
.
enterpriseVisibleUserId
=
item
.
enterpriseUserId
;
_item
.
departmentId
=
this
.
props
.
selectDep
.
id
;
}
return
_item
})
...
...
src/modules/store-manage/EmployeeAddOrEditModal.tsx
View file @
bef8f520
/*
* @Author: wufan
* @Date: 2020-11-27 16:21:49
* @LastEditors:
zhangleyuan
* @LastEditTime: 2021-0
3-09 14:21:35
* @LastEditors:
Please set LastEditors
* @LastEditTime: 2021-0
8-09 10:50:44
* @Description: Description
* @@Copyrigh: © 2020 杭州杰竞科技有限公司 版权所有
*/
...
...
@@ -23,6 +23,7 @@ import _, { values } from "underscore";
import
"./EmployeeAddOrEditModal.less"
;
import
{
CropperModal
}
from
"@/components/"
;
import
StoreService
from
"@/domains/store-domain/storeService"
;
import
WWOpenDataCom
from
'@/components/WWOpenDataCom'
;
import
$
from
"jquery"
;
import
User
from
"@/common/js/user"
;
...
...
@@ -36,7 +37,8 @@ interface AddEmployeeModalProps {
role
:
Array
<
string
>
;
avatar
?:
string
;
storeUserId
?:
string
;
weChatAccount
?:
string
weChatAccount
?:
string
;
depNameList
?:
any
;
};
onClose
:
()
=>
void
;
isWorkWechat
:
boolean
;
...
...
@@ -219,20 +221,20 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
initialValues=
{
{
nickName
:
nickName
,
phone
:
phone
,
role
:
role
}
}
>
<
Form
.
Item
label=
"员工
昵称
"
label=
"员工
姓名
"
name=
"nickName"
rules=
{
[{
required
:
true
}]
}
validateStatus=
{
nameStatus
}
help=
{
nameErrorMsg
||
undefined
}
//
rules={[{ required: true }]}
//
validateStatus={nameStatus}
//
help={nameErrorMsg || undefined}
style=
{
{
marginBottom
:
0
}
}
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"请输入员工昵称"
maxLength=
{
15
}
autoComplete=
"off"
onChange=
{
(
e
)
=>
handleChangeValues
(
"nickName"
,
e
.
target
.
value
)
}
/
>
<
div
style=
{
{
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
overflow
:
'hidden'
,
}
}
>
<
WWOpenDataCom
type=
"userName"
openid=
{
props
.
choosedItem
.
weChatAccount
}
/>
</
div
>
</
Form
.
Item
>
{
props
.
isWorkWechat
?
(
<
Form
.
Item
...
...
@@ -273,6 +275,21 @@ function AddEmployeeModal(props: AddEmployeeModalProps) {
</
Form
.
Item
>
)
}
<
Form
.
Item
label=
"所在部门"
name=
"weChatAccount"
style=
{
{
marginBottom
:
0
}
}
>
<
div
style=
{
{
whiteSpace
:
'nowrap'
,
textOverflow
:
'ellipsis'
,
overflow
:
'hidden'
,
}
}
>
{
props
.
choosedItem
.
depNameList
.
map
((
item
:
any
,
index
:
any
)
=>
{
return
<
span
><
WWOpenDataCom
type=
"departmentName"
openid=
{
item
}
/>
{
index
<
props
.
choosedItem
.
depNameList
.
length
-
1
?
'、'
:
''
}
</
span
>
})
}
</
div
>
</
Form
.
Item
>
<
Form
.
Item
label=
"员工身份"
name=
"role"
rules=
{
[{
required
:
false
}]
}
...
...
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