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
3e3454b4
Commit
3e3454b4
authored
Jan 19, 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
0a284db6
e0bf3148
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
58 additions
and
66 deletions
+58
-66
UserLayout.less
src/layouts/UserLayout.less
+34
-0
UserLayout.tsx
src/layouts/UserLayout.tsx
+0
-23
ResultPageFailed.tsx
...es/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
+7
-5
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+7
-4
index.tsx
src/pages/user/login/index.tsx
+0
-1
login2.tsx
src/pages/user/login/login2.tsx
+0
-7
style.less
src/pages/user/login/style.less
+0
-16
method.ts
src/utils/method.ts
+10
-10
No files found.
src/layouts/UserLayout.less
View file @
3e3454b4
...
...
@@ -28,6 +28,23 @@
padding: 60px 80px;
box-shadow: 1px 2px 20px 0px #ccc;
border-radius: 30px;
:global {
.ant-form-item-has-error .ant-input,
.ant-form-item-has-error .ant-input-affix-wrapper,
.ant-form-item-has-error .ant-input:hover,
.ant-form-item-has-error .ant-input-affix-wrapper:hover {
background: transparent !important;
}
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-text-fill-color: #6a912cff !important;
transition: background-color 50000s ease-in-out 0s;
}
}
.lang {
...
...
@@ -63,6 +80,23 @@
padding: 60px 80px;
box-shadow: 1px 2px 20px 0px #ccc;
border-radius: 30px;
:global {
.ant-form-item-has-error .ant-input,
.ant-form-item-has-error .ant-input-affix-wrapper,
.ant-form-item-has-error .ant-input:hover,
.ant-form-item-has-error .ant-input-affix-wrapper:hover {
background: transparent !important;
}
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-text-fill-color: #6a912cff !important;
transition: background-color 50000s ease-in-out 0s;
}
}
}
...
...
src/layouts/UserLayout.tsx
View file @
3e3454b4
...
...
@@ -35,29 +35,6 @@ const UserLayout: React.FC<UserLayoutProps> = (props) => {
...
props
,
});
// useEffect(() => {
// console.log(location.pathname);
// if (location.pathname === '/user/login2') {
// console.log('更改ui');
// dispatch &&
// dispatch({
// type: 'login/goResetPwd',
// payload: {
// result: true,
// },
// });
// } else {
// dispatch &&
// dispatch({
// type: 'login/goResetPwd',
// payload: {
// result: false,
// },
// });
// }
// }, [location]);
console
.
log
(
result
);
return
(
<
div
className=
{
styles
.
container
+
' '
+
(
result
?
styles
.
active
:
''
)
}
>
<
div
className=
{
styles
.
contain
}
>
...
...
src/pages/UserManagement/LIFEUserManagement/ResultPageFailed.tsx
View file @
3e3454b4
...
...
@@ -2,11 +2,12 @@ import React, { useState, useEffect } from 'react';
import
{
Result
,
Button
,
message
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
// const { REACT_APP_ENV } = process.env;
const
module
=
'User'
;
const
ResultPageFailed
=
()
=>
{
const
[
resultId
,
setResultId
]
=
useState
(
''
);
const
[
flag
,
setFlag
]
=
useState
(
true
);
const
backPage
=
()
=>
{
history
.
go
(
-
1
);
};
...
...
@@ -33,13 +34,14 @@ const ResultPageFailed = () => {
extra=
{
[
<
Button
type=
"primary"
key=
"ok"
onClick=
{
handleDownload
}
>
{
flag
?
(
<
a
href=
{
'http://192.168.1.28:8651/tos/excel/down?operator_id='
+
resultId
}
>
Download
</
a
>
)
:
(
// <a href=
{
'http://47.74.233.180:8651/tos/excel/down?operator_id='
+
resultId
}
>
// Download
// </a>
// <a href=
{
'http://192.168.1.28:8651/tos/excel/down?operator_id='
+
resultId
}
>
// Download
// </a>
<
a
href=
{
'/tos/excel/down?operator_id='
+
resultId
}
>
Download
</
a
>
)
:
(
'Download'
)
}
</
Button
>,
...
...
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
3e3454b4
...
...
@@ -30,6 +30,7 @@ let readyData: any = {
// 节流阀
let
flag
:
boolean
=
false
;
const
Users
=
(
props
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
const
{
formatMessage
}
=
useIntl
();
...
...
@@ -94,10 +95,12 @@ const Users = (props: any) => {
// 上传的模块
const
propsUpload
=
{
name
:
'file'
,
action
:
()
=>
{
// return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + id;
return
'http://192.168.1.28:8651/tos/excel/upload?userId='
+
id
;
},
// action: () => {
// // return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + id;
// // return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id;
// return '/tos/excel/upload?userId=' + id;
// },
action
:
'/tos/excel/upload?userId='
+
id
,
beforeUpload
:
(
file
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'4'
)
<
0
)
{
message
.
error
(
'No permissions'
);
...
...
src/pages/user/login/index.tsx
View file @
3e3454b4
...
...
@@ -58,7 +58,6 @@ const Login: React.FC<LoginProps> = (props) => {
const
res
=
await
ValidateCaptcha
({
account
:
values
.
userName
,
code
:
values
.
code
});
if
(
res
.
error_code
===
'0000'
)
{
console
.
log
(
'通过跳转到修改密码页面'
);
dispatch
({
type
:
'login/goResetPwd'
,
payload
:
userName
,
...
...
src/pages/user/login/login2.tsx
View file @
3e3454b4
...
...
@@ -15,13 +15,6 @@ const Login2 = (props: {
userStatus
:
number
;
})
=>
{
const
{
history
,
result
,
dispatch
,
userName
,
userStatus
}
=
props
;
console
.
log
(
userName
);
// const [resetPwd, setResetPwd] = useState(false);
// useEffect(() => {
// setResetPwd(result);
// }, [result]);
useEffect
(()
=>
{
if
(
!
userName
)
{
...
...
src/pages/user/login/style.less
View file @
3e3454b4
...
...
@@ -45,14 +45,6 @@
margin-bottom: 20px;
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-text-fill-color: #6a912cff !important;
transition: background-color 50000s ease-in-out 0s;
}
.input {
border: none;
background: none;
...
...
@@ -185,14 +177,6 @@ select:-webkit-autofill {
}
}
}
:global {
.ant-form-item-has-error .ant-input,
.ant-form-item-has-error .ant-input-affix-wrapper,
.ant-form-item-has-error .ant-input:hover,
.ant-form-item-has-error .ant-input-affix-wrapper:hover {
background: transparent !important;
}
}
.passBtn {
margin-top: 80px;
...
...
src/utils/method.ts
View file @
3e3454b4
...
...
@@ -48,17 +48,17 @@ export const getCookie = (key: string) => {
return
''
;
};
/**
* @param key 名字
* @param value 值
* @param time 存储时间
*/
export
const
setCookie
=
(
key
:
string
,
value
:
string
,
time
?:
number
)
=>
{
let
expires
:
string
;
// 是否传入缓存时间
if
(
time
)
{
expires
=
"expores="
+
time
;
}
else
{
// cookie 设置时间,防止刷新就丢失
var
d
=
new
Date
();
d
.
setTime
(
d
.
getTime
()
+
1
*
24
*
60
*
60
*
1000
);
expires
=
'expires='
+
d
.
toUTCString
();
}
const
d
=
new
Date
();
// cookie 设置时间,防止刷新就丢失
d
.
setTime
(
d
.
getTime
()
+
(
time
||
1
)
*
24
*
60
*
60
*
1000
);
let
expires
=
'expires='
+
d
.
toUTCString
();
document
.
cookie
=
key
+
'='
+
value
+
'; '
+
expires
+
';path=/'
;
};
...
...
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