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
3bfc14e6
Commit
3bfc14e6
authored
Feb 01, 2021
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录和用户模块提示删除
parent
e31991a0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
103 additions
and
160 deletions
+103
-160
User.ts
src/models/CommunityManagement/User.ts
+65
-78
login.ts
src/models/login.ts
+3
-5
user.ts
src/models/user.ts
+5
-7
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+10
-13
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+20
-52
Services.tsx
...ges/UserManagement/ServiceProviderManagement/Services.tsx
+0
-5
No files found.
src/models/CommunityManagement/User.ts
View file @
3bfc14e6
import
*
as
service
from
'../../services/tos
'
;
import
{
history
}
from
'umi
'
;
import
{
message
}
from
'antd'
;
import
{
message
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
*
as
service
from
'../../services/tos'
;
import
{
routerRedux
}
from
'dva/router'
;
export
default
{
export
default
{
namespace
:
'User'
,
namespace
:
'User'
,
...
@@ -24,7 +22,7 @@ export default {
...
@@ -24,7 +22,7 @@ export default {
DataServices
:
null
,
DataServices
:
null
,
Data4Error
:
null
,
Data4Error
:
false
,
},
},
reducers
:
{
reducers
:
{
...
@@ -74,186 +72,175 @@ export default {
...
@@ -74,186 +72,175 @@ export default {
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
12
:
case
12
:
{
{
le
t
Data
=
null
;
cons
t
Data
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
break
;
break
;
case
13
:
case
13
:
{
{
le
t
DataSaveDetail
=
null
;
cons
t
DataSaveDetail
=
null
;
le
t
returnValue
=
null
;
cons
t
returnValue
=
null
;
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
,
returnValue
});
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
,
returnValue
});
}
}
break
;
break
;
case
43
:
case
43
:
{
{
le
t
DataServices
=
null
;
cons
t
DataServices
=
null
;
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
}
}
break
;
break
;
default
:
break
;
}
}
const
resp
=
yield
call
(
service
.
RA
,
playload
);
const
resp
=
yield
call
(
service
.
RA
,
playload
);
console
.
log
(
'resp'
,
resp
);
if
(
resp
.
code
==
500
||
resp
.
error_code
!=
'0000'
)
{
// message.error('Server Error,try again,error code:500', 3);
// window.location.href = '/500';
// message.error(resp.msg);
}
if
(
resp
.
error_code
!=
'0000'
)
{
if
(
resp
.
error_code
!=
=
'0000'
)
{
if
(
playload
.
index
!==
53
)
{
if
(
playload
.
index
!==
53
)
{
message
.
error
(
`
${
resp
.
error_
code
}
:
${
resp
.
error_
msg
}
`
);
message
.
error
(
`
${
resp
.
error_msg
}
`
);
}
}
var
Data3Error
=
null
;
let
Data3Error
=
null
;
var
Result
=
null
;
let
Result
=
null
;
let
Data4Error
=
null
;
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
11
:
case
11
:
{
Data3Error
=
{
msg
:
'Information Wrong!'
};
Data3Error
=
{
msg
:
'Information Wrong!'
};
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
}
break
;
break
;
case
13
:
case
13
:
{
// message.error('Request exception please retry!!!');
// message.error('Request exception please retry!!!');
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
}
break
;
break
;
// 删除失败的案例
// 删除失败的案例
case
16
:
case
16
:
{
Result
=
resp
;
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
}
break
;
break
;
case
14
:
case
14
:
{
{
Data4Error
=
{
msg
:
'The community or unit is already registered!'
};
const
Data4Error
=
true
;
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
}
}
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
break
;
break
;
case
18
:
case
18
:
case
53
:
case
53
:
{
Result
=
resp
;
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
})
;
yield
put
({
type
:
'returnResult'
,
Result
})
;
break
;
}
default
:
break
;
break
;
}
}
}
else
{
}
else
{
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
12
:
case
12
:
{
{
le
t
Data
=
resp
;
cons
t
Data
=
resp
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
break
;
break
;
case
18
:
case
18
:
case
14
:
case
14
:
{
// window.location.href = '/CommunityManagement/FacilityBookings';
message
.
success
(
'Success Operation!'
);
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
// window.location.href = '/CommunityManagement/FacilityBookings';
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
}
break
;
break
;
case
13
:
case
13
:
{
{
le
t
DataSaveDetail
=
resp
.
data
;
cons
t
DataSaveDetail
=
resp
.
data
;
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
});
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
});
}
}
break
;
break
;
case
16
:
case
16
:
{
{
console
.
log
(
'等待删除完成'
);
const
returnValue
=
resp
;
var
returnValue
=
resp
;
yield
put
({
type
:
'ReturnValue'
,
returnValue
});
yield
put
({
type
:
'ReturnValue'
,
returnValue
});
}
}
break
;
break
;
case
32
:
case
32
:
{
{
le
t
communityInfo
=
resp
;
cons
t
communityInfo
=
resp
;
yield
put
({
type
:
'returnCommunityInfo'
,
communityInfo
});
yield
put
({
type
:
'returnCommunityInfo'
,
communityInfo
});
}
}
break
;
break
;
case
39
:
case
39
:
{
{
le
t
memberResult
=
resp
;
cons
t
memberResult
=
resp
;
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
}
}
break
;
break
;
case
43
:
case
43
:
{
{
le
t
DataServices
=
resp
;
cons
t
DataServices
=
resp
;
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
}
}
break
;
break
;
case
44
:
{
case
44
:
let
Result
=
resp
;
{
yield
put
({
type
:
'returnResult'
,
Result
});
const
Result
=
resp
;
}
yield
put
({
type
:
'returnResult'
,
Result
});
}
break
;
default
:
break
;
}
}
}
}
},
},
*
IA
({
},
{
put
}:
any
)
{
*
IA
({
},
{
call
,
put
}:
any
)
{
var
Data3
=
null
;
const
Data3
=
null
;
yield
put
({
type
:
'returnPage3'
,
Data3
});
yield
put
({
type
:
'returnPage3'
,
Data3
});
},
},
*
IA2
({
},
{
put
}:
any
)
{
*
IA2
({
},
{
call
,
put
}:
any
)
{
var
Data3Error
=
null
;
const
Data3Error
=
null
;
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
},
},
*
SA
({
playload
}:
any
,
{
put
}:
any
)
{
*
SA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
DataSave
=
playload
;
const
DataSave
=
playload
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
},
*
CA
({
playload
}:
any
,
{
put
}:
any
)
{
*
CA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
sourceData
=
playload
;
const
sourceData
=
playload
;
yield
put
({
type
:
'returnSource'
,
sourceData
});
yield
put
({
type
:
'returnSource'
,
sourceData
});
},
},
*
QA
({
playload
}:
any
,
{
put
}:
any
)
{
*
QA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
curString
=
playload
;
const
curString
=
playload
;
yield
put
({
type
:
'returnCurString'
,
curString
});
yield
put
({
type
:
'returnCurString'
,
curString
});
},
},
*
ResultClear
({
}
,
{
put
}:
any
)
{
*
ResultClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
var
tmp
=
null
;
const
tmp
=
null
;
yield
put
({
type
:
'returnResult'
,
tmp
});
yield
put
({
type
:
'returnResult'
,
tmp
});
},
},
*
PAGE
({
playload
}:
any
,
{
put
}:
any
)
{
*
PAGE
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
pageDate
=
playload
;
const
pageDate
=
playload
;
yield
put
({
type
:
'PageDate'
,
pageDate
});
yield
put
({
type
:
'PageDate'
,
pageDate
});
},
},
*
DataClear
({
}
,
{
put
}:
any
)
{
*
DataClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
var
pageDate
=
null
;
const
pageDate
=
null
;
yield
put
({
type
:
'returnPage'
,
pageDate
});
yield
put
({
type
:
'returnPage'
,
pageDate
});
},
},
*
MemberResultClear
({
}
,
{
put
}:
any
)
{
*
MemberResultClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
le
t
memberResult
=
null
;
cons
t
memberResult
=
null
;
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
},
},
*
Data4ErrorClear
({
}
,
{
put
}:
any
)
{
*
Data4ErrorClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
let
Data4Error
=
null
;
const
Data4Error
=
false
;
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
},
},
*
ClearResult
({
}
,
{
put
}:
any
)
{
*
ClearResult
({
}
:
any
,
{
call
,
put
}:
any
)
{
le
t
Result
=
null
;
cons
t
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
*
ClearReturnValue
({
}
,
{
put
}:
any
)
{
*
ClearReturnValue
({
}
:
any
,
{
call
,
put
}:
any
)
{
le
t
returnValue
=
null
;
cons
t
returnValue
=
null
;
yield
put
({
type
:
"ReturnValue"
,
returnValue
})
yield
put
({
type
:
"ReturnValue"
,
returnValue
})
}
}
},
},
...
...
src/models/login.ts
View file @
3bfc14e6
...
@@ -109,9 +109,7 @@ const Model: LoginModelType = {
...
@@ -109,9 +109,7 @@ const Model: LoginModelType = {
setCookie
(
"remenberUserName"
,
""
,
-
1
)
setCookie
(
"remenberUserName"
,
""
,
-
1
)
setCookie
(
"remenberPwd"
,
""
,
-
1
)
setCookie
(
"remenberPwd"
,
""
,
-
1
)
}
}
// Login successfully response.status === 'ok'
const
userMessage
=
yield
call
(
AccountCheckLogin
,
payload
.
values
);
// 请求时间网络
message
.
success
(
'Login Successfully!'
,
3
);
const
userMessage
=
yield
call
(
AccountCheckLogin
,
payload
.
values
);
//请求时间网络
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'id'
,
userMessage
.
userModel
.
id
);
setCookie
(
'id'
,
userMessage
.
userModel
.
id
);
...
@@ -199,7 +197,7 @@ const Model: LoginModelType = {
...
@@ -199,7 +197,7 @@ const Model: LoginModelType = {
}
}
},
},
*
goResetPwd
({
payload
},
{
call
,
put
})
{
*
goResetPwd
({
payload
},
{
put
})
{
yield
put
({
yield
put
({
type
:
'resetPwd'
,
type
:
'resetPwd'
,
result
:
true
,
result
:
true
,
...
@@ -209,7 +207,7 @@ const Model: LoginModelType = {
...
@@ -209,7 +207,7 @@ const Model: LoginModelType = {
history
.
push
(
'login2'
);
history
.
push
(
'login2'
);
},
},
*
setResult
({
payload
},
{
call
,
put
})
{
*
setResult
({
payload
},
{
put
})
{
yield
put
({
yield
put
({
type
:
"setResultLogin"
,
type
:
"setResultLogin"
,
resultLogin
:
payload
.
resultLogin
||
false
,
resultLogin
:
payload
.
resultLogin
||
false
,
...
...
src/models/user.ts
View file @
3bfc14e6
...
@@ -37,8 +37,7 @@ const UserModel: UserModelType = {
...
@@ -37,8 +37,7 @@ const UserModel: UserModelType = {
},
},
effects
:
{
effects
:
{
*
fetch
(
_
,
{
call
,
put
})
{
*
fetch
()
{
console
.
log
(
call
);
// const response = yield call(queryUsers);
// const response = yield call(queryUsers);
// console.error(response)
// console.error(response)
// yield put({
// yield put({
...
@@ -49,11 +48,10 @@ const UserModel: UserModelType = {
...
@@ -49,11 +48,10 @@ const UserModel: UserModelType = {
*
fetchCurrent
({
playload
},
{
call
,
put
})
{
*
fetchCurrent
({
playload
},
{
call
,
put
})
{
// console.log("response")
// console.log("response")
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
||
'null'
);
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
||
'null'
);
console
.
log
(
'存储用户信息'
);
console
.
log
(
userInfo
);
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
const
response
=
yield
call
(
queryCurrent
,
playload
);
const
response
=
yield
call
(
queryCurrent
,
playload
);
console
.
log
(
response
);
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
response
));
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
response
));
yield
put
({
yield
put
({
type
:
'saveCurrentUser'
,
type
:
'saveCurrentUser'
,
...
@@ -67,7 +65,7 @@ const UserModel: UserModelType = {
...
@@ -67,7 +65,7 @@ const UserModel: UserModelType = {
}
}
},
},
*
deleteCurrent
({
p
layload
},
{
call
,
p
ut
})
{
*
deleteCurrent
({
put
})
{
yield
put
({
yield
put
({
type
:
'deleteCurrentUser'
,
type
:
'deleteCurrentUser'
,
});
});
...
@@ -81,7 +79,7 @@ const UserModel: UserModelType = {
...
@@ -81,7 +79,7 @@ const UserModel: UserModelType = {
currentUser
:
action
.
payload
||
{},
currentUser
:
action
.
payload
||
{},
};
};
},
},
deleteCurrentUser
(
state
,
action
)
{
deleteCurrentUser
(
state
)
{
return
{
return
{
...
state
,
...
state
,
currentUser
:
{},
currentUser
:
{},
...
...
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
3bfc14e6
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Spin
,
Button
,
Form
,
message
}
from
'antd'
;
import
{
Input
,
Spin
,
Button
,
Form
,
message
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
styles
from
'./UsersAdd.less'
;
import
styles
from
'./UsersAdd.less'
;
import
Line
from
'../../../components/Line/Line'
;
import
Line
from
'../../../components/Line/Line'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
SearchOptionsCommnity
from
'../../../components/SearchOptions/SearchOptionsCommnity'
;
import
SearchOptionsCommnity
from
'../../../components/SearchOptions/SearchOptionsCommnity'
;
import
{
checkParam
,
RA
,
Clear
}
from
'../../../utils/method'
;
import
{
checkParam
,
RA
}
from
'../../../utils/method'
;
import
{
validateMessages
}
from
'@/utils/params'
;
const
module
=
'User'
;
const
module
=
'User'
;
const
UsersAdd
=
(
props
:
any
)
=>
{
const
UsersAdd
=
(
props
:
any
)
=>
{
...
@@ -21,11 +19,11 @@ const UsersAdd = (props: any) => {
...
@@ -21,11 +19,11 @@ const UsersAdd = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Data4Error
)
{
if
(
Data4Error
)
{
if
(
Data4Error
.
msg
)
{
setLoading
(
false
);
setLoading
(
false
);
dispatch
({
message
.
error
(
Data4Error
.
msg
,
3
);
type
:
`
${
module
}
/Data4ErrorClear`
,
Clear
(
module
+
'/Data4ErrorClear'
,
dispatch
);
payload
:
{},
}
}
);
}
}
},
[
Data4Error
]);
},
[
Data4Error
]);
...
@@ -39,17 +37,16 @@ const UsersAdd = (props: any) => {
...
@@ -39,17 +37,16 @@ const UsersAdd = (props: any) => {
values
.
owerPhone
=
null
;
values
.
owerPhone
=
null
;
values
.
owerEmail
=
null
;
values
.
owerEmail
=
null
;
values
.
buildingNumber
=
'BLK '
+
values
.
buildingNumber
;
values
.
buildingNumber
=
'BLK '
+
values
.
buildingNumber
;
console
.
log
(
values
);
RA
(
14
,
values
,
module
,
dispatch
);
RA
(
14
,
values
,
module
,
dispatch
);
setLoading
(
true
);
setLoading
(
true
);
}
else
{
}
else
{
setLoading
(
false
);
setLoading
(
false
);
message
.
error
(
'Error,Please finish it,not empty!'
,
3
);
message
.
error
(
'Error,Please finish it,not empty!'
);
}
}
};
};
const
extendName
=
(
values
:
any
)
=>
{
const
extendName
=
(
values
:
any
)
=>
{
var
tmp
=
postman
;
const
tmp
=
postman
;
tmp
.
extend
=
values
;
tmp
.
extend
=
values
;
RA
(
32
,
{
communityName
:
values
},
module
,
dispatch
);
RA
(
32
,
{
communityName
:
values
},
module
,
dispatch
);
setPostman
(
tmp
);
setPostman
(
tmp
);
...
@@ -82,7 +79,7 @@ const UsersAdd = (props: any) => {
...
@@ -82,7 +79,7 @@ const UsersAdd = (props: any) => {
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
TitleBack
title=
{
'Create New Owner'
}
/>
<
TitleBack
title=
"Create New Owner"
/>
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1
}
>
...
...
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
3bfc14e6
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Modal
,
Button
,
Form
,
Row
,
Col
,
message
,
Spin
}
from
'antd'
;
import
{
Input
,
Modal
,
Button
,
Form
,
Row
,
Col
,
message
,
Spin
}
from
'antd'
;
const
{
confirm
}
=
Modal
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
connect
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
styles
from
'./UsersAdd.less'
;
import
Line
from
'../../../components/Line/Line'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
{
checkParam
}
from
'../../../utils/method'
;
import
TableShow
from
'@/components/TableShow/TableShow'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
TableShow
from
'@/components/TableShow/TableShow'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
checkParam
}
from
'../../../utils/method'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
Line
from
'../../../components/Line/Line'
;
import
styles
from
'./UsersAdd.less'
;
const
{
confirm
}
=
Modal
;
const
UsersDetail
=
(
props
:
any
)
=>
{
const
UsersDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataSave
,
DataSaveDetail
,
Result
,
returnValue
,
memberResult
}
=
props
;
const
{
dispatch
,
DataSave
,
DataSaveDetail
,
Result
,
returnValue
,
memberResult
,
location
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
dispatch
({
type
:
'User/RA'
,
type
:
'User/RA'
,
playload
:
{
playload
:
{
index
:
index
,
index
,
body
:
values
,
body
:
values
,
},
},
});
});
...
@@ -61,11 +60,6 @@ const UsersDetail = (props: any) => {
...
@@ -61,11 +60,6 @@ const UsersDetail = (props: any) => {
}
else
{
}
else
{
values
.
id
=
null
;
values
.
id
=
null
;
}
}
var
tmp
=
Object
.
keys
(
values
);
console
.
log
(
'添加业主提交的参数:'
+
tmp
.
length
);
console
.
log
(
values
);
if
(
checkParam
(
values
))
{
if
(
checkParam
(
values
))
{
setVisible
(
true
);
setVisible
(
true
);
RA
(
18
,
values
);
RA
(
18
,
values
);
...
@@ -77,30 +71,18 @@ const UsersDetail = (props: any) => {
...
@@ -77,30 +71,18 @@ const UsersDetail = (props: any) => {
// 监听删除结果
// 监听删除结果
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
console
.
log
(
Result
);
if
(
Result
.
error_code
!==
'0000'
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
message
.
error
(
Result
.
error_msg
);
message
.
error
(
Result
.
error_msg
);
ResultClear
();
ResultClear
();
history
.
go
(
0
);
history
.
back
(
);
}
}
}
}
},
[
Result
]);
},
[
Result
]);
// 监听返回内容
// 监听返回内容
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
returnValue
);
if
(
returnValue
!=
null
)
{
if
(
returnValue
!=
null
)
{
if
(
returnValue
.
error_code
!==
'0001'
)
{
if
(
returnValue
.
error_code
!==
'0001'
)
{
message
.
success
(
'Delete Successfully!'
,
3
);
// RA(13, {
// id: DataSave.id,
// owerName: DataSave.owerName,
// enable: DataSave.enable,
// buildingNumber: DataSave.buildingNumber,
// floorNumber: DataSave.floorNumber,
// roomNumber: DataSave.roomNumber,
// });
dispatch
({
dispatch
({
type
:
'User/ClearReturnValue'
,
type
:
'User/ClearReturnValue'
,
playload
:
{},
playload
:
{},
...
@@ -116,9 +98,7 @@ const UsersDetail = (props: any) => {
...
@@ -116,9 +98,7 @@ const UsersDetail = (props: any) => {
// 监听数据返回
// 监听数据返回
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
console
.
log
(
'给予页面数据'
);
const
tmp
=
{
console
.
log
(
DataSave
);
var
tmp
=
{
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
owerPhone
:
DataSave
.
owerPhone
,
owerPhone
:
DataSave
.
owerPhone
,
owerEmail
:
DataSave
.
owerEmail
,
owerEmail
:
DataSave
.
owerEmail
,
...
@@ -133,25 +113,22 @@ const UsersDetail = (props: any) => {
...
@@ -133,25 +113,22 @@ const UsersDetail = (props: any) => {
roomNumber
:
DataSave
.
roomNumber
,
roomNumber
:
DataSave
.
roomNumber
,
});
});
}
else
{
}
else
{
history
.
go
(
-
1
);
history
.
back
(
);
}
}
},
[
DataSave
]);
},
[
DataSave
]);
// 监听数据返回
// 监听数据返回
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSaveDetail
!=
null
)
{
if
(
DataSaveDetail
!=
null
)
{
console
.
log
(
'页面数据副歌'
);
console
.
log
(
DataSaveDetail
);
setDataSaveLoading
(
false
);
setDataSaveLoading
(
false
);
}
}
},
[
DataSaveDetail
]);
},
[
DataSaveDetail
]);
// 存储住户详情页的数据
// 存储住户详情页的数据
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
memberDetail
);
if
(
DataSave
)
{
if
(
DataSave
)
{
if
(
!
memberDetail
)
{
if
(
!
memberDetail
)
{
var
tmp
=
{
const
tmp
=
{
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
owerPhone
:
DataSave
.
owerPhone
,
owerPhone
:
DataSave
.
owerPhone
,
owerEmail
:
DataSave
.
owerEmail
,
owerEmail
:
DataSave
.
owerEmail
,
...
@@ -170,8 +147,6 @@ const UsersDetail = (props: any) => {
...
@@ -170,8 +147,6 @@ const UsersDetail = (props: any) => {
// 住户详情页
// 住户详情页
const
tableShowCallback
=
(
values
:
any
)
=>
{
const
tableShowCallback
=
(
values
:
any
)
=>
{
console
.
log
(
'成员信息'
);
console
.
log
(
values
);
setMemberData
(
values
);
setMemberData
(
values
);
setMemberDetail
(
true
);
setMemberDetail
(
true
);
...
@@ -193,8 +168,7 @@ const UsersDetail = (props: any) => {
...
@@ -193,8 +168,7 @@ const UsersDetail = (props: any) => {
onCancel
()
{},
onCancel
()
{},
onOk
()
{
onOk
()
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
// console.log(DataSave);
const
tmp
=
{
var
tmp
=
{
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
communityName
:
DataSave
.
communityName
,
communityName
:
DataSave
.
communityName
,
unit
:
values
,
unit
:
values
,
...
@@ -206,8 +180,7 @@ const UsersDetail = (props: any) => {
...
@@ -206,8 +180,7 @@ const UsersDetail = (props: any) => {
};
};
// 删除住户
// 删除住户
const
DeleteMember
=
(
values
:
any
,
e
:
any
)
=>
{
const
DeleteMember
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
if
(
permissionArr
.
indexOf
(
'7'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'7'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
...
@@ -237,7 +210,6 @@ const UsersDetail = (props: any) => {
...
@@ -237,7 +210,6 @@ const UsersDetail = (props: any) => {
if
(
memberResult
!=
null
)
{
if
(
memberResult
!=
null
)
{
setMemberDetail
(
false
);
setMemberDetail
(
false
);
setLoadding
(
false
);
setLoadding
(
false
);
message
.
success
(
'Successfully delete!!!'
);
RA
(
13
,
{
RA
(
13
,
{
id
:
DataSave
.
id
,
id
:
DataSave
.
id
,
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
...
@@ -265,7 +237,7 @@ const UsersDetail = (props: any) => {
...
@@ -265,7 +237,7 @@ const UsersDetail = (props: any) => {
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
Spin
spinning=
{
visible
}
tip=
"Loading Submit"
>
<
Spin
spinning=
{
visible
}
tip=
"Loading Submit"
>
{
memberDetail
==
false
?
(
{
memberDetail
==
=
false
?
(
<>
<>
{
DataSave
!=
null
?
(
{
DataSave
!=
null
?
(
<>
<>
...
@@ -290,7 +262,7 @@ const UsersDetail = (props: any) => {
...
@@ -290,7 +262,7 @@ const UsersDetail = (props: any) => {
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
</
div
>
</
div
>
{
DataSave
.
enable
==
1
?
(
{
DataSave
.
enable
==
=
1
?
(
<>
<>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item0
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box4item0
}
>
Contact Details
</
div
>
...
@@ -353,11 +325,7 @@ const UsersDetail = (props: any) => {
...
@@ -353,11 +325,7 @@ const UsersDetail = (props: any) => {
<>
<>
<
Spin
spinning=
{
loadding
}
>
<
Spin
spinning=
{
loadding
}
>
<
div
>
<
div
>
<
TitleBack
<
TitleBack
title=
"Family/Tenant Details"
url=
"none"
titleBack=
{
titleBackCallBack
}
/>
title=
{
'Family/Tenant Details'
}
url=
"none"
titleBack=
{
titleBackCallBack
}
></
TitleBack
>
<
Row
>
<
Row
>
<
Col
span=
{
4
}
>
User Type:
</
Col
>
<
Col
span=
{
4
}
>
User Type:
</
Col
>
<
Col
span=
{
4
}
>
<
Col
span=
{
4
}
>
...
@@ -375,7 +343,7 @@ const UsersDetail = (props: any) => {
...
@@ -375,7 +343,7 @@ const UsersDetail = (props: any) => {
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_phone
}
</
Col
>
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_phone
}
</
Col
>
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_email
}
</
Col
>
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_email
}
</
Col
>
</
Row
>
</
Row
>
<
Line
></
Line
>
<
Line
/
>
<
Button
danger
onClick=
{
DeleteMember
.
bind
(
this
,
memberData
)
}
>
<
Button
danger
onClick=
{
DeleteMember
.
bind
(
this
,
memberData
)
}
>
Delete
Delete
...
...
src/pages/UserManagement/ServiceProviderManagement/Services.tsx
View file @
3bfc14e6
...
@@ -24,14 +24,12 @@ const Services = (props: any) => {
...
@@ -24,14 +24,12 @@ const Services = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
if
(
DataServices
!=
null
)
{
console
.
log
(
DataServices
);
setDataList
(
DataServices
.
data
.
rows
);
setDataList
(
DataServices
.
data
.
rows
);
let
tmp
=
DataServices
.
data
.
rows
.
map
(
let
tmp
=
DataServices
.
data
.
rows
.
map
(
(
v
:
{
serviceName
:
string
;
deleted
:
number
},
i
:
number
)
=>
{
(
v
:
{
serviceName
:
string
;
deleted
:
number
},
i
:
number
)
=>
{
return
v
.
deleted
!==
1
&&
v
.
serviceName
;
return
v
.
deleted
!==
1
&&
v
.
serviceName
;
},
},
);
);
console
.
log
(
tmp
);
formRef
.
current
[
'setFieldsValue'
]({
serviceName
:
tmp
});
formRef
.
current
[
'setFieldsValue'
]({
serviceName
:
tmp
});
}
}
},
[
DataServices
]);
},
[
DataServices
]);
...
@@ -66,12 +64,9 @@ const Services = (props: any) => {
...
@@ -66,12 +64,9 @@ const Services = (props: any) => {
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
Result
);
if
(
Result
)
{
if
(
Result
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
message
.
error
(
'Failed: binding service provider!!!'
);
message
.
error
(
'Failed: binding service provider!!!'
);
}
else
{
message
.
success
(
'Operate Success!!!'
);
}
}
Clear
(
module
+
'/ClearResult'
,
dispatch
);
Clear
(
module
+
'/ClearResult'
,
dispatch
);
RA
(
43
,
{},
module
,
dispatch
);
RA
(
43
,
{},
module
,
dispatch
);
...
...
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