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
20c8de57
Commit
20c8de57
authored
Oct 28, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
服务商编辑页 优化
parent
105d2bdf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
10 deletions
+21
-10
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+20
-9
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+1
-1
No files found.
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
20c8de57
...
@@ -17,17 +17,15 @@ const Edit = (props: any) => {
...
@@ -17,17 +17,15 @@ const Edit = (props: any) => {
};
};
const
[
CList
,
setCList
]
=
useState
(
CommunityList
);
const
[
CList
,
setCList
]
=
useState
(
CommunityList
);
const
[
SList
,
setSList
]
=
useState
([
'1'
]);
const
[
load
,
setload
]
=
useState
(
false
);
const
[
load
,
setload
]
=
useState
(
false
);
const
printContent
=
(
List
:
any
)
=>
{
const
printContent
=
(
List
:
any
)
=>
{
setCList
(
List
);
setCList
(
List
);
};
};
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
as
any
);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
SaveChooseData
);
RA
(
43
,
{},
module
,
dispatch
);
RA
(
43
,
{},
module
,
dispatch
);
},
[]);
},
[]);
...
@@ -40,16 +38,29 @@ const Edit = (props: any) => {
...
@@ -40,16 +38,29 @@ const Edit = (props: any) => {
value
:
i
.
toString
(),
value
:
i
.
toString
(),
};
};
});
});
}
},
[
DataServices
]);
useEffect
(()
=>
{
if
(
SaveChooseData
!=
null
)
{
if
(
SaveChooseData
!=
null
)
{
formRef
.
current
.
setFieldsValue
(
SaveChooseData
);
console
.
log
(
SaveChooseData
);
console
.
log
(
options
);
let
arr
:
[]
=
[];
SaveChooseData
.
serviceScopeList
.
forEach
((
v
:
any
)
=>
{
options
.
forEach
((
ele
:
any
)
=>
{
if
(
v
===
ele
.
label
)
{
arr
.
push
(
ele
.
value
as
never
);
}
}
});
});
SaveChooseData
.
serviceScopeList
=
arr
;
formRef
.
current
.
setFieldsValue
(
SaveChooseData
);
}
}
},
[
DataServices
]);
},
[
SaveChooseData
]);
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
var
val
=
values
;
var
val
=
values
;
val
.
serviceCommunityList
=
CList
;
val
.
serviceCommunityList
=
CList
;
// val.serviceScopeList = SList
val
.
creator
=
'admin'
;
val
.
creator
=
'admin'
;
val
.
updater
=
'admin'
;
val
.
updater
=
'admin'
;
setload
(
true
);
setload
(
true
);
...
@@ -114,7 +125,7 @@ const Edit = (props: any) => {
...
@@ -114,7 +125,7 @@ const Edit = (props: any) => {
},
},
]
}
]
}
>
>
<
Checkbox
.
Group
options=
{
options
}
/>
<
Checkbox
.
Group
options=
{
options
as
any
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
20c8de57
...
@@ -219,7 +219,7 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -219,7 +219,7 @@ const ServiceProviderManagement = (props: any) => {
onSubmit=
{
CallBackTitleSearch
}
onSubmit=
{
CallBackTitleSearch
}
defaultValue=
{
{
defaultValue=
{
{
providerName
:
readyData
.
providerName
,
providerName
:
readyData
.
providerName
,
status
:
parseInt
(
readyData
.
serviceScope
)
,
status
:
readyData
.
serviceScope
?
parseInt
(
readyData
.
serviceScope
)
:
undefined
,
}
}
}
}
checklist=
{
checklist=
{
readyData
.
serviceCommunityList
.
length
!==
0
?
readyData
.
serviceCommunityList
:
null
readyData
.
serviceCommunityList
.
length
!==
0
?
readyData
.
serviceCommunityList
:
null
...
...
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