Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
32d32c4e
Commit
32d32c4e
authored
Dec 28, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务商编辑页显示bug修复
parent
75f1683c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+24
-13
No files found.
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
32d32c4e
...
...
@@ -48,11 +48,6 @@ const Edit = (props: any) => {
optionsList
=
[...
DataServices
.
data
.
rows
];
}
return
()
=>
{
}
},
[
DataServices
]);
// 判断是否有小区列表数据返回
...
...
@@ -72,14 +67,30 @@ const Edit = (props: any) => {
useEffect
(()
=>
{
if
(
SaveChooseData
!=
null
)
{
// 处理服务范围数据
optionsList
.
forEach
((
v
)
=>
{
if
(
v
.
serviceName
===
SaveChooseData
.
serviceScope
)
{
SaveChooseData
.
serviceScopeList
=
v
.
serviceCode
;
formRef
.
current
.
setFieldsValue
(
SaveChooseData
);
}
});
console
.
log
(
optionsList
);
console
.
log
(
SaveChooseData
);
if
(
SaveChooseData
.
serviceScopeList
.
length
<=
1
)
{
// 处理服务范围数据
optionsList
.
forEach
((
v
)
=>
{
if
(
v
.
serviceName
===
SaveChooseData
.
serviceScope
)
{
SaveChooseData
.
serviceScopeList
=
v
.
serviceCode
;
}
});
}
else
{
console
.
log
(
1122
);
// 处理服务范围数据
optionsList
.
forEach
((
v1
)
=>
{
SaveChooseData
.
serviceScopeList
.
forEach
((
v2
:
string
,
index
:
number
)
=>
{
console
.
log
(
v1
.
serviceName
);
console
.
log
(
v1
.
serviceName
===
v2
);
if
(
v1
.
serviceName
===
v2
)
{
SaveChooseData
.
serviceScopeList
[
index
]
=
v1
.
serviceCode
;
}
});
});
}
formRef
.
current
.
setFieldsValue
(
SaveChooseData
);
console
.
log
(
SaveChooseData
);
}
},
[
SaveChooseData
]);
...
...
@@ -239,7 +250,7 @@ function mapStateToProps(state: any) {
const
{
CurData
,
SaveChooseData
}
=
state
.
ServiceProvider
;
const
{
DataServices
}
=
state
.
User
;
const
{
CommunityList
}
=
state
.
Init
;
console
.
log
(
CurData
)
console
.
log
(
CurData
)
;
return
{
CurData
,
SaveChooseData
,
...
...
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