Commit 33947b75 authored by 华国豪's avatar 华国豪 🙄

1

parent 1092afe5
...@@ -651,9 +651,6 @@ export default { ...@@ -651,9 +651,6 @@ export default {
} else { } else {
slineId = regionIdArr[1] slineId = regionIdArr[1]
} }
if (this.prolineId == lineId) {
return
}
this.prolineId = lineId this.prolineId = lineId
this.slineId = slineId this.slineId = slineId
this.init() this.init()
...@@ -678,6 +675,7 @@ export default { ...@@ -678,6 +675,7 @@ export default {
init(){ init(){
this.loding = false; this.loding = false;
this.chartShow = false; this.chartShow = false;
this.chartShow2 = false;
let url='http://47.96.23.199:5001/api/order/get_single_data' 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 url2 = "http://47.96.23.199:5001/api/order/get_single_data_v2"
let msg={ let msg={
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
function calculateMA(dayCount, data) { function calculateMA(dayCount, data) {
var result = []; var result = [];
for (var i = 0, len = data.length; i < len; i++) { for (var i = 0, len = data.length; i < len; i++) {
result.push(data[i].value[4]); result.push(data[i].value[dayCount]);
} }
return result; return result;
} }
...@@ -54,7 +54,7 @@ export default { ...@@ -54,7 +54,7 @@ export default {
},mounted() { },mounted() {
let data = this.lineChartKData.map(function (item) { 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) { var dates = this.lineChartKData.map(function (item) {
return item.CreateDate; return item.CreateDate;
...@@ -89,7 +89,7 @@ export default { ...@@ -89,7 +89,7 @@ export default {
let option = { let option = {
backgroundColor: '#21202D', backgroundColor: '#21202D',
legend: { legend: {
data: ['成交单价', '产品点击'], data: ['成交单价', '产品点击', '5日平均', '10日平均'],
inactiveColor: '#777', inactiveColor: '#777',
textStyle: { textStyle: {
color: '#fff' color: '#fff'
...@@ -110,6 +110,8 @@ export default { ...@@ -110,6 +110,8 @@ export default {
low: params[0].value[3], low: params[0].value[3],
height: params[0].value[4], height: params[0].value[4],
click: params[0].value[5], click: params[0].value[5],
FiveAvg: params[0].value[6],
TenAvg: params[0].value[7],
} }
} else { } else {
obj = { obj = {
...@@ -120,6 +122,8 @@ export default { ...@@ -120,6 +122,8 @@ export default {
low: params[1].value[3], low: params[1].value[3],
height: params[1].value[4], height: params[1].value[4],
click: params[1].value[5], click: params[1].value[5],
FiveAvg: params[0].value[6],
TenAvg: params[0].value[7],
} }
} }
var res = obj.sName + ' ' + obj.name var res = obj.sName + ' ' + obj.name
...@@ -128,6 +132,8 @@ export default { ...@@ -128,6 +132,8 @@ export default {
res += '<br/> 结束值: ' + obj.close res += '<br/> 结束值: ' + obj.close
res += '<br/> 最低值: ' + obj.low res += '<br/> 最低值: ' + obj.low
res += '<br/> 点击: ' + obj.click res += '<br/> 点击: ' + obj.click
res += '<br/> 5日平均: ' + obj.FiveAvg
res += '<br/> 10日平均: ' + obj.TenAvg
return res return res
}, },
axisPointer: { axisPointer: {
...@@ -192,14 +198,37 @@ export default { ...@@ -192,14 +198,37 @@ export default {
{ {
name: '产品点击', name: '产品点击',
type: 'line', 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), data: calculateMA(5, _this.dataList),
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
lineStyle: { lineStyle: {
normal: { width: 3,
width: 1, color: '#3FD2F3',
color: "#F5AF19", opacity: 0.5
} }
},
{
name: '10日平均',
type: 'line',
data: calculateMA(6, _this.dataList),
smooth: true,
showSymbol: false,
lineStyle: {
width: 3,
color: '#EE4454',
opacity: 0.5
} }
}, },
// { // {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment