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
841925d4
Commit
841925d4
authored
Jan 27, 2021
by
cellee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi.git
into final
parents
16513394
7c658770
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
95 additions
and
64 deletions
+95
-64
ServiceProvider.ts
src/models/ServiceProvider.ts
+4
-4
login.ts
src/models/login.ts
+1
-3
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+17
-3
index.less
src/pages/CommercialService/css/index.less
+13
-13
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+8
-10
UsersAdd.less
src/pages/UserManagement/LIFEUserManagement/UsersAdd.less
+35
-0
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+14
-21
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+0
-2
index.tsx
src/pages/user/login/index.tsx
+3
-6
login.ts
src/services/login.ts
+0
-2
No files found.
src/models/ServiceProvider.ts
View file @
841925d4
...
...
@@ -65,7 +65,7 @@ export default {
// message.error("Service scope selection error!!!")
Modal
.
error
({
title
:
'Service selection error'
,
content
:
'No multiple selection are allowed once Accounting or Security
server
is being selected!'
,
content
:
'No multiple selection are allowed once Accounting or Security
Service
is being selected!'
,
});
return
;
}
...
...
@@ -91,9 +91,9 @@ export default {
// 创建成功
if
(
resp
.
error_code
===
"0000"
)
{
message
.
success
(
'Operator Success!'
,
1.5
,
()
=>
{
window
.
location
.
href
=
'/UserManagement/ServiceProviderManagement'
;
})
;
//
message.success('Operator Success!', 1.5, () => {
// })
;
window
.
location
.
href
=
'/UserManagement/ServiceProviderManagement'
;
let
CurData
:
Boolean
=
true
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
return
;
...
...
src/models/login.ts
View file @
841925d4
...
...
@@ -81,7 +81,6 @@ const Model: LoginModelType = {
effects
:
{
*
login
({
payload
},
{
call
,
put
})
{
console
.
log
(
payload
);
const
response
=
yield
call
(
AccountLogin
,
payload
.
values
);
if
(
response
.
status
===
'resetPwd'
)
{
// console.log('跳转到修改密码页面');
...
...
@@ -153,8 +152,7 @@ const Model: LoginModelType = {
// 只跳到首页
history
.
replace
(
'/'
);
}
else
{
// message.error('Login Error! Username or Password is wrong!', 3);
message
.
error
(
"Wrong account or password!"
);
yield
put
({
type
:
"setResultLogin"
,
resultLogin
:
true
,
...
...
src/pages/CommercialService/CardAdd.tsx
View file @
841925d4
...
...
@@ -108,7 +108,11 @@ const CardAdd = (props: any) => {
style=
{
{
marginRight
:
16
}
}
className=
{
styles
.
buildNumber
}
rules=
{
[
{
required
:
true
,
pattern
:
/^
\d
+$/
,
message
:
'Only number can be entered'
},
{
required
:
true
,
pattern
:
/^
\d
+$/
,
message
:
'Only numbers and letters can be entered'
,
},
]
}
>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
{
'BLK'
}
/>
...
...
@@ -119,7 +123,11 @@ const CardAdd = (props: any) => {
style=
{
{
marginRight
:
16
}
}
className=
{
styles
.
floorNumber
}
rules=
{
[
{
required
:
true
,
pattern
:
/^
\d
+$/
,
message
:
'Only number can be entered'
},
{
required
:
true
,
pattern
:
/^
\d
+$/
,
message
:
'Only numbers and letters can be entered'
,
},
]
}
>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
{
'Floor'
}
/>
...
...
@@ -128,7 +136,13 @@ const CardAdd = (props: any) => {
<
Form
.
Item
name=
"roomNumber"
className=
{
styles
.
roomNumber
}
rules=
{
[{
required
:
true
,
validator
:
checkData2
}]
}
rules=
{
[
{
required
:
true
,
pattern
:
/^
\d
+$/
,
message
:
'Only numbers and letters can be entered'
,
},
]
}
>
<
Input
style=
{
{
width
:
120
}
}
placeholder=
{
'Room'
}
/>
</
Form
.
Item
>
...
...
src/pages/CommercialService/css/index.less
View file @
841925d4
...
...
@@ -59,7 +59,7 @@
position: absolute;
top: 34px;
left: 33px;
width:
18
0px;
width:
26
0px;
z-index: 10;
background-color: #fff;
min-height: 20px;
...
...
@@ -71,21 +71,21 @@
position: absolute;
top: 34px;
left: -87px;
width:
18
0px;
width:
26
0px;
z-index: 20;
background-color: #fff;
min-height: 20px;
}
}
//
.roomNumber {
//
:global(.ant-form-item-explain) {
//
position: absolute;
//
top: 34px;
//
left: -205px;
//
width: 260px;
//
z-index: 30;
//
background-color: #fff;
//
min-height: 20px;
//
}
//
}
.roomNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -205px;
width: 260px;
z-index: 30;
background-color: #fff;
min-height: 20px;
}
}
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
841925d4
...
...
@@ -101,34 +101,32 @@ const Users = (props: any) => {
message
.
error
(
'No permissions'
);
return
false
;
}
if
(
file
.
type
!==
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
&&
file
.
type
!==
'application/vnd.ms-excel'
)
{
if
(
file
.
name
.
indexOf
(
'.xlsx'
)
===
-
1
&&
file
.
name
.
indexOf
(
'.xls'
)
===
-
1
)
{
message
.
error
(
`
${
file
.
name
}
file format is incorrect!`
);
return
false
;
}
else
{
return
true
;
}
return
(
file
.
type
===
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
||
file
.
type
===
'application/vnd.ms-excel'
);
},
onChange
(
info
:
any
)
{
if
(
info
.
file
.
status
==
'uploading'
)
{
setFileUploading
(
true
);
}
console
.
log
(
info
);
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
response
.
error_code
==
'0000'
)
{
history
.
push
(
location
.
pathname
+
'/Result'
);
}
else
if
(
info
.
file
.
response
.
error_code
==
'0002'
)
{
message
.
error
(
info
.
file
.
response
.
error_msg
);
}
else
{
}
else
if
(
info
.
file
.
response
.
error_code
==
'0001'
)
{
history
.
push
(
location
.
pathname
+
'/ResultFailed'
);
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
+
'failed count is '
+
info
.
file
.
response
.
data
.
count
,
);
}
else
{
message
.
error
(
'File upload failed'
);
setFileUploading
(
false
);
}
setFileUploading
(
false
);
}
else
if
(
info
.
file
.
status
===
'error'
)
{
...
...
src/pages/UserManagement/LIFEUserManagement/UsersAdd.less
View file @
841925d4
...
...
@@ -142,3 +142,38 @@
.ant-form-item-explain {
margin-top: 5px;
}
.buildNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: 33px;
width: 260px;
z-index: 10;
background-color: #fff;
min-height: 20px;
}
}
.floorNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -87px;
width: 260px;
z-index: 20;
background-color: #fff;
min-height: 20px;
}
}
.roomNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -205px;
width: 260px;
z-index: 30;
background-color: #fff;
min-height: 20px;
}
}
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
841925d4
...
...
@@ -39,6 +39,7 @@ const UsersAdd = (props: any) => {
values
.
owerPhone
=
null
;
values
.
owerEmail
=
null
;
values
.
buildingNumber
=
'BLK '
+
values
.
buildingNumber
;
console
.
log
(
values
);
RA
(
14
,
values
,
module
,
dispatch
);
setLoading
(
true
);
}
else
{
...
...
@@ -67,23 +68,12 @@ const UsersAdd = (props: any) => {
}
},
[
communityInfo
]);
const
checkData
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
const
checkData
=
(
rule
:
any
,
value
:
string
,
callback
:
(
arg0
?:
string
)
=>
void
)
=>
{
if
(
value
)
{
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
callback
();
}
else
{
callback
(
new
Error
(
'Only numbers and letters can be entered!'
));
}
}
callback
();
};
const
checkData1
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
/^
[
0-9
]
+$/g
.
test
(
value
))
{
callback
();
}
else
{
callback
(
new
Error
(
'Only numbers!'
));
callback
(
'Only numbers and letters can be entered!'
);
}
}
callback
();
...
...
@@ -104,12 +94,6 @@ const UsersAdd = (props: any) => {
</
div
>
</
div
>
{
/* <div className={styles.box4}>
<div className={styles.box4item0}>Contact Details</div>
<div className={styles.box4item1}><Form.Item name="owerPhone" ><Input placeholder="Phone Number" /></Form.Item></div>
<div className={styles.box4item2}><Form.Item name="owerEmail" ><Input placeholder="Email" /></Form.Item></div>
</div> */
}
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
...
...
@@ -119,13 +103,21 @@ const UsersAdd = (props: any) => {
<
Form
.
Item
>
<
Input
.
Group
>
<
div
className=
{
styles
.
box2item3
}
>
<
Form
.
Item
name=
"buildingNumber"
rules=
{
[{
validator
:
checkData1
}]
}
>
<
Form
.
Item
name=
"buildingNumber"
className=
{
styles
.
buildNumber
}
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"BLK"
style=
{
{
width
:
94
}
}
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item5
}
>
<
Form
.
Item
name=
"floorNumber"
rules=
{
[{
validator
:
checkData1
}]
}
>
<
Form
.
Item
name=
"floorNumber"
className=
{
styles
.
floorNumber
}
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/>
</
Form
.
Item
>
</
div
>
...
...
@@ -134,6 +126,7 @@ const UsersAdd = (props: any) => {
<
Form
.
Item
name=
"roomNumber"
rules=
{
[{
validator
:
checkData
}]
}
className=
{
styles
.
roomNumber
}
style=
{
{
width
:
260
}
}
>
<
Input
placeholder=
"Room"
style=
{
{
width
:
112
}
}
/>
...
...
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
841925d4
...
...
@@ -38,7 +38,6 @@ const Edit = (props: any) => {
// 处理服务范围数据
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
console
.
log
(
DataServices
);
options
=
DataServices
.
data
.
rows
.
map
((
v
:
any
)
=>
{
return
{
label
:
v
.
serviceName
,
...
...
@@ -103,7 +102,6 @@ const Edit = (props: any) => {
if
(
SaveChooseData
)
{
val
.
id
=
SaveChooseData
.
id
;
}
console
.
log
(
val
);
setload
(
true
);
TosTosServiceProviderSave
(
val
);
...
...
src/pages/user/login/index.tsx
View file @
841925d4
...
...
@@ -18,8 +18,8 @@ interface LoginProps {
}
const
Login
:
React
.
FC
<
LoginProps
>
=
(
props
)
=>
{
const
{
userLogin
=
{},
submitting
,
dispatch
}
=
props
;
const
{
status
,
type
:
loginType
,
resultLogin
}
=
userLogin
;
const
{
userLogin
=
{},
dispatch
}
=
props
;
const
{
resultLogin
}
=
userLogin
;
const
[
userName
,
setUsername
]
=
useState
(
''
);
const
[
forgetflag
,
setForgetFlag
]
=
useState
(
false
);
...
...
@@ -36,7 +36,6 @@ const Login: React.FC<LoginProps> = (props) => {
if
(
location
.
pathname
===
'/user/login'
)
{
const
name
=
getCookie
(
'remenberUserName'
);
const
Pwd
=
getCookie
(
'remenberPwd'
);
console
.
log
(
name
,
Pwd
);
if
(
Pwd
&&
name
)
{
setRemenber
(
true
);
const
values
=
{
...
...
@@ -63,7 +62,7 @@ const Login: React.FC<LoginProps> = (props) => {
payload
:
userName
,
});
}
else
{
message
.
error
(
'MemberCode!'
);
message
.
error
(
'MemberCode!
!!
'
);
dispatch
({
type
:
'login/setResult'
,
payload
:
{
...
...
@@ -105,7 +104,6 @@ const Login: React.FC<LoginProps> = (props) => {
userName
!==
''
&&
/^
[
a-z0-9
]
+
([
._
\\
-
]
*
[
a-z0-9
])
*@
([
a-z0-9
]
+
[
-a-z0-9
]
*
[
a-z0-9
]
+.
){1,63}[
a-z0-9
]
+$/
.
test
(
userName
)
)
{
console
.
log
(
'邮箱正确!'
);
onGetCaptcha
(
userName
);
}
else
{
message
.
warning
(
'Please enter the correct email address!'
);
...
...
@@ -123,7 +121,6 @@ const Login: React.FC<LoginProps> = (props) => {
// getCaptcha
setTiming
(
true
);
const
result
=
await
getCaptcha
({
account
:
email
});
console
.
log
(
result
);
if
(
result
.
error_code
===
'0000'
)
{
message
.
success
(
'Has Been Sent!'
);
}
else
{
...
...
src/services/login.ts
View file @
841925d4
...
...
@@ -21,8 +21,6 @@ export interface PwdType {
}
export
async
function
AccountLogin
(
params
:
LoginParamsType
)
{
console
.
log
(
'登录请求'
);
console
.
log
(
params
);
return
request
(
'/tos/user/login'
,
{
method
:
'POST'
,
data
:
params
});
}
...
...
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