运行数据中心-师生概览-教师接口

init
zhusiyu 3 years ago
parent d41ed33a43
commit f199af6f1d

@ -22,55 +22,16 @@
</a-col>
</a-row>
<a-row class="content-right-bot-style" type="flex" justify="space-around" align="middle">
<a-col :span="7" class="content-right-bot-style-box">
<div class="col-title">{{'小学部 / ' + 500}}</div>
<a-col :span="7" class="content-right-bot-style-box" v-for="item,index in teacherGenderData"
:key="index">
<div class="col-title">{{item.stage_name + ' / ' + item.total}}</div>
<a-row class="col-row">
<a-col :span="10">{{'男/' + 10}}</a-col>
<a-col :span="10">{{'男/' + item.nan_total}}</a-col>
<a-col :span="4" class="genderLine"></a-col>
<a-col :span="10">{{'女/' + 10}}</a-col>
</a-row>
</a-col>
<a-col :span="7" class="content-right-bot-style-box">
<div class="col-title">{{'初中部 / ' + 500}}</div>
<a-row class="col-row">
<a-col :span="10">{{'男/' + 10}}</a-col>
<a-col :span="4" class="genderLine"></a-col>
<a-col :span="10">{{'女/' + 10}}</a-col>
</a-row>
</a-col>
<a-col :span="7" class="content-right-bot-style-box">
<div class="col-title">{{'高中部 / ' + 500}}</div>
<a-row class="col-row">
<a-col :span="10">{{'男/' + 10}}</a-col>
<a-col :span="4" class="genderLine"></a-col>
<a-col :span="10">{{'女/' + 10}}</a-col>
<a-col :span="10">{{'女/' + item.nv_total}}</a-col>
</a-row>
</a-col>
</a-row>
<!--<div class="right-item-style">-->
<!--<span>小学部</span>-->
<!--<span>{{smallSchoolDept + '人'}}</span>-->
<!--</div>-->
<!--<div class="right-item-style">-->
<!--<span>高中部</span>-->
<!--<span>{{highSchoolDept + '人'}}</span>-->
<!--</div>-->
<!--<div class="right-item-style">-->
<!--<span>行政后勤</span>-->
<!--<span>53</span>-->
<!--</div>-->
<!--<div class="right-item-style">-->
<!--<span>初中部</span>-->
<!--<span>{{middleSchoolDept + '人'}}</span>-->
<!--</div>-->
<!--<div class="right-item-style">-->
<!--<span>其他部门</span>-->
<!--<span>{{otherDept + '人'}}</span>-->
<!--</div>-->
<!--<div class="right-item-style">-->
<!--<span>德育处</span>-->
<!--<span>26</span>-->
<!--</div>-->
</div>
</div>
<div class="info-center-style">
@ -79,11 +40,6 @@
{{ item.value }}
</a-select-option>
</a-select>
<!--<a-select style="width:150px;margin-left: 10px" :value="gradeId" @change="gradeChange">-->
<!--<a-select-option v-for="item in gradeList" :key="item.id" :value="item.id">-->
<!--{{ item.value }}-->
<!--</a-select-option>-->
<!--</a-select>-->
</div>
<div class="info-bottom-style">
<vue-scroll :ops="listScroll" style="width: 100%;height:330px">
@ -108,53 +64,45 @@
middleSchoolDept: 0,
highSchoolDept: 0,
otherDept: 0,
teacherGenderData: [],
stageList: [{id: 1, value: '小学部'}, {id: 2, value: '初中部'}, {id: 3, value: '高中部'}],
stageId: 1,
// gradeList: [{id: 1, value: ''}, {id: 2, value: ''}, {id: 3, value: ''}, {
// id: 4,
// value: ''
// }, {id: 5, value: ''}, {id: 6, value: ''}],
gradeId: 1,
columns: [
{
title: '学科',
dataIndex: 'dep',
key: 'dep',
dataIndex: 'subject_name',
key: 'subject_name',
align: "center",
},
{
title: '教师总数',
dataIndex: 'teacherNum',
key: 'teacherNum',
dataIndex: 'total',
key: 'total',
align: "center",
}, {
title: '男教师数',
dataIndex: 'nanTeacherNum',
key: 'nanTeacherNum',
dataIndex: 'nan_total',
key: 'nan_total',
align: "center",
},
{
title: '女教师数',
dataIndex: 'nvTeacherNum',
key: 'nvTeacherNum',
dataIndex: 'nv_total',
key: 'nv_total',
align: "center",
},
],
tableData: [
{dep: "语文组", teacherNum: 8, nanTeacherNum: 8, nvTeacherNum: 9},
{dep: "英语组", teacherNum: 10, nanTeacherNum: 8, nvTeacherNum: 9},
{dep: "数学组", teacherNum: 12, nanTeacherNum: 8, nvTeacherNum: 9},
{dep: "美术组", teacherNum: 4, nanTeacherNum: 8, nvTeacherNum: 9},
{dep: "音乐组", teacherNum: 6, nanTeacherNum: 8, nvTeacherNum: 9},
]
tableData: []
}
},
mounted() {
this.getTeacherOverview()
// this.getGenderInfo()
this.getGenderInfo()
this.getTeacherTableData()
},
methods: {
//-
//--
getTeacherOverview: function () {
let param = {
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
@ -175,7 +123,7 @@
}], (result) => {
if (result[0].data.success) {
let res = result[0].data.result;
console.log('师生概览-教师人数数据', JSON.parse(res))
//console.log('-', JSON.parse(res))
if (res !== "") {
let dataList = JSON.parse(res);
if (dataList && dataList.length > 0) {
@ -184,16 +132,16 @@
this.otherTeacherNum = dataList[0].rkjs_total;
}
}
this.getTeacherOverviewDept()
//this.getTeacherOverviewDept()
}
})
},
//
getGenderInfo: function () {
//--
getGenderInfo() {
let param = {
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
"query": {
"query_id": "query_jiaoshi_gailan3",
"query_id": "query_jiaoshi_gailan2",
"query_param": [
this.BaseConfig.person_info_my.bureau_id + ""
]
@ -207,26 +155,36 @@
params: param,
method: "post",
}], (result) => {
console.log('男女教师性别比例', result)
if (result[0].data.success) {
let res = result[0].data.result;
let res = JSON.parse(result[0].data.result);
//console.log('--', res)
if (res !== "") {
let dataList = JSON.parse(res);
if (dataList && dataList.length > 0) {
}
this.teacherGenderData = res
}
}
})
},
//--
getTeacherOverviewDept: function () {
//---
getTeacherTableData() {
let stageName = "";
switch (this.stageId) {
case 1:
stageName = '小学部'
break;
case 2:
stageName = '初中部'
break;
case 3:
stageName = '高中部'
break;
}
let param = {
"access_token": "system_01##20200102030405##a6ce11eab94df48a6ce11eab",
"query": {
"query_id": "query_jiaoshi_gailan2",
"query_id": "query_jiaoshi_duiwu",
"query_param": [
this.BaseConfig.person_info_my.bureau_id + ""
this.BaseConfig.person_info_my.bureau_id + "",
stageName + ""
]
},
"query_cache": 0,
@ -240,37 +198,20 @@
}], (result) => {
if (result[0].data.success) {
let res = result[0].data.result;
//console.log('', JSON.parse(res))
if (res !== "") {
let dataList = JSON.parse(res);
dataList.forEach(item => {
if (item.stage_name === '小学部') {
this.smallSchoolDept = item.total
} else if (item.stage_name === '初中部') {
this.middleSchoolDept = item.total
} else if (item.stage_name === '高中部') {
this.highSchoolDept = item.total
}
})
this.getOtherDeptNum()
this.tableData = dataList
//console.log('', dataList)
}
}
})
},
//
getOtherDeptNum() {
this.otherDept = this.teacherTotalNum - this.smallSchoolDept - this.middleSchoolDept - this.highSchoolDept
},
stageChange: function (stageId) {
if (this.stageId !== stageId) {
this.stageId = stageId;
}
this.getTeacherTableData()
},
// gradeChange: function (gradeId) {
// if (this.gradeId !== gradeId) {
// this.gradeId = gradeId;
// }
// },
getCustomRow: function () {
let obj = {style: {}};
obj['style']['color'] = '#00ffff';

Loading…
Cancel
Save