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
7d8693a5
Commit
7d8693a5
authored
Oct 18, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增事件管理外部字段显示
parent
98a67b67
Pipeline
#36163
skipped with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
72 additions
and
2 deletions
+72
-2
ChangeAddFlows.jsx
...ges/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
+22
-0
changeAdd.jsx
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
+50
-2
No files found.
src/pages/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
View file @
7d8693a5
...
...
@@ -70,7 +70,12 @@ const ChangeAddFlows = props => {
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
newCheckedList
);
let
b
=
[]
let
a
=
[]
arr
.
map
((
item
,
index
)
=>
{
filed1
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
checkArr
[
index
]
=
[]
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed1
[
item
].
includes
(
checkItem
))
{
...
...
@@ -80,6 +85,23 @@ const ChangeAddFlows = props => {
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed1
[
item
].
length
)
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed1
[
item
].
length
)
})
newCheckedList
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
){
a
=
[]
}
else
{
a
.
push
(
item
)
}
}
})
if
(
a
.
length
>
0
){
filed1
.
外部字段
=
a
console
.
log
(
filed1
)
arr
.
push
(
'外部字段'
)
}
setTitle
(
arr
)
checkArr
.
push
(
a
)
console
.
log
(
checkArr
)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
...
...
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
View file @
7d8693a5
import
React
,
{
useState
,
useEffect
,
useCallback
,
useRef
}
from
'react'
;
import
{
Form
,
Modal
,
Divider
,
Checkbox
}
from
'antd'
;
import
{
Form
,
Modal
,
Divider
,
Checkbox
}
from
'antd'
;
import
styles
from
'./incident.less'
;
import
Sortable
from
'sortablejs'
;
...
...
@@ -17,6 +17,7 @@ const AddModal = props => {
const
[
checkAll
,
setCheckAll
]
=
useState
([]);
const
[
selectData
,
setSelectData
]
=
useState
([])
let
objArr
=
[]
const
onChangeList
=
(
list
,
index
,
title
)
=>
{
const
checkedListArr
=
[...
checkedList
]
checkedListArr
[
index
]
=
list
...
...
@@ -76,7 +77,12 @@ const AddModal = props => {
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
newCheckedList
);
let
b
=
[]
let
a
=
[]
arr
.
map
((
item
,
index
)
=>
{
filed
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
checkArr
[
index
]
=
[]
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
[
item
].
includes
(
checkItem
))
{
...
...
@@ -86,10 +92,29 @@ const AddModal = props => {
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed
[
item
].
length
)
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed
[
item
].
length
)
})
newCheckedList
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
){
a
=
[]
}
else
{
a
.
push
(
item
)
}
}
})
if
(
a
.
length
>
0
){
filed
.
外部字段
=
a
console
.
log
(
filed
)
arr
.
push
(
'外部字段'
)
}
setTitle
(
arr
)
checkArr
.
push
(
a
)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
setCheckAll
(
checkAllArr
)
console
.
log
(
characterValue
)
let
newArr
=
characterValue
.
length
?
characterValue
.
split
(
","
)
:
[]
console
.
log
(
newArr
)
setSelectData
(
newArr
)
draftSort
()
}
else
if
(
isType
===
'app'
)
{
...
...
@@ -101,7 +126,12 @@ const AddModal = props => {
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
newCheckedList
);
let
b
=
[]
let
a
=
[]
arr
.
map
((
item
,
index
)
=>
{
filed1
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
checkArr
[
index
]
=
[]
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed1
[
item
].
includes
(
checkItem
))
{
...
...
@@ -111,6 +141,23 @@ const AddModal = props => {
indeterminateArr
.
push
(
!!
checkArr
[
index
].
length
&&
checkArr
[
index
].
length
<
filed1
[
item
].
length
)
checkAllArr
.
push
(
checkArr
[
index
].
length
===
filed1
[
item
].
length
)
})
newCheckedList
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
){
a
=
[]
}
else
{
a
.
push
(
item
)
}
}
})
if
(
a
.
length
>
0
){
filed1
.
外部字段
=
a
console
.
log
(
filed1
)
arr
.
push
(
'外部字段'
)
}
setTitle
(
arr
)
checkArr
.
push
(
a
)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
setCheckAll
(
checkAllArr
)
...
...
@@ -180,7 +227,8 @@ const AddModal = props => {
{
title
.
map
((
item
,
index
)
=>
{
return
<
div
className=
{
styles
.
cardItemData
}
key=
{
index
}
>
<
Divider
orientation=
"left"
style=
{
{
margin
:
'0 0 10px 0'
,
color
:
'#15428b'
,
borderTopColor
:
'#99bbe8'
}
}
><
Checkbox
indeterminate=
{
indeterminate
[
index
]
}
onChange=
{
onCheckAllChange
}
index=
{
index
}
checkvalue=
{
filed
[
item
]
}
checked=
{
checkAll
[
index
]
}
style=
{
{
marginRight
:
'7px'
}
}
></
Checkbox
>
{
item
}
</
Divider
>
<
CheckboxGroup
options=
{
filed
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
(
e
)
=>
onChangeList
(
e
,
index
,
item
)
}
/></
div
>
<
CheckboxGroup
options=
{
filed
[
item
]
}
value=
{
checkedList
[
index
]
}
onChange=
{
(
e
)
=>
onChangeList
(
e
,
index
,
item
)
}
/>
</
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