Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
NewTruckTerminalSyetem
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
SQL_Mou
NewTruckTerminalSyetem
Commits
9355ba02
Commit
9355ba02
authored
May 18, 2022
by
caicaicai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改
parent
c4b0866b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
1 deletion
+34
-1
index.vue
src/views/MLargeScreen/components/carInformation/index.vue
+34
-1
No files found.
src/views/MLargeScreen/components/carInformation/index.vue
View file @
9355ba02
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
</div>
</div>
<div
class=
"carInFrom_content"
>
<div
class=
"carInFrom_content"
>
<div>
保养时间:
</div>
<div>
保养时间:
</div>
<div
class=
"carInFrom_input"
>
{{
vehicleInformationData
.
time
}}
</div>
<div
class=
"carInFrom_input"
>
{{
currentTime
(
vehicleInformationData
.
time
)
}}
</div>
</div>
</div>
<div
class=
"carInFrom_content"
>
<div
class=
"carInFrom_content"
>
<div>
超速预警值:
</div>
<div>
超速预警值:
</div>
...
@@ -112,6 +112,39 @@ export default {
...
@@ -112,6 +112,39 @@ export default {
},
},
carInCloseFn
(){
carInCloseFn
(){
this
.
showDecide
=
false
;
this
.
showDecide
=
false
;
},
currentTime
(
time
){
var
date
=
new
Date
(
time
);
var
year
=
date
.
getFullYear
();
//年 ,从 Date 对象以四位数字返回年份
var
month
=
date
.
getMonth
()
+
1
;
//月 ,从 Date 对象返回月份 (0 ~ 11) ,date.getMonth()比实际月份少 1 个月
var
day
=
date
.
getDate
();
//日 ,从 Date 对象返回一个月中的某一天 (1 ~ 31)
var
hours
=
date
.
getHours
();
//小时 ,返回 Date 对象的小时 (0 ~ 23)
var
minutes
=
date
.
getMinutes
();
//分钟 ,返回 Date 对象的分钟 (0 ~ 59)
var
seconds
=
date
.
getSeconds
();
//秒 ,返回 Date 对象的秒数 (0 ~ 59)
//修改月份格式
if
(
month
>=
1
&&
month
<=
9
)
{
month
=
"
0
"
+
month
;
}
//修改日期格式
if
(
day
>=
0
&&
day
<=
9
)
{
day
=
"
0
"
+
day
;
}
//修改小时格式
if
(
hours
>=
0
&&
hours
<=
9
)
{
hours
=
"
0
"
+
hours
;
}
//修改分钟格式
if
(
minutes
>=
0
&&
minutes
<=
9
)
{
minutes
=
"
0
"
+
minutes
;
}
//修改秒格式
if
(
seconds
>=
0
&&
seconds
<=
9
)
{
seconds
=
"
0
"
+
seconds
;
}
//获取当前系统时间 格式(yyyy-mm-dd hh:mm:ss)
let
currentFormatDate
=
year
+
"
-
"
+
month
+
"
-
"
+
day
;
//console.log(currentFormatDate);
return
currentFormatDate
;
}
}
}
}
}
}
...
...
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