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
d32ac6a6
Commit
d32ac6a6
authored
Nov 09, 2022
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修复巡检初始值获取失败bug'
parent
637ef695
Pipeline
#63418
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
27 deletions
+19
-27
fieldEditor.jsx
...s/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
+8
-6
AddModal.jsx
...s/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
+11
-21
No files found.
src/pages/bsmanager/base/tablemanager/filedConfig/fieldEditor.jsx
View file @
d32ac6a6
...
...
@@ -56,6 +56,7 @@ import VerifyModal from './VerifyModal';
import
Tree
from
'@/components/ExpendableTree'
;
import
RuleConfig
from
'@/components/RuleConfig'
;
import
Things
from
'../../../../../assets/images/icons/时间.svg'
;
import
logo
from
'@/assets/images/icons/值映射.png'
;
const
AddModal
=
props
=>
{
const
{
callBackSubmit
=
()
=>
{},
...
...
@@ -3348,17 +3349,17 @@ const AddModal = props => {
rules=
{
[{
required
:
true
,
message
:
'请输入字段名'
}]
}
style=
{
{
marginBottom
:
0
}
}
>
<
Input
placeholder=
"请输入字段名"
style=
{
{
width
:
'2
10
px'
}
}
/>
<
Input
placeholder=
"请输入字段名"
style=
{
{
width
:
'2
08
px'
}
}
/>
</
Item
>
</
Col
>
<
Col
span=
{
1
}
style=
{
{
paddingTop
:
'3px'
}
}
>
<
SwapOutlined
style=
{
{
marginLeft
:
'-4px'
}
}
/></
Col
>
<
Col
span=
{
1
}
style=
{
{
paddingTop
:
'3px'
}
}
>
<
img
src=
{
logo
}
style=
{
{
height
:
'24px'
,
marginLeft
:
'-10px'
}
}
alt=
""
/></
Col
>
<
Col
span=
{
11
}
>
<
Item
name=
"eventOrder"
rules=
{
[{
required
:
true
,
message
:
'请输入映射字段名'
}]
}
style=
{
{
marginBottom
:
0
}
}
>
<
Input
placeholder=
"请输入映射字段名"
style=
{
{
width
:
'2
10
px'
}
}
/>
<
Input
placeholder=
"请输入映射字段名"
style=
{
{
width
:
'2
08
px'
}
}
/>
</
Item
>
</
Col
>
</
Row
>
...
...
@@ -3404,9 +3405,10 @@ const AddModal = props => {
},
]
}
>
<
Input
placeholder=
"请填写字段名"
style=
{
{
width
:
'2
10
px'
,
marginLeft
:
'98px'
}
}
/>
<
Input
placeholder=
"请填写字段名"
style=
{
{
width
:
'2
08
px'
,
marginLeft
:
'98px'
}
}
/>
</
Form
.
Item
>
<
SwapOutlined
style=
{
{
marginLeft
:
'4px'
}
}
/>
{
/* <SwapOutlined style={{marginLeft:'4px'}}/> */
}
<
img
src=
{
logo
}
style=
{
{
height
:
'24px'
}
}
alt=
""
/>
<
Form
.
Item
{
...
restField
}
style=
{
{
marginBottom
:
'5px'
}
}
...
...
@@ -3414,7 +3416,7 @@ const AddModal = props => {
fieldKey=
{
[
fieldKey
,
'key'
]
}
rules=
{
[{
required
:
true
,
message
:
'请填写映射字段名'
}]
}
>
<
Input
placeholder=
"请填写映射字段名"
style=
{
{
width
:
'2
10px'
,
marginLeft
:
'4
px'
}
}
/>
<
Input
placeholder=
"请填写映射字段名"
style=
{
{
width
:
'2
08
px'
}
}
/>
</
Form
.
Item
>
<
MinusCircleOutlined
onClick=
{
()
=>
remove
(
name
)
}
...
...
src/pages/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
View file @
d32ac6a6
...
...
@@ -61,12 +61,11 @@ const AddModal = props => {
const
[
chooseGroupName
,
setChooseGroupName
]
=
useState
([
'角色'
,
'部门'
,
'站点'
]);
const
[
keepFiled
,
setKeepFiled
]
=
useState
([]);
const
[
eventData
,
setEventData
]
=
useState
([]);
const
[
keepData
,
setKeepData
]
=
useState
(
[]
);
const
[
keep
,
setkeep
]
=
useState
([]);
const
[
keepAllData
,
setKeepAllData
]
=
useState
([]);
const
[
keepData
,
setKeepData
]
=
useState
(
''
);
const
[
keep
,
setkeep
]
=
useState
([]);
// 保存初始完整任务同步事件字段
const
[
keepAllData
,
setKeepAllData
]
=
useState
([]);
// 保存所有关联事件类型数据
const
[
keepTree
,
setKeepTree
]
=
useState
([]);
const
[
keepAll
,
setKeepAll
]
=
useState
([]);
const
all
=
useRef
();
const
[
keepAll
,
setKeepAll
]
=
useState
([]);
// 保存所选关联事件下完整的字段值
const
[
form
]
=
Form
.
useForm
();
const
[
formAdd
]
=
Form
.
useForm
();
...
...
@@ -95,16 +94,16 @@ const AddModal = props => {
formAdd
.
resetFields
();
form
.
resetFields
();
setKeepTree
([]);
setKeepData
(
[]
);
setKeepData
(
''
);
}
},
[
visible
]);
// 获取字段名数据
const
getGetTaskSyncField
=
e
=>
{
GetTaskSyncField
().
then
(
res
=>
{
if
(
res
.
code
===
'0'
)
{
// 编辑时处理数据为下拉框过滤调已选数据
if
(
e
)
{
console
.
log
(
res
.
data
);
console
.
log
(
e
);
let
datalist
=
[...
e
];
datalist
.
map
(
i
=>
{
res
.
data
.
map
(
j
=>
{
...
...
@@ -113,9 +112,7 @@ const AddModal = props => {
}
});
});
console
.
log
(
e
);
console
.
log
(
datalist
);
formAdd
.
setFieldsValue
({
parmars
:
datalist
});
formAdd
.
setFieldsValue
({
parmars
:
datalist
});
// 处理数据让下拉框回显title值
let
aa
=
e
;
let
from
=
[];
aa
.
map
(
i
=>
{
...
...
@@ -124,18 +121,15 @@ const AddModal = props => {
}
});
let
lastFrom
=
[];
keep
.
map
(
j
=>
{
res
.
data
.
map
(
j
=>
{
if
(
from
.
indexOf
(
j
.
key
)
==
-
1
)
{
lastFrom
.
push
(
j
);
}
});
setKeepData
(
lastFrom
);
console
.
log
(
lastFrom
);
}
else
{
setKeepData
(
res
.
data
);
console
.
log
(
res
.
data
);
}
setkeep
(
res
.
data
);
}
});
...
...
@@ -149,7 +143,7 @@ const AddModal = props => {
console
.
log
(
res
.
data
.
root
);
console
.
log
(
i
);
setKeepAll
(
res
.
data
.
root
);
// 编辑时过滤数据
// 编辑时过滤
下l拉框初始
数据
if
(
i
)
{
let
aa
=
i
;
let
to
=
[];
...
...
@@ -307,14 +301,11 @@ const AddModal = props => {
const
onSubmit
=
()
=>
{
formAdd
.
validateFields
().
then
(
validate1
=>
{
console
.
log
(
validate1
);
if
(
validate1
)
{
form
.
validateFields
().
then
(
validate
=>
{
if
(
validate
)
{
let
obj
=
form
.
getFieldsValue
();
let
objaa
=
formAdd
.
getFieldValue
(
'parmars'
);
console
.
log
(
objaa
);
console
.
log
(
keep
);
objaa
&&
objaa
.
map
(
i
=>
{
keep
.
map
(
j
=>
{
...
...
@@ -323,7 +314,6 @@ const AddModal = props => {
}
});
});
console
.
log
(
objaa
);
if
(
type
==
'add'
)
{
CM_Feedback_OperatePatrolFeedback
({
...
obj
,
...
...
@@ -880,7 +870,7 @@ const AddModal = props => {
block
icon=
{
<
PlusOutlined
/>
}
style=
{
{
marginLeft
:
'-2px'
}
}
disabled=
{
!
(
keepData
.
length
>
0
)
}
disabled=
{
keepData
&&
!
(
keepData
.
length
>
0
)
}
>
添加映射
</
Button
>
...
...
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