Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
frontend-h5
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
songrui
frontend-h5
Commits
7dbe5ba1
Commit
7dbe5ba1
authored
Dec 17, 2024
by
gengchunlei
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'chronic-dev' of
http://gitlab.yiboshi.com/nightkis1995/frontend-h5
into chronic-dev
parents
8660094b
9531287b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
dataTime.vue
src/doctor/components/dataTime/dataTime.vue
+9
-1
No files found.
src/doctor/components/dataTime/dataTime.vue
View file @
7dbe5ba1
...
...
@@ -35,6 +35,12 @@ const props = defineProps({
default
:()
=>
{
return
[
'year'
,
'month'
,
'day'
,
'hour'
,
'minute'
,
'second'
]
}
},
minDate
:
{
type
:
Date
},
maxDate
:
{
type
:
Date
}
});
...
...
@@ -79,7 +85,9 @@ function getcolumns() {
let
year
=
[];
//获取前后十年数组
year
.
values
=
[];
let
Currentday
=
new
Date
().
getFullYear
();
for
(
let
i
=
Currentday
-
10
;
i
<
Currentday
+
10
;
i
++
)
{
let
minYear
=
props
.
minDate
?
props
.
minDate
.
getFullYear
()
:
Currentday
-
10
;
let
maxYear
=
props
.
maxDate
?
props
.
maxDate
.
getFullYear
()
:
Currentday
+
10
;
for
(
let
i
=
minYear
;
i
<
maxYear
;
i
++
)
{
year
.
push
({
text
:
i
.
toString
(),
value
:
i
});
}
year
.
defaultIndex
=
year
.
values
.
indexOf
(
Y
);
//设置默认选项当前年
...
...
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