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
c132f305
Commit
c132f305
authored
Nov 17, 2021
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决事件管理外部字段展示错误
parent
89f4fb9b
Pipeline
#38066
skipped with stages
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
159 additions
and
66 deletions
+159
-66
AddFlowsModal.jsx
...ages/platformCenter/bsmanager/workOrder/AddFlowsModal.jsx
+32
-0
AddModal.jsx
src/pages/platformCenter/bsmanager/workOrder/AddModal.jsx
+64
-3
ChangeAddFlows.jsx
...ges/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
+21
-21
changeAdd.jsx
src/pages/platformCenter/bsmanager/workOrder/changeAdd.jsx
+42
-42
No files found.
src/pages/platformCenter/bsmanager/workOrder/AddFlowsModal.jsx
View file @
c132f305
...
...
@@ -16,6 +16,7 @@ const AddFlowsModal = props => {
const
[
visible1
,
setVisible1
]
=
useState
(
false
)
const
[
pickItem
,
setPickItem
]
=
useState
(
''
)
const
[
checkedList1
,
setCheckedList1
]
=
useState
([])
const
[
nu1
,
setNu1
]
=
useState
([])
const
[
inputValue
,
setInputValue
]
=
useState
({
Roles
:
''
});
const
[
selectValue
,
setSelectValue
]
=
useState
(
''
)
const
[
characterValue
,
setCharacterValue
]
=
useState
(
''
)
...
...
@@ -242,6 +243,7 @@ const AddFlowsModal = props => {
const getRole = () => {
CM_Event_LoadDepartmentAndRoles().then(res => {
if (res.msg === 'Ok') {
setNu1(res.data)
setFiled1(formateArrDataA1(res.data, 'groupType'))
console.log(res.data)
...
...
@@ -255,6 +257,36 @@ const AddFlowsModal = props => {
}
const pickFiled1 = (fileds) => {
// setTypes('app')
let pp = formateArrDataA1(nu1, 'group')
let ab = inputValue[fileds].split(',')
console.log(pp)
let arr = Object.keys(pp)
let b = []
let a = []
arr.map((item, index) => {
pp[item].map((i, j) => {
b.push(i)
})
})
console.log(ab)
ab.map((item, index) => {
if (b.includes(item) == false) {
if(item == ''){
a=[]
}else{
a.push(item)
}
}
})
if(a.length >0){
pp.外部字段 = a
console.log(pp)
arr.push('外部字段')
}
console.log(a)
console.log(pp)
setFiled1(pp)
console.log(fileds)
setCharacterValue(inputValue[fileds])
setCheckedList1(inputValue[fileds].split(','))
...
...
src/pages/platformCenter/bsmanager/workOrder/AddModal.jsx
View file @
c132f305
...
...
@@ -25,6 +25,8 @@ const AddModal = props => {
const
[
checkedList2
,
setCheckedList2
]
=
useState
([])
const
[
checkedList3
,
setCheckedList3
]
=
useState
([])
const
[
checkedList4
,
setCheckedList4
]
=
useState
([])
const
[
nu
,
setNu
]
=
useState
([])
const
[
nu1
,
setNu1
]
=
useState
([])
const
[
editable
,
setEditable
]
=
useState
(
false
)
const
[
ReportFromMobile
,
setReportFromMobile
]
=
useState
(
false
)
...
...
@@ -259,6 +261,7 @@ const AddModal = props => {
const
getRole
=
()
=>
{
CM_Event_LoadDepartmentAndRoles
().
then
(
res
=>
{
if
(
res
.
msg
===
'Ok'
)
{
setNu1
(
res
.
data
)
setFiled1
(
formateArrDataA1
(
res
.
data
,
'groupType'
))
console
.
log
(
res
.
data
)
...
...
@@ -296,6 +299,7 @@ const AddModal = props => {
setFlag
(
flag
+
1
)
LoadEventFields
({
eventTableName
:
value
,
distinctFields
:
''
}).
then
(
res
=>
{
if
(
res
.
data
.
root
)
{
setNu
(
res
.
data
.
root
)
setFiled
(
formateArrDataA
(
res
.
data
.
root
,
'group'
))
console
.
log
(
filed
)
console
.
log
(
res
.
data
.
root
)
...
...
@@ -489,6 +493,36 @@ const AddModal = props => {
setIsVisible1
(
false
)
}
const
pickFiled
=
(
fileds
)
=>
{
let
pp
=
formateArrDataA
(
nu
,
'group'
)
let
ab
=
inputValue
[
fileds
].
split
(
','
)
console
.
log
(
pp
)
let
arr
=
Object
.
keys
(
pp
)
let
b
=
[]
let
a
=
[]
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
})
console
.
log
(
ab
)
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
){
a
=
[]
}
else
{
a
.
push
(
item
)
}
}
})
if
(
a
.
length
>
0
){
pp
.
外部字段
=
a
console
.
log
(
pp
)
arr
.
push
(
'外部字段'
)
}
console
.
log
(
a
)
console
.
log
(
pp
)
setFiled
(
pp
)
setTypes
(
'add'
)
setCharacterValue
(
inputValue
[
fileds
])
setCheckedList1
(
inputValue
[
fileds
].
split
(
','
))
...
...
@@ -496,10 +530,37 @@ const AddModal = props => {
setIsVisible
(
true
)
}
const
pickFiled1
=
(
fileds
)
=>
{
let
pp
=
formateArrDataA1
(
nu1
,
'group'
)
let
ab
=
inputValue
[
fileds
].
split
(
','
)
console
.
log
(
pp
)
let
arr
=
Object
.
keys
(
pp
)
let
b
=
[]
let
a
=
[]
arr
.
map
((
item
,
index
)
=>
{
pp
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
})
console
.
log
(
ab
)
ab
.
map
((
item
,
index
)
=>
{
if
(
b
.
includes
(
item
)
==
false
)
{
if
(
item
==
''
){
a
=
[]
}
else
{
a
.
push
(
item
)
}
}
})
if
(
a
.
length
>
0
){
pp
.
外部字段
=
a
console
.
log
(
pp
)
arr
.
push
(
'外部字段'
)
}
console
.
log
(
a
)
console
.
log
(
pp
)
setFiled1
(
pp
)
setTypes
(
'app'
)
// console.log(fileds)
// console.log(inputValue)
// console.log(inputValue[fileds])
setCharacterValue
(
inputValue
[
fileds
])
setCheckedList1
(
inputValue
[
fileds
].
split
(
','
))
setPickItem
(
fileds
)
...
...
src/pages/platformCenter/bsmanager/workOrder/ChangeAddFlows.jsx
View file @
c132f305
...
...
@@ -70,12 +70,12 @@ const ChangeAddFlows = props => {
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
newCheckedList
);
let
b
=
[]
let
a
=
[]
//
let b = []
//
let a = []
arr
.
map
((
item
,
index
)
=>
{
filed1
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
//
filed1[item].map((i, j) => {
//
b.push(i)
//
})
checkArr
[
index
]
=
[]
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed1
[
item
].
includes
(
checkItem
))
{
...
...
@@ -85,23 +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
)
}
//
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
)
//
}
//
})
//
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 @
c132f305
...
...
@@ -78,12 +78,12 @@ const AddModal = props => {
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
newCheckedList
);
let
b
=
[]
let
a
=
[]
//
let b = []
//
let a = []
arr
.
map
((
item
,
index
)
=>
{
filed
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
//
filed[item].map((i, j) => {
//
b.push(i)
//
})
checkArr
[
index
]
=
[]
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed
[
item
].
includes
(
checkItem
))
{
...
...
@@ -93,23 +93,23 @@ 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
)
}
//
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
)
//
}
//
})
//
if(a.length >0){
//
filed.外部字段 = a
//
console.log(filed)
//
arr.push('外部字段')
//
}
//
setTitle(arr)
//
checkArr.push(a)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
setCheckAll
(
checkAllArr
)
...
...
@@ -127,12 +127,12 @@ const AddModal = props => {
let
indeterminateArr
=
[]
let
checkAllArr
=
[]
console
.
log
(
newCheckedList
);
let
b
=
[]
let
a
=
[]
//
let b = []
//
let a = []
arr
.
map
((
item
,
index
)
=>
{
filed1
[
item
].
map
((
i
,
j
)
=>
{
b
.
push
(
i
)
})
//
filed1[item].map((i, j) => {
//
b.push(i)
//
})
checkArr
[
index
]
=
[]
newCheckedList
.
map
(
checkItem
=>
{
if
(
filed1
[
item
].
includes
(
checkItem
))
{
...
...
@@ -142,23 +142,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
)
}
//
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
)
//
}
//
})
//
if(a.length >0){
//
filed1.外部字段 = a
//
console.log(filed1)
//
arr.push('外部字段')
//
}
//
setTitle(arr)
//
checkArr.push(a)
setCheckedList
(
checkArr
)
setIndeterminate
(
indeterminateArr
)
setCheckAll
(
checkAllArr
)
...
...
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