dash
This commit is contained in:
parent
b7b13e1732
commit
96a924436d
|
@ -1,26 +1,26 @@
|
||||||
<template>
|
<template>
|
||||||
<el-row :gutter="40" class="panel-group">
|
<el-row :gutter="40" class="panel-group">
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||||
<div class="card-panel" @click="handleSetLineChartData('注册用户')">
|
<div class="card-panel" @click="handleSetLineChartData('访问用户')">
|
||||||
<div class="card-panel-icon-wrapper icon-people">
|
<div class="card-panel-icon-wrapper icon-people">
|
||||||
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">
|
||||||
注册用户
|
访问用户
|
||||||
</div>
|
</div>
|
||||||
<count-to :start-val="0" v-bind:end-val="ret.consumer1_count" :duration="1600" class="card-panel-num" />
|
<count-to :start-val="0" v-bind:end-val="ret.consumer1_count" :duration="1600" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||||
<div class="card-panel" @click="handleSetLineChartData('缴费学员')">
|
<div class="card-panel" @click="handleSetLineChartData('缴费用户')">
|
||||||
<div class="card-panel-icon-wrapper icon-message">
|
<div class="card-panel-icon-wrapper icon-message">
|
||||||
<svg-icon icon-class="people" class-name="card-panel-icon" />
|
<svg-icon icon-class="people" class-name="card-panel-icon" />
|
||||||
</div>
|
</div>
|
||||||
<div class="card-panel-description">
|
<div class="card-panel-description">
|
||||||
<div class="card-panel-text">
|
<div class="card-panel-text">
|
||||||
缴费学员
|
缴费用户
|
||||||
</div>
|
</div>
|
||||||
<count-to :start-val="0" v-bind:end-val="ret.consumer2_count" :duration="1600" class="card-panel-num" />
|
<count-to :start-val="0" v-bind:end-val="ret.consumer2_count" :duration="1600" class="card-panel-num" />
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -13,11 +13,11 @@ import PanelGroup from './components/PanelGroup'
|
||||||
import LineChart from './components/LineChart'
|
import LineChart from './components/LineChart'
|
||||||
|
|
||||||
const lineChartData = {
|
const lineChartData = {
|
||||||
'注册用户': {
|
'访问用户': {
|
||||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||||||
},
|
},
|
||||||
'缴费学员': {
|
'缴费用户': {
|
||||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,4 +3,12 @@
|
||||||
margin-left:8px;
|
margin-left:8px;
|
||||||
margin-right:8px;
|
margin-right:8px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
/* background: linear-gradient(to right, #fad8be 0%, #fe6673 100%); */
|
||||||
|
/* background:#00a7d0; */
|
||||||
|
background: rgba(255, 255, 255, 1);
|
||||||
|
box-shadow: 0px 4rpx 16rpx 0px rgba(140, 160, 181, 0.2);
|
||||||
|
/* background: linear-gradient(to right, #3399CC 0%, #0066CC 100%); */
|
||||||
}
|
}
|
||||||
|
/* .weui-media-box__title {
|
||||||
|
color:ghostwhite
|
||||||
|
} */
|
|
@ -3,4 +3,6 @@
|
||||||
margin-left:8px;
|
margin-left:8px;
|
||||||
margin-right:8px;
|
margin-right:8px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
background: rgba(255, 255, 255, 1);
|
||||||
|
box-shadow: 0px 4rpx 16rpx 0px rgba(140, 160, 181, 0.2);
|
||||||
}
|
}
|
|
@ -25,7 +25,7 @@
|
||||||
"disablePlugins": [],
|
"disablePlugins": [],
|
||||||
"outputPath": ""
|
"outputPath": ""
|
||||||
},
|
},
|
||||||
"useCompilerModule": true,
|
"useCompilerModule": false,
|
||||||
"userConfirmedUseCompilerModuleSwitch": false,
|
"userConfirmedUseCompilerModuleSwitch": false,
|
||||||
"compileHotReLoad": false,
|
"compileHotReLoad": false,
|
||||||
"useMultiFrameRuntime": true,
|
"useMultiFrameRuntime": true,
|
||||||
|
|
|
@ -18,8 +18,8 @@ class BasicCount(APIView):
|
||||||
'''
|
'''
|
||||||
def get(self, request, format=None):
|
def get(self, request, format=None):
|
||||||
ret={}
|
ret={}
|
||||||
ret['consumer1_count'] = Consumer.objects.filter(is_delete=False).exclude(username=None).count()
|
ret['consumer1_count'] = Consumer.objects.filter(is_delete=False).count()
|
||||||
ret['consumer2_count'] = Consumer.objects.filter(is_delete=False).exclude(subjects=None).count()
|
ret['consumer2_count'] = Consumer.objects.filter(is_delete=False).exclude(create_admin=None).count()
|
||||||
ret['test_count'] = ExamTest.objects.filter(is_delete=False).count()
|
ret['test_count'] = ExamTest.objects.filter(is_delete=False).count()
|
||||||
ret['question_count'] = Question.objects.filter(is_delete=False).count()
|
ret['question_count'] = Question.objects.filter(is_delete=False).count()
|
||||||
return Response(ret)
|
return Response(ret)
|
||||||
|
|
Loading…
Reference in New Issue