|
|
|
@ -0,0 +1,817 @@
|
|
|
|
|
<template>
|
|
|
|
|
<a-spin :spinning="isLoading">
|
|
|
|
|
<div class="school-04-style">
|
|
|
|
|
<div class="title-style">
|
|
|
|
|
长春市{{year.value}}【{{countyData.value}}】【{{schoolData.value}}】学生体质健康报告
|
|
|
|
|
</div>
|
|
|
|
|
<div class="report-tips-style">
|
|
|
|
|
【{{countyData.value}}】【{{schoolData.value}}】本年度学生体质健康数据中,成绩满分120分,累计参与测评学段包括{{primaryCount !== ''?'小学' + primaryCount+'个年级'+(middleCount !== ''?'、':'') :''}}{{middleCount !== ''?'初中' + middleCount+'个年级'+(highCount !== ''?'、':''):''}}{{highCount !== ''?'高中' + highCount + '个年级':''}},累计班级{{totalClass}}个,学生总人数{{totalStudent}}名。
|
|
|
|
|
从身体形态、身体机能和身体素质等方面综合评定学生的体质健康水平,适用对象划分为以下组别:小学、初中、高中按每个年级为一组,其中小学为6组、初中为3组、高中为3组。
|
|
|
|
|
学年总分由标准分与附加分之和构成,满分为120分。标准分由各单项指标得分与权重乘积之和组成,满分为100分。附加分根据实测成绩确定,即对成绩超过100分的加分指标进行加分,满分为20分;小学的加分指标为1分钟跳绳,加分幅度为20分;初中、高中和大学的加分指标为男生引体向上和1000米跑,女生1分钟仰卧起坐和800米跑,各指标加分幅度均为10分。
|
|
|
|
|
根据学生学年总分评定等级:90.0分及以上为优秀,80~89.9分为良好,60.0~79.9分为及格,59.9分及以下为不及格。
|
|
|
|
|
</div>
|
|
|
|
|
<div class="analysis-container-style clearfix">
|
|
|
|
|
<div class="analysis-title-style">
|
|
|
|
|
单项样本、平均分、等级分布分析
|
|
|
|
|
</div>
|
|
|
|
|
<div class="module-title-style">1.班级单项样本、性别、均值、标准差对比</div>
|
|
|
|
|
<a-table :columns="sampleColumn" size="small" bordered :pagination="false" :dataSource="sampleTableData" rowKey="id"
|
|
|
|
|
:scroll="sampleTableData.length > 0?{x:2800,y:500}:{x:2800}">
|
|
|
|
|
</a-table>
|
|
|
|
|
<div class="sample-chart clearfix">
|
|
|
|
|
<div v-if="!gradeList || gradeList.length === 0" class="nodata-style">暂无统计图信息</div>
|
|
|
|
|
<a-radio-group v-if="gradeList && gradeList.length > 0" button-style="solid" v-model="sampleGrade"
|
|
|
|
|
style="margin-bottom: 20px" @change="sampleGradeChange">
|
|
|
|
|
<a-radio-button v-for="grade in gradeList" :key="grade.grade_no" :value="grade.grade_no">
|
|
|
|
|
{{grade.grade_name}}
|
|
|
|
|
</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
<a-tabs type="card" :activeKey="sampleTabkey" @change="onSampleTabChange">
|
|
|
|
|
<template v-for="tab in IndexObject">
|
|
|
|
|
<a-tab-pane v-if="tab.obj_id !== 'bmi'" :key="tab.obj_id" :tab="tab.obj_name"></a-tab-pane>
|
|
|
|
|
</template>
|
|
|
|
|
</a-tabs>
|
|
|
|
|
<div class="type-list-style">
|
|
|
|
|
<div class="type-style" :data-selected="sampleTypeSelect === 'sample'" @click="onTypeChange('sample')">样本数</div>
|
|
|
|
|
<div class="type-style" :data-selected="sampleTypeSelect === 'average'" @click="onTypeChange('average')">平均分</div>
|
|
|
|
|
<div class="type-style" :data-selected="sampleTypeSelect === 'standard'" @click="onTypeChange('standard')">标准差</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="sample-echart-style" id="sampleEChart"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="module-title-style">2.学校单项等级分布对比</div>
|
|
|
|
|
<a-table :columns="gradeColumn" size="small" bordered :pagination="false" :dataSource="gradeTableData" rowKey="id"
|
|
|
|
|
:scroll="gradeTableData.length>0?{x:3480,y:500}:{x:3480}">
|
|
|
|
|
</a-table>
|
|
|
|
|
<div class="sample-chart clearfix">
|
|
|
|
|
<div v-if="!gradeList || gradeList.length === 0" class="nodata-style" style="width: 100%;left: 0">暂无统计图信息</div>
|
|
|
|
|
<a-radio-group v-if="gradeList && gradeList.length > 0" button-style="solid" v-model="gradeGrade"
|
|
|
|
|
style="margin-bottom: 20px" @change="gradeGradeChange">
|
|
|
|
|
<a-radio-button v-for="grade in gradeList" :key="grade.grade_no" :value="grade.grade_no">
|
|
|
|
|
{{grade.grade_name}}
|
|
|
|
|
</a-radio-button>
|
|
|
|
|
</a-radio-group>
|
|
|
|
|
<a-tabs type="card" :activeKey="gradeTabkey" @change="onGradeTabChange">
|
|
|
|
|
<template v-for="tab in IndexObject">
|
|
|
|
|
<a-tab-pane v-if="tab.obj_id !== 'height' && tab.obj_id !== 'weight'" :key="tab.obj_id" :tab="tab.obj_name"></a-tab-pane>
|
|
|
|
|
</template>
|
|
|
|
|
</a-tabs>
|
|
|
|
|
<div class="grade-echart-style" id="gradeEChart"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<year-select :selected-year="year" @yearChange="onYearChange"/>
|
|
|
|
|
</div>
|
|
|
|
|
</a-spin>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {Spin,Table,Tabs,Radio} from 'ant-design-vue';
|
|
|
|
|
import Interface from '../../../../global-llibs/axios-config';
|
|
|
|
|
import InterfaceConfig from '../interfaceConfig';
|
|
|
|
|
import YearSelect from '../common/YearSelect';
|
|
|
|
|
import IndexObject from '../commonParams';
|
|
|
|
|
import * as echarts from 'echarts';
|
|
|
|
|
import _ from 'lodash';
|
|
|
|
|
export default {
|
|
|
|
|
name: "School_04",
|
|
|
|
|
props:{
|
|
|
|
|
yearData:{
|
|
|
|
|
type:Object,
|
|
|
|
|
},
|
|
|
|
|
countyData:{
|
|
|
|
|
type:Object,
|
|
|
|
|
},
|
|
|
|
|
reportData:{
|
|
|
|
|
type:Object,
|
|
|
|
|
},
|
|
|
|
|
schoolData:{
|
|
|
|
|
type:Object,
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
data:function () {
|
|
|
|
|
return{
|
|
|
|
|
IndexObject,
|
|
|
|
|
year:_.cloneDeep(this.yearData),
|
|
|
|
|
primaryCount:'',//小学
|
|
|
|
|
middleCount:'',//中学
|
|
|
|
|
highCount:'',//高中
|
|
|
|
|
totalClass:'0',//班级总数
|
|
|
|
|
totalStudent:'0',//学生总数
|
|
|
|
|
isLoading:true,
|
|
|
|
|
sampleData:null,
|
|
|
|
|
sampleColumn:this.getSampleColumns('sample'),
|
|
|
|
|
sampleTableData:[],
|
|
|
|
|
sampleTabkey:IndexObject[1].obj_id,
|
|
|
|
|
sampleTypeSelect:'sample',//sample:样本数 average:平均分 standard:标准差
|
|
|
|
|
sampleEChart:null,
|
|
|
|
|
sampleEChartData:{
|
|
|
|
|
title: {
|
|
|
|
|
show:false
|
|
|
|
|
},
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis'
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
bottom:0,
|
|
|
|
|
data: ['男生', '女生'],
|
|
|
|
|
},
|
|
|
|
|
grid:{
|
|
|
|
|
left: 30,
|
|
|
|
|
right: 30,
|
|
|
|
|
bottom: 30,
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
xAxis: [
|
|
|
|
|
{
|
|
|
|
|
type: 'category',
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
yAxis: [
|
|
|
|
|
{
|
|
|
|
|
type: 'value'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: '男生',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '女生',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
sampleGrade:'',
|
|
|
|
|
|
|
|
|
|
gradeData:null,
|
|
|
|
|
gradeColumn:this.getSampleColumns('grade'),
|
|
|
|
|
gradeTableData:[],
|
|
|
|
|
gradeTabkey:IndexObject[0].obj_id,
|
|
|
|
|
gradeEChart:null,
|
|
|
|
|
gradeEChartData:{
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
axisPointer: { // 坐标轴指示器,坐标轴触发有效
|
|
|
|
|
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
legend: {
|
|
|
|
|
bottom: 0,
|
|
|
|
|
},
|
|
|
|
|
grid: {
|
|
|
|
|
top:'12%',
|
|
|
|
|
left: '2%',
|
|
|
|
|
right: '2%',
|
|
|
|
|
bottom: 25,
|
|
|
|
|
containLabel: true
|
|
|
|
|
},
|
|
|
|
|
xAxis: [
|
|
|
|
|
{
|
|
|
|
|
type: 'category',
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
yAxis: [
|
|
|
|
|
{
|
|
|
|
|
type: 'value'
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
series: [
|
|
|
|
|
{
|
|
|
|
|
name: '优秀',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
stack:'等级',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '良好',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
stack: '等级',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '及格',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
stack: '等级',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
name: '不及格',
|
|
|
|
|
type: 'bar',
|
|
|
|
|
stack: '等级',
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
},//柱状堆叠图数据
|
|
|
|
|
gradeGrade:'',
|
|
|
|
|
|
|
|
|
|
gradeList:[],
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
components:{
|
|
|
|
|
ASpin:Spin,
|
|
|
|
|
ATable:Table,
|
|
|
|
|
YearSelect,
|
|
|
|
|
ATabs:Tabs,
|
|
|
|
|
ATabPane:Tabs.TabPane,
|
|
|
|
|
ARadioGroup:Radio.Group,
|
|
|
|
|
ARadioButton:Radio.Button
|
|
|
|
|
},
|
|
|
|
|
methods:{
|
|
|
|
|
onYearChange:function(){
|
|
|
|
|
this.isLoading = true;
|
|
|
|
|
this.sampleTabkey = IndexObject[1].obj_id;
|
|
|
|
|
this.sampleTypeSelect = 'sample';
|
|
|
|
|
this.gradeTabkey = IndexObject[0].obj_id;
|
|
|
|
|
this.sampleGrade = '';
|
|
|
|
|
this.gradeGrade = '';
|
|
|
|
|
this.getData();
|
|
|
|
|
},
|
|
|
|
|
onGradeTabChange:function(type){
|
|
|
|
|
if (!this.gradeList || this.gradeList.length === 0){
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
this.gradeTabkey = type;
|
|
|
|
|
this.getClassProjectRankChart();
|
|
|
|
|
},
|
|
|
|
|
gradeGradeChange:function(){
|
|
|
|
|
if (!this.gradeList || this.gradeList.length === 0){
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
this.gradeTabkey = 'bmi';
|
|
|
|
|
this.getClassProjectRankChart();
|
|
|
|
|
},
|
|
|
|
|
sampleGradeChange:function(){
|
|
|
|
|
if (!this.gradeList || this.gradeList.length === 0){
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
this.sampleTabkey = IndexObject[1].obj_id;
|
|
|
|
|
this.sampleTypeSelect = 'sample';
|
|
|
|
|
this.getClassProjectNumAvgChart();
|
|
|
|
|
},
|
|
|
|
|
onSampleTabChange:function(key){
|
|
|
|
|
if (!this.gradeList || this.gradeList.length === 0){
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
this.sampleTabkey = key;
|
|
|
|
|
this.sampleTypeSelect = 'sample';
|
|
|
|
|
this.getClassProjectNumAvgChart();
|
|
|
|
|
},
|
|
|
|
|
onTypeChange:function(type){
|
|
|
|
|
if (!this.gradeList || this.gradeList.length === 0){
|
|
|
|
|
return ;
|
|
|
|
|
}
|
|
|
|
|
if (type !== this.sampleTypeSelect){
|
|
|
|
|
this.isLoading = true;
|
|
|
|
|
this.sampleTypeSelect = type;
|
|
|
|
|
this.sampleEChartData.series[0].data = [];
|
|
|
|
|
this.sampleEChartData.series[1].data = [];
|
|
|
|
|
this.sampleData.forEach((item)=>{
|
|
|
|
|
this.sampleEChartData.series[0].data.push(type === 'sample'?(item.psn_num_boy?item.psn_num_boy:''):
|
|
|
|
|
(type === 'average'?(item.res_avg_boy?item.res_avg_boy:''):(item.res_std_boy?item.res_std_boy:'')));
|
|
|
|
|
|
|
|
|
|
this.sampleEChartData.series[1].data.push(type === 'sample'?(item.psn_num_girl?item.psn_num_girl:''):
|
|
|
|
|
(type === 'average'?(item.res_avg_girl?item.res_avg_girl:''):(item.res_std_girl?item.res_std_girl:'')));
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (this.sampleEChart !== null){
|
|
|
|
|
this.sampleEChart.setOption(this.sampleEChartData)
|
|
|
|
|
this.isLoading = false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getSampleColumns:function (type) {
|
|
|
|
|
let column = [
|
|
|
|
|
{title:'序号',key:'index',fixed: 'left',width:45,align:'center',customRender:(text,record,index)=>{
|
|
|
|
|
let obj = {
|
|
|
|
|
children:index % 2 === 0?(index + 2) / 2:'',
|
|
|
|
|
attrs:{},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (index % 2 === 0){
|
|
|
|
|
obj.attrs.rowSpan = 2;
|
|
|
|
|
}else{
|
|
|
|
|
obj.attrs.rowSpan = 0;
|
|
|
|
|
}
|
|
|
|
|
return obj;
|
|
|
|
|
}},
|
|
|
|
|
{title:'年级',key:'grade',width:88,align:'center',dataIndex:'grade_name',fixed: 'left'},
|
|
|
|
|
{title:'班级',key:'class',width:112,align:'center',dataIndex:'class_name',fixed: 'left',customRender:(text,record,index)=>{
|
|
|
|
|
let obj = {
|
|
|
|
|
children:text,
|
|
|
|
|
attrs:{},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (index % 2 === 0){
|
|
|
|
|
obj.attrs.rowSpan = 2;
|
|
|
|
|
}else{
|
|
|
|
|
obj.attrs.rowSpan = 0;
|
|
|
|
|
}
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{title:'性别',key:'gender',width:45,align:'center',dataIndex:'gender',fixed:'left'}
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < IndexObject.length; i ++){
|
|
|
|
|
let obj = IndexObject[i];
|
|
|
|
|
if (type === 'sample' && obj.obj_id !== 'bmi'){
|
|
|
|
|
column.push({
|
|
|
|
|
title:obj.obj_name,
|
|
|
|
|
key:obj.obj_id,
|
|
|
|
|
children:[
|
|
|
|
|
{title:'样本数',width:70,key:obj.obj_id + "_sample",align:'center',dataIndex:obj.obj_id + "_sample"},
|
|
|
|
|
{title:'平均值',width:70,key:obj.obj_id + "_average",align:'center',dataIndex:obj.obj_id + "_average"},
|
|
|
|
|
{title:'标准差',width:70,key:obj.obj_id + "_std",align:'center',dataIndex:obj.obj_id + "_std"}
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
}else if (type === 'grade' && obj.obj_id !== 'height' && obj.obj_id !== 'weight'){
|
|
|
|
|
column.push({
|
|
|
|
|
title:obj.obj_name,
|
|
|
|
|
key:obj.obj_id,
|
|
|
|
|
children:[
|
|
|
|
|
{title:obj.obj_id === 'bmi'?'低体重':'优秀',width:70,key:obj.obj_id + "_a",align:'center',dataIndex:obj.obj_id + "_a"},
|
|
|
|
|
{title:obj.obj_id === 'bmi'?'标准体重':'良好',width:80,key:obj.obj_id + "_b",align:'center',dataIndex:obj.obj_id + "_b"},
|
|
|
|
|
{title:obj.obj_id === 'bmi'?'超重':'及格',width:70,key:obj.obj_id + "_c",align:'center',dataIndex:obj.obj_id + "_c"},
|
|
|
|
|
{title:obj.obj_id === 'bmi'?'肥胖':'不及格',width:70,key:obj.obj_id + "_d",align:'center',dataIndex:obj.obj_id + "_d"}
|
|
|
|
|
]
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
return column;
|
|
|
|
|
},
|
|
|
|
|
getData:function () {
|
|
|
|
|
let params = {
|
|
|
|
|
report_year:this.year.id,
|
|
|
|
|
school_id:this.schoolData.id
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let config = [InterfaceConfig.getSchoolStatisticsSummary,InterfaceConfig.getSchoolStageGradeList,
|
|
|
|
|
InterfaceConfig.getClassProjectNumAvgList,InterfaceConfig.getClassProjectRankList];
|
|
|
|
|
config.forEach((item)=>{
|
|
|
|
|
item.params = params;
|
|
|
|
|
});
|
|
|
|
|
Interface.callInterface(config,(result)=>{
|
|
|
|
|
// this.isLoading = false;
|
|
|
|
|
if (result[0].data.code === 2000){
|
|
|
|
|
let summary = result[0].data.data;
|
|
|
|
|
this.totalClass = summary.total_class_number?summary.total_class_number:'0';
|
|
|
|
|
this.totalStudent = summary.total_student_number?summary.total_student_number:'0';
|
|
|
|
|
if(summary.stage_list && Array.isArray(summary.stage_list)){
|
|
|
|
|
if (summary.stage_list.some((item)=>{return parseInt(item.stage_id) === 1})){
|
|
|
|
|
this.primaryCount = summary.stage_list.filter((item)=>{return parseInt(item.stage_id) === 1})[0].grade_number;
|
|
|
|
|
}else{
|
|
|
|
|
this.primaryCount = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (summary.stage_list.some((item)=>{return parseInt(item.stage_id) === 2})){
|
|
|
|
|
this.middleCount = summary.stage_list.filter((item)=>{return parseInt(item.stage_id) === 2})[0].grade_number;
|
|
|
|
|
}else{
|
|
|
|
|
this.middleCount = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (summary.stage_list.some((item)=>{return parseInt(item.stage_id) === 3})){
|
|
|
|
|
this.highCount = summary.stage_list.filter((item)=>{return parseInt(item.stage_id) === 3})[0].grade_number;
|
|
|
|
|
}else{
|
|
|
|
|
this.highCount = "";
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.primaryCount = "";
|
|
|
|
|
this.middleCount = "";
|
|
|
|
|
this.highCount = "";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (result[1].data.code === 2000){
|
|
|
|
|
this.gradeList = result[1].data.data.grade_list;
|
|
|
|
|
if (this.gradeList && this.gradeList.length > 0){
|
|
|
|
|
this.sampleGrade = this.gradeList[0].grade_no;
|
|
|
|
|
this.gradeGrade = this.gradeList[0].grade_no;
|
|
|
|
|
|
|
|
|
|
if (result[2].data.code === 2000){
|
|
|
|
|
let data = result[2].data.data;
|
|
|
|
|
let tableData = [];
|
|
|
|
|
let list = [];
|
|
|
|
|
data.forEach((item,index)=>{
|
|
|
|
|
if (list.every((grade)=>{return grade.grade_no !== item.grade_no})){
|
|
|
|
|
list.push({grade_no:item.grade_no,grade_name:item.grade_name,index:index * 2,
|
|
|
|
|
length:data.filter((data)=>{return data.grade_no === item.grade_no}).length * 2})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let male = {
|
|
|
|
|
id:item.grade_no + "_" + item.class_no + '_male',
|
|
|
|
|
grade_name:item.grade_name,
|
|
|
|
|
class_name:item.class_name,
|
|
|
|
|
gender:'男'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let female = {
|
|
|
|
|
id:item.grade_no + "_" + item.class_no + 'female',
|
|
|
|
|
grade_name:item.grade_name,
|
|
|
|
|
class_name:item.class_name,
|
|
|
|
|
gender:'女'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IndexObject.forEach((obj)=>{
|
|
|
|
|
if (obj.obj_id !== 'bmi'){
|
|
|
|
|
if (item[obj.obj_id] && Object.keys(item[obj.obj_id]).length > 0){
|
|
|
|
|
male[obj.obj_id + "_sample"] = item[obj.obj_id].psn_num_boy;
|
|
|
|
|
male[obj.obj_id + "_average"] = item[obj.obj_id].res_avg_boy;
|
|
|
|
|
male[obj.obj_id + "_std"] = item[obj.obj_id].res_std_boy;
|
|
|
|
|
|
|
|
|
|
female[obj.obj_id + "_sample"] = item[obj.obj_id].psn_num_girl;
|
|
|
|
|
female[obj.obj_id + "_average"] = item[obj.obj_id].res_avg_girl;
|
|
|
|
|
female[obj.obj_id + "_std"] = item[obj.obj_id].res_std_girl;
|
|
|
|
|
}else{
|
|
|
|
|
male[obj.obj_id + "_sample"] = '';
|
|
|
|
|
male[obj.obj_id + "_average"] = '';
|
|
|
|
|
male[obj.obj_id + "_std"] = '';
|
|
|
|
|
|
|
|
|
|
female[obj.obj_id + "_sample"] = '';
|
|
|
|
|
female[obj.obj_id + "_average"] = '';
|
|
|
|
|
female[obj.obj_id + "_std"] = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
tableData.push(male);
|
|
|
|
|
tableData.push(female);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let column = _.cloneDeep(this.sampleColumn[1]);
|
|
|
|
|
|
|
|
|
|
column.customRender=(text,record,index)=>{
|
|
|
|
|
const obj = {
|
|
|
|
|
children: text,
|
|
|
|
|
attrs: {},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (list.some((item)=>{return item.index === index})){
|
|
|
|
|
let grade = list.filter((item)=>{return item.index === index});
|
|
|
|
|
obj.attrs.rowSpan = grade[0]['length'];
|
|
|
|
|
}else{
|
|
|
|
|
obj.attrs.rowSpan = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.$set(this.sampleColumn,1,column);
|
|
|
|
|
this.sampleTableData = tableData;
|
|
|
|
|
this.getClassProjectNumAvgChart();
|
|
|
|
|
}else{
|
|
|
|
|
this.sampleTableData = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (result[3].data.code === 2000){
|
|
|
|
|
let data = result[3].data.data;
|
|
|
|
|
let tableData = [];
|
|
|
|
|
let list = [];
|
|
|
|
|
data.forEach((item,index)=>{
|
|
|
|
|
if (list.every((grade)=>{return grade.grade_no !== item.grade_no})){
|
|
|
|
|
list.push({grade_no:item.grade_no,grade_name:item.grade_name,index:index * 2,
|
|
|
|
|
length:data.filter((data)=>{return data.grade_no === item.grade_no}).length * 2})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let male = {
|
|
|
|
|
id:item.grade_no + "_" + item.class_no + '_male',
|
|
|
|
|
grade_name:item.grade_name,
|
|
|
|
|
class_name:item.class_name,
|
|
|
|
|
gender:'男'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let female = {
|
|
|
|
|
id:item.grade_no + "_" + item.class_no + 'female',
|
|
|
|
|
grade_name:item.grade_name,
|
|
|
|
|
class_name:item.class_name,
|
|
|
|
|
gender:'女'
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IndexObject.forEach((obj)=>{
|
|
|
|
|
if (obj.obj_id !== 'height' && obj.obj_id !== 'weight'){
|
|
|
|
|
if (item[obj.obj_id] && Object.keys(item[obj.obj_id]).length > 0){
|
|
|
|
|
male[obj.obj_id + "_a"] = item[obj.obj_id].rnk_rto_a_boy;
|
|
|
|
|
male[obj.obj_id + "_b"] = item[obj.obj_id].rnk_rto_b_boy;
|
|
|
|
|
male[obj.obj_id + "_c"] = item[obj.obj_id].rnk_rto_c_boy;
|
|
|
|
|
male[obj.obj_id + "_d"] = item[obj.obj_id].rnk_rto_d_boy;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
female[obj.obj_id + "_a"] = item[obj.obj_id].rnk_rto_a_girl;
|
|
|
|
|
female[obj.obj_id + "_b"] = item[obj.obj_id].rnk_rto_b_girl;
|
|
|
|
|
female[obj.obj_id + "_c"] = item[obj.obj_id].rnk_rto_c_girl;
|
|
|
|
|
female[obj.obj_id + "_d"] = item[obj.obj_id].rnk_rto_d_girl;
|
|
|
|
|
}else{
|
|
|
|
|
male[obj.obj_id + "_a"] = '';
|
|
|
|
|
male[obj.obj_id + "_b"] = '';
|
|
|
|
|
male[obj.obj_id + "_c"] = '';
|
|
|
|
|
male[obj.obj_id + "_d"] = '';
|
|
|
|
|
|
|
|
|
|
female[obj.obj_id + "_a"] = '';
|
|
|
|
|
female[obj.obj_id + "_b"] = '';
|
|
|
|
|
female[obj.obj_id + "_c"] = '';
|
|
|
|
|
female[obj.obj_id + "_d"] = '';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
tableData.push(male);
|
|
|
|
|
tableData.push(female);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let column = _.cloneDeep(this.gradeColumn[1]);
|
|
|
|
|
|
|
|
|
|
column.customRender=(text,record,index)=>{
|
|
|
|
|
const obj = {
|
|
|
|
|
children: text,
|
|
|
|
|
attrs: {},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
if (list.some((item)=>{return item.index === index})){
|
|
|
|
|
let grade = list.filter((item)=>{return item.index === index});
|
|
|
|
|
obj.attrs.rowSpan = grade[0]['length'];
|
|
|
|
|
}else{
|
|
|
|
|
obj.attrs.rowSpan = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return obj;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.$set(this.gradeColumn,1,column);
|
|
|
|
|
this.gradeTableData = tableData;
|
|
|
|
|
this.getClassProjectRankChart();
|
|
|
|
|
}else{
|
|
|
|
|
this.gradeTableData = [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.isLoading = false;
|
|
|
|
|
this.sampleGrade = '';
|
|
|
|
|
this.gradeGrade = '';
|
|
|
|
|
this.sampleTableData = [];
|
|
|
|
|
this.gradeTableData = [];
|
|
|
|
|
this.sampleData = null;
|
|
|
|
|
this.gradeData = null;
|
|
|
|
|
if (this.sampleEChart){
|
|
|
|
|
this.sampleEChart.clear();
|
|
|
|
|
this.sampleEChart = null;
|
|
|
|
|
}
|
|
|
|
|
if (this.gradeEChart){
|
|
|
|
|
this.gradeEChart.clear();
|
|
|
|
|
this.gradeEChart = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/*
|
|
|
|
|
* 样本、平均数、标准差统计图
|
|
|
|
|
* */
|
|
|
|
|
getClassProjectNumAvgChart:function () {
|
|
|
|
|
this.isLoading = true;
|
|
|
|
|
let params = {
|
|
|
|
|
report_year:this.year.id,
|
|
|
|
|
school_id:this.schoolData.id,
|
|
|
|
|
grade_no:this.sampleGrade,
|
|
|
|
|
project_key:this.sampleTabkey,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Interface.callInterface([{
|
|
|
|
|
url:InterfaceConfig.getClassProjectNumAvgChart.url,
|
|
|
|
|
params:params,
|
|
|
|
|
method:InterfaceConfig.getClassProjectNumAvgChart.method,
|
|
|
|
|
isTestLogin:InterfaceConfig.getClassProjectNumAvgChart.isTestLogin
|
|
|
|
|
}],(result)=>{
|
|
|
|
|
this.isLoading = false;
|
|
|
|
|
if (result[0].data.code === 2000){
|
|
|
|
|
this.sampleData = result[0].data.data;
|
|
|
|
|
this.sampleEChartData.xAxis[0].data = [];//构建样本/平均值/标准差的横坐标
|
|
|
|
|
this.sampleEChartData.series[0].data = [];
|
|
|
|
|
this.sampleEChartData.series[1].data = [];
|
|
|
|
|
if (this.sampleData && Array.isArray(this.sampleData)){
|
|
|
|
|
this.sampleData.forEach((item)=>{
|
|
|
|
|
this.sampleEChartData.xAxis[0].data.push(item.class_name);
|
|
|
|
|
this.sampleEChartData.series[0].data.push(item.psn_num_boy?item.psn_num_boy:'');
|
|
|
|
|
this.sampleEChartData.series[1].data.push(item.psn_num_girl?item.psn_num_girl:'')
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (this.sampleEChart === null){
|
|
|
|
|
this.sampleEChart = echarts.init(document.getElementById('sampleEChart'));
|
|
|
|
|
this.sampleEChart.setOption(this.sampleEChartData);
|
|
|
|
|
}else{
|
|
|
|
|
this.sampleEChart.setOption(this.sampleEChartData);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.sampleData = null;
|
|
|
|
|
if (this.sampleEChart){
|
|
|
|
|
this.sampleEChart.clear();
|
|
|
|
|
this.sampleEChart = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.sampleData = null;
|
|
|
|
|
if (this.sampleEChart){
|
|
|
|
|
this.sampleEChart.clear();
|
|
|
|
|
this.sampleEChart = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
/*
|
|
|
|
|
* 等级分布柱状统计图
|
|
|
|
|
* */
|
|
|
|
|
getClassProjectRankChart:function () {
|
|
|
|
|
this.isLoading = true;
|
|
|
|
|
let params = {
|
|
|
|
|
report_year:this.year.id,
|
|
|
|
|
school_id:this.schoolData.id,
|
|
|
|
|
grade_no:this.gradeGrade,
|
|
|
|
|
project_key:this.gradeTabkey,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Interface.callInterface([{
|
|
|
|
|
url:InterfaceConfig.getClassProjectRankChart.url,
|
|
|
|
|
params:params,
|
|
|
|
|
method:InterfaceConfig.getClassProjectRankChart.method,
|
|
|
|
|
isTestLogin:InterfaceConfig.getClassProjectRankChart.isTestLogin
|
|
|
|
|
}],(result)=>{
|
|
|
|
|
this.isLoading = false;
|
|
|
|
|
if (result[0].data.code === 2000){
|
|
|
|
|
this.gradeData = result[0].data.data;
|
|
|
|
|
this.gradeEChartData.xAxis[0].data = [];//构建等级分布的横坐标
|
|
|
|
|
if (this.gradeTabkey === "bmi"){
|
|
|
|
|
this.gradeEChartData.legend.data=["低体重",'标准体重','超重','肥胖'];
|
|
|
|
|
this.gradeEChartData.series[0].name = '低体重';
|
|
|
|
|
this.gradeEChartData.series[1].name = '标准体重';
|
|
|
|
|
this.gradeEChartData.series[2].name = '超重';
|
|
|
|
|
this.gradeEChartData.series[3].name = '肥胖';
|
|
|
|
|
}else{
|
|
|
|
|
this.gradeEChartData.legend.data=["优秀",'良好','及格','不及格'];
|
|
|
|
|
this.gradeEChartData.series[0].name = '优秀';
|
|
|
|
|
this.gradeEChartData.series[1].name = '良好';
|
|
|
|
|
this.gradeEChartData.series[2].name = '及格';
|
|
|
|
|
this.gradeEChartData.series[3].name = '不及格';
|
|
|
|
|
}
|
|
|
|
|
this.gradeEChartData.series[0].data = [];
|
|
|
|
|
this.gradeEChartData.series[1].data = [];
|
|
|
|
|
this.gradeEChartData.series[2].data = [];
|
|
|
|
|
this.gradeEChartData.series[3].data = [];
|
|
|
|
|
if (this.gradeData && Array.isArray(this.gradeData)){
|
|
|
|
|
this.gradeData.forEach((item)=>{
|
|
|
|
|
this.gradeEChartData.xAxis[0].data.push(item.class_name);
|
|
|
|
|
this.gradeEChartData.series[0].data.push(item.rnk_rto_a_stu);
|
|
|
|
|
this.gradeEChartData.series[1].data.push(item.rnk_rto_b_stu)
|
|
|
|
|
this.gradeEChartData.series[2].data.push(item.rnk_rto_c_stu);
|
|
|
|
|
this.gradeEChartData.series[3].data.push(item.rnk_rto_d_stu)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
if (this.gradeEChart === null){
|
|
|
|
|
this.gradeEChart = echarts.init(document.getElementById('gradeEChart'));
|
|
|
|
|
this.gradeEChart.setOption(this.gradeEChartData);
|
|
|
|
|
}else{
|
|
|
|
|
this.gradeEChart.setOption(this.gradeEChartData);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.gradeData = null;
|
|
|
|
|
if (this.gradeEChart){
|
|
|
|
|
this.gradeEChart.clear();
|
|
|
|
|
this.gradeEChart = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
this.gradeData = null;
|
|
|
|
|
if (this.gradeEChart){
|
|
|
|
|
this.gradeEChart.clear();
|
|
|
|
|
this.gradeEChart = null;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getData();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.ant-spin-nested-loading {
|
|
|
|
|
/deep/ div{
|
|
|
|
|
.ant-spin{
|
|
|
|
|
position: fixed;
|
|
|
|
|
top:calc(50vh - 200px);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.school-04-style{
|
|
|
|
|
min-height: calc(100vh - 136px);
|
|
|
|
|
background-color: white;
|
|
|
|
|
padding-bottom: 20px;
|
|
|
|
|
.title-style{
|
|
|
|
|
height: 80px;
|
|
|
|
|
line-height: 80px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 24px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
letter-spacing: 2px;
|
|
|
|
|
}
|
|
|
|
|
.report-tips-style{
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
padding: 15px 30px;
|
|
|
|
|
background-color: rgba(255,147,31,0.5);
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
line-height: 25px;
|
|
|
|
|
}
|
|
|
|
|
.analysis-container-style{
|
|
|
|
|
margin-top: 20px;
|
|
|
|
|
padding: 0 20px;
|
|
|
|
|
/deep/.total-tr-style{
|
|
|
|
|
background-color: rgba(49,168,250,0.3);
|
|
|
|
|
}
|
|
|
|
|
.analysis-title-style{
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
padding-left: 10px;
|
|
|
|
|
border-left: 10px solid #31a8fa;
|
|
|
|
|
margin-bottom: 20px;
|
|
|
|
|
}
|
|
|
|
|
.module-title-style{
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
color: white;
|
|
|
|
|
width: 400px;
|
|
|
|
|
height: 50px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
line-height: 50px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANcAAAAwCAYAAACCPO+PAAAEPElEQVR4Xu2dP4wUZRjG33d2d9YzMYECaDAWJoZC7maWwhAbQqTReIk5ZGf1Cgu2oTARDJSHnZBIQkGDR+Nld2bXg4SIVhAbNRbmZiEhViQUBKVQ/hRyO3PuayZccUFud3bvm5lvJs+19833Ps/v218mtzd3y4QvEACBRAhwIrtiUxAAAYJceBGAQEIERsq1t/Voe7k09TURzyWUAduCQO4IMPG3K07lyLDgQ+WacQPbYPqJiF7OXXsEBoGECYwSbFO53mzLrooR/plwPmwPArkmICJf9BrV0y8qsalcNS+4IETHct0c4UEgcQJ8PzDKe28f4b+fH/VCueyu7KBBeJuIdiSeDQNAIOcEhGS+51RbseSyvOAYE13IeWfEB4FUCAhRq+eY87Hksr3AJSInlWQYAgJ5JyByz29UX40rV/RGxq68d0Z+EEiLAA9kZuWj6q2N8/73M1dtuT8ta3wzrVCYAwJFICBEzZ5jLg6Vy+qsvstifF+EwugAAmkREJKzPad6avidy+3XhdlLKxTmgEBBCCz6jtkcfudygyYzXSxIYdQAgXQIMF/265XDw+9cnfCkiJxJJxGmgEBBCDBf9+uVQ0Pl2qyq5fZPM/NCQVCgBghMTMB3zJEPvEebx1oULYRcE58FLiwYAchVsANFHX0IQC59zgJJCkYAchXsQFFHHwLK5bLd/ili/lKfikgCAtkQSECu4FNiOp9NHUwFAX0IKJfL6gRNFvxyWZ8jRpKsCCiXq9bpz4vwUlaFMBcEdCGgXC67szZHMljWpSBygEBWBJTLZbmr7zEb17IqhLkgoAsB5XLV2uFBMeSGLgWRAwSyIqBcLrsb7qeB/JJVIcwFAV0IKJfL6gYWD8jXpSBygEBWBJTLta/d3zMw+PesCmEuCOhCQLlcduvpa1Qq3dWlIHKAQFYElMs1/Y3sLJnhg6wKYS4I6EJAuVxvX5VX/nkaPtGlIHKAQFYElMt14EcpP34QhlkVwlwQ0IWAcrmiYrYXPCSibbqURA4QSJ+AdHynGuu/Ucf+M/91uaK34q30C2EiCGhD4JzvmCfipBlLLsvrn2Hik3E2xhoQKCIBJuP9Facc6zHAseSadoO3Sky/FhEaOoHASALM3/n1yuzIdesLxpIruqbmhV0h+TDuAKwDgcIQkH/f8RtTsZ+vHVsuux3uJwPPGBbmBYMicQl85Tvm53EXR+vGliu6yHKDc8z02TiDsBYEckzgku+YR8fNP5FczwTrX2HmD8YdiPUgkCcCwz5QfFSPieVav4N9wkxn8dnJozDj+zkk8JvwYKFXf+mHSbNvSa5o6D5PXhcKj4vILDHvnjQIrgMBDQg8YpGfiWhppVHtbDXPluXaGGDGW33DENojbOwmkZ1bDYfrnyNgGAImagkYIn8Jyx+yxnd6H5s9lbsrlUtlMOwFAnknALnyfoLIry2B/wDS/RJA/BzSkQAAAABJRU5ErkJggg==);
|
|
|
|
|
background-size: 400px 50px;
|
|
|
|
|
margin: 0 auto 20px auto;
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
}
|
|
|
|
|
.sample-chart{
|
|
|
|
|
margin-top: 30px;
|
|
|
|
|
position: relative;
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
.type-list-style{
|
|
|
|
|
width: 200px;
|
|
|
|
|
float: left;
|
|
|
|
|
height: 600px;
|
|
|
|
|
padding-top: 100px;
|
|
|
|
|
padding-left: 110px;
|
|
|
|
|
.type-style{
|
|
|
|
|
width: 90px;
|
|
|
|
|
letter-spacing: 10px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
height: 40px;
|
|
|
|
|
margin-bottom: 30px;
|
|
|
|
|
border:1px solid #31a8fa;
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
border-right: none;
|
|
|
|
|
color:#31a8fa;
|
|
|
|
|
&:hover{
|
|
|
|
|
color:white;
|
|
|
|
|
background-color: #31a8fa;
|
|
|
|
|
}
|
|
|
|
|
&[data-selected=true]{
|
|
|
|
|
color:white;
|
|
|
|
|
background-color: #31a8fa;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.sample-echart-style{
|
|
|
|
|
float: left;
|
|
|
|
|
width: calc(100% - 200px);
|
|
|
|
|
height: 600px;
|
|
|
|
|
}
|
|
|
|
|
.grade-echart-style{
|
|
|
|
|
height: 600px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
.nodata-style{
|
|
|
|
|
position: absolute;
|
|
|
|
|
width: calc(100% - 200px);
|
|
|
|
|
height: 600px;
|
|
|
|
|
left:200px;
|
|
|
|
|
top:56px;
|
|
|
|
|
line-height: 600px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 20px;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
color:#999999;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/.ant-table-small{
|
|
|
|
|
border: 1.5px dashed rgba(255,147,31,1);
|
|
|
|
|
.td{
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/deep/.ant-table-fixed,/deep/.ant-table-fixed-left{
|
|
|
|
|
margin: 0!important;
|
|
|
|
|
.ant-table-thead{
|
|
|
|
|
background-color: rgba(49,168,250,0.6);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|