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
60a8e1ca
Commit
60a8e1ca
authored
Jun 16, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '流程中心报错修复'
parent
4789f572
Pipeline
#74412
waiting for manual action with stages
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
104 additions
and
95 deletions
+104
-95
FlowChartRt.jsx
...workOrder/workflowEdit/workFlowComponents/FlowChartRt.jsx
+44
-39
AddGIS.jsx
...onents/flowChartComponents/nodeModalComponents/AddGIS.jsx
+4
-8
ConfigGIS.jsx
...nts/flowChartComponents/nodeModalComponents/ConfigGIS.jsx
+56
-48
No files found.
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/FlowChartRt.jsx
View file @
60a8e1ca
...
...
@@ -1043,7 +1043,6 @@ const FlowChart = props => {
list
.
FlowNodeBackfillConfigs
=
jsonData
(
list
.
FlowNodeBackfillConfigs
);
currentNode
.
current
=
list
;
console
.
log
(
currentNode
.
current
);
debugger
;
FlowNodeSave
({
PreviewImage
:
response
.
data
,
CreateUser
:
sessionStorage
.
getItem
(
'userName'
),
...
...
@@ -1083,47 +1082,54 @@ const FlowChart = props => {
const
jsonData
=
val
=>
{
let
listArr
=
[];
val
.
map
((
item
,
index
)
=>
{
let
arr
=
[];
arr
.
push
({
mapServer
:
item
.
schemeName
,
tableName
:
item
[
0
].
nodeName
,
filed
:
item
[
0
].
nodeValue
,
});
if
(
item
.
users
)
{
item
.
users
.
map
(
i
=>
{
arr
.
push
({
mapServer
:
item
.
schemeName
,
tableName
:
i
.
nodeName
,
filed
:
i
.
nodeValue
,
});
if
(
!
item
.
Config
){
console
.
log
(
item
);
debugger
let
arr
=
[];
arr
.
push
({
mapServer
:
item
.
schemeName
,
tableName
:
item
[
0
].
nodeName
,
filed
:
item
[
0
].
nodeValue
,
});
}
let
obj
=
{};
obj
.
type
=
'GIS'
;
if
(
item
.
tableType
===
'mapping'
)
{
obj
.
mapping
=
[
{
fromData
:
{
tableName
:
item
.
TableName
,
filed
:
item
.
Fields
,
if
(
item
.
users
)
{
item
.
users
.
map
(
i
=>
{
arr
.
push
({
mapServer
:
item
.
schemeName
,
tableName
:
i
.
nodeName
,
filed
:
i
.
nodeValue
,
});
});
}
let
obj
=
{};
obj
.
type
=
'GIS'
;
if
(
item
.
tableType
===
'mapping'
)
{
obj
.
mapping
=
[
{
fromData
:
{
tableName
:
item
.
TableName
,
filed
:
item
.
Fields
,
},
toData
:
arr
,
},
toData
:
arr
,
},
];
}
else
{
obj
.
relationFormMapping
=
[
{
fromData
:
{
tableName
:
item
.
TableName
,
filed
:
item
.
Fields
,
];
}
else
{
obj
.
relationFormMapping
=
[
{
fromData
:
{
tableName
:
item
.
TableName
,
filed
:
item
.
Fields
,
}
,
toData
:
arr
,
},
toData
:
arr
,
},
];
];
}
let
json
=
JSON
.
stringify
(
obj
);
let
newObj
=
{
Config
:
json
,
BackfillType
:
'GIS'
,
RuleName
:
item
.
RuleName
};
listArr
.
push
(
newObj
);
}
else
{
listArr
.
push
(
item
);
}
let
json
=
JSON
.
stringify
(
obj
);
let
newObj
=
{
Config
:
json
,
BackfillType
:
'GIS'
,
RuleName
:
item
.
RuleName
};
listArr
.
push
(
newObj
);
});
return
listArr
;
};
...
...
@@ -1280,7 +1286,6 @@ const FlowChart = props => {
i
.
FlowNodeBackfillConfigs
=
jsonData
(
i
.
FlowNodeBackfillConfigs
);
});
console
.
log
(
diagramObj
.
nodeDataArray
);
debugger
;
SaveNodeChange
({
FlowId
:
flowID
,
// DeleteNodes,
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/AddGIS.jsx
View file @
60a8e1ca
...
...
@@ -45,9 +45,6 @@ const AddModal = props => {
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
if
(
visible
)
{
console
.
log
(
tableData
);
console
.
log
(
msg
);
debugger
;
let
arr
=
[];
tableData
.
map
(
i
=>
{
arr
.
push
(
i
.
RuleName
);
...
...
@@ -105,6 +102,8 @@ const AddModal = props => {
const
getLayerFields
=
(
val
,
key
,
value
,
typeFields
)
=>
{
let
obj
=
form
.
getFieldsValue
();
let
newValue
=
value
?
value
:
schemeValue
;
console
.
log
(
schemeValue
);
debugger
let
data
=
newValue
.
find
(
i
=>
i
.
servicename
===
obj
.
schemeName
);
GetLayerFields
({
mapServer
:
data
.
servicename
,
...
...
@@ -136,12 +135,12 @@ const AddModal = props => {
});
let
data
=
arr
.
find
(
i
=>
i
.
FieldName
===
val
[
Object
.
keys
(
val
)[
0
]]);
console
.
log
(
data
);
debugger
;
setTableType
(
data
.
type
);
setType
(
data
.
FiledType
);
setTableName
(
data
.
table
);
// 修改源字段字段类型改变要重新获取type更新所有目标字段下拉框数据
getLayerFields
()
// getLayerFields(val[Object.keys(val)[0]]);
}
};
...
...
@@ -226,9 +225,6 @@ const AddModal = props => {
{
required
:
true
},
{
validator
:
(
_
,
value
)
=>
{
console
.
log
(
value
);
console
.
log
(
ruleList
);
debugger
if
(
modalType
===
'add'
&&
ruleList
.
indexOf
(
value
)
!==
-
1
)
{
return
Promise
.
reject
(
new
Error
(
'规则名称已存在'
));
}
else
if
(
...
...
src/pages/bsmanager/workOrder/workflowEdit/workFlowComponents/flowChartComponents/nodeModalComponents/ConfigGIS.jsx
View file @
60a8e1ca
/* eslint-disable no-else-return */
/* eslint-disable prettier/prettier */
/* eslint-disable indent */
/* eslint-disable no-unused-expressions */
...
...
@@ -78,55 +79,63 @@ const ConfigGIS = (props, ref) => {
// });
tableData
.
current
=
editMsg
.
FlowNodeBackfillConfigs
?.
map
((
item
,
index
)
=>
{
let
obj
=
{};
let
newConfig
=
JSON
.
parse
(
item
.
Config
);
if
(
newConfig
.
mapping
)
{
let
users
=
[];
newConfig
.
mapping
[
0
].
toData
.
map
((
x
,
y
)
=>
{
obj
[
y
]
=
{
nodeName
:
x
.
tableName
,
nodeValue
:
x
.
filed
}
})
obj
.
Fields
=
newConfig
.
mapping
[
0
].
fromData
.
filed
;
obj
.
ID
=
index
;
obj
.
RuleName
=
item
.
RuleName
;
obj
.
TableName
=
newConfig
.
mapping
[
0
].
fromData
.
tableName
;
obj
.
key
=
index
;
obj
.
nodeName1
=
newConfig
.
mapping
[
0
].
toData
[
0
].
tableName
;
obj
.
nodeValue1
=
newConfig
.
mapping
[
0
].
toData
[
0
].
filed
;
obj
.
schemeName
=
newConfig
.
mapping
[
0
].
toData
[
0
].
mapServer
;
obj
.
tableType
=
'mapping'
;
if
(
newConfig
.
mapping
[
0
].
toData
.
length
>
1
)
{
newConfig
.
mapping
[
0
].
toData
.
map
((
i
,
j
)
=>
{
if
(
j
!==
0
)
{
users
.
push
({
nodeName
:
i
.
tableName
,
nodeValue
:
i
.
filed
});
}
if
(
item
.
Config
)
{
let
newConfig
=
JSON
.
parse
(
item
.
Config
);
if
(
newConfig
.
mapping
)
{
let
users
=
[];
newConfig
.
mapping
[
0
].
toData
.
map
((
x
,
y
)
=>
{
obj
[
y
]
=
{
nodeName
:
x
.
tableName
,
nodeValue
:
x
.
filed
};
});
obj
.
users
=
users
;
}
}
else
{
let
users
=
[]
;
newConfig
.
relationFormMapping
[
0
].
toData
.
map
((
x
,
y
)
=>
{
obj
[
y
]
=
{
nodeName
:
x
.
tableName
,
nodeValue
:
x
.
filed
}
})
obj
.
Fields
=
newConfig
.
relationFormMapping
[
0
].
fromData
.
filed
;
obj
.
ID
=
index
;
obj
.
RuleName
=
item
.
RuleName
;
obj
.
TableName
=
newConfig
.
relationFormMapping
[
0
].
fromData
.
tableName
;
obj
.
key
=
index
;
obj
.
nodeName1
=
newConfig
.
relationFormMapping
[
0
].
toData
[
0
].
tableName
;
obj
.
nodeValue1
=
newConfig
.
relationFormMapping
[
0
].
toData
[
0
].
filed
;
obj
.
schemeName
=
newConfig
.
relationFormMapping
[
0
].
toData
[
0
].
mapServer
;
obj
.
tableType
=
'relationFormMapping'
;
if
(
newConfig
.
relationFormMapping
[
0
].
toData
.
length
>
1
)
{
newConfig
.
relationFormMapping
[
0
].
toData
.
map
((
i
,
j
)
=>
{
if
(
j
!==
0
)
{
users
.
push
({
nodeName
:
i
.
tableName
,
nodeValue
:
i
.
filed
});
}
obj
.
Fields
=
newConfig
.
mapping
[
0
].
fromData
.
filed
;
obj
.
ID
=
index
;
obj
.
RuleName
=
item
.
RuleName
;
obj
.
TableName
=
newConfig
.
mapping
[
0
].
fromData
.
tableName
;
obj
.
key
=
index
;
obj
.
nodeName1
=
newConfig
.
mapping
[
0
].
toData
[
0
].
tableName
;
obj
.
nodeValue1
=
newConfig
.
mapping
[
0
].
toData
[
0
].
filed
;
obj
.
schemeName
=
newConfig
.
mapping
[
0
].
toData
[
0
].
mapServer
;
obj
.
tableType
=
'mapping'
;
if
(
newConfig
.
mapping
[
0
].
toData
.
length
>
1
)
{
newConfig
.
mapping
[
0
].
toData
.
map
((
i
,
j
)
=>
{
if
(
j
!==
0
)
{
users
.
push
({
nodeName
:
i
.
tableName
,
nodeValue
:
i
.
filed
})
;
}
})
;
obj
.
users
=
users
;
}
}
else
{
let
users
=
[];
newConfig
.
relationFormMapping
[
0
].
toData
.
map
((
x
,
y
)
=>
{
obj
[
y
]
=
{
nodeName
:
x
.
tableName
,
nodeValue
:
x
.
filed
};
});
obj
.
users
=
users
;
obj
.
Fields
=
newConfig
.
relationFormMapping
[
0
].
fromData
.
filed
;
obj
.
ID
=
index
;
obj
.
RuleName
=
item
.
RuleName
;
obj
.
TableName
=
newConfig
.
relationFormMapping
[
0
].
fromData
.
tableName
;
obj
.
key
=
index
;
obj
.
nodeName1
=
newConfig
.
relationFormMapping
[
0
].
toData
[
0
].
tableName
;
obj
.
nodeValue1
=
newConfig
.
relationFormMapping
[
0
].
toData
[
0
].
filed
;
obj
.
schemeName
=
newConfig
.
relationFormMapping
[
0
].
toData
[
0
].
mapServer
;
obj
.
tableType
=
'relationFormMapping'
;
if
(
newConfig
.
relationFormMapping
[
0
].
toData
.
length
>
1
)
{
newConfig
.
relationFormMapping
[
0
].
toData
.
map
((
i
,
j
)
=>
{
if
(
j
!==
0
)
{
users
.
push
({
nodeName
:
i
.
tableName
,
nodeValue
:
i
.
filed
});
}
});
obj
.
users
=
users
;
}
}
return
{
...
obj
,
};
}
else
{
return
{
...
item
,
key
:
index
,
ID
:
index
,
};
}
return
{
...
obj
,
};
});
setFlag
(
flag
+
1
);
tableFields
();
...
...
@@ -142,7 +151,7 @@ const ConfigGIS = (props, ref) => {
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
res
.
data
.
FromData
.
map
(
i
=>
{
i
.
type
=
'
工单、事件
表'
;
i
.
type
=
'
事件工单
表'
;
i
.
TableFields
.
map
(
j
=>
{
j
.
table
=
i
.
TableName
;
j
.
type
=
'mapping'
;
...
...
@@ -181,7 +190,6 @@ const ConfigGIS = (props, ref) => {
}
tableData
.
current
=
list
;
console
.
log
(
list
);
debugger
;
nodeChage
(
'FlowNodeBackfillConfigs'
,
tableData
.
current
);
setViewModal
(
false
);
};
...
...
@@ -247,7 +255,7 @@ const ConfigGIS = (props, ref) => {
fontWeight
:
700
,
}
}
>
GIS
配置
GIS
数据回填
</
Divider
>
<
div
style=
{
{
...
...
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