微信统计

This commit is contained in:
shijingjing
2022-12-20 10:21:22 +08:00
parent 3ecfb9e308
commit afbad86c7e
3 changed files with 153 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ export default {
component: message component: message
}, },
], ],
tabIndex: 1, tabIndex: 0,
areaId: '', areaId: '',
areaName: '', areaName: '',
} }

View File

@@ -25,6 +25,14 @@
<div class="card_name">新增积分事件</div> <div class="card_name">新增积分事件</div>
<div class="card_num">234</div> <div class="card_num">234</div>
</div> </div>
<div class="card">
<div class="card_name">新增积分</div>
<div class="card_num">234</div>
</div>
<div class="card">
<div class="card_name">新增走访记录</div>
<div class="card_num">234</div>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -90,7 +98,7 @@ export default {
.card_num { .card_num {
font-size: 36px; font-size: 36px;
color: #000000; color: #000000;
font-weight: 500; font-weight: 600;
margin-top: 12px; margin-top: 12px;
} }
} }

View File

@@ -19,6 +19,10 @@
</div> </div>
</div> </div>
<div class="friends_box">
<div id="friends"></div>
</div>
<div class="head"> <div class="head">
<span>居民群统计</span><span>(统计数据为去重后的数据)</span> <span>居民群统计</span><span>(统计数据为去重后的数据)</span>
</div> </div>
@@ -41,10 +45,15 @@
<div class="item_num">18 <img src="../img/down.png" alt="" class="imgs"></div> <div class="item_num">18 <img src="../img/down.png" alt="" class="imgs"></div>
</div> </div>
</div> </div>
<div class="groups_box">
<div id="groups"></div>
</div>
</div> </div>
</template> </template>
<script> <script>
import echarts from 'echarts';
export default { export default {
name: "wechat", name: "wechat",
data() { data() {
@@ -52,8 +61,127 @@ export default {
} }
}, },
mounted() {
this.getFriendsEcharts()
this.getGroupsEcharts()
},
methods: { methods: {
getFriendsEcharts() {
let friendsDom = document.getElementById('friends');
let myChart = echarts.init(friendsDom);
let option = {
tooltip: {
trigger: "axis",
},
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月'],
axisTick: {
show: false,
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
axisTick: {
show: false,
}
},
series: [
{
data: [350, 230, 224, 218, 135],
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
},
itemStyle: {
color: '#3975C6', // 折角颜色
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [ // 渐变颜色
{
offset: 0,
color: '#2891ff33',
},
{
offset: 1,
color: '#2891ff00',
},
],
global: false,
},
},
}
]
};
option && myChart.setOption(option);
},
getGroupsEcharts() {
let groupsDom = document.getElementById('groups');
let myChart = echarts.init(groupsDom);
let option = {
tooltip: {
trigger: "axis",
},
xAxis: {
type: 'category',
data: ['1月', '2月', '3月', '4月', '5月'],
axisTick: {
show: false,
}
},
yAxis: {
type: 'value',
axisLine: {
show: false,
},
axisTick: {
show: false,
}
},
series: [
{
data: [350, 230, 224, 218, 135],
type: 'line',
lineStyle: {
color: '#3975C6', // 折线线条颜色
},
itemStyle: {
color: '#3975C6', // 折角颜色
},
areaStyle: {
color: {
type: 'linear',
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [ // 渐变颜色
{
offset: 0,
color: '#2891ff33',
},
{
offset: 1,
color: '#2891ff00',
},
],
global: false,
},
},
}
]
};
option && myChart.setOption(option);
}
}, },
} }
</script> </script>
@@ -104,5 +232,19 @@ export default {
} }
} }
} }
.friends_box,
.groups_box {
margin-top: 24px;
width: 100%;
height: 514px;
background: #FFF;
#friends,
#groups {
width: 100%;
height: 100%;
}
}
} }
</style> </style>