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
d4dd8495
Commit
d4dd8495
authored
Jul 27, 2023
by
皮倩雯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: '修复维保模板父业务模板接口报错问题'
parent
82ffe887
Pipeline
#76793
passed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
26 deletions
+39
-26
AddModal.jsx
...ages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
+37
-24
AddModal.jsx
...s/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
+2
-2
No files found.
src/pages/bsmanager/patrolMaintenance/maintenance/AddModal.jsx
View file @
d4dd8495
...
...
@@ -145,7 +145,6 @@ const AddModal = props => {
getEventData
();
if
(
visible
)
{
getRole
();
getParentList
();
if
(
type
===
'add'
)
{
setChee
(
'否'
);
form
.
setFieldsValue
({
isSubmit
:
'否'
,
docycle
:
'一周一次'
,
feedbackRule
:
''
});
...
...
@@ -154,6 +153,7 @@ const AddModal = props => {
setType2
(
''
);
setFiled1
({});
}
else
if
(
type
===
'edit'
)
{
getParentList
();
onChangeFeed
(
formObj
.
feedbackName
,
''
,
...
...
@@ -203,8 +203,9 @@ const AddModal = props => {
useEffect
(()
=>
{},
[
keepData
]);
const
getParentList
=
()
=>
{
GetParentDeviceTemplate
({
id
:
formObj
.
id
}).
then
(
res
=>
{
const
getParentList
=
e
=>
{
let
value
=
e
?
e
:
formObj
.
accountName
;
GetParentDeviceTemplate
({
accountName
:
value
}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
setParentList
(
res
.
data
);
}
...
...
@@ -823,14 +824,6 @@ const AddModal = props => {
required
:
true
,
message
:
'请选择维保设备'
,
},
{
validator
:
(
rule
,
value
)
=>
{
if
(
form
.
getFieldsValue
().
accountName
===
''
)
{
return
Promise
.
reject
(
'维保设备必选'
);
}
return
Promise
.
resolve
();
},
},
]
}
>
{
/* <Select placeholder="选择此计划关联的设备台账名称" showSearch>
...
...
@@ -849,24 +842,44 @@ const AddModal = props => {
allowClear
treeDefaultExpandAll
showCheckedStrategy
onChange=
{
e
=>
{
getParentList
(
e
);
}
}
>
{
treeData
.
map
(
i
=>
mapTree
(
i
))
}
</
TreeSelect
>
</
Item
>
</
Col
>
<
Col
span=
{
24
}
>
<
Item
label=
"父业务模板"
name=
"parentId"
labelCol=
{
{
span
:
5
}
}
>
<
Select
placeholder=
"选择父业务模板"
showSearch
allowClear
>
{
parentList
?
parentList
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
.
ID
}
value=
{
item
.
ID
}
>
{
item
.
TemplateName
}
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
</
Col
>
{
form
.
getFieldsValue
().
accountName
?
(
<
Col
span=
{
24
}
>
<
Item
label=
"父业务模板"
name=
"parentId"
labelCol=
{
{
span
:
5
}
}
>
<
Select
placeholder=
"选择父业务模板"
showSearch
allowClear
>
{
parentList
?
parentList
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
.
ID
}
value=
{
item
.
ID
}
>
{
item
.
TemplateName
}
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
</
Col
>
)
:
(
<
Col
span=
{
24
}
>
<
Item
label=
"父业务模板"
name=
"parentId"
labelCol=
{
{
span
:
5
}
}
>
<
Select
placeholder=
"请先选择维保设备"
disabled
>
{
parentList
?
parentList
.
map
((
item
,
index
)
=>
(
<
Option
key=
{
index
.
ID
}
value=
{
item
.
ID
}
>
{
item
.
TemplateName
}
</
Option
>
))
:
''
}
</
Select
>
</
Item
>
</
Col
>
)
}
<
Col
span=
{
24
}
>
<
Item
label=
"反馈名称"
...
...
src/pages/bsmanager/patrolMaintenance/patrolFeedback/AddModal.jsx
View file @
d4dd8495
...
...
@@ -450,7 +450,7 @@ const AddModal = props => {
notification
.
warning
({
message
:
'提示'
,
duration
:
3
,
description
:
'请先选择反馈
名称
'
,
description
:
'请先选择反馈
表
'
,
});
}
};
...
...
@@ -959,7 +959,7 @@ const AddModal = props => {
onFocus=
{
()
=>
{
let
obj
=
form
.
getFieldsValue
().
tableName
;
if
(
!
obj
)
{
message
.
warning
(
'请先选择反馈
名称
!'
);
message
.
warning
(
'请先选择反馈
表
!'
);
}
}
}
>
...
...
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