Browse Source

调整体育文化页面

master
453530270@qq.com 3 years ago
parent
commit
aec357cb7a
  1. BIN
      src/assets/ty_jg_bg.png
  2. BIN
      src/assets/wh_00.png
  3. 314
      src/views/TycView.vue
  4. 303
      src/views/WhView.vue

BIN
src/assets/ty_jg_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
src/assets/wh_00.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

314
src/views/TycView.vue

@ -1,9 +1,32 @@
<template>
<div class="tyc">
<div class="topnav">体育</div>
<div class="topnav">体育</div>
<!-- 图形 -->
<div class="tyclogo">
<div class="tyname">体育场</div>
<div class="tyname">体育</div>
<div class="tydesc">体育场|体育馆|游泳馆</div>
</div>
<!-- 总计进馆人数 -->
<div class="jgbox">
<div class="jg_title">总计进馆人数</div>
<div class="jgcon">
<div class="jgitem">
<div class="jgimg"><img src="../assets/icon01.png"/></div>
<span class="jgival">234,255</span>
<span class="jgdesc">今日进馆人数</span>
</div>
<div class="jgitem">
<div class="jgimg"><img src="../assets/icon02.png"/></div>
<span class="jgival">234,255</span>
<span class="jgdesc">本月进馆人数</span>
</div>
<div class="jgitem">
<div class="jgimg"><img src="../assets/icon03.png"/></div>
<span class="jgival">234,255</span>
<span class="jgdesc">本年进馆人数</span>
</div>
</div>
</div>
<!-- 进馆人数统计 -->
<div class="gcins">
@ -40,16 +63,68 @@
background-image: url("../assets/tyc_00.png");
background-repeat: no-repeat;
background-size: 100%;
background-position: center center;
background-position: 0 0;
height: 12rem;
}
.tyclogo .tyname {
line-height: 12rem;
height: 3rem;
line-height: 3rem;
text-align: right;
padding-right: 16%;
padding-right: 6.06rem;
font-size: 2.02rem;
padding-top: 1.6rem;
padding-top: 4.8rem;
}
.tyclogo .tydesc{
height: 2rem;
line-height: 2rem;
font-size: 1.03rem;
text-align: right;
padding-right: 1.06rem;
color: #999;
}
/* 总计进馆 */
.jgbox{
margin-top: 1.02rem;
width: 100%;
height: 12rem;
}
.jgbox .jg_title{
background-image: url('../assets/ty_jg_bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: 0 0;
padding-left: 3.2rem;
height: 2.06rem;
line-height: 2.06rem;
}
.jgbox .jgcon{
width: 100%;
height: 7rem;
padding-top: 2rem;
}
.jgbox .jgcon .jgitem{
width: 30%;
margin-left: 3%;
float: left;
}
.jgbox .jgcon .jgitem .jgimg{
margin-left: auto;
margin-right: auto;
text-align: center;
}
.jgbox .jgcon .jgitem span{
display: block;
text-align: center;
height: 1.8rem;
line-height: 1.8rem;
}
.jgbox .jgcon .jgitem .jgival{
font-size: 1.06rem;
}
.jgbox .jgcon .jgitem .jgdesc{
color: #666;
font-size: 0.8rem;
}
/* 进馆人数统计 */
.gcins {
@ -94,151 +169,126 @@ export default {
var option;
option = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "none",
},
formatter: function (params) {//hover160
return params[0].name + ": " + params[0].value + "个";
},
},
grid: {
width: "85%",
height: "65%",
top: "17%",
left: "12%",
left: '3%',
right: '3%',
bottom: '3%',
top: '10%',
containLabel: true
},
xAxis: {
data: ["1号商店进货", "2号商店进货", "3号商店进货", "4号商店进货"],
axisTick: { show: false },
xAxis: [{
data: [
'08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00',
],
axisLine: {
lineStyle: {
color: "#483D8B",
color: '#0095FF',
width: 1,
type: 'solid',
},
show: true
},
axisLabel: {
color: "#483D8B",
interval: 0,//0
fontSize: "12",//x
itemSize: "",
formatter: function (params) {
var newParamsName = ""; //
var paramsNameNumber = params.length; //
var provideNumber = 4; //
var rowNumber = Math.ceil(paramsNameNumber / provideNumber); //
/**
* 判断标签的个数是否大于规定的个数 如果大于则进行换行处理 如果不大于即等于或小于就返回原标签
*/
// rowNumber>1
if (paramsNameNumber > provideNumber) {
/** 循环每一行,p表示行 */
for (var p = 0; p < rowNumber; p++) {
var tempStr = ""; //
var start = p * provideNumber; //
var end = start + provideNumber; //
//
if (p == rowNumber - 1) {
//
tempStr = params.substring(start, paramsNameNumber);
} else {
//
tempStr = params.substring(start, end) + "\n";
}
newParamsName += tempStr; //
}
} else {
//
newParamsName = params;
}
//
return newParamsName;
},
axisTick: {
show: false,
},
axisPointer: {
type: "shadow",
splitLine: {
show: false
},
},
yAxis: {
name: "单位:个",
type: "value",
//Y
min: 0,
max: 100,
interval: 20,
axisLabel: {
color: "#483D8B",
},
axisTick: { show: false },
show: true,
textStyle: {
color: '#fff'
}
}
}],
yAxis: [{
type: 'value',
axisLine: {
show: false
},
axisTick: {
show: false,
lineStyle: {
color: "#483D8B",
},
},
splitLine: {
show: true,
lineStyle: {
color: "rgba( 72,61,139,0.7)",
type: "dashed",
},
// 使
color: '#027eff'
}
},
axisLabel: {
color: '#0095FF',
}
}],
series: [{
// name: '',
type: 'bar',
barGap: '5%',
barWidth: '10%',
barCategoryGap: '60%',
stack: 1,
itemStyle: {
normal: {
barBorderRadius: [30, 30, 0, 0],
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{
offset: 0,
color: '#00feff'
},
{
offset: 1,
color: '#0286ff'
}
]
)
}
},
data: [
14000,
11000,
10000,
9000,
8000,
7000,
5000,
4000,
3000,
],
zlevel: 11
},
series: [
{
name: "hill",
type: "pictorialBar",
barCategoryGap: "5%",
symbol:
"path://M0,10 L10,10 C5.5,10 5.5,5 5,0 C4.5,5 4.5,10 0,10 z",
//< symbol: 'path://path://M10 600 Q 95 0 180 600' >
//< symbol: 'triangle' >
itemStyle: {
opacity: 1,
color: {//
type: "linear",
//x y x2 y2 ,
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "red", // 0%
},
{
offset: 0.3,
color: "rgba(123,104,238, .8)", // 30%
},
{
offset: 1,
color: "rgba(123,104,238, .1)", // 100%
},
],
global: false, // false
},
},
emphasis: {
itemStyle: {
opacity: 1,
},
},
data: [60, 95, 70, 52],
z: 10,
{
// name: '',
type: 'scatter',
stack: 1,
xAxisIndex: 0,
symbolOffset: [0, 0], //
data: [0, 0, 0, 0, 0, 0, 0, 0, 0],
itemStyle: {
normal: {
color: '#fff'
}
},
{
name: "glyph",
type: "pictorialBar",
barGap: "-100%",//
symbolPosition: "end",
symbolSize: 0,
symbolOffset: [0, "100%"],
data: [],
symbolSize: 13,
zlevel: 10,
z: 2,
},
{
name: '背景',
type: 'bar',
barWidth: '10%',
barGap: '-100%',
data: [15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000],
itemStyle: {
normal: {
color: '#004298',
barBorderRadius: 30,
}
},
],
};
z: 1,
},
]
}
option && myChart.setOption(option);
},

