Browse Source

体育馆移动端完善4

master
‘daijinzheng@xingtongworld.com’ 3 years ago
parent
commit
84fea401d7
  1. BIN
      public/img/wh_right1.png
  2. BIN
      public/img/wh_right2.png
  3. BIN
      public/img/wh_right3.png
  4. 48
      src/App.vue
  5. BIN
      src/assets/img/wh_right1.png
  6. BIN
      src/assets/img/wh_right2.png
  7. BIN
      src/assets/img/wh_right3.png
  8. 58
      src/views/HomeView.vue
  9. 17
      src/views/TycView.vue
  10. 215
      src/views/WhView.vue

BIN
public/img/wh_right1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
public/img/wh_right2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
public/img/wh_right3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

48
src/App.vue

@ -2,9 +2,9 @@
<router-view /> <router-view />
<nav class="navbar"> <nav class="navbar">
<!-- &nbsp;&nbsp; --> <!-- &nbsp;&nbsp; -->
<router-link class="narRouter" to="/ty" active-class='ative'>体育</router-link> <router-link class="narRouter" to="/ty">体育</router-link>
<router-link class="narRouter" to="/" active-class='ative'>总览</router-link> <router-link class="narRouter" to="/">总览</router-link>
<router-link class="narRouter" to="/wh" active-class='ative'>文化</router-link> <router-link class="narRouter" to="/wh">文化</router-link>
</nav> </nav>
</template> </template>
@ -21,28 +21,52 @@
z-index: 90; z-index: 90;
} }
/* .navbar a.router-link-exact-active { .navbar a.router-link-exact-active {
background-color: #2132fa; /* background-color: #2132fa;
padding-bottom: 10px; padding-bottom: 10px;
background-image: linear-gradient(#2132fa, #1d37fb); */
width: 100px;
/* text-align: center; */
line-height: 44px;
/* background-color: #2132fa; */
background-image: linear-gradient(#2132fa, #1d37fb); background-image: linear-gradient(#2132fa, #1d37fb);
} */ background-repeat: no-repeat;
background-size: 50% 70%;
background-position: 50% 50%;
box-sizing: border-box;
padding: 0 0.9rem;
}
.navbar a { .navbar a {
display: block; display: block;
float: left; float: left;
width: 33.33%; width: 33.33% !important;
text-align: center; text-align: center;
line-height: 44px; line-height: 44px;
background-color: #0c2151; background-color: #0c2151;
} }
.ative { /* .navbar .narRouter {
width: 100px !important; display: block;
float: left;
width: 33.33% !important;
text-align: center; text-align: center;
line-height: 44px; line-height: 44px;
/* background-color: #2132fa; */ background-color: #0c2151;
} */
/* .navbar .ative {
width: 100px;
line-height: 44px;
background-image: linear-gradient(#2132fa, #1d37fb); background-image: linear-gradient(#2132fa, #1d37fb);
/* background-size: 50% 50%; */ background-repeat: no-repeat;
} background-size: 50% 70%;
background-position: 50% 50%;
box-sizing: border-box;
padding: 0 0.9rem;
} */
</style> </style>

BIN
src/assets/img/wh_right1.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
src/assets/img/wh_right2.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

BIN
src/assets/img/wh_right3.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

58
src/views/HomeView.vue

