Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training
Commits
3b600521
提交
3b600521
authored
3月 22, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改时间
上级
cd1b6405
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
31 行增加
和
7 行删除
+31
-7
index.vue
src/pages/result/index.vue
+31
-7
没有找到文件。
src/pages/result/index.vue
浏览文件 @
3b600521
...
...
@@ -111,13 +111,18 @@ export default {
.
getRecordsScore
(
param
)
.
then
(
response
=>
{
if
(
parseInt
(
response
.
code
)
===
0
)
{
const
data1
=
[]
const
data2
=
[]
let
data1
=
[]
let
data2
=
[]
if
(
!
response
.
data
.
length
)
{
data1
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
data2
=
this
.
getDate7
()
}
else
{
response
.
data
.
map
((
item
,
index
)
=>
{
data1
.
push
(
item
.
score
)
data2
.
push
(
this
.
getNowTime
(
item
.
date_index
))
data2
.
push
(
this
.
getNowTime
(
item
.
date_index
,
1
))
})
if
(
data2
.
length
>
1
)
{
}
if
(
data1
.
length
===
1
)
{
this
.
polar
=
{
dataZoom
:
[{
type
:
'inside'
,
...
...
@@ -189,7 +194,7 @@ export default {
series
:
[{
data
:
data1
,
type
:
'line'
,
symbol
:
'none'
,
//
symbol: 'none',
smooth
:
true
,
itemStyle
:
{
normal
:
{
...
...
@@ -272,6 +277,7 @@ export default {
series
:
[{
data
:
data1
,
type
:
'line'
,
symbol
:
'none'
,
smooth
:
true
,
itemStyle
:
{
normal
:
{
...
...
@@ -289,10 +295,24 @@ export default {
.
finally
(()
=>
{
})
},
getDate7
()
{
const
dateArray
=
[]
const
myDate
=
new
Date
()
myDate
.
setDate
(
myDate
.
getDate
()
-
7
)
let
dateTemp
const
flag
=
1
for
(
let
i
=
0
;
i
<
7
;
i
++
)
{
dateTemp
=
(
myDate
.
getMonth
()
+
1
)
+
'-'
+
myDate
.
getDate
()
dateArray
.
push
(
dateTemp
)
myDate
.
setDate
(
myDate
.
getDate
()
+
flag
)
}
return
dateArray
},
getStyle
(
score
)
{
return
`bottom:
${
score
.
score
/
score
.
score_sum
*
100
}
%`
},
getNowTime
(
n
)
{
// s
getNowTime
(
n
,
n2
)
{
let
dateTime
=
''
const
date
=
n
===
-
7
?
new
Date
(
new
Date
()
-
7
*
24
*
3600
*
1000
)
:
new
Date
()
const
yy
=
date
.
getFullYear
()
...
...
@@ -301,7 +321,11 @@ export default {
const
hh
=
date
.
getHours
()
const
mf
=
date
.
getMinutes
()
const
ss
=
date
.
getSeconds
()
dateTime
=
n
>
1
?
this
.
toDo
(
yy
)
+
'-'
+
this
.
toDo
(
mm
)
+
'-'
+
this
.
toDo
(
dd
)
:
this
.
toDo
(
yy
)
+
'-'
+
this
.
toDo
(
mm
)
+
'-'
+
this
.
toDo
(
dd
)
+
' '
+
this
.
toDo
(
hh
)
+
':'
+
this
.
toDo
(
mf
)
+
':'
+
this
.
toDo
(
ss
)
dateTime
=
n
>
1
?
n2
?
this
.
toDo
(
mm
)
+
'-'
+
this
.
toDo
(
dd
)
:
this
.
toDo
(
yy
)
+
'-'
+
this
.
toDo
(
mm
)
+
'-'
+
this
.
toDo
(
dd
)
:
this
.
toDo
(
yy
)
+
'-'
+
this
.
toDo
(
mm
)
+
'-'
+
this
.
toDo
(
dd
)
+
' '
+
this
.
toDo
(
hh
)
+
':'
+
this
.
toDo
(
mf
)
+
':'
+
this
.
toDo
(
ss
)
return
dateTime
},
toDo
(
n
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论