Browse Source

体育馆移动端完善2

master
‘daijinzheng@xingtongworld.com’ 3 years ago
parent
commit
e4287d7ec4
  1. BIN
      src/assets/img/left_t2_bg.png
  2. BIN
      src/assets/img/left_t3_bg.png
  3. 57
      src/views/HomeView.vue
  4. 347
      src/views/TycView.vue
  5. 23
      src/views/WhView.vue

BIN
src/assets/img/left_t2_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/assets/img/left_t3_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

57
src/views/HomeView.vue

@ -260,9 +260,11 @@ export default {
xAxis: {
axisLabel: {
color: '#FFFFFF',
fontSize: 12,
fontSize: 10,
interval: 0,
// show: false,
rotate:45,
// show: true,
// inside:false
},
axisTick: {
lineStyle: {
@ -281,8 +283,8 @@ export default {
},
show: true,
},
data: this.kltdata,
//data: ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '20:00', '21:00', '22:00'],
// data: this.kltdata,
data: ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '20:00', '21:00', '22:00'],
type: 'category',
},
yAxis: {
@ -399,6 +401,21 @@ export default {
}
},
],
tooltip: {
show: "true",
trigger: 'item',
backgroundColor: 'rgba(0,0,0,0.7)', //
padding: [8, 10], //
textStyle: {
color: '#fff'
},
extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);', //
formatter: function (params) {
if (params.seriesName != "") {
return params.name + ' : 有 ' + params.value + ' 人';
}
},
},
};
@ -520,7 +537,19 @@ export default {
})
}
option = {
tooltip: {
trigger: "axis",
axisPointer: { //
type: 'line', // 线'line' | 'shadow'
lineStyle: {
color: '#57617B'
}
},
formatter: '{b}<br />{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}<br />{a3}: {c3}<br />{a4}: {c4}<br />{a5}: {c5}',
backgroundColor: 'rgba(0,0,0,0.7)', //
padding: [8, 10], //
extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);', //
},
grid: {
borderWidth: 0,
top: 160,
@ -849,8 +878,9 @@ export default {
}
.klqs .klbtn {
float: left;
float: right;
margin-left: 1.06rem;
margin-right: 1rem;
}
.klqs .klbtn span {
@ -964,7 +994,7 @@ export default {
}
.today_rs .tdrs_title {
background-image: url("../assets/img/klqs_bg.png");
background-image: url("../assets/img/left_t3_bg.png");
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: 0 0;
@ -984,7 +1014,7 @@ export default {
}
.pcgrs .pcgrs_title {
background-image: url("../assets/img/klqs_bg.png");
background-image: url("../assets/img/left_t2_bg.png");
background-repeat: no-repeat;
background-size: 100%;
height: 3.8rem;
@ -1023,7 +1053,8 @@ export default {
width: 69%;
display: block;
float: left;
text-align: center;
text-align: left;
margin-left: 2rem;
}
/* .pcgrs .pcg_item:nth-child(6) .pcval {
@ -1036,8 +1067,8 @@ export default {
} */
.pcgrs .pcg_item .pcrate {
width: 32%;
height: 3.3rem;
width: 30%;
height: 3.4rem;
line-height: 3.3rem;
display: block;
float: left;
@ -1045,8 +1076,8 @@ export default {
margin-top: 3.78rem;
text-align: center;
position: absolute;
bottom: 3.5rem;
right: 0.8rem;
bottom: 3.45rem;
right: 1.33rem;
background-image: url('../assets/img/安静.png');
background-size: 100% 100%;
background-position: 100% 100%;

347
src/views/TycView.vue

@ -173,13 +173,15 @@
line-height: 1.8rem;
padding-left: 2.02rem;
}
/* 各场馆人次占比 */
.pcgrbox{
.pcgrbox {
margin-top: 1.6rem;
padding-bottom: 4rem;
height: 8rem;
}
.pcgrbox .pcb_title{
.pcgrbox .pcb_title {
background-image: url("../assets/img/tyc_tbg.png");
background-position: 0 0;
background-repeat: no-repeat;
@ -188,11 +190,13 @@
line-height: 1.8rem;
padding-left: 2.02rem;
}
.pcgrbox .pcbcon{
.pcgrbox .pcbcon {
width: 100%;
margin-top: 2rem;
}
.pcgrbox .pcbcon .pcbitem{
.pcgrbox .pcbcon .pcbitem {
width: 30%;
height: 5rem;
float: left;
@ -202,13 +206,16 @@
background-position: 100%, 100%;
background-repeat: no-repeat; */
}
.pcgrbox .pcbcon .pcbitem div{
.pcgrbox .pcbcon .pcbitem div {
float: left;
}
.pcgrbox .pcbcon .pcbitem div:first{
.pcgrbox .pcbcon .pcbitem div:first {
margin-left: 0;
}
.pcgrbox .pcbcon .pcbitem .pcbval{
.pcgrbox .pcbcon .pcbitem .pcbval {
height: 5rem;
width: 5rem;
background-image: url('../assets/img/ty_pcb_val.png');
@ -219,7 +226,8 @@
line-height: 5rem;
text-align: center;
}
.pcgrbox .pcbcon .pcbitem .pcbdesc{
.pcgrbox .pcbcon .pcbitem .pcbdesc {
background-image: url('../assets/img/ty_pcb_desc.png');
background-position: 0 0;
background-repeat: no-repeat;
@ -236,23 +244,23 @@
/* 各场馆人数趋势 */
.gcgrs {
margin-top: 1.06rem;
margin-top: 1.06rem;
}
.gcgrs .gcgrs_title {
background-image: url("../assets/img/wh_tbg.png");
background-position: 0 0;
background-repeat: no-repeat;
background-size: 100% 100%;
height: 1.8rem;
line-height: 1.4rem;
padding-left: 2.02rem;
background-image: url("../assets/img/wh_tbg.png");
background-position: 0 0;
background-repeat: no-repeat;
background-size: 100% 100%;
height: 1.8rem;
line-height: 1.4rem;
padding-left: 2.02rem;
}
.gcgrs .gcgrs_charts {
margin-top: 2rem;
width: 100%;
height: 19rem;
margin-top: 2rem;
width: 100%;
height: 19rem;
}
</style>
<script>
@ -278,7 +286,15 @@ export default {
var option;
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function (params) {
return params[0].name + "</br>" + params[0].value
}
},
grid: {
left: '3%',
right: '3%',
@ -402,149 +418,162 @@ export default {
option && myChart.setOption(option);
},
//
cg_line(){
cg_line() {
var chartDom = document.getElementById("gc_charts");
var myChart = echarts.init(chartDom);
var option
var xData = ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00',];
var color = ['#FF99CC', '#6666FF', '#FF6600', '#7049f0', '#fa704d', '#01babc',]
var name = ['体育场', '体育馆', '游泳场馆']
var data = [
[137, 34, 135, 161, 74, 152, 110, 100, 150],
[174, 137, 135, 34, 152, 135, 140, 160, 100],
[134, 74, 137, 135, 161, 137, 300, 220, 250],
]
var series = [];
for (var i = 0; i < 6; i++) {
series.push({
name: name[i],
type: "line",
symbolSize: 3,// 10 [20, 10] 2010[ default: 4 ]
symbol: 'circle',//ECharts 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
smooth: true, //线
showSymbol: false, // symbol, false tooltip hover
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: color[i]
}, {
offset: 0.8,
color: 'rgba(255,255,255,0)'
}], false),
// shadowColor: 'rgba(255,255,255, 0.1)',
shadowBlur: 10,
opacity: 0.3,
}
},
itemStyle: {
normal: {
color: color[i],
lineStyle: {
width: 1,
type: 'solid' //'dotted'线 'solid'线
},
borderColor: color[i], // color
borderWidth: 8,//线 0 [ default: 0 ]
barBorderRadius: 0,
label: {
show: false,
},
opacity: 0.5,
}
},
data: data[i],
})
var myChart = echarts.init(chartDom);
var option
var xData = ['09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00',];
var color = ['#FF99CC', '#6666FF', '#FF6600', '#7049f0', '#fa704d', '#01babc',]
var name = ['体育场', '体育馆', '游泳场馆']
var data = [
[137, 34, 135, 161, 74, 152, 110, 100, 150],
[174, 137, 135, 34, 152, 135, 140, 160, 100],
[134, 74, 137, 135, 161, 137, 300, 220, 250],
]
var series = [];
for (var i = 0; i < 6; i++) {
series.push({
name: name[i],
type: "line",
symbolSize: 3,// 10 [20, 10] 2010[ default: 4 ]
symbol: 'circle',//ECharts 'circle', 'rect', 'roundRect', 'triangle', 'diamond', 'pin', 'arrow'
smooth: true, //线
showSymbol: false, // symbol, false tooltip hover
areaStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: color[i]
}, {
offset: 0.8,
color: 'rgba(255,255,255,0)'
}], false),
// shadowColor: 'rgba(255,255,255, 0.1)',
shadowBlur: 10,
opacity: 0.3,
}
option = {
// backgroundColor: "#141f56",
legend: {
bottom: 0,
right:20,
itemGap: 15,
itemWidth: 15,
textStyle: {
color: '#fff',
fontSize: '14'
},
data: name
},
title: {
// text: "",
textStyle: {
color: '#fff',
fontSize: '22',
fontWeight: 'normal',
},
subtextStyle: {
color: '#90979c',
fontSize: '16',
},
},
grid: {
borderWidth: 0,
top: 240,
bottom: 240,
textStyle: {
color: "#fff"
}
},
xAxis: [{
type: "category",
axisLine: {
show: false,
},
splitLine: {
show: false,
},
boundaryGap: false, //
axisTick: {
show: false
},
splitArea: {
show: false
},
axisLabel: {
inside: false,
textStyle: {
color: '#FFFFFF',
fontWeight: 'normal',
fontSize: '12',
},
},
data: xData,
}],
yAxis: {
type: 'value',
axisTick: {
show: false
},
axisLine: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#32346c ',
}
},
axisLabel: {
textStyle: {
color: '#0095FF',
fontWeight: 'normal',
fontSize: '12',
},
formatter: '{value}',
},
},
series: series,
},
itemStyle: {
normal: {
color: color[i],
lineStyle: {
width: 1,
type: 'solid' //'dotted'线 'solid'线
},
borderColor: color[i], // color
borderWidth: 8,//线 0 [ default: 0 ]
barBorderRadius: 0,
label: {
show: false,
},
opacity: 0.5,
}
},
data: data[i],
})
}
option = {
// backgroundColor: "#141f56",
legend: {
bottom: 0,
right: 20,
itemGap: 15,
itemWidth: 15,
textStyle: {
color: '#fff',
fontSize: '14'
},
data: name
},
title: {
// text: "",
textStyle: {
color: '#fff',
fontSize: '22',
fontWeight: 'normal',
},
subtextStyle: {
color: '#90979c',
fontSize: '16',
},
},
tooltip: {
trigger: "axis",
axisPointer: { //
type: 'line', // 线'line' | 'shadow'
lineStyle: {
color: '#57617B'
}
},
formatter: '{b}<br />{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}',
backgroundColor: 'rgba(0,0,0,0.7)', //
padding: [8, 10], //
extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);', //
},
grid: {
borderWidth: 0,
top: 240,
bottom: 240,
textStyle: {
color: "#fff"
}
},
xAxis: [{
type: "category",
axisLine: {
show: false,
},
splitLine: {
show: false,
},
boundaryGap: false, //
axisTick: {
show: false
},
splitArea: {
show: false
},
axisLabel: {
inside: false,
textStyle: {
color: '#FFFFFF',
fontWeight: 'normal',
fontSize: '12',
},
},
data: xData,
}],
yAxis: {
type: 'value',
axisTick: {
show: false
},
axisLine: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
color: '#32346c ',
}
},
axisLabel: {
textStyle: {
color: '#0095FF',
fontWeight: 'normal',
fontSize: '12',
},
formatter: '{value}',
},
},
series: series,
}
option && myChart.setOption(option);
option && myChart.setOption(option);
},
},

23
src/views/WhView.vue

@ -312,7 +312,15 @@ export default {
var option;
option = {
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function (params) {
return params[0].name + "</br>" + params[0].value
}
},
grid: {
left: '3%',
right: '3%',
@ -519,6 +527,19 @@ export default {
},
},
tooltip: {
trigger: "axis",
axisPointer: { //
type: 'line', // 线'line' | 'shadow'
lineStyle: {
color: '#57617B'
}
},
formatter: '{b}<br />{a0}: {c0}<br />{a1}: {c1}<br />{a2}: {c2}',
backgroundColor: 'rgba(0,0,0,0.7)', //
padding: [8, 10], //
extraCssText: 'box-shadow: 0 0 3px rgba(255, 255, 255, 0.4);', //
},
grid: {
borderWidth: 0,
top: 240,

Loading…
Cancel
Save