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
faa7daf7
Commit
faa7daf7
authored
Dec 26, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '工单辅助视图功能优化'
parent
c68e08ed
Pipeline
#65899
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
97 additions
and
12 deletions
+97
-12
AddModal.jsx
...wNode/flowNodeComponents/auxiliaryComponents/AddModal.jsx
+81
-6
ParmarModal.jsx
...de/flowNodeComponents/auxiliaryComponents/ParmarModal.jsx
+16
-6
No files found.
src/pages/bsmanager/workOrder/workFlow/flowNode/flowNodeComponents/auxiliaryComponents/AddModal.jsx
View file @
faa7daf7
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
getFlowNodeExtendPage
,
operateFlowNodeExtendPage
}
from
'@/services/flow/flow'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Button
}
from
'antd'
;
import
{
Form
,
Modal
,
Input
,
notification
,
Button
,
Select
,
Tag
}
from
'antd'
;
import
ParmarModal
from
'./ParmarModal'
;
const
{
Option
}
=
Select
;
const
ProcessConfig
=
props
=>
{
const
{
onSubumit
,
handleCancel
,
visible
,
msg
,
flowNodeId
,
modalType
,
title
}
=
props
;
const
[
showParmarModal
,
setShowParmarModal
]
=
useState
(
false
);
const
[
treeData
,
setTreeData
]
=
useState
([
'FeedbackAccount'
,
'GisGatherProjectView'
]);
const
[
paramValue
,
setParamValue
]
=
useState
([
'一键入库'
,
'edit'
]);
const
[
selectValue
,
setSelectValue
]
=
useState
(
''
);
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
form
.
resetFields
();
...
...
@@ -23,6 +27,7 @@ const ProcessConfig = props => {
getFlowNodeExtendPage
({
flowNodeExtendPageId
:
msg
.
ID
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
form
.
setFieldsValue
({
...
res
.
data
,
FlowName
:
title
});
setSelectValue
(
res
.
data
.
WebPage
);
}
});
};
...
...
@@ -69,6 +74,23 @@ const ProcessConfig = props => {
console
.
log
(
form
.
getFieldValue
(
'WebParam'
));
setShowParmarModal
(
true
);
};
const
inputType
=
value
=>
{
console
.
log
(
value
);
if
(
value
)
{
form
.
setFieldsValue
({
WebPage
:
value
});
setSelectValue
(
value
);
}
};
const
changeValue
=
e
=>
{
form
.
setFieldsValue
({
WebPage
:
e
});
setSelectValue
(
e
);
};
const
changeParam
=
value
=>
{
form
.
setFieldsValue
({
WebParam
:
value
});
};
return
(
<
Modal
title=
"流程节点辅助视图配置"
...
...
@@ -91,15 +113,68 @@ const ProcessConfig = props => {
<
Input
placeholder=
"请输入前端标签"
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"前端视图"
name=
"WebPage"
>
<
Input
placeholder=
"请输入前端视图"
/>
<
Select
placeholder=
"请输入前端视图"
onSearch=
{
inputType
}
showSearch
onChange=
{
changeValue
}
optionLabelProp=
"label"
value=
{
selectValue
}
style=
{
{
marginLeft
:
'-3px'
}
}
>
<
Option
value=
"FeedbackAccount"
label=
"FeedbackAccount"
>
<
div
style=
{
{
marginRight
:
'6px'
}
}
>
<
Tag
color=
"blue"
>
标准
</
Tag
>
FeedbackAccount:工单反馈标准视图
</
div
>
</
Option
>
<
Option
value=
"GisGatherProjectView"
label=
"GisGatherProjectView"
>
<
div
style=
{
{
marginRight
:
'6px'
}
}
>
<
Tag
color=
"purple"
>
专用
</
Tag
>
GisGatherProjectView:管网采集辅助视图
</
div
>
</
Option
>
{
/* {treeData
? treeData.map((item, index) => (
<Option key={index} value={item}>
{item}
</Option>
))
: ''} */
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
label=
"视图参数"
name=
"WebParam"
>
<
div
style=
{
{
display
:
'flex'
}
}
>
{
selectValue
===
'FeedbackAccount'
&&
(
<
div
style=
{
{
display
:
'flex'
}
}
>
<
Form
.
Item
name=
"WebParam"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请输入视图参数"
style=
{
{
width
:
'100%'
}
}
/>
</
Form
.
Item
>
<
Button
onClick=
{
addParama
}
>
参数管理
</
Button
>
</
div
>
)
}
{
selectValue
===
'GisGatherProjectView'
&&
(
<
Form
.
Item
name=
"WebParam"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Select
placeholder=
"选择视图参数"
onSearch=
{
changeParam
}
showSearch
style=
{
{
marginLeft
:
'-3px'
}
}
>
{
paramValue
?
paramValue
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
</
Option
>
))
:
''
}
</
Select
>
</
Form
.
Item
>
)
}
{
selectValue
!==
'FeedbackAccount'
&&
selectValue
!==
'GisGatherProjectView'
&&
(
<
Form
.
Item
name=
"WebParam"
style=
{
{
marginBottom
:
0
,
width
:
'100%'
}
}
>
<
Input
placeholder=
"请输入视图参数"
style=
{
{
width
:
'100%'
}
}
/>
<
Input
placeholder=
"请输入视图参数"
/>
</
Form
.
Item
>
<
Button
onClick=
{
addParama
}
>
参数管理
</
Button
>
</
div
>
)
}
</
Form
.
Item
>
<
Form
.
Item
label=
"手持标签"
name=
"MobileLabel"
>
<
Input
placeholder=
"请输入手持标签"
/>
...
...
src/pages/bsmanager/workOrder/workFlow/flowNode/flowNodeComponents/auxiliaryComponents/ParmarModal.jsx
View file @
faa7daf7
...
...
@@ -9,7 +9,7 @@ const ParmarModal = props => {
const
[
form
]
=
Form
.
useForm
();
const
[
keepStandingBook
,
setKeepStandingBook
]
=
useState
([]);
const
[
visibleChecked
,
setVisibleChecked
]
=
useState
(
true
);
const
[
shineFieldsData
,
setShineFieldsData
]
=
useState
([
'事件编号'
,
'工单编号'
,
'GIS编号'
]);
const
[
shineFieldsData
,
setShineFieldsData
]
=
useState
([
'事件编号'
,
'工单编号'
]);
const
{
Option
}
=
Select
;
useEffect
(()
=>
{
if
(
visible
)
{
...
...
@@ -27,12 +27,16 @@ const ParmarModal = props => {
if
(
pageUrl
)
{
if
(
pageUrl
.
indexOf
(
'['
)
!==
-
1
)
{
let
data
=
JSON
.
parse
(
pageUrl
);
console
.
log
(
data
.
shineFields
);
console
.
log
(
data
.
shineFields
.
formField
);
let
list
=
[];
if
(
data
.
shineFields
.
length
>
0
)
{
data
.
shineFields
.
map
(
i
=>
{
list
.
push
(
i
.
formField
);
});
}
form
.
setFieldsValue
({
accountName
:
data
.
accountName
,
editable
:
data
.
editable
,
shineFields
:
data
.
shineFields
[
0
].
formField
,
shineFields
:
list
,
});
}
}
...
...
@@ -50,7 +54,13 @@ const ParmarModal = props => {
let
data
=
{};
data
.
accountName
=
obj
.
accountName
;
data
.
editable
=
visibleChecked
;
data
.
shineFields
=
[{
formField
:
obj
.
shineFields
,
toField
:
obj
.
shineFields
}];
data
.
shineFields
=
[];
if
(
obj
.
shineFields
)
{
obj
.
shineFields
.
map
(
i
=>
{
data
.
shineFields
.
push
({
formField
:
i
,
toField
:
i
});
});
}
// data.shineFields = [{ formField: obj.shineFields, toField: obj.shineFields }];
// data.shineFields = parma;
parmarCallBack
(
JSON
.
stringify
(
data
));
}
...
...
@@ -99,7 +109,7 @@ const ParmarModal = props => {
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"映射字段"
name=
"shineFields"
>
<
Select
placeholder=
"请选择映射字段"
showSearch
>
<
Select
placeholder=
"请选择映射字段"
showSearch
mode=
"multiple"
>
{
shineFieldsData
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
}
value=
{
item
}
>
{
item
}
...
...
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