Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CivManage
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ReactWeb5
CivManage
Commits
7e05b273
Commit
7e05b273
authored
Jul 13, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 'web配置售后服务优化'
parent
bbf5260e
Pipeline
#75884
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
15 deletions
+40
-15
index.jsx
src/components/PersonnelSelector/index.jsx
+32
-15
siteConfigDrawer.js
...es/productCenter/webConfig/components/siteConfigDrawer.js
+8
-0
No files found.
src/components/PersonnelSelector/index.jsx
View file @
7e05b273
/* eslint-disable no-unused-expressions */
import
React
,
{
useState
,
useEffect
,
useCallback
,
useRef
}
from
'react'
;
import
{
Modal
,
Input
,
Button
,
message
,
Spin
,
Pagination
,
Table
,
Tooltip
,
Space
}
from
'antd'
;
import
{
GetGroupUserTree
}
from
'@/services/messagemanage/messagemanage'
;
...
...
@@ -7,7 +8,7 @@ import styles from './index.less';
import
CardCheck
from
'./CardCheck'
;
const
SelectUser
=
props
=>
{
const
{
callBackSubmit
,
onCancel
,
visible
,
itemObj
,
aftercare
}
=
props
;
const
{
callBackSubmit
,
onCancel
,
visible
,
itemObj
,
aftercare
,
checkValueList
}
=
props
;
const
[
allList
,
setAllist
]
=
useState
([]);
// 用于展示得数据
const
[
checkList
,
setCheckList
]
=
useState
([]);
// 选中得数据集合
const
[
loading
,
setLoading
]
=
useState
(
false
);
...
...
@@ -53,19 +54,19 @@ const SelectUser = props => {
Promise
.
all
([
p2
]).
then
(
res
=>
{
if
(
res
[
0
].
code
===
0
)
{
setTotal
(
res
[
0
].
data
.
count
);
let
checkedListAll
=
[];
console
.
log
(
itemObj
);
if
(
aftercare
!==
'请勾选不显示售后服务的用户'
)
{
itemObj
.
length
>
0
&&
itemObj
.
forEach
((
i
,
j
)
=>
{
checkedListAll
.
push
({
label
:
aftercare
.
split
(
','
)[
j
]
,
value
:
i
,
});
});
}
//
let checkedListAll = [];
// if (aftercare !== '请勾选不显示售后服务的用户') {
// itemObj.length > 0 &&
// checkValueList.forEach((i, j) => {
// checkedListAll.push(
{
// label: i.userName,
// value: i.userId
,
// groupName: i.groupName
,
//
});
//
});
//
}
setCheckList
(
checkedListAll
);
//
setCheckList(checkedListAll);
// if (itemObj) {
// res[0].data.data.map(item => {
// item.users.map(val => {
...
...
@@ -84,6 +85,20 @@ const SelectUser = props => {
// });
// setCheckList(checkedListAll);
// }
// console.log(checkValueList);
let
listCheck
=
[];
console
.
log
(
checkValueList
);
debugger
checkValueList
&&
checkValueList
.
map
(
item
=>
{
let
data
=
item
.
userId
||
item
.
value
;
listCheck
.
push
({
label
:
item
.
userName
||
item
.
label
,
value
:
data
.
toString
(),
groupName
:
item
.
groupName
,
});
});
setCheckList
(
listCheck
);
// 数据处理成checkbox组件需要得形式
let
list
=
res
[
0
].
data
.
data
.
map
(
item
=>
{
...
...
@@ -91,7 +106,7 @@ const SelectUser = props => {
let
checkedList
=
[];
let
checkAll
=
false
;
let
options
=
item
.
users
.
map
(
val
=>
{
checkedListAll
.
forEach
(
ele
=>
{
listCheck
.
forEach
(
ele
=>
{
if
(
val
.
userId
===
ele
.
value
)
{
checkedList
.
push
(
ele
.
value
);
}
...
...
@@ -131,6 +146,7 @@ const SelectUser = props => {
callBackSubmit
({
text
,
ids
,
checkList
,
});
};
// 搜索
...
...
@@ -210,6 +226,7 @@ const SelectUser = props => {
const
deleteRol
=
key
=>
{
const
dataSource
=
[...
checkList
];
setCheckList
(
dataSource
.
filter
(
item
=>
item
.
value
!==
key
));
console
.
log
();
setDeleKey
(
key
);
setDelFlag
(
delFlag
+
1
);
};
...
...
@@ -225,7 +242,7 @@ const SelectUser = props => {
render
:
(
text
,
record
)
=>
(
<
span
>
<
Tooltip
placement=
"topLeft"
title=
{
`${record.label}`
}
>
{
record
.
label
}
{
record
.
label
}
(
{
record
.
groupName
}
)
</
Tooltip
>
</
span
>
),
...
...
src/pages/productCenter/webConfig/components/siteConfigDrawer.js
View file @
7e05b273
...
...
@@ -95,6 +95,7 @@ export default props => {
const
homepageConfigRef
=
useRef
();
const
[
addVisible
,
setAddVisible
]
=
useState
(
false
);
const
[
checkValue
,
setCheckValue
]
=
useState
([]);
const
[
checkValueList
,
setCheckValueList
]
=
useState
([]);
const
[
aftercare
,
setAftercare
]
=
useState
(
'请勾选不显示售后服务的用户'
);
useEffect
(()
=>
{
onGetLoginPages
();
...
...
@@ -189,6 +190,8 @@ export default props => {
:
'linear-gradient(0deg, #0066D6 0%, #39A9FF 100%)'
,
);
setCheckValue
(
config
.
afterSales
);
debugger
setCheckValueList
(
config
.
afterSalesInfo
);
if
(
!
config
.
afterSales
||
config
.
afterSales
===
''
)
{
setAftercare
(
'请勾选不显示售后服务的用户'
);
}
...
...
@@ -240,6 +243,7 @@ export default props => {
setVisibleChecked5
(
''
);
setHomePageConfig
([]);
setCheckValue
([]);
setCheckValueList
([]);
setAftercare
(
''
);
}
},
[
visible
]);
...
...
@@ -402,6 +406,9 @@ export default props => {
};
const
rolCallBack
=
useCallback
(
list
=>
{
console
.
log
(
list
);
debugger
setCheckValueList
(
list
.
checkList
);
setAddVisible
(
false
);
setAftercare
(
list
.
text
===
''
?
'请勾选不显示售后服务的用户'
:
list
.
text
);
setCheckValue
(
list
.
ids
);
...
...
@@ -798,6 +805,7 @@ export default props => {
callBackSubmit
=
{
roleList
=>
rolCallBack
(
roleList
)}
itemObj
=
{
checkValue
&&
checkValue
.
toString
().
split
(
','
)}
// 单选框中的值
aftercare
=
{
aftercare
}
checkValueList
=
{
checkValueList
}
/
>
<
/Drawer
>
);
...
...
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