Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
罗鑫霖
/
vion-tools
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8442da0a
authored
Mar 25, 2020
by
周志凯
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[chg]: calc time
1 parent
4ee2ea26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
static/index.html
static/index.html
View file @
8442da0
...
@@ -924,7 +924,6 @@
...
@@ -924,7 +924,6 @@
<div
class=
"result-header"
>
结果展示
</div>
<div
class=
"result-header"
>
结果展示
</div>
<el-scrollbar
ref=
"scrollbarRef"
wrap-class=
"scrollbar-wrapper"
>
<el-scrollbar
ref=
"scrollbarRef"
wrap-class=
"scrollbar-wrapper"
>
<div
id=
"showDiv"
class=
"result-content"
v-show=
"showDiv"
>
<div
id=
"showDiv"
class=
"result-content"
v-show=
"showDiv"
>
<div
class=
"result-item"
>
<!-- /{{ item.totalNum }}条 -->
<!-- /{{ item.totalNum }}条 -->
<div
class=
"result-item"
v-for=
"item in results"
:key=
"item.id"
>
<div
class=
"result-item"
v-for=
"item in results"
:key=
"item.id"
>
<!-- /{{ item.totalNum }}条 -->
<!-- /{{ item.totalNum }}条 -->
...
@@ -948,7 +947,7 @@
...
@@ -948,7 +947,7 @@
</div>
</div>
</el-scrollbar>
</el-scrollbar>
<div
class=
"result-footer"
>
<div
class=
"result-footer"
>
<span
class=
"result-intro"
v-if=
"startTiming && endTiming"
>
{{ footerText || '数据重跑' }}完毕! 共计 {{ totalTime
}} 秒
</span>
<span
class=
"result-intro"
v-if=
"startTiming && endTiming"
>
{{ footerText || '数据重跑' }}完毕! 共计 {{ totalTime
| formatTime }}
</span>
<el-button
class=
"result-clear-btn"
@
click=
"onClearClick"
>
清空结果
</el-button>
<el-button
class=
"result-clear-btn"
@
click=
"onClearClick"
>
清空结果
</el-button>
</div>
</div>
</div>
</div>
...
@@ -1128,15 +1127,35 @@
...
@@ -1128,15 +1127,35 @@
],
],
socket
:
null
,
socket
:
null
,
results
:
[],
results
:
[],
startTiming
:
0
,
startTiming
:
10
0
,
endTiming
:
0
,
endTiming
:
10
0
,
footerText
:
''
footerText
:
''
};
};
},
},
filters
:
{
formatTime
(
val
)
{
function
autoPrefixZero
(
num
)
{
return
num
>
10
?
num
:
'0'
+
num
}
const
day
=
parseInt
(
val
/
(
24
*
60
*
60
*
1000
))
+
1
const
hour
=
parseInt
(
val
%
(
24
*
60
*
60
*
1000
)
/
(
60
*
60
*
1000
))
const
minutes
=
parseInt
(
val
%
(
60
*
60
*
1000
)
/
(
60
*
1000
))
const
seconds
=
parseInt
(
val
%
(
60
*
1000
)
/
1000
)
if
(
val
<
1000
||
val
<
60
*
1000
)
{
return
`
${
val
%
(
60
*
1000
)
/
1000
}
秒`
}
else
if
(
val
<
60
*
60
*
1000
)
{
return
`
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
}
else
if
(
val
<
24
*
60
*
60
*
1000
)
{
return
`
${
autoPrefixZero
(
hour
)}
小时
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
}
else
{
return
`
${
autoPrefixZero
(
day
)}
天
${
autoPrefixZero
(
hour
)}
小时
${
autoPrefixZero
(
minutes
)}
分钟
${
autoPrefixZero
(
seconds
)}
秒`
}
}
},
computed
:
{
computed
:
{
totalTime
()
{
totalTime
()
{
const
{
startTiming
,
endTiming
}
=
this
const
{
startTiming
,
endTiming
}
=
this
return
(
endTiming
-
startTiming
)
/
1000
return
endTiming
-
startTiming
// return this.formatDateToStamp(endTiming) - this.formatDateToStamp(startTiming)
// return this.formatDateToStamp(endTiming) - this.formatDateToStamp(startTiming)
}
}
},
},
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment