Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-kanban
Project
Project
Details
Activity
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
ximai
mes-kanban
Commits
f9f4ce1c
Commit
f9f4ce1c
authored
Nov 19, 2024
by
沈翠玲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug
parent
d6c32192
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
35 deletions
+32
-35
app.tsx
src/app.tsx
+1
-7
index.tsx
src/pages/kanban/components/FHD1080P/Style1/index.tsx
+6
-8
index.less
src/pages/kanban/components/FHD1080P/Style2/index.less
+1
-1
index.tsx
src/pages/kanban/components/FHD1080P/Style2/index.tsx
+6
-6
index.tsx
src/pages/kanban/components/Real4K/Style1/index.tsx
+7
-7
index.tsx
src/pages/user/Login/index.tsx
+11
-6
No files found.
src/app.tsx
View file @
f9f4ce1c
import
type
{
Settings
as
LayoutSettings
}
from
'@ant-design/pro-layout'
;
import
type
{
Settings
as
LayoutSettings
}
from
'@ant-design/pro-layout'
;
import
{
setLocale
}
from
'umi'
;
import
{
PageLoading
}
from
'@ant-design/pro-layout'
;
import
{
PageLoading
}
from
'@ant-design/pro-layout'
;
import
type
{
RunTimeLayoutConfig
,
RequestConfig
}
from
'umi'
;
import
type
{
RunTimeLayoutConfig
,
RequestConfig
}
from
'umi'
;
import
{
history
,
Link
,
matchPath
}
from
'umi'
;
import
{
history
,
Link
,
matchPath
}
from
'umi'
;
...
@@ -192,7 +191,6 @@ export async function getInitialState(): Promise<{
...
@@ -192,7 +191,6 @@ export async function getInitialState(): Promise<{
const
fetchUserInfo
=
async
()
=>
{
const
fetchUserInfo
=
async
()
=>
{
try
{
try
{
const
msg
=
await
queryCurrentUser
();
const
msg
=
await
queryCurrentUser
();
console
.
log
(
'msgmsg'
,
msg
)
if
(
msg
&&
msg
.
code
===
200
)
{
if
(
msg
&&
msg
.
code
===
200
)
{
return
msg
;
return
msg
;
}
else
{
}
else
{
...
@@ -203,14 +201,10 @@ export async function getInitialState(): Promise<{
...
@@ -203,14 +201,10 @@ export async function getInitialState(): Promise<{
}
}
return
undefined
;
return
undefined
;
};
};
// 如果是登录页面,不执行
// 如果是登录页面,不执行
if
(
history
.
location
.
pathname
!==
loginPath
)
{
if
(
history
.
location
.
pathname
!==
loginPath
)
{
const
currentUser
=
await
fetchUserInfo
();
const
currentUser
=
await
fetchUserInfo
();
console
.
log
(
'currentUser'
,
currentUser
)
if
(
currentUser
&&
currentUser
.
user
.
locale
)
{
console
.
log
(
'locale'
,
currentUser
.
user
.
locale
)
setLocale
(
currentUser
.
user
.
locale
)
}
return
{
return
{
fetchUserInfo
,
fetchUserInfo
,
currentUser
,
currentUser
,
...
...
src/pages/kanban/components/FHD1080P/Style1/index.tsx
View file @
f9f4ce1c
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
get
Intl
}
from
'umi'
;
import
{
use
Intl
}
from
'umi'
;
export
type
Style1Props
=
{
export
type
Style1Props
=
{
autoResize
:
boolean
;
autoResize
:
boolean
;
headerText
:
string
;
headerText
:
string
;
onHeaderClick
?:
()
=>
void
;
onHeaderClick
?:
()
=>
void
;
};
};
const
intl
=
getIntl
();
const
weekList
=
[
intl
.
formatMessage
({
id
:
'星期日'
}),
intl
.
formatMessage
({
id
:
'星期一'
}),
intl
.
formatMessage
({
id
:
'星期二'
}),
intl
.
formatMessage
({
id
:
'星期三'
}),
intl
.
formatMessage
({
id
:
'星期四'
}),
intl
.
formatMessage
({
id
:
'星期五'
}),
intl
.
formatMessage
({
id
:
'星期六'
})];
function
getWeekDayString
(
weekDay
:
number
)
{
return
weekList
[
weekDay
];
}
const
Style1
:
React
.
FC
<
Style1Props
>
=
({
autoResize
,
headerText
,
children
,
onHeaderClick
})
=>
{
const
Style1
:
React
.
FC
<
Style1Props
>
=
({
autoResize
,
headerText
,
children
,
onHeaderClick
})
=>
{
const
[
scaleWidth
,
setScaleWidth
]
=
useState
(
1
);
const
[
scaleWidth
,
setScaleWidth
]
=
useState
(
1
);
const
[
scaleHeight
,
setScaleHeight
]
=
useState
(
1
);
const
[
scaleHeight
,
setScaleHeight
]
=
useState
(
1
);
const
[
currentDate
,
setCurrentDate
]
=
useState
(
''
);
const
[
currentDate
,
setCurrentDate
]
=
useState
(
''
);
const
[
currentWeek
,
setCurrentWeek
]
=
useState
(
''
);
const
[
currentWeek
,
setCurrentWeek
]
=
useState
(
''
);
const
[
currentTime
,
setCurrentTime
]
=
useState
(
''
);
const
[
currentTime
,
setCurrentTime
]
=
useState
(
''
);
const
intl
=
useIntl
();
function
getWeekDayString
(
weekDay
:
number
)
{
const
weekList
=
[
intl
.
formatMessage
({
id
:
'星期日'
}),
intl
.
formatMessage
({
id
:
'星期一'
}),
intl
.
formatMessage
({
id
:
'星期二'
}),
intl
.
formatMessage
({
id
:
'星期三'
}),
intl
.
formatMessage
({
id
:
'星期四'
}),
intl
.
formatMessage
({
id
:
'星期五'
}),
intl
.
formatMessage
({
id
:
'星期六'
})];
return
weekList
[
weekDay
];
}
const
resetScale
=
(
ar
:
boolean
)
=>
{
const
resetScale
=
(
ar
:
boolean
)
=>
{
if
(
ar
===
true
)
{
if
(
ar
===
true
)
{
setScaleWidth
(
document
.
body
.
clientWidth
/
1920
);
setScaleWidth
(
document
.
body
.
clientWidth
/
1920
);
...
...
src/pages/kanban/components/FHD1080P/Style2/index.less
View file @
f9f4ce1c
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
}
}
.leftheader {
.leftheader {
width: 2
1
0px;
width: 2
2
0px;
padding: 26px 0 0 50px;
padding: 26px 0 0 50px;
color: #fff;
color: #fff;
font-size: 21px;
font-size: 21px;
...
...
src/pages/kanban/components/FHD1080P/Style2/index.tsx
View file @
f9f4ce1c
...
@@ -2,7 +2,7 @@ import moment from 'moment';
...
@@ -2,7 +2,7 @@ import moment from 'moment';
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
delay
,
floor
}
from
'lodash'
;
import
{
delay
,
floor
}
from
'lodash'
;
import
{
get
Intl
}
from
'umi'
;
import
{
use
Intl
}
from
'umi'
;
export
type
Style1Props
=
{
export
type
Style1Props
=
{
autoResize
:
boolean
;
autoResize
:
boolean
;
headerText
:
string
;
headerText
:
string
;
...
@@ -11,11 +11,6 @@ export type Style1Props = {
...
@@ -11,11 +11,6 @@ export type Style1Props = {
style
?:
object
;
style
?:
object
;
onHeaderClick
?:
()
=>
void
;
onHeaderClick
?:
()
=>
void
;
};
};
const
intl
=
getIntl
();
const
weekList
=
[
intl
.
formatMessage
({
id
:
'星期日'
}),
intl
.
formatMessage
({
id
:
'星期一'
}),
intl
.
formatMessage
({
id
:
'星期二'
}),
intl
.
formatMessage
({
id
:
'星期三'
}),
intl
.
formatMessage
({
id
:
'星期四'
}),
intl
.
formatMessage
({
id
:
'星期五'
}),
intl
.
formatMessage
({
id
:
'星期六'
})];
function
getWeekDayString
(
weekDay
:
number
)
{
return
weekList
[
weekDay
];
}
const
Style1
:
React
.
FC
<
Style1Props
>
=
({
const
Style1
:
React
.
FC
<
Style1Props
>
=
({
autoResize
,
autoResize
,
...
@@ -26,6 +21,11 @@ const Style1: React.FC<Style1Props> = ({
...
@@ -26,6 +21,11 @@ const Style1: React.FC<Style1Props> = ({
children
,
children
,
onHeaderClick
,
onHeaderClick
,
})
=>
{
})
=>
{
const
intl
=
useIntl
();
function
getWeekDayString
(
weekDay
:
number
)
{
const
weekList
=
[
intl
.
formatMessage
({
id
:
'星期日'
}),
intl
.
formatMessage
({
id
:
'星期一'
}),
intl
.
formatMessage
({
id
:
'星期二'
}),
intl
.
formatMessage
({
id
:
'星期三'
}),
intl
.
formatMessage
({
id
:
'星期四'
}),
intl
.
formatMessage
({
id
:
'星期五'
}),
intl
.
formatMessage
({
id
:
'星期六'
})];
return
weekList
[
weekDay
];
}
const
[
scaleWidth
,
setScaleWidth
]
=
useState
(
1
);
const
[
scaleWidth
,
setScaleWidth
]
=
useState
(
1
);
const
[
scaleHeight
,
setScaleHeight
]
=
useState
(
1
);
const
[
scaleHeight
,
setScaleHeight
]
=
useState
(
1
);
const
[
currentDate
,
setCurrentDate
]
=
useState
(
''
);
const
[
currentDate
,
setCurrentDate
]
=
useState
(
''
);
...
...
src/pages/kanban/components/Real4K/Style1/index.tsx
View file @
f9f4ce1c
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
get
Intl
}
from
'umi'
;
import
{
use
Intl
}
from
'umi'
;
export
type
Style1Props
=
{
export
type
Style1Props
=
{
autoResize
:
boolean
;
autoResize
:
boolean
;
headerText
:
string
;
headerText
:
string
;
onHeaderClick
?:
()
=>
void
;
onHeaderClick
?:
()
=>
void
;
};
};
const
intl
=
getIntl
();
const
weekList
=
[
intl
.
formatMessage
({
id
:
'星期日'
}),
intl
.
formatMessage
({
id
:
'星期一'
}),
intl
.
formatMessage
({
id
:
'星期二'
}),
intl
.
formatMessage
({
id
:
'星期三'
}),
intl
.
formatMessage
({
id
:
'星期四'
}),
intl
.
formatMessage
({
id
:
'星期五'
}),
intl
.
formatMessage
({
id
:
'星期六'
})];
function
getWeekDayString
(
weekDay
:
number
)
{
return
weekList
[
weekDay
];
}
const
Style1
:
React
.
FC
<
Style1Props
>
=
({
autoResize
,
headerText
,
children
,
onHeaderClick
})
=>
{
const
Style1
:
React
.
FC
<
Style1Props
>
=
({
autoResize
,
headerText
,
children
,
onHeaderClick
})
=>
{
const
[
scaleWidth
,
setScaleWidth
]
=
useState
(
1
);
const
[
scaleWidth
,
setScaleWidth
]
=
useState
(
1
);
...
@@ -19,7 +15,11 @@ const Style1: React.FC<Style1Props> = ({ autoResize, headerText, children, onHea
...
@@ -19,7 +15,11 @@ const Style1: React.FC<Style1Props> = ({ autoResize, headerText, children, onHea
const
[
currentDate
,
setCurrentDate
]
=
useState
(
''
);
const
[
currentDate
,
setCurrentDate
]
=
useState
(
''
);
const
[
currentWeek
,
setCurrentWeek
]
=
useState
(
''
);
const
[
currentWeek
,
setCurrentWeek
]
=
useState
(
''
);
const
[
currentTime
,
setCurrentTime
]
=
useState
(
''
);
const
[
currentTime
,
setCurrentTime
]
=
useState
(
''
);
const
intl
=
useIntl
();
function
getWeekDayString
(
weekDay
:
number
)
{
const
weekList
=
[
intl
.
formatMessage
({
id
:
'星期日'
}),
intl
.
formatMessage
({
id
:
'星期一'
}),
intl
.
formatMessage
({
id
:
'星期二'
}),
intl
.
formatMessage
({
id
:
'星期三'
}),
intl
.
formatMessage
({
id
:
'星期四'
}),
intl
.
formatMessage
({
id
:
'星期五'
}),
intl
.
formatMessage
({
id
:
'星期六'
})];
return
weekList
[
weekDay
];
}
const
resetScale
=
(
ar
:
boolean
)
=>
{
const
resetScale
=
(
ar
:
boolean
)
=>
{
if
(
ar
===
true
)
{
if
(
ar
===
true
)
{
setScaleWidth
(
document
.
body
.
clientWidth
/
3840
);
setScaleWidth
(
document
.
body
.
clientWidth
/
3840
);
...
...
src/pages/user/Login/index.tsx
View file @
f9f4ce1c
...
@@ -6,6 +6,8 @@ import ProForm, { ProFormText, ProFormCheckbox } from '@ant-design/pro-form';
...
@@ -6,6 +6,8 @@ import ProForm, { ProFormText, ProFormCheckbox } from '@ant-design/pro-form';
import
{
UserOutlined
,
LockOutlined
,
CloseCircleOutlined
}
from
'@ant-design/icons'
;
import
{
UserOutlined
,
LockOutlined
,
CloseCircleOutlined
}
from
'@ant-design/icons'
;
import
Footer
from
'@/components/Footer'
;
import
Footer
from
'@/components/Footer'
;
import
{
login
}
from
'@/services/mgr/api'
;
import
{
login
}
from
'@/services/mgr/api'
;
import
{
setLocale
}
from
'umi'
;
const
LoginMessage
:
React
.
FC
=
({
children
})
=>
(
const
LoginMessage
:
React
.
FC
=
({
children
})
=>
(
<
Alert
<
Alert
...
@@ -38,6 +40,11 @@ const Login: React.FC = () => {
...
@@ -38,6 +40,11 @@ const Login: React.FC = () => {
const
fetchUserInfo
=
async
()
=>
{
const
fetchUserInfo
=
async
()
=>
{
const
resp
=
await
initialState
?.
fetchUserInfo
?.();
const
resp
=
await
initialState
?.
fetchUserInfo
?.();
if
(
resp
)
{
if
(
resp
)
{
if
(
resp
.
user
.
locale
)
{
console
.
log
(
'locale'
,
resp
.
user
.
locale
)
setLocale
(
resp
.
user
.
locale
,
false
)
}
await
setInitialState
((
s
)
=>
({
await
setInitialState
((
s
)
=>
({
...
s
,
...
s
,
currentUser
:
resp
,
currentUser
:
resp
,
...
@@ -88,12 +95,10 @@ const Login: React.FC = () => {
...
@@ -88,12 +95,10 @@ const Login: React.FC = () => {
<
div
className=
{
styles
.
content
}
>
<
div
className=
{
styles
.
content
}
>
<
div
className=
{
styles
.
top
}
>
<
div
className=
{
styles
.
top
}
>
<
div
className=
{
styles
.
header
}
>
<
div
className=
{
styles
.
header
}
>
<
Link
to=
"/"
>
<
img
alt=
"logo"
className=
{
styles
.
logo
}
src=
"logo.png"
/>
<
img
alt=
"logo"
className=
{
styles
.
logo
}
src=
"logo.png"
/>
<
span
className=
{
styles
.
title
}
>
<
span
className=
{
styles
.
title
}
>
<
FormattedMessage
id=
"看板系统"
defaultMessage=
"看板系统"
/>
<
FormattedMessage
id=
"看板系统"
defaultMessage=
"看板系统"
/>
</
span
>
</
span
>
</
Link
>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
main
}
>
<
div
className=
{
styles
.
main
}
>
...
...
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