303
src/views/WhView.vue

@ -1,10 +1,297 @@
<template>
<div class="">
第三個頁面
<div class="tyc">
<div class="topnav">文化</div>
<!-- 图形 -->
<div class="tyclogo">
<div class="tyname">文化</div>
<div class="tydesc">图书馆|文化馆|博物馆</div>
</div>
<!-- 总计进馆人数 -->
<div class="jgbox">
<div class="jg_title">总计进馆人数</div>
<div class="jgcon">
<div class="jgitem">
<div class="jgimg"><img src="../assets/icon01.png"/></div>
<span class="jgival">234,255</span>
<span class="jgdesc">今日进馆人数</span>
</div>
<div class="jgitem">
<div class="jgimg"><img src="../assets/icon02.png"/></div>
<span class="jgival">234,255</span>
<span class="jgdesc">本月进馆人数</span>
</div>
<div class="jgitem">
<div class="jgimg"><img src="../assets/icon03.png"/></div>
<span class="jgival">234,255</span>
<span class="jgdesc">本年进馆人数</span>
</div>
</div>
</div>
<!-- 进馆人数统计 -->
<div class="gcins">
<div class="gcins_title">进馆人数统计</div>
<div id="gcins_charts" style="height:16rem"></div>
</div>
<!-- 人数状态 -->
<div class="incbox"></div>
</div>
</template>
<script>
export default{
name:"gym"
}
</script>
</template>
<style scoped>
.tyc {
position: relative;
}
.topnav {
height: 46px;
line-height: 46px;
text-align: center;
padding: 12rpx;
width: 100%;
position: fixed;
z-index: 90;
color: #fff;
left: 0;
top: 0;
background-color: #080A25;
margin-bottom: 30rpx;
}
.tyclogo {
margin-top: 1.6rem;
background-image: url("../assets/wh_00.png");
background-repeat: no-repeat;
background-size: 100%;
background-position: 0 0;
height: 12rem;
}
.tyclogo .tyname {
height: 3rem;
line-height: 3rem;
text-align: right;
padding-right: 6.06rem;
font-size: 2.02rem;
padding-top: 4.8rem;
}
.tyclogo .tydesc{
height: 2rem;
line-height: 2rem;
font-size: 1.03rem;
text-align: right;
padding-right: 1.06rem;
color: #999;
}
/* 总计进馆 */
.jgbox{
margin-top: 1.02rem;
width: 100%;
height: 12rem;
}
.jgbox .jg_title{
background-image: url('../assets/ty_jg_bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: 0 0;
padding-left: 3.2rem;
height: 2.06rem;
line-height: 2.06rem;
}
.jgbox .jgcon{
width: 100%;
height: 7rem;
padding-top: 2rem;
}
.jgbox .jgcon .jgitem{
width: 30%;
margin-left: 3%;
float: left;
}
.jgbox .jgcon .jgitem .jgimg{
margin-left: auto;
margin-right: auto;
text-align: center;
}
.jgbox .jgcon .jgitem span{
display: block;
text-align: center;
height: 1.8rem;
line-height: 1.8rem;
}
.jgbox .jgcon .jgitem .jgival{
font-size: 1.06rem;
}
.jgbox .jgcon .jgitem .jgdesc{
color: #666;
font-size: 0.8rem;
}
/* 进馆人数统计 */
.gcins {
margin-top: 1.6rem;
}
.gcins .gcins_title {
background-image: url("../assets/tyc_tbg.png");
background-position: 0 0;
background-repeat: no-repeat;
background-size: 100%;
height: 1.8rem;
line-height: 1.8rem;
padding-left: 2.02rem;
}
/* 进馆人数 */
.incbox{
margin-top: 1.2rem;
background: url("../assets/tyc_bhd.png") no-repeat 0 center;
background-size: 100%;
height: 8rem;
}
</style>
<script>
import * as echarts from 'echarts';
export default {
name: 'TycView',
data() {
return {
//
}
},
mounted() {
this.cgsf_line()
},
methods: {
//
cgsf_line() {
var chartDom = document.getElementById('gcins_charts');
var myChart = echarts.init(chartDom);
var option;
option = {
grid: {
left: '3%',
right: '3%',
bottom: '3%',
top: '10%',
containLabel: true
},
xAxis: [{
data: [
'08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00',
],
axisLine: {
lineStyle: {
color: '#0095FF',
width: 1,
type: 'solid',
},
show: true
},
axisTick: {
show: false,
},
splitLine: {
show: false
},
axisLabel: {
show: true,
textStyle: {
color: '#fff'
}
}
}],
yAxis: [{
type: 'value',
axisLine: {
show: false
},
axisTick: {
show: false,
},
splitLine: {
show: true,
lineStyle: {
// 使
color: '#027eff'
}
},
axisLabel: {
color: '#0095FF',
}
}],
series: [{
// name: '',
type: 'bar',
barGap: '5%',
barWidth: '10%',
barCategoryGap: '60%',
stack: 1,
itemStyle: {
normal: {
barBorderRadius: [30, 30, 0, 0],
color: new echarts.graphic.LinearGradient(
0, 0, 0, 1, [{
offset: 0,
color: '#00feff'
},
{
offset: 1,
color: '#0286ff'
}
]
)
}
},
data: [
14000,
11000,
10000,
9000,
8000,
7000,
5000,
4000,
3000,
],
zlevel: 11
},
{
// name: '',
type: 'scatter',
stack: 1,
xAxisIndex: 0,
symbolOffset: [0, 0], //
data: [0, 0, 0, 0, 0, 0, 0, 0, 0],
itemStyle: {
normal: {
color: '#fff'
}
},
symbolSize: 13,
zlevel: 10,
z: 2,
},
{
name: '背景',
type: 'bar',
barWidth: '10%',
barGap: '-100%',
data: [15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000, 15000],
itemStyle: {
normal: {
color: '#004298',
barBorderRadius: 30,
}
},
z: 1,
},
]
}
option && myChart.setOption(option);
},
},
}
</script>
Loading…
Cancel
Save