Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
x-training
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
x-training
Commits
35b07d87
提交
35b07d87
authored
3月 23, 2021
作者:
lihuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改图表
上级
df174608
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
74 行增加
和
158 行删除
+74
-158
index.vue
src/pages/result/index.vue
+74
-158
没有找到文件。
src/pages/result/index.vue
浏览文件 @
35b07d87
...
...
@@ -120,7 +120,7 @@ export default {
if
(
response
.
data
.
length
<
7
)
{
response
.
data
.
map
((
item
,
index
)
=>
{
data1
.
push
(
item
.
score
)
data2
.
push
(
this
.
getNowTime
(
item
.
date_index
,
1
))
data2
.
push
(
this
.
getNowTime
2
(
item
.
date_index
))
})
setTimeout
(()
=>
{
for
(
let
i
=
0
;
i
<
7
-
response
.
data
.
length
;
i
++
)
{
...
...
@@ -131,176 +131,86 @@ export default {
}
else
{
response
.
data
.
map
((
item
,
index
)
=>
{
data1
.
push
(
item
.
score
)
data2
.
push
(
this
.
getNowTime
(
item
.
date_index
,
1
))
data2
.
push
(
this
.
getNowTime
(
item
.
date_index
))
})
}
}
if
(
data1
.
length
===
1
)
{
this
.
polar
=
{
dataZoom
:
[{
type
:
'inside'
,
start
:
0
,
end
:
50
}],
grid
:
{
x
:
30
,
y
:
20
,
this
.
polar
=
{
grid
:
{
x
:
30
,
y
:
20
,
x2
:
0
,
y2
:
30
},
itemStyle
:
{
// color: 'linear-gradient(0deg, #00A2DB, #35D0E9)'
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
30
y2
:
1
,
colorStops
:
[{
offset
:
1
,
color
:
'#00A2DB'
},
{
offset
:
0
,
color
:
'#35D0E9'
}],
global
:
false
// 缺省为 false
}
},
xAxis
:
{
type
:
'category'
,
data
:
data2
,
axisLabel
:
{
color
:
'rgba(255,255,255,0.3)'
},
itemStyle
:
{
// color: 'linear-gradient(0deg, #00A2DB, #35D0E9)'
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
1
,
color
:
'#00A2DB'
},
{
offset
:
0
,
color
:
'#35D0E9'
}],
global
:
false
// 缺省为 false
}
axisLine
:
{
show
:
false
},
xAxis
:
{
type
:
'category'
,
data
:
data2
,
axisLabel
:
{
color
:
'rgba(255,255,255,0.3)'
},
axisLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
splitLine
:
{
lineStyle
:
{
color
:
[
'#D4D4D8'
],
opacity
:
0.1
}
}
axisTick
:
{
show
:
false
},
yAxis
:
{
// minInterval: 50,
// interval: 50,
splitNumber
:
3
,
type
:
'value'
,
axisLabel
:
{
color
:
'rgba(255,255,255,0.3)'
},
axisLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
splitLine
:
{
lineStyle
:
{
color
:
[
'#D4D4D8'
],
opacity
:
0.1
}
splitLine
:
{
lineStyle
:
{
color
:
[
'#D4D4D8'
],
opacity
:
0.1
}
}
},
yAxis
:
{
// minInterval: 50,
// interval: 50,
splitNumber
:
3
,
type
:
'value'
,
axisLabel
:
{
color
:
'rgba(255,255,255,0.3)'
},
series
:
[{
data
:
data1
,
type
:
'line'
,
// symbol: 'none',
smooth
:
true
,
itemStyle
:
{
normal
:
{
lineStyle
:
{
width
:
3
}
}
}
}]
}
}
else
{
this
.
polar
=
{
dataZoom
:
[{
type
:
'inside'
,
start
:
0
,
end
:
50
}],
grid
:
{
x
:
30
,
y
:
20
,
x2
:
0
,
y2
:
30
axisLine
:
{
show
:
false
},
itemStyle
:
{
// color: 'linear-gradient(0deg, #00A2DB, #35D0E9)'
color
:
{
type
:
'linear'
,
x
:
0
,
y
:
0
,
x2
:
0
,
y2
:
1
,
colorStops
:
[{
offset
:
1
,
color
:
'#00A2DB'
},
{
offset
:
0
,
color
:
'#35D0E9'
}],
global
:
false
// 缺省为 false
}
axisTick
:
{
show
:
false
},
xAxis
:
{
type
:
'category'
,
data
:
data2
,
axisLabel
:
{
color
:
'rgba(255,255,255,0.3)'
},
axisLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
splitLine
:
{
lineStyle
:
{
color
:
[
'#D4D4D8'
],
opacity
:
0.1
}
splitLine
:
{
lineStyle
:
{
color
:
[
'#D4D4D8'
],
opacity
:
0.1
}
},
yAxis
:
{
// minInterval: 50,
// interval: 50,
splitNumber
:
3
,
type
:
'value'
,
axisLabel
:
{
color
:
'rgba(255,255,255,0.3)'
},
axisLine
:
{
show
:
false
},
axisTick
:
{
show
:
false
},
splitLine
:
{
}
},
series
:
[{
data
:
data1
,
type
:
'line'
,
symbol
:
'none'
,
smooth
:
true
,
itemStyle
:
{
normal
:
{
lineStyle
:
{
color
:
[
'#D4D4D8'
],
opacity
:
0.1
width
:
3
}
}
},
series
:
[{
data
:
data1
,
type
:
'line'
,
symbol
:
'none'
,
smooth
:
true
,
itemStyle
:
{
normal
:
{
lineStyle
:
{
width
:
3
}
}
}
}]
}
}
}]
}
this
.
$forceUpdate
()
}
...
...
@@ -315,7 +225,7 @@ export default {
let
dateTemp
const
flag
=
1
for
(
let
i
=
0
;
i
<
7
;
i
++
)
{
dateTemp
=
(
myDate
.
getMonth
()
+
1
)
+
'-'
+
myDate
.
getDate
(
)
dateTemp
=
(
this
.
toDo
(
myDate
.
getMonth
()
+
1
))
+
'-'
+
this
.
toDo
(
myDate
.
getDate
()
)
dateArray
.
push
(
dateTemp
)
myDate
.
setDate
(
myDate
.
getDate
()
+
flag
)
}
...
...
@@ -326,7 +236,7 @@ export default {
const
myDate
=
new
Date
(
start
)
myDate
.
setDate
(
myDate
.
getDate
()
-
dayNum
)
console
.
log
(
dayNum
,
'=123'
)
return
(
myDate
.
getMonth
()
+
1
)
+
'-'
+
myDate
.
getDate
(
)
return
(
this
.
toDo
(
myDate
.
getMonth
()
+
1
))
+
'-'
+
this
.
toDo
(
myDate
.
getDate
()
)
},
getStyle
(
score
)
{
return
`bottom:
${
score
.
score
/
score
.
score_sum
*
100
}
%`
...
...
@@ -348,6 +258,12 @@ export default {
:
this
.
toDo
(
yy
)
+
'-'
+
this
.
toDo
(
mm
)
+
'-'
+
this
.
toDo
(
dd
)
+
' '
+
this
.
toDo
(
hh
)
+
':'
+
this
.
toDo
(
mf
)
+
':'
+
this
.
toDo
(
ss
)
return
dateTime
},
getNowTime2
(
n
)
{
const
date
=
new
Date
(
n
*
1000
)
const
mm
=
date
.
getMonth
()
+
1
const
dd
=
date
.
getDate
()
return
this
.
toDo
(
mm
)
+
'-'
+
this
.
toDo
(
dd
)
},
toDo
(
n
)
{
return
n
<
10
?
'0'
+
n
:
n
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论