Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
ZZDataAnalysis
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
hlwu
ZZDataAnalysis
Commits
b42b471c
Commit
b42b471c
authored
Oct 12, 2023
by
whlviolin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改我的数据时间戳显示
parent
9a9d040a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
8 deletions
+30
-8
myData.vue
web/src/views/myData/components/myData.vue
+25
-4
sysAllData.vue
web/src/views/myData/components/sysAllData.vue
+5
-4
No files found.
web/src/views/myData/components/myData.vue
View file @
b42b471c
...
...
@@ -2,7 +2,7 @@
<div
class=
"index-container"
>
<div
style=
"flex:1;padding: 10px;"
>
<el-table
:data=
"fileList"
:data=
fileList
:style=
"
{'width': '100%', 'height': '100%'}">
<template
v-for=
"item in tableHeader"
>
<el-table-column
v-if=
"item.key == 'name'"
...
...
@@ -73,7 +73,7 @@ import { getFileList } from '@/api/data'
initData
()
{
getFileList
().
then
(
res
=>
{
console
.
log
(
res
)
this
.
fileList
=
res
.
data
;
this
.
fileList
=
this
.
getFfileList
(
res
.
data
)
}).
catch
(
err
=>
{
console
.
log
(
err
)
...
...
@@ -85,7 +85,28 @@ import { getFileList } from '@/api/data'
name
:
"detail"
,
query
:
row
})
}
},
dateFormat
(
timestamp
){
// 使用日期对象来格式化日期字符串
let
date
=
new
Date
(
timestamp
);
let
year
=
date
.
getFullYear
();
let
month
=
(
date
.
getMonth
()
+
1
).
toString
().
padStart
(
2
,
'0'
);
// 月份从0开始,所以要加1,然后使用padStart函数补零
let
day
=
date
.
getDate
().
toString
().
padStart
(
2
,
'0'
);
let
hours
=
date
.
getHours
().
toString
().
padStart
(
2
,
'0'
);
let
minutes
=
date
.
getMinutes
().
toString
().
padStart
(
2
,
'0'
);
let
seconds
=
date
.
getSeconds
().
toString
().
padStart
(
2
,
'0'
);
let
formattedDate
=
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
return
formattedDate
;
},
getFfileList
(
datas
){
for
(
let
i
in
datas
)
{
let
data
=
datas
[
i
]
data
[
'createTime'
]
=
this
.
dateFormat
(
data
[
'createTime'
])
data
[
'updateTime'
]
=
this
.
dateFormat
(
data
[
'updateTime'
])
};
return
datas
;
},
}
}
</
script
>
...
...
@@ -99,4 +120,4 @@ import { getFileList } from '@/api/data'
cursor
:
pointer
;
color
:
rgb
(
255
,
121
,
11
);
}
</
style
>
\ No newline at end of file
</
style
>
web/src/views/myData/components/sysAllData.vue
View file @
b42b471c
...
...
@@ -47,11 +47,11 @@
</div>
<div
class=
"right"
>
<div
class=
"entry"
style=
"height:
3
5%;"
>
<div
class=
"entry"
style=
"height:
2
5%;"
>
<div
class=
"header"
style=
""
>
指标
</div>
<div
class=
"body"
>
<
template
v-for=
"(item, index) in params.dataCondition"
>
<div
style=
"margin-left:10px;
height:26px;
line-height:26px;"
>
{{
"Y"
+
(
index
+
1
)
+
" "
}}{{
item
.
name
}}
</div>
<div
style=
"margin-left:10px;line-height:26px;"
>
{{
"Y"
+
(
index
+
1
)
+
" "
}}{{
item
.
name
}}
</div>
</
template
>
</div>
</div>
...
...
@@ -66,7 +66,7 @@
</div>
<div
class=
"entry"
style=
"width: 100%;height: 35%;border-right: 3px solid #dbdbdb69;"
>
<div
class=
"header"
>
区域
</div>
<div
class=
"body"
style=
" border-right: 3px solid #dbdbdb69;"
>
<div
class=
"body"
>
<
template
v-for=
"(item, index) in params.address"
>
<div
style=
"margin-left:10px; height:26px;line-height:26px;"
>
{{
item
.
name
}}
</div>
</
template
>
...
...
@@ -354,7 +354,6 @@ import {getyear, getAddress, detDataTitle, getIndustry, getCondition, getTree, s
for
(
let
item
in
dataList
)
{
let
obj
=
dataList
[
item
]
obj
[
"checked"
]
=
false
;
dataList
.
push
(
obj
);
}
return
dataList
;
},
...
...
@@ -493,6 +492,7 @@ import {getyear, getAddress, detDataTitle, getIndustry, getCondition, getTree, s
/* box-shadow: 3px 0px 4px #8b8b8b; */
line-height
:
41px
;
padding-left
:
20px
;
position
:
inherit
;
color
:
#545454
;
font-weight
:
700
;
}
...
...
@@ -501,6 +501,7 @@ import {getyear, getAddress, detDataTitle, getIndustry, getCondition, getTree, s
flex
:
1
;
overflow-y
:
scroll
;
padding-left
:
20px
;
}
.result
{
...
...
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