[mod]超融合-无数据时增加默认显示

init
wangxi 4 years ago
parent f1646e7ec6
commit 526ce5c6ec

@ -4,7 +4,7 @@
<a-tabs default-active-key="1" class="tab-style" @change="handleTabsChange" >
<a-tab-pane key="1" tab="行政班概况">
<div style="width:100%">
<div v-if="getData" style="width:100%">
<div class="leftContent">
<div style="text-align: center;font-weight: bold">行政班类别统计汇总</div>
<m-echarts
@ -22,9 +22,10 @@
</div>
</div>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
<a-tab-pane key="2" tab="教学班概况">
<table border="1" class="table-style" >
<table v-if="getData" border="1" class="table-style" >
<thead>
<tr style="background:#E8F3FF;">
<th style="text-align:center;">学科</th>
@ -51,9 +52,10 @@
</tbody>
</table>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
<a-tab-pane key="3" tab="走班概况" >
<div class="go-class">
<div v-if="getData" class="go-class">
<div class="top-content">
<div class="left-line"></div>
<div class="text">学生走班情况汇总</div>
@ -102,18 +104,20 @@
</div>
</div>
</div>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
<a-tab-pane key="4" tab="男女比例" >
<div style="width:50%;display: inline-block;height:370px">
<m-echarts
v-if="sexPieFlag"
:echartStyle="sexPieData.style"
:opinion="sexPieData.c"
:opinionData="sexPieData.e"
v-on:currentEchartData="getSexStatic"
></m-echarts>
</div>
<div style="width:50%;display: inline-block;height:370px">
<div v-if="getData">
<div style="width:50%;display: inline-block;height:370px">
<m-echarts
v-if="sexPieFlag"
:echartStyle="sexPieData.style"
:opinion="sexPieData.c"
:opinionData="sexPieData.e"
v-on:currentEchartData="getSexStatic"
></m-echarts>
</div>
<div style="width:50%;display: inline-block;height:370px">
<m-bar-echarts
v-if="sexLineFlag"
:echartStyle="sexData.style"
@ -124,7 +128,9 @@
:yAxisName="sexData.yAxisName"
>
</m-bar-echarts>
</div>
</div>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
</a-tabs>
<div class="select-style" >
@ -256,7 +262,8 @@
],
xAxisName:"",
yAxisName:"人数",
}
},
getData:true,
}
},
@ -267,34 +274,46 @@
methods:{
handleTaskChange:function (key) {
this.task_id=key;
if(this.type==='1'){
this.administrativeTable=false;
this.pieFlag=false;
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(this.type==='2'){
this.getClassComprehensiveInfo();
}else if(this.type==='3'){
this.goClassPieFlag=false;
this.getStudentTeachingClassInfo();
if(key!==''){
this.getData=true;
if(this.type==='1'){
this.administrativeTable=false;
this.pieFlag=false;
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(this.type==='2'){
this.getClassComprehensiveInfo();
}else if(this.type==='3'){
this.goClassPieFlag=false;
this.getStudentTeachingClassInfo();
}else {
this.sexPieFlag=false;
this.sexLineFlag=false;
this.getSexStatic()
}
}else {
this.sexPieFlag=false;
this.sexLineFlag=false;
this.getSexStatic()
this.getData=false;
}
},
handleTabsChange:function (key) {
this.type=key;
if(key==='1'){
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(key==='2'){
this.getClassComprehensiveInfo();
}else if(key==='3'){
this.getStudentTeachingClassInfo();
if(this.task_id!==''){
this.getData=true;
if(key==='1'){
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(key==='2'){
this.getClassComprehensiveInfo();
}else if(key==='3'){
this.getStudentTeachingClassInfo();
}else {
this.getSexStatic()
}
}else {
this.getSexStatic()
this.getData=false;
}
},
//
getClassCountCompareByType:function () {
@ -503,13 +522,15 @@
if(result[0].data.success === true){
this.taskFlag=true;
if(result[0].data.list.length!==0){
this.getData=true;
this.taskList=result[0].data.list;
this.task_id=result[0].data.list[0].divide_id;
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else {
this.stageList=[{stage_name:'暂无数据',stage_id:''}];
this.getData=false;
this.taskList=[{divide_name:'暂无数据',divide_id:''}];
}
}

@ -12,46 +12,50 @@
</div>
<a-tabs default-active-key="1" class="tab-style" @change="handleTabsChange" >
<a-tab-pane key="1" tab="行政班概况">
<div style="height:3rem;overflow: hidden">
<img src="./image/u5561.svg" class="img-style" @click="administrativeImgClick('table')"/>
<img src="./image/u5560.svg" class="img-style" @click="administrativeImgClick('pie')" />
</div>
<div v-if="showPie">
<div style="height:370px">
<m-echarts
v-if="pieFlag"
:echartStyle="administrativeClassData.style"
:opinion="administrativeClassData.c"
:opinionData="administrativeClassData.e"
:isRing=true
v-on:currentEchartData="getClassCountCompareByType"
></m-echarts>
<div v-if="getData">
<div style="height:3rem;overflow: hidden">
<img src="./image/u5561.svg" class="img-style" @click="administrativeImgClick('table')"/>
<img src="./image/u5560.svg" class="img-style" @click="administrativeImgClick('pie')" />
</div>
<div v-if="showPie">
<div style="height:370px">
<m-echarts
v-if="pieFlag"
:echartStyle="administrativeClassData.style"
:opinion="administrativeClassData.c"
:opinionData="administrativeClassData.e"
:isRing=true
v-on:currentEchartData="getClassCountCompareByType"
></m-echarts>
</div>
</div>
<div v-else>
<a-table v-if="administrativeTable" style="min-height: 10rem;margin-bottom:2rem" :columns="columns" :data-source="tableData" size="small" :pagination="false" rowKey='class_id'>
</a-table>
</div>
</div>
<div v-else>
<a-table v-if="administrativeTable" style="min-height: 10rem;margin-bottom:2rem" :columns="columns" :data-source="tableData" size="small" :pagination="false" rowKey='class_id'>
</a-table>
</div>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
<a-tab-pane key="2" tab="教学班概况">
<div class="class-style">
<div class="block-style" :style="{background:index===type?'#00A4FF':'#C6D7F2'}" v-for="(item,type) in this.administrativeClass" :key="item.subject_id" @click="handleCardClick(item.subject_id,type)">
<img :src="require('./image/'+item.imgsrc+'.svg')" style="margin-bottom: .4rem" />
<span style="margin-left: .5rem">{{item.subject_name}}</span>
<span class="count">{{item.total_count}}</span>
<div v-if="getData">
<div class="class-style">
<div class="block-style" :style="{background:index===type?'#00A4FF':'#C6D7F2'}" v-for="(item,type) in this.administrativeClass" :key="item.subject_id" @click="handleCardClick(item.subject_id,type)">
<img :src="require('./image/'+item.imgsrc+'.svg')" style="margin-bottom: .4rem" />
<span style="margin-left: .5rem">{{item.subject_name}}</span>
<span class="count">{{item.total_count}}</span>
</div>
</div>
</div>
<table class="class-table" v-if="classTable">
<thead>
<table class="class-table" v-if="classTable">
<thead>
<tr>
<th></th>
<th>选考<span class="num-style">{{subjectData[0].count+subjectData[0].teaching_count}}</span></th>
<th>学考<span class="num-style">{{subjectData[1].count+subjectData[1].teaching_count}}</span></th>
</tr>
</thead>
<tbody>
</thead>
<tbody>
<tr>
<td style="font-weight: bold">行政班<span class="num-style">{{subjectData[0].count+subjectData[1].count}}</span></td>
<td>{{subjectData[0].count}}</td>
@ -62,11 +66,13 @@
<td>{{subjectData[0].teaching_count}}</td>
<td>{{subjectData[1].teaching_count}}</td>
</tr>
</tbody>
</table>
</tbody>
</table>
</div>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
<a-tab-pane key="3" tab="走班概况" >
<div class="goClass">
<div v-if="getData" class="goClass">
<div class="left-con">
<div style="height:370px">
<m-echarts
@ -99,33 +105,37 @@
</div>
</div>
</div>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
<a-tab-pane key="4" tab="男女比例" >
<div style="height:3rem;overflow: hidden">
<img src="./image/u5729.svg" class="img-style" @click="sexImgClick('pie')"/>
<img src="./image/u5560.svg" class="img-style" @click="sexImgClick('line')" />
</div>
<div v-if="showLine" style="height:370px">
<m-echarts
v-if="sexPieFlag"
:echartStyle="sexPieData.style"
:opinion="sexPieData.c"
:opinionData="sexPieData.e"
v-on:currentEchartData="getSexStatic"
></m-echarts>
</div>
<div v-else style="height:370px">
<m-bar-echarts
v-if="sexLineFlag"
:echartStyle="sexData.style"
:xAxisData="sexData.xAxisData"
:legendData="sexData.legendData"
:seriesData="sexData.seriesData"
:xAxisName="sexData.xAxisName"
:yAxisName="sexData.yAxisName"
>
</m-bar-echarts>
<div v-if="getData">
<div style="height:3rem;overflow: hidden">
<img src="./image/u5729.svg" class="img-style" @click="sexImgClick('pie')"/>
<img src="./image/u5560.svg" class="img-style" @click="sexImgClick('line')" />
</div>
<div v-if="showLine" style="height:370px">
<m-echarts
v-if="sexPieFlag"
:echartStyle="sexPieData.style"
:opinion="sexPieData.c"
:opinionData="sexPieData.e"
v-on:currentEchartData="getSexStatic"
></m-echarts>
</div>
<div v-else style="height:370px">
<m-bar-echarts
v-if="sexLineFlag"
:echartStyle="sexData.style"
:xAxisData="sexData.xAxisData"
:legendData="sexData.legendData"
:seriesData="sexData.seriesData"
:xAxisName="sexData.xAxisName"
:yAxisName="sexData.yAxisName"
>
</m-bar-echarts>
</div>
</div>
<div v-else style="text-align: center;margin: 4rem 0">暂无数据</div>
</a-tab-pane>
</a-tabs>
@ -257,7 +267,8 @@
],
xAxisName:"",
yAxisName:"人数",
}
},
getData:true,
}
},
@ -276,35 +287,43 @@
},
handleTaskChange:function (key) {
this.task_id=key;
if(this.type==='1'){
this.administrativeTable=false;
this.pieFlag=false;
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(this.type==='2'){
this.getClassComprehensiveInfo();
}else if(this.type==='3'){
this.goClassPieFlag=false;
this.getStudentTeachingClassInfo();
if(key!==''){
this.getData=true;
if(this.type==='1'){
this.administrativeTable=false;
this.pieFlag=false;
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(this.type==='2'){
this.getClassComprehensiveInfo();
}else if(this.type==='3'){
this.goClassPieFlag=false;
this.getStudentTeachingClassInfo();
}else {
this.sexPieFlag=false;
this.sexLineFlag=false;
this.getSexStatic()
}
}else {
this.sexPieFlag=false;
this.sexLineFlag=false;
this.getSexStatic()
this.getData=false;
}
},
handleTabsChange:function (key) {
this.type=key;
if(key==='1'){
this.showPie=true;
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(key==='2'){
this.index=0;
this.getClassComprehensiveInfo();
}else if(key==='3'){
this.getStudentTeachingClassInfo();
if(this.task_id!==''){
this.getData=true;
if(key==='1'){
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else if(key==='2'){
this.getClassComprehensiveInfo();
}else if(key==='3'){
this.getStudentTeachingClassInfo();
}else {
this.getSexStatic()
}
}else {
this.getSexStatic()
this.getData=false;
}
},
administrativeImgClick:function (key) {
@ -336,13 +355,15 @@
if(result[0].data.success === true){
this.taskFlag=true;
if(result[0].data.list.length!==0){
this.getData=true;
this.taskList=result[0].data.list;
this.task_id=result[0].data.list[0].divide_id;
this.getClassCountCompareByType();
this.getClassCountCompareByTypeDetail();
}else {
this.stageList=[{stage_name:'暂无数据',stage_id:''}];
this.getData=false;
this.taskList=[{divide_name:'暂无数据',divide_id:''}];
}
}

@ -4,8 +4,7 @@
<div >
<div class="left-content">
<div style="font-size: 18px;margin-bottom:1rem">异动数据统计分析</div>
<div></div>
<div style="height:370px;width:100%;margin:0 auto">
<div style="height:370px;width:100%;margin:0 auto" v-if="getData">
<m-bar-echarts
v-if="classesFlag"
:echartStyle="classesSubstituteData.style"
@ -20,6 +19,7 @@
</m-bar-echarts>
</div>
<div style="margin-top: 8rem;" v-else></div>
</div>
<div class="right-content">
<div class="module" style="background: #F4593A">
@ -77,7 +77,8 @@
],
xAxisName:"日期",
yAxisName:"异动课节",
}
},
getData:true,
}
},
@ -124,6 +125,7 @@
}],(result)=>{
if(result[0].data.success === true){
this.classesFlag=true;
this.getData=true;
let nameList=[];
let classes=[];
let substitute=[];
@ -143,6 +145,8 @@
this.classesSubstituteData.seriesData[1].data=substitute;
this.classesSubstituteData.seriesData[1].name=nameList[1];
}else {
this.getData=false;
}
})
}

@ -20,7 +20,7 @@
</div>
<div>
<div style="height:370px;width:96%;margin:1rem auto;">
<div style="height:370px;width:96%;margin:1rem auto;" v-if="getData">
<m-bar-echarts
v-if="classesFlag"
:echartStyle="classesSubstituteData.style"
@ -35,6 +35,7 @@
</m-bar-echarts>
</div>
<div v-else style="margin: 5rem 0;text-align: center">暂无数据</div>
</div>
</div>
@ -77,7 +78,8 @@
],
xAxisName:"日期",
yAxisName:"异动课节",
}
},
getData:true
}
},
@ -124,6 +126,7 @@
}],(result)=>{
if(result[0].data.success === true){
this.classesFlag=true;
this.getData=true;
let nameList=[];
let classes=[];
let substitute=[];
@ -143,6 +146,8 @@
this.classesSubstituteData.seriesData[1].data=substitute;
this.classesSubstituteData.seriesData[1].name=nameList[1];
}else{
this.getData=false;
}
})
}

