bug
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
colConfigs: [
|
||||
{ prop: 'examinationName', label: '考试名称', align: 'left' },
|
||||
{ prop: 'allSubjectNumber', label: '试题总数', align: 'center' },
|
||||
{ prop: 'beginTime', label: '通过分数', align: 'center' },
|
||||
{ prop: 'passScore', label: '通过分数', align: 'center' },
|
||||
{ prop: 'status', label: '状态', align: 'center', format: v => this.dict.getLabel('qjEIStatus', v) },
|
||||
{ prop: 'examinationNumber', label: '考试人数', align: 'center' },
|
||||
{ prop: 'passNumber', label: '通过人数', align: 'center' }
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
</ai-card>
|
||||
<ai-card class="resident" title="居民统计">
|
||||
<template #right>
|
||||
<el-radio-group v-model="search4.dateRange" size="small" @change="getStatisticsHot">
|
||||
<el-radio-group v-model="search4.dateRange" size="small" @change="search4.date = [], getStatisticsHot">
|
||||
<el-radio-button label="0" >今天</el-radio-button>
|
||||
<el-radio-button label="1">本周</el-radio-button>
|
||||
<el-radio-button label="2">本月</el-radio-button>
|
||||
@@ -148,7 +148,7 @@
|
||||
style="width: 240px"
|
||||
v-model="search4.date"
|
||||
value-format="yyyy-MM-dd"
|
||||
@change="getStatisticsHot"
|
||||
@change="search4.dateRange = '', getStatisticsHot()"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
@@ -166,6 +166,7 @@
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import * as echarts from 'echarts'
|
||||
export default {
|
||||
name: 'AppLearningStatistics',
|
||||
label: '学习统计',
|
||||
@@ -213,7 +214,8 @@
|
||||
],
|
||||
tableData1: [],
|
||||
tableData2: [],
|
||||
statisticsKeyData: {}
|
||||
statisticsKeyData: {},
|
||||
statisticsUse: {}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -225,6 +227,7 @@
|
||||
this.search1.areaId = this.user.info.areaId
|
||||
this.getStatisticsKeyData()
|
||||
this.getStatisticsHot()
|
||||
this.getStatisticsUse()
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -242,6 +245,20 @@
|
||||
})
|
||||
},
|
||||
|
||||
getStatisticsUse () {
|
||||
this.instance.post(`/app/appwechatuserqujing/statisticsUse`, null, {
|
||||
params: {
|
||||
...this.search4,
|
||||
beginDate: this.search4.date[0],
|
||||
endDate: this.search4.date[1]
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
res.data.length && this.initPieChart(res.data[0])
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
getStatisticsHot () {
|
||||
this.instance.post(`/app/appexaminationinfo/statisticsHot`, null, {
|
||||
params: {
|
||||
@@ -268,31 +285,16 @@
|
||||
tooltip: {},
|
||||
color: ['#2896FF', '#09DBFE', '#61FDB9', '#FFBB69', '#8429FF', '#ea7ccc'],
|
||||
legend: {
|
||||
right: '5%',
|
||||
top: 'center',
|
||||
orient: 'vertical',
|
||||
formatter: function(name) {
|
||||
let data = option.series[0].data
|
||||
let total = 0
|
||||
let tarValue = 0
|
||||
for (let i = 0, l = data.length; i < l; i++) {
|
||||
total += data[i].value
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value
|
||||
}
|
||||
}
|
||||
let p = total === 0 ? 0 : (tarValue / total * 100).toFixed(2)
|
||||
return name + ':' + tarValue + ' ' + p + '%'
|
||||
}
|
||||
show: true
|
||||
},
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: '50%',
|
||||
data: data.map(v => {
|
||||
data: Object.keys(data).map(v => {
|
||||
return {
|
||||
value: v.c,
|
||||
name: v.status
|
||||
value: data[v],
|
||||
name: v
|
||||
}
|
||||
}),
|
||||
label : {
|
||||
@@ -344,7 +346,7 @@
|
||||
}
|
||||
|
||||
.resident {
|
||||
width: 560px;
|
||||
width: 660px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user