Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sass-admin
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李晨
sass-admin
Commits
449fe173
Commit
449fe173
authored
Sep 01, 2025
by
end
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
工作台日期展示
parent
e0cfb985
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
5 deletions
+22
-5
dist.zip
+0
-0
src/pages/Dashboard/index.js
+22
-5
No files found.
dist.zip
View file @
449fe173
No preview for this file type
src/pages/Dashboard/index.js
View file @
449fe173
...
...
@@ -31,8 +31,8 @@ class homePage extends Component {
super
(
props
);
this
.
state
=
{
dllTime
:
3
,
//1年 2月 3日 4周
dllXtitle
:
[
`
${
month
}
-
${
day
-
4
}
`
,
`
${
month
}
-
${
day
-
3
}
`
,
`
${
month
}
-
${
day
-
2
}
`
,
`
${
month
}
-
${
day
-
1
}
`
,
`
${
month
}
-
${
day
}
`
]
,
tgXtitle
:
[
`
${
month
}
-
${
day
-
4
}
`
,
`
${
month
}
-
${
day
-
3
}
`
,
`
${
month
}
-
${
day
-
2
}
`
,
`
${
month
}
-
${
day
-
1
}
`
,
`
${
month
}
-
${
day
}
`
]
,
dllXtitle
:
this
.
getDateRange
()
,
tgXtitle
:
this
.
getDateRange
()
,
lllTime
:
3
,
//1年 2月 3日 4周
hdlTime
:
3
,
//1年 2月 3日 4周
hdlType
:
6
,
//11点赞 12收藏 13评论 6阅读
...
...
@@ -53,7 +53,18 @@ class homePage extends Component {
};
}
// 登录量
getDateRange
=
()
=>
{
const
dates
=
[];
for
(
let
i
=
4
;
i
>=
0
;
i
--
)
{
const
currentDate
=
new
Date
();
currentDate
.
setDate
(
currentDate
.
getDate
()
-
i
);
const
m
=
currentDate
.
getMonth
()
+
1
;
const
d
=
currentDate
.
getDate
();
dates
.
push
(
`
${
m
}
-
${
d
<
10
?
'0'
+
d
:
d
}
`
);
}
return
dates
;
};
// 在dllChange方法中调用
dllChange
=
e
=>
{
if
(
e
==
1
)
{
this
.
setState
({
dllTime
:
e
,
currentPeriod
:
"今年"
,
oldCurrentPeriod
:
"去年"
,
dllXtitle
:
[
`
${
year
-
4
}
年`
,
`
${
year
-
3
}
年`
,
`
${
year
-
2
}
年`
,
`
${
year
-
1
}
年`
,
`
${
year
}
年`
]
},
()
=>
{
...
...
@@ -64,7 +75,13 @@ class homePage extends Component {
this
.
getDllRes
();
});
}
else
if
(
e
==
3
)
{
this
.
setState
({
dllTime
:
e
,
currentPeriod
:
"今日"
,
oldCurrentPeriod
:
"昨日"
,
dllXtitle
:
[
`
${
month
}
-
${
day
-
4
}
`
,
`
${
month
}
-
${
day
-
3
}
`
,
`
${
month
}
-
${
day
-
2
}
`
,
`
${
month
}
-
${
day
-
1
}
`
,
`
${
month
}
-
${
day
}
`
]
},
()
=>
{
const
dateTitles
=
this
.
getDateRange
();
this
.
setState
({
dllTime
:
e
,
currentPeriod
:
"今日"
,
oldCurrentPeriod
:
"昨日"
,
dllXtitle
:
dateTitles
},
()
=>
{
this
.
getDllRes
();
});
}
...
...
@@ -556,7 +573,7 @@ class homePage extends Component {
this
.
getTgRes
();
});
}
else
if
(
e
==
3
)
{
this
.
setState
({
tgTime
:
e
,
tgXtitle
:
[
`
${
month
}
-
${
day
-
4
}
`
,
`
${
month
}
-
${
day
-
3
}
`
,
`
${
month
}
-
${
day
-
2
}
`
,
`
${
month
}
-
${
day
-
1
}
`
,
`
${
month
}
-
${
day
}
`
]
},
()
=>
{
this
.
setState
({
tgTime
:
e
,
tgXtitle
:
this
.
getDateRange
()
},
()
=>
{
this
.
getTgRes
();
});
}
...
...
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