@ -30,7 +30,7 @@
</div>
<div class="right-content">
<div>听评课趋势统计</div>
<div v-if="this.trendStatistical.yAxis.length!==0">
<div style="width:100%;overflow: hidden">
<a-select style="width:6rem;float: right" v-if="stageFlag" value-key="item.stage_name" :default-value=this.stageList[0].stage_name
@change="handleSelectStage($event,'line')">
@ -39,6 +39,7 @@
</a-select-option>
</a-select>
</div>
<div v-if="this.trendStatistical.yAxis.length!==0">
<l-echarts
v-if="lineFlag"
:echartStyle="trendStatistical.style"

@ -11,14 +11,21 @@
</a-select-option>
</a-select>
</div>
<m-echarts
v-if="pieFlag"
:echartStyle="courseDistribution.s"
:opinion="courseDistribution.c"
:opinionData="courseDistribution.e"
:isRing=true
v-on:currentEchartData="getCourseProgressPie"
></m-echarts>
<div v-if="this.courseDistribution.e.length!==0">
<m-echarts
v-if="pieFlag"
:echartStyle="courseDistribution.s"
:opinion="courseDistribution.c"
:opinionData="courseDistribution.e"
:isRing=true
v-on:currentEchartData="getCourseProgressPie"
></m-echarts>
</div>
<div v-else="">
<div>
<div class="bgImg"></div>
</div>
</div>
</a-tab-pane>
<a-tab-pane key="2" tab="听评课趋势统计" >
<div style="width:100%;overflow: hidden">
@ -29,14 +36,21 @@
</a-select-option>
</a-select>
</div>
<l-echarts
v-if="lineFlag"
:echartStyle="trendStatistical.style"
:xAxisData="trendStatistical.xAxis"
:yAxisData="trendStatistical.yAxis"
:isType="trendStatistical.type"
v-on:trendStatistical="getCourseProgressLine"
></l-echarts>
<div v-if="this.trendStatistical.yAxis.length!==0">
<l-echarts
v-if="lineFlag"
:echartStyle="trendStatistical.style"
:xAxisData="trendStatistical.xAxis"
:yAxisData="trendStatistical.yAxis"
:isType="trendStatistical.type"
v-on:trendStatistical="getCourseProgressLine"
></l-echarts>
</div>
<div v-else="">
<div>
<div class="bgImg"></div>
</div>
</div>
</a-tab-pane>
</a-tabs>
</div>
@ -221,6 +235,13 @@
text-align: center;
}
}
.bgImg{
text-align: center;
margin: 0 auto;
width:16rem;
height:16rem;
background: url('./image/bgImg.png') center center no-repeat;
}
}

Loading…
Cancel
Save