Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Muse
Project
Project
Details
Activity
Releases
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
罗超
Muse
Commits
33947b75
Commit
33947b75
authored
Oct 15, 2019
by
华国豪
🙄
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1092afe5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
10 deletions
+37
-10
dataLook.vue
src/components/viitto/dataLook.vue
+1
-3
lineChartK.vue
src/components/viitto/lineChartK.vue
+36
-7
No files found.
src/components/viitto/dataLook.vue
View file @
33947b75
...
...
@@ -651,9 +651,6 @@ export default {
}
else
{
slineId
=
regionIdArr
[
1
]
}
if
(
this
.
prolineId
==
lineId
)
{
return
}
this
.
prolineId
=
lineId
this
.
slineId
=
slineId
this
.
init
()
...
...
@@ -678,6 +675,7 @@ export default {
init
(){
this
.
loding
=
false
;
this
.
chartShow
=
false
;
this
.
chartShow2
=
false
;
let
url
=
'http://47.96.23.199:5001/api/order/get_single_data'
let
url2
=
"http://47.96.23.199:5001/api/order/get_single_data_v2"
let
msg
=
{
...
...
src/components/viitto/lineChartK.vue
View file @
33947b75
...
...
@@ -33,7 +33,7 @@
function
calculateMA
(
dayCount
,
data
)
{
var
result
=
[];
for
(
var
i
=
0
,
len
=
data
.
length
;
i
<
len
;
i
++
)
{
result
.
push
(
data
[
i
].
value
[
4
]);
result
.
push
(
data
[
i
].
value
[
dayCount
]);
}
return
result
;
}
...
...
@@ -54,7 +54,7 @@ export default {
},
mounted
()
{
let
data
=
this
.
lineChartKData
.
map
(
function
(
item
)
{
return
[
+
item
.
StartPrice
,
+
item
.
MaxPrice
,
+
item
.
EndPrice
,
+
item
.
MinPrice
,
+
item
.
ClickCount
];
return
[
item
.
StartPrice
,
item
.
MaxPrice
,
item
.
EndPrice
,
item
.
MinPrice
,
item
.
ClickCount
,
item
.
FiveAvg
,
item
.
TenAvg
];
});
var
dates
=
this
.
lineChartKData
.
map
(
function
(
item
)
{
return
item
.
CreateDate
;
...
...
@@ -89,7 +89,7 @@ export default {
let
option
=
{
backgroundColor
:
'#21202D'
,
legend
:
{
data
:
[
'成交单价'
,
'产品点击'
],
data
:
[
'成交单价'
,
'产品点击'
,
'5日平均'
,
'10日平均'
],
inactiveColor
:
'#777'
,
textStyle
:
{
color
:
'#fff'
...
...
@@ -110,6 +110,8 @@ export default {
low
:
params
[
0
].
value
[
3
],
height
:
params
[
0
].
value
[
4
],
click
:
params
[
0
].
value
[
5
],
FiveAvg
:
params
[
0
].
value
[
6
],
TenAvg
:
params
[
0
].
value
[
7
],
}
}
else
{
obj
=
{
...
...
@@ -120,6 +122,8 @@ export default {
low
:
params
[
1
].
value
[
3
],
height
:
params
[
1
].
value
[
4
],
click
:
params
[
1
].
value
[
5
],
FiveAvg
:
params
[
0
].
value
[
6
],
TenAvg
:
params
[
0
].
value
[
7
],
}
}
var
res
=
obj
.
sName
+
' '
+
obj
.
name
...
...
@@ -128,6 +132,8 @@ export default {
res
+=
'<br/> 结束值: '
+
obj
.
close
res
+=
'<br/> 最低值: '
+
obj
.
low
res
+=
'<br/> 点击: '
+
obj
.
click
res
+=
'<br/> 5日平均: '
+
obj
.
FiveAvg
res
+=
'<br/> 10日平均: '
+
obj
.
TenAvg
return
res
},
axisPointer
:
{
...
...
@@ -192,14 +198,37 @@ export default {
{
name
:
'产品点击'
,
type
:
'line'
,
data
:
calculateMA
(
4
,
_this
.
dataList
),
smooth
:
true
,
showSymbol
:
false
,
lineStyle
:
{
width
:
3
,
color
:
'#F5AF19'
,
opacity
:
0.5
}
},
{
name
:
'5日平均'
,
type
:
'line'
,
data
:
calculateMA
(
5
,
_this
.
dataList
),
smooth
:
true
,
showSymbol
:
false
,
lineStyle
:
{
normal
:
{
width
:
1
,
color
:
"#F5AF19"
,
}
width
:
3
,
color
:
'#3FD2F3'
,
opacity
:
0.5
}
},
{
name
:
'10日平均'
,
type
:
'line'
,
data
:
calculateMA
(
6
,
_this
.
dataList
),
smooth
:
true
,
showSymbol
:
false
,
lineStyle
:
{
width
:
3
,
color
:
'#EE4454'
,
opacity
:
0.5
}
},
// {
...
...
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