|
|
|
@ -229,7 +229,6 @@ export default { |
|
|
|
// console.log(rqtp); |
|
|
|
// |
|
|
|
homeApi.allGroupTimeNum().then(res => { |
|
|
|
console.log(res); |
|
|
|
const kldata = res.data.data.allTimeData |
|
|
|
// 对应的键名 |
|
|
|
let kltd = new Array; |
|
|
|
@ -241,14 +240,11 @@ export default { |
|
|
|
}) |
|
|
|
this.kltdata = kltd |
|
|
|
this.klvdata = tmpkvd |
|
|
|
console.log(this.kltdata); |
|
|
|
console.log(this.klvdata); |
|
|
|
}); |
|
|
|
}, |
|
|
|
btgetdata2() { |
|
|
|
// |
|
|
|
homeApi.allGroupTimeNum2().then(res => { |
|
|
|
console.log(res); |
|
|
|
const kldata = res.data.data.allTimeData |
|
|
|
// 对应的键名 |
|
|
|
let kltd = new Array; |
|
|
|
@ -260,14 +256,11 @@ export default { |
|
|
|
}) |
|
|
|
this.kltdata = kltd |
|
|
|
this.klvdata = tmpkvd |
|
|
|
console.log(this.kltdata); |
|
|
|
console.log(this.klvdata); |
|
|
|
}); |
|
|
|
}, |
|
|
|
btgetdata3() { |
|
|
|
// |
|
|
|
homeApi.allGroupTimeNum3().then(res => { |
|
|
|
console.log(res); |
|
|
|
const kldata = res.data.data.allTimeData |
|
|
|
// 对应的键名 |
|
|
|
let kltd = new Array; |
|
|
|
@ -279,26 +272,22 @@ export default { |
|
|
|
}) |
|
|
|
this.kltdata = kltd |
|
|
|
this.klvdata = tmpkvd |
|
|
|
console.log(this.kltdata); |
|
|
|
console.log(this.klvdata); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
//选择年月日中的某个 |
|
|
|
selitem(type) { |
|
|
|
console.log('1111111111'); |
|
|
|
console.log(type); |
|
|
|
// console.log(type); |
|
|
|
this.klselt = type; |
|
|
|
this.btgetdata() |
|
|
|
}, |
|
|
|
selitem2(type) { |
|
|
|
console.log('1111111111'); |
|
|
|
console.log(type); |
|
|
|
// console.log(type); |
|
|
|
this.klselt = type; |
|
|
|
this.btgetdata2() |
|
|
|
}, |
|
|
|
selitem3(type) { |
|
|
|
console.log('1111111111'); |
|
|
|
console.log(type); |
|
|
|
// console.log(type); |
|
|
|
this.klselt = type; |
|
|
|
this.btgetdata3() |
|
|
|
}, |
|
|
|
@ -408,12 +397,6 @@ export default { |
|
|
|
type: 'bar', |
|
|
|
barMaxWidth: 'auto', |
|
|
|
barWidth: 15, |
|
|
|
// backgroundStyle: { |
|
|
|
// showBackground: true, |
|
|
|
// borderColor: '#B03A5B', |
|
|
|
// shadowColor: 'rgba(42, 18, 255,0.5)', |
|
|
|
// shadowBlur: 15 |
|
|
|
// }, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
color: function () { |
|
|
|
@ -427,24 +410,6 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
// color: { |
|
|
|
// x: 0, |
|
|
|
// y: 0, |
|
|
|
// x2: 0, |
|
|
|
// y2: 1, |
|
|
|
// type: 'linear', |
|
|
|
// global: false, |
|
|
|
// colorStops: [ |
|
|
|
// { |
|
|
|
// offset: 0, |
|
|
|
// color: '#0b9eff', |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// offset: 1, |
|
|
|
// color: '#63caff', |
|
|
|
// }, |
|
|
|
// ], |
|
|
|
// }, |
|
|
|
}, |
|
|
|
label: { |
|
|
|
show: true, |
|
|
|
@ -481,24 +446,6 @@ export default { |
|
|
|
// barGap: '40%', |
|
|
|
zlevel: -1, |
|
|
|
|
|
|
|
// backgroundStyle: { |
|
|
|
// showBackground: true, |
|
|
|
// borderColor: '#B03A5B', |
|
|
|
// shadowColor: 'rgba(42, 18, 255,0.5)', |
|
|
|
// shadowBlur: 15 |
|
|
|
// }, |
|
|
|
itemStyle: { |
|
|
|
normal: { |
|
|
|
// color: function () { |
|
|
|
// return new echarts.graphic.LinearGradient(0, 0, 0, 0.7, [ |
|
|
|
// { offset: 0, color: "#00B4FF" }, |
|
|
|
// { offset: 1, color: "#2F00FF" } |
|
|
|
// ], false) |
|
|
|
// }, |
|
|
|
|
|
|
|
// color:'rgba(8, 15, 56,1)' |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
data: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], |
|
|
|
@ -533,12 +480,7 @@ export default { |
|
|
|
color: '#fff' |
|
|
|
}, |
|
|
|
extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);', //添加阴影 |
|
|
|
formatter: function (params) { |
|
|
|
console.log(params); |
|
|
|
if (params.seriesName != "") { |
|
|
|
return params.name + ' : 有 ' + params.value + ' 人'; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
}; |
|
|
|
|
|
|
|
@ -546,75 +488,12 @@ export default { |
|
|
|
option && myChart.setOption(option); |
|
|
|
}, |
|
|
|
|
|
|
|
// 大面积折线图 |
|
|
|
// line_zone() { |
|
|
|
// var chartDom = document.getElementById("kl-line"); |
|
|
|
// var myChart = echarts.init(chartDom); |
|
|
|
// var option; |
|
|
|
|
|
|
|
// let base = +new Date(2022, 9, 3); |
|
|
|
// let oneDay = 24 * 3600 * 1000; |
|
|
|
// let date = []; |
|
|
|
// let data = [Math.random() * 300]; |
|
|
|
// for (let i = 1; i < 20000; i++) { |
|
|
|
// var now = new Date((base += oneDay)); |
|
|
|
// date.push( |
|
|
|
// [now.getFullYear(), now.getMonth() + 1, now.getDate()].join("/") |
|
|
|
// ); |
|
|
|
// data.push(Math.round((Math.random() - 0.5) * 20 + data[i - 1])); |
|
|
|
// } |
|
|
|
// option = { |
|
|
|
// xAxis: { |
|
|
|
// type: "category", |
|
|
|
// boundaryGap: false, |
|
|
|
// data: date, |
|
|
|
// }, |
|
|
|
// yAxis: { |
|
|
|
// type: "value", |
|
|
|
// boundaryGap: [0, "100%"], |
|
|
|
// //网格线 |
|
|
|
// splitLine: { |
|
|
|
// lineStyle: { |
|
|
|
// type: "soild", |
|
|
|
// color: "#2F00FF", |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
// }, |
|
|
|
|
|
|
|
// series: [ |
|
|
|
// { |
|
|
|
// name: "Fake Data", |
|
|
|
// type: "line", |
|
|
|
// symbol: "none", |
|
|
|
// sampling: "lttb", |
|
|
|
// itemStyle: { |
|
|
|
// color: "rgb(255, 170, 131)", |
|
|
|
// }, |
|
|
|
// areaStyle: { |
|
|
|
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ |
|
|
|
// { |
|
|
|
// offset: 0, |
|
|
|
// color: "rgba(255, 158, 68,0.6)", |
|
|
|
// }, |
|
|
|
// { |
|
|
|
// offset: 1, |
|
|
|
// color: "rgb(255, 70, 131,0.6)", |
|
|
|
// }, |
|
|
|
// ]), |
|
|
|
// }, |
|
|
|
// data: data, |
|
|
|
// }, |
|
|
|
// ], |
|
|
|
// }; |
|
|
|
|
|
|
|
// option && myChart.setOption(option); |
|
|
|
// }, |
|
|
|
|
|
|
|
// 今日各场馆进馆人数趋势 |
|
|
|
line_zone() { |
|
|
|
var chartDom = document.getElementById("kl-line"); |
|
|
|
var myChart = echarts.init(chartDom); |
|
|
|
var option; |
|
|
|
console.log(this.rsqsData_z); |
|
|
|
|
|
|
|
var xData = ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '20:00', '21:00']; |
|
|
|
var color = ['#FF99CC', '#6666FF', '#FF6600', '#7049f0', '#fa704d', '#01babc',] |
|
|
|
var name = [] |
|
|
|
@ -800,29 +679,18 @@ export default { |
|
|
|
|
|
|
|
getStat() { |
|
|
|
let that = this |
|
|
|
console.log(that); |
|
|
|
homeApi.allGroupNum().then(res => { |
|
|
|
// get allTimeData |
|
|
|
const tmpdata = res.data.returnData |
|
|
|
console.log(tmpdata); |
|
|
|
this.day_num = tmpdata.day.noRepeatInNum |
|
|
|
this.week_num_num = tmpdata.week.noRepeatInNum |
|
|
|
this.week_num = tmpdata.week.noRepeatInNum |
|
|
|
this.mon_num = tmpdata.month.noRepeatInNum |
|
|
|
this.year_num = tmpdata.year.noRepeatInNum |
|
|
|
|
|
|
|
// let btdata = new Array(); |
|
|
|
// let bvdata = new Array(); |
|
|
|
// tmpdata.foreach(function(item,index){ |
|
|
|
// console.log(item); |
|
|
|
// console.log(index); |
|
|
|
// }); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
getHomeBarData() { |
|
|
|
let that = this |
|
|
|
console.log(that); |
|
|
|
homeApi.homeBarData().then(res => { |
|
|
|
// get allTimeData |
|
|
|
const tmpdata = res.data.data.allTimeData |
|
|
|
@ -831,155 +699,58 @@ export default { |
|
|
|
|
|
|
|
let datas = [] |
|
|
|
Object.values(tmpdata).forEach((value) => { |
|
|
|
console.log(value.num); |
|
|
|
datas.push(value.num) |
|
|
|
|
|
|
|
}); |
|
|
|
console.log(datas); |
|
|
|
|
|
|
|
that.klqsDatas = datas |
|
|
|
console.log(this.klqsDatas); |
|
|
|
|
|
|
|
|
|
|
|
groupsData.forEach((item) => { |
|
|
|
console.log(item); |
|
|
|
// that.proportionData = item.proportion |
|
|
|
// console.log(this.proportionData); |
|
|
|
that.proportionData.push(item.proportion) |
|
|
|
console.log(this.proportionData); |
|
|
|
that.groupNameData.push(item.groupName) |
|
|
|
console.log(this.groupNameData); |
|
|
|
// console.log(value); |
|
|
|
// datas.push(value) |
|
|
|
}) |
|
|
|
|
|
|
|
// this.proportionData.forEach((item) => { |
|
|
|
// console.log(item); |
|
|
|
// let rsqsData = [] |
|
|
|
// Object.values(item).forEach((value) => { |
|
|
|
// // console.log(value); |
|
|
|
// rsqsData.push(value) |
|
|
|
// console.log(rsqsData); |
|
|
|
|
|
|
|
// }); |
|
|
|
// that.proportionData_z.push(rsqsData) |
|
|
|
// console.log(that.proportionData_z); |
|
|
|
// groupsData.forEach((item) => { |
|
|
|
// that.proportionData.push(item.proportion) |
|
|
|
// that.groupNameData.push(item.groupName) |
|
|
|
// }) |
|
|
|
|
|
|
|
// let rsqsData = [] |
|
|
|
// Object.values(this.rsqsDatas).forEach((value) => { |
|
|
|
// console.log(value); |
|
|
|
// rsqsData.push(value) |
|
|
|
// console.log(rsqsData); |
|
|
|
// that.rsqsData_z = rsqsData |
|
|
|
// console.log(that.rsqsData_z); |
|
|
|
// }); |
|
|
|
// this.day_num = tmpdata.day.noRepeatInNum |
|
|
|
// this.week_num_num = tmpdata.week.noRepeatInNum |
|
|
|
// this.mon_num = tmpdata.month.noRepeatInNum |
|
|
|
// this.year_num = tmpdata.year.noRepeatInNum |
|
|
|
|
|
|
|
// let btdata = new Array(); |
|
|
|
// let bvdata = new Array(); |
|
|
|
// tmpdata.foreach(function(item,index){ |
|
|
|
// console.log(item); |
|
|
|
// console.log(index); |
|
|
|
// }); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 查看拥挤并计算舒适度 |
|
|
|
getInfoDatas() { |
|
|
|
let that = this |
|
|
|
console.log(that); |
|
|
|
homeApi.allInfoDatas().then(res => { |
|
|
|
// get allTimeData |
|
|
|
console.log(res); |
|
|
|
this.ssjgNumDatas = res.data.returnData |
|
|
|
// this.ssjgNumDatas = res.data.returnData |
|
|
|
// let ssjgNumDatas = this.ssjgNumDatas |
|
|
|
// ssjgNumDatas.forEach(item => { |
|
|
|
// console.log(parseInt(item.proportion)); |
|
|
|
// let proportion = parseInt(item.proportion) |
|
|
|
// if (proportion >= 80 && proportion <= 90) { |
|
|
|
// console.log('11111111'); |
|
|
|
// this.$refs.proportionbox.addClass('rbrate2') |
|
|
|
// } |
|
|
|
// if (proportion > 90) { |
|
|
|
// console.log('222222'); |
|
|
|
// // console.log(this.$refs.proportionbox) |
|
|
|
// this.$refs.proportionbox.addClass('rbrate3') |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// console.log(tmpdata); |
|
|
|
// console.log(tmpdata.01.proportion); |
|
|
|
// let arr = JSON.stringify(tmpdata) |
|
|
|
// console.log(arr); |
|
|
|
// this.day_num = tmpdata.day.noRepeatInNum |
|
|
|
// this.week_num_num = tmpdata.week.noRepeatInNum |
|
|
|
// this.mon_num = tmpdata.month.noRepeatInNum |
|
|
|
// this.year_num = tmpdata.year.noRepeatInNum |
|
|
|
|
|
|
|
// let btdata = new Array(); |
|
|
|
// let bvdata = new Array(); |
|
|
|
// tmpdata.foreach(function(item,index){ |
|
|
|
// console.log(item); |
|
|
|
// console.log(index); |
|
|
|
// }); |
|
|
|
that.ssjgNumDatas = res.data.returnData |
|
|
|
|
|
|
|
ssjgNumDatas.forEach(item => { |
|
|
|
let proportion = parseInt(item.proportion) |
|
|
|
if (proportion >= 80 && proportion <= 90) { |
|
|
|
this.$refs.proportionbox.addClass('rbrate2') |
|
|
|
} |
|
|
|
if (proportion > 90) { |
|
|
|
this.$refs.proportionbox.addClass('rbrate3') |
|
|
|
} |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
getGcgNumDatas() { |
|
|
|
let that = this |
|
|
|
console.log(that); |
|
|
|
|
|
|
|
homeApi.allGcgNumDatas().then(res => { |
|
|
|
// get allTimeData |
|
|
|
const tmpdata = res.data.data |
|
|
|
console.log(tmpdata); |
|
|
|
tmpdata.forEach((item) => { |
|
|
|
console.log(item); |
|
|
|
console.log(item.list); |
|
|
|
that.rsqsDatas.push(item.list) |
|
|
|
console.log(this.rsqsDatas); |
|
|
|
// console.log(value); |
|
|
|
// datas.push(value) |
|
|
|
// let rsqsData = [] |
|
|
|
// Object.values(item.list).forEach((value) => { |
|
|
|
// console.log(value); |
|
|
|
// rsqsData.push(value) |
|
|
|
// // console.log(rsqsData); |
|
|
|
// that.rsqsData_z.push(rsqsData) |
|
|
|
// console.log(that.rsqsData_z); |
|
|
|
// // console.log(that.rsqsData_z); |
|
|
|
// }); |
|
|
|
}) |
|
|
|
|
|
|
|
this.rsqsDatas.forEach((item) => { |
|
|
|
console.log(item); |
|
|
|
let rsqsData = [] |
|
|
|
Object.values(item).forEach((value) => { |
|
|
|
// console.log(value); |
|
|
|
rsqsData.push(value) |
|
|
|
console.log(rsqsData); |
|
|
|
|
|
|
|
}); |
|
|
|
that.rsqsData_z.push(rsqsData) |
|
|
|
console.log(that.rsqsData_z); |
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
// this.day_num = tmpdata.day.noRepeatInNum |
|
|
|
// this.week_num_num = tmpdata.week.noRepeatInNum |
|
|
|
// this.mon_num = tmpdata.month.noRepeatInNum |
|
|
|
// this.year_num = tmpdata.year.noRepeatInNum |
|
|
|
|
|
|
|
// let btdata = new Array(); |
|
|
|
// let bvdata = new Array(); |
|
|
|
// tmpdata.foreach(function(item,index){ |
|
|
|
// console.log(item); |
|
|
|
// console.log(index); |
|
|
|
// }); |
|
|
|
|
|
|
|
}); |
|
|
|
} |
|
|
|
}, |
|
|
|
|