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
456aff51
Commit
456aff51
authored
Jan 20, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除设施
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
57d20fdc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
5 deletions
+43
-5
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+19
-1
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+22
-3
params.ts
src/utils/params.ts
+2
-1
No files found.
src/models/CommunityManagement/FacilityBookings.ts
View file @
456aff51
...
...
@@ -35,6 +35,7 @@ export default {
Remaining
:
null
,
FacilityDelete
:
null
,
},
...
...
@@ -90,6 +91,11 @@ export default {
return
{
...
state
,
Remaining
};
},
//删除设施结果
FacilityDelete
(
state
,
{
FacilityDelete
})
{
return
{
...
state
,
FacilityDelete
};
},
},
effects
:
{
...
...
@@ -118,7 +124,7 @@ export default {
}
else
{
// console.log('===========================')
// console.log(playload)
// console.log(playload
.index
)
switch
(
playload
.
index
)
{
case
1
:
{
...
...
@@ -202,6 +208,14 @@ export default {
let
Remaining
=
resp
.
data
;
yield
put
({
type
:
'Remaining'
,
Remaining
});
}
break
;
// 设施删除
case
61
:
{
let
FacilityDelete
=
{
data
:
'ok'
};
yield
put
({
type
:
'FacilityDelete'
,
FacilityDelete
});
}
break
;
}
...
...
@@ -243,6 +257,10 @@ export default {
yield
put
({
type
:
'Remaining'
,
Remaining
})
},
*
FacilityDel
(
state
,
{
put
})
{
let
FacilityDelete
=
null
;
yield
put
({
type
:
'FacilityDelete'
,
FacilityDelete
})
},
},
};
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
456aff51
...
...
@@ -35,7 +35,7 @@ const FacilityTow = (props: any) => {
dispatch
,
location
,
DataSaveDetail
,
sourceData
,
FacilityDelete
,
DataSave
,
Result
,
load
,
...
...
@@ -144,6 +144,16 @@ const FacilityTow = (props: any) => {
}
},
[
DataSaveDetail
]);
// 设施删除结果
useEffect
(()
=>
{
if
(
FacilityDelete
)
{
message
.
success
(
'Closed Successfully!'
);
setIsModalVisible
(
false
);
history
.
push
(
'/CommunityManagement/FacilityBookings'
);
dispatch
({
type
:
'FacilityBookings/FacilityDel'
});
}
},
[
FacilityDelete
]);
// tab 切换
const
onTabClicks
=
(
id
:
String
)
=>
{
// 清空设施图片
...
...
@@ -270,7 +280,8 @@ const FacilityTow = (props: any) => {
// 确认删除
const
handleOk
=
()
=>
{
// setIsModalVisible(false);
message
.
info
(
'In function development'
);
// message.info('In function development');
RA
(
61
,
{
id
:
DataSaveDetail
.
facilities
.
id
});
};
// 关闭关闭框
...
...
@@ -529,7 +540,14 @@ const FacilityTow = (props: any) => {
};
function
mapStateToProps
(
state
:
any
)
{
const
{
sourceData
,
DataSave
,
DataSaveDetail
,
Result
,
FacilitysList
}
=
state
.
FacilityBookings
;
const
{
sourceData
,
DataSave
,
DataSaveDetail
,
Result
,
FacilitysList
,
FacilityDelete
,
}
=
state
.
FacilityBookings
;
const
{
token
}
=
state
.
login
;
const
load
=
state
.
loading
.
models
.
FacilityBookings
||
false
;
return
{
...
...
@@ -540,6 +558,7 @@ function mapStateToProps(state: any) {
Result
,
load
,
FacilitysList
,
FacilityDelete
,
// 设施删除结果
};
}
export
default
connect
(
mapStateToProps
)(
FacilityTow
);
src/utils/params.ts
View file @
456aff51
/*
* @Author: your name
* @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-01-
15 18:52:31
* @LastEditTime: 2021-01-
20 17:30:05
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts
...
...
@@ -93,4 +93,5 @@ export const requestList = [
[
'/tos/community/categories/subscribe/reservationInfo'
,
'58 获取小区设施可预约次数'
,
{}],
[
'/tos/bug/feedback/list'
,
'59 获取用户反馈列表'
,
{}],
[
'/tos/community/facilities/get/detail'
,
'60 获取小区设施详情'
,
{}],
[
'/tos/bookingService/delete'
,
'61 设施删除'
,
{}],
];
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