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

init
zhusiyu 3 years ago
parent d41ed33a43
commit f199af6f1d

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

Loading…
Cancel
Save