@ -61,12 +61,12 @@
<li> <li>
<span>体育馆</span> <span>体育馆</span>
<span>12%</span> <span>12%</span>
<span><img src="../assets/img/tyc_icon.png" /></span> <span><img src="../assets/img/tyg_icon.png" /></span>
</li> </li>
<li> <li>
<span>游泳场馆</span> <span>游泳场馆</span>
<span>12%</span> <span>12%</span>
<span><img src="../assets/img/tyc_icon.png" /></span> <span><img src="../assets/img/yyg_icon.png" /></span>
</li> </li>
</ul> </ul>
</div> </div>
@ -76,17 +76,17 @@
<div class="cglist cgright"> <div class="cglist cgright">
<ul> <ul>
<li> <li>
<span><img src="../assets/img/tyc_icon.png" /></span> <span><img src="../assets/img/tsg_icon.png" /></span>
<span>20%</span> <span>20%</span>
<span>图书馆</span> <span>图书馆</span>
</li> </li>
<li> <li>
<span><img src="../assets/img/tyc_icon.png" /></span> <span><img src="../assets/img/whg_icon.png" /></span>
<span>12%</span> <span>12%</span>
<span>文化馆</span> <span>文化馆</span>
</li> </li>
<li> <li>
<span><img src="../assets/img/tyc_icon.png" /></span> <span><img src="../assets/img/bwg_icon.png" /></span>
<span>12%</span> <span>12%</span>
<span>博物馆</span> <span>博物馆</span>
</li> </li>
@ -107,10 +107,12 @@
<div class="pcgrs"> <div class="pcgrs">
<div class="pcgrs_title">各场馆实时进馆人数</div> <div class="pcgrs_title">各场馆实时进馆人数</div>
<!-- 場館實時 --> <!-- 場館實時 -->
<div class="pcg_item" v-for="item in ssjgNumDatas" :key="item.groupId"> <div class="pcg_item" v-for="item in ssjgNumDatas" :key="item.groupId">
<span class="pcpos">体育场</span> <span class="pcpos">体育场</span>
<p class="pcval">{{ item.allEnter }}</p> <p class="pcval">{{ item.allEnter }}</p>
<span class="pcrate" :class="[{pcrate2: parseInt(item.proportion) >= 80 && parseInt(item.proportion) < 90},{pcrate3: parseInt(item.proportion) >= 90 }]">{{ item.proportion }}</span> <span class="pcrate"
:class="[{ pcrate2: parseInt(item.proportion) >= 80 && parseInt(item.proportion) < 90 }, { pcrate3: parseInt(item.proportion) >= 90 }]">{{
item.proportion }}</span>
</div> </div>
<!-- <div class="pcg_item"> <!-- <div class="pcg_item">
@ -174,6 +176,11 @@ export default {
ssjgNumDatas: [] ssjgNumDatas: []
} }
}, },
// created() {
// this.$nextTick(() => {
// this.cgchart()
// });
// },
mounted() { mounted() {
this.showorders() this.showorders()
this.cgrs_line() this.cgrs_line()
@ -262,7 +269,7 @@ export default {
color: '#FFFFFF', color: '#FFFFFF',
fontSize: 10, fontSize: 10,
interval: 0, interval: 0,
rotate:45, rotate: 45,
// show: true, // show: true,
// inside:false // inside:false
}, },
@ -425,12 +432,14 @@ export default {
// //
cgchart() { cgchart() {
var chartDom = document.getElementById('cgchart'); var chartDom = document.getElementById('cgchart');
chartDom.removeAttribute('_echarts_instance_');
var myChart = echarts.init(chartDom); var myChart = echarts.init(chartDom);
var option; var option;
option = { option = {
color: [ "#F2A0CE","#0780e2","#FF6504", "#01FE00","#00FFFF","#fdff00"], color: ["#F2A0CE", "#0780e2", "#FF6504", "#01FE00", "#00FFFF", "#fdff00"],
series: [ series: [
{ {
@ -764,7 +773,7 @@ export default {
width: 100%; width: 100%;
background-image: url("../assets/img/gymbox_bg.png"); background-image: url("../assets/img/gymbox_bg.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100% 100%;
background-position: 0 0; background-position: 0 0;
padding-top: 2.26rem; padding-top: 2.26rem;
height: 20rem; height: 20rem;
@ -775,7 +784,7 @@ export default {
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
padding-top: 0rem; padding-top: 0rem;
height: 12.68rem; /* height: 12.68rem; */
width: 100%; width: 100%;
} }
@ -783,19 +792,19 @@ export default {
width: 90%; width: 90%;
margin-left: auto; margin-left: auto;
margin-right: auto; margin-right: auto;
margin-top: 1rem; /* margin-top: 1rem; */
display: block; display: block;
padding-top: 0.2rem; /* padding-top: 0.2rem; */
height: 16rem; height: 16rem;
} }
.gymbox .gymnum { .gymbox .gymnum {
width: 100%; width: 100%;
margin: 0.6rem auto; /* margin: 0.6rem auto; */
text-align: center; text-align: center;
height: 3rem; height: 3rem;
position: absolute; position: absolute;
bottom: 0.66rem; bottom: 2rem;
/* padding-top: 0.7rem; */ /* padding-top: 0.7rem; */
} }
@ -821,7 +830,7 @@ export default {
width: 100%; width: 100%;
height: 4rem; height: 4rem;
line-height: 1.2; line-height: 1.2;
margin-top: 2.6rem; margin-top: 0.6rem;
} }
.numbox .numicon { .numbox .numicon {
@ -866,7 +875,7 @@ export default {
/** 客流趋势 */ /** 客流趋势 */
.klqs { .klqs {
margin-top: 3rem; margin-top: 2rem;
background-image: url("../assets/img/klqs_bg.png"); background-image: url("../assets/img/klqs_bg.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
@ -1035,22 +1044,25 @@ export default {
.pcgrs .pcg_item { .pcgrs .pcg_item {
margin-top: 0.4rem; margin-top: 0.4rem;
background-image: url("../assets/img/pcg_bg.png"); background-image: url("../assets/img/pcg_bg.png");
background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
height: 12rem; /* height: 12rem; */
width: 48%; width: 48%;
float: left; float: left;
margin-left: 2%; margin-left: 2%;
position: relative; position: relative;
margin-bottom: 1.6rem;
} }
.pcgrs .pcg_item .pcpos { .pcgrs .pcg_item .pcpos {
text-align: right; text-align: right;
font-size: 0.68rem; font-size: 0.68rem;
display: block; display: block;
width: 3.5rem; /* width: 3.5rem; */
text-align: left; text-align: left;
float: right; float: right;
margin-top: 1.6rem; margin-top: 1.6rem;
margin-right: 1.1rem;
/* padding-right: 0.9rem; */ /* padding-right: 0.9rem; */
} }
@ -1074,17 +1086,17 @@ export default {
} */ } */
.pcgrs .pcg_item .pcrate { .pcgrs .pcg_item .pcrate {
width: 30%; width: 32%;
height: 3.4rem; height: 3.4rem;
line-height: 3.3rem; line-height: 3.4rem;
display: block; display: block;
float: left; float: left;
font-size: 0.46rem; font-size: 0.46rem;
margin-top: 3.78rem; margin-top: 3.78rem;
text-align: center; text-align: center;
position: absolute; position: absolute;
bottom: 3.45rem; bottom: 0.4rem;
right: 1.33rem; right: 0.63rem;
background-image: url('../assets/img/安静.png'); background-image: url('../assets/img/安静.png');
background-size: 100% 100%; background-size: 100% 100%;
background-position: 100% 100%; background-position: 100% 100%;

17
src/views/TycView.vue

@ -30,7 +30,7 @@
</div> </div>
<!-- 进馆人数统计 --> <!-- 进馆人数统计 -->
<div class="gcins"> <div class="gcins">
<div class="gcins_title">进馆人数统计</div> <div class="gcins_title">24小时总进馆人流趋势</div>
<div id="gcins_charts" style="height:16rem"></div> <div id="gcins_charts" style="height:16rem"></div>
</div> </div>
<!-- 各场馆人次占比 --> <!-- 各场馆人次占比 -->
@ -91,12 +91,12 @@
} }
.tyclogo .tyname { .tyclogo .tyname {
height: 3rem; height: 2.5rem;
line-height: 3rem; line-height: 2.5rem;
text-align: right; text-align: right;
padding-right: 6.06rem; padding-right: 7.3rem;
font-size: 2.02rem; font-size: 1.7rem;
padding-top: 4.8rem; padding-top: 6.8rem;
} }
.tyclogo .tydesc { .tyclogo .tydesc {
@ -105,7 +105,7 @@
font-size: 1.03rem; font-size: 1.03rem;
text-align: right; text-align: right;
padding-right: 1.06rem; padding-right: 1.06rem;
color: #999; color: #fff;
} }
/* 总计进馆 */ /* 总计进馆 */
@ -232,7 +232,7 @@
background-position: 0 0; background-position: 0 0;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
font-size: 0.6rem; font-size: 0.8rem;
width: 5rem; width: 5rem;
height: 2rem; height: 2rem;
margin-top: 0.42rem; margin-top: 0.42rem;
@ -544,6 +544,7 @@ export default {
}, },
axisLabel: { axisLabel: {
inside: false, inside: false,
interval: 0,
textStyle: { textStyle: {
color: '#FFFFFF', color: '#FFFFFF',
fontWeight: 'normal', fontWeight: 'normal',

215
src/views/WhView.vue

@ -233,9 +233,9 @@
background-image: url("../assets/img/tyc_tbg.png"); background-image: url("../assets/img/tyc_tbg.png");
background-position: 0 0; background-position: 0 0;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100% 100%;
height: 2.4rem; height: 2.2rem;
line-height: 1.9rem; line-height: 2.2rem;
padding-left: 2.02rem; padding-left: 2.02rem;
} }
@ -276,9 +276,9 @@
} }
.tsgbox .tsgc_charts { .tsgbox .tsgc_charts {
margin-top: 2rem; /* margin-top: 2rem; */
width: 100%; width: 100%;
height: 16rem; height: 10rem;
} }
</style> </style>
<script> <script>
@ -460,7 +460,7 @@ export default {
] ]
var series = []; var series = [];
for (var i = 0; i < 6; i++) { for (var i = 0; i < 3; i++) {
series.push({ series.push({
name: name[i], name: name[i],
type: "line", type: "line",
@ -506,7 +506,7 @@ export default {
// backgroundColor: "#141f56", // backgroundColor: "#141f56",
legend: { legend: {
top: 0, top: 0,
right:30, right: 30,
itemGap: 15, itemGap: 15,
itemWidth: 20, itemWidth: 20,
itemHeight: 20, itemHeight: 20,
@ -572,6 +572,7 @@ export default {
}, },
axisLabel: { axisLabel: {
inside: false, inside: false,
interval: 0,
textStyle: { textStyle: {
color: '#FFFFFF', color: '#FFFFFF',
fontWeight: 'normal', fontWeight: 'normal',
@ -627,6 +628,11 @@ export default {
value: 323, value: 323,
}, },
]; ];
var libraryIcons = {
'Lend': '/img/wh_right1.png',
'Still': '/img/wh_right2.png',
'Accreditation': '/img/wh_right3.png'
};
var getArrByKey = (data, k) => { var getArrByKey = (data, k) => {
let key = k || "value"; let key = k || "value";
let res = []; let res = [];
@ -650,68 +656,156 @@ export default {
console.log(getSymbolData(data)); console.log(getSymbolData(data));
option = { option = {
// legend: {
// orient: 'vertical',
// top: 0,
// right: 0,
// itemGap: 15,
// itemWidth: 20,
// itemHeight: 20,
// textStyle: {
// color: '#fff',
// fontSize: '14'
// },
// data: [
// { icon: 'image://img/tyc_icon.png' },
// { icon: 'image://img/tyg_icon.png' },
// { icon: 'image://img/yyg_icon.png' },
// ]
// },
grid: { grid: {
top: '2%', show: false,
bottom: -15,
right: 30,
left: 30, left: 30,
containLabel: true right: -45,
top: 25,//
bottom: 0,//
containLabel: true,
}, },
xAxis: { xAxis: {
show: false show: false
}, },
yAxis: [{ yAxis: [
triggerEvent: true, {
show: true, triggerEvent: true,
// inverse: true, show: true,
data: getArrByKey(data, 'name'), // inverse: true,
axisLine: { // data: getArrByKey(data, 'name'),
show: false data: [
}, 'Lend', 'Still', 'Accreditation'
splitLine: { // '../assets/img/wh_right1.png','../assets/img/wh_right1.png','../assets/img/wh_right1.png'
show: false ],
}, // max:80,
axisTick: { axisLine: {
show: false show: false
},
axisLabel: {
show: false,
interval: 0,
color: '#fff',
align: 'left',
margin: 80,
fontSize: 12,
formatter: function (value) {
return '{title|' + value + '}'
}, },
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
// show: false,
type: 'category',
inverse: true, //truefalse
// interval: 0,
// color: '#fff',
// align: 'left',
// margin: 0,
fontSize: 12,
verticalAlign: 'bottom',
// formatter: function (value) {
// return '{title|' + value + '}'
// },
formatter: function (value) {
//return '{' + value + '| }\n{value|' + value + '}';
return '{' + value + '|}'; //icon
},
rich: {
// title: {
// width: 165
// },
value: {
lineHeight: 30,
align: 'center'
},
Lend: {
height: 30,
align: 'center',
backgroundColor: {
image: libraryIcons.Accreditation
}
},
Still: {
height: 30,
align: 'center',
backgroundColor: {
image: libraryIcons.Still
}
},
Accreditation: {
height: 30,
align: 'center',
backgroundColor: {
image: libraryIcons.Lend
}
}
}
}
}, },
}, { {
triggerEvent: true, triggerEvent: true,
show: true, show: true,
// inverse: true, // inverse: true,
data: getArrByKey(data, 'name'), data: getArrByKey(data, 'name'),
axisLine: { axisLine: {
show: false show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
interval: 0,
shadowOffsetX: '-20px',
color: '#fff',
align: 'right',
verticalAlign: 'bottom',
lineHeight: 42,
fontSize: 14,
formatter: function (value, index) {
return data[index].value + ' 册 '
}, },
} splitLine: {
}], show: false
},
axisTick: {
show: false
},
axisLabel: {
show: false,
interval: 0,
color: '#fff',
align: 'left',
// margin: 80,
fontSize: 12,
formatter: function (value) {
return '{title|' + value + '}'
},
},
}, {
triggerEvent: true,
show: true,
// inverse: true,
data: getArrByKey(data, 'name'),
axisLine: {
show: false
},
splitLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
interval: 0,
shadowOffsetX: '-20px',
color: '#fff',
align: 'right',
verticalAlign: 'bottom',
lineHeight: 42,
fontSize: 14,
formatter: function (value, index) {
return data[index].value + ' 册 '
},
}
}],
series: [{ series: [{
name: 'XXX', name: 'XXX',
type: 'pictorialBar', type: 'pictorialBar',
@ -733,6 +827,7 @@ export default {
yAxisIndex: 0, yAxisIndex: 0,
data: data, data: data,
barWidth: 10, barWidth: 10,
barGap:20,
// align: left, // align: left,
itemStyle: { itemStyle: {
normal: { normal: {

Loading…
Cancel
Save