Commit 53cf405f authored by zhengke's avatar zhengke

新增教师

parent d6f2a37e
import request from '../../utils/request'
/**
* 获取课程分页列表
* @param {JSON参数} data
*/
export function GetClassPageList(data) {
return request({
url: '/TeacherClass/GetClassPageList',
method: 'post',
data
})
}
/**
* 获取课程分页列表
* @param {JSON参数} data
*/
export function GetClassMonthStatistics(data) {
return request({
url: '/TeacherClass/GetClassMonthStatistics',
method: 'post',
data
})
}
......@@ -90,13 +90,13 @@
<q-tab :ripple="false" name="fourth" label="班级日志" />
</q-tabs>
<div v-if="tabCheck=='first'" style="margin:0 15px;">
 <classstuForm :seting-obj="setingObj"></classstuForm>
 <classstuForm :seting-obj="setingObj" :isShowMyBtn="isShowMyBtn"></classstuForm>
</div>
<div v-if="tabCheck=='second'">
 <lessForm :seting-obj="setingObj"></lessForm>
 <lessForm :seting-obj="setingObj" :isShowMyBtn="isShowMyBtn"></lessForm>
</div>
<div v-if="tabCheck=='third'">
<recordForm :seting-obj="setingObj"></recordForm>
<recordForm :seting-obj="setingObj" :isShowMyBtn="isShowMyBtn"></recordForm>
</div>
<div v-if="tabCheck=='fourth'">
<classlogForm :seting-obj="setingObj"></classlogForm>
......@@ -122,6 +122,10 @@
setingObj: {
type: Object,
default: null
},
isShowEditBtn:{
type: Number,
default: null
}
},
components: {
......@@ -136,6 +140,7 @@
tabCheck: 'first', //默认选第一个
loading: false,
classObj:{},
isShowMyBtn:0
}
},
created() {
......@@ -151,6 +156,10 @@
},
mounted() {
// this.queryClassInfo();
console.log(this.isShowEditBtn,'this.isShowEditBtn');
if(this.isShowEditBtn==1){
this.isShowMyBtn=1
}
},
methods: {
queryClassInfo() {
......
<template>
<div>
<div style="text-align:right;">
<template v-if="isShowBtn">
<q-btn outline color="black" label="退课" @click="dropClass()" size="12px" style="margin-right:20px;">
<q-popup-proxy>
<q-banner v-if="isShowDropPop">
......@@ -52,6 +53,7 @@
</q-banner>
</q-popup-proxy>
</q-btn>
</template>
</div>
<q-table :loading="loading" no-data-label="暂无相关数据" style="margin-bottom:80px;" flat selection="multiple"
:selected.sync="selectedStudent" class="sticky-column-table" separator="none" title="学员信息" :data="studentList"
......@@ -104,6 +106,10 @@
setingObj: {
type: Object,
default: null
},
isShowMyBtn: {
type: Number,
default: null
}
},
data() {
......@@ -191,12 +197,16 @@
InvitationList: [], //学员下拉数据
AllInvitationList: [],
checkedStudent: '', //选择学员
isShowBtn:true
}
},
created() {
},
mounted() {
if(this.isShowMyBtn==1){
this.isShowBtn=false;
}
this.getStudentData();
this.getStudentList();
},
......
......@@ -199,7 +199,7 @@
</el-radio-group>
</div>
<div>
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增日程" @click="addNew()">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增日程" v-if="isShowBtn" @click="addNew()">
<q-popup-proxy>
<q-banner v-if="isShowMenu">
<div class="calenderDialog">
......@@ -632,6 +632,10 @@
setingObj: {
type: Object,
default: null
},
isShowMyBtn: {
type: Number,
default: null
}
},
name: "calendar",
......@@ -761,12 +765,16 @@
align: 'center'
}
],
isShowBtn:true
}
},
created() {
if (this.setingObj && this.setingObj.ClassId) {
this.addMsg.ClassId = this.setingObj.ClassId;
}
if(this.isShowMyBtn==1){
this.isShowBtn=false;
}
},
mounted() {
var d = new Date();
......
......@@ -101,7 +101,7 @@
<el-radio-button :label="2">时间轴模式</el-radio-button>
</el-radio-group>
</div>
<div class="col-3">
<div class="col-3" v-if="isShowBtn">
<q-select filled stack-label option-value="TId" @input="changeRecord()" option-label="TeacherName"
v-model="TeacherId" ref="Teacher_Id" :options="TeacherList" label="关联教师" :dense="false" class="col-6"
emit-value map-options />
......@@ -209,6 +209,10 @@
setingObj: {
type: Object,
default: null
},
isShowMyBtn: {
type: Number,
default: null
}
},
components: {
......@@ -260,6 +264,7 @@
}
],
checkType: 1, //默认列表模式
isShowBtn:true
}
},
created() {
......@@ -267,6 +272,10 @@
},
mounted() {
this.TeacherId = this.setingObj.Teacher_Id;
if(this.isShowMyBtn==1){
this.isShowBtn=false;
}
this.getRecord();
this.GetTeacherList();
},
......
......@@ -195,7 +195,7 @@
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="editOrder(item)" />
</template>
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-btn-dropdown flat size="xs" color="dark" v-if="AuthorityObj.isShowMore" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup>
<q-item-section @click="gostudent(item)">
......@@ -767,7 +767,7 @@
<myOrder-form v-if="isShowmyorderForm" :save-obj="myorderObjOption" @close="closeMOSaveForm"></myOrder-form>
<!--班级详情-->
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" @close="closeClass" @success="refreshOrder">
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" :isShowEditBtn="isShowEditBtn" @close="closeClass" @success="refreshOrder">
</classinfo-form>
<!--退课申请-->
......@@ -852,6 +852,10 @@
modityOrderType: {
type: Number,
default: 0, //1-销售修改,2-OP修改,3-总经理修改
},
isShowEditBtn:{
type: Number,
default: null
}
},
data() {
......@@ -892,6 +896,7 @@
isShowRenewClass: false, //是否显示续课按钮
isShowContract: true, //是否显示合同
isShowEdit: true, //是否显示修改订单按钮
isShowMore: true //是否显示更多下拉按钮
},
isShowEduForm: false, //是否显示新增修改合同弹窗
......@@ -991,6 +996,9 @@
if (this.authObj.isShowEdit != null && !this.authObj.isShowEdit) {
this.AuthorityObj.isShowEdit = this.authObj.isShowEdit;
}
if(this.authObj.isShowMore != null && !this.authObj.isShowMore){
this.AuthorityObj.isShowMore = this.authObj.isShowMore
}
}
},
//关闭报价单
......
......@@ -308,7 +308,7 @@
ClassStatus: 0, //班级状态
TeacherName: '', //带班老师
CourseName: '', //学习课程
School_Id: 0, //关联校区
School_Id: -1, //关联校区
},
//班级状态
classStatusList: [],
......@@ -438,7 +438,7 @@
tempArray = [];
}
tempArray.unshift({
SId: 0,
SId: -1,
SName: "不限"
})
this.schoolList = tempArray;
......
......@@ -23,7 +23,7 @@
</div>
</div>
<div class="page-content">
<orderlist :dataList="dataList" ref="orderL" :authObj="authObj" :modityOrderType="2" :cancelList="CancelList"
<orderlist :dataList="dataList" ref="orderL" :authObj="authObj" :isShowEditBtn="isShowEditBtn" :modityOrderType="2" :cancelList="CancelList"
@success="refreshClassOrder"></orderlist>
</div>
</div>
......@@ -57,7 +57,10 @@
isShowManagerRemark: true, //显示总经理备注
isShowCommissionEdit: true, //显示修改提成按钮
isShowRewardEdit: true, //显示修改额外提成按钮
}
isShowEdit: true, //显示修改按钮
isShowMore: true //显示更多下拉
},
isShowEditBtn:0
}
},
created() {
......@@ -65,6 +68,11 @@
this.ClassId = this.$route.query.ClassId
this.msg.ClassId = this.ClassId;
}
if(this.$route.query.isFromMyclass&&this.$route.query.isFromMyclass==1){
this.authObj.isShowEdit=false
this.authObj.isShowMore=false
this.isShowEditBtn=1
}
this.getList();
},
mounted() {
......
......@@ -282,7 +282,7 @@
<div class="pay_InorOut">
<div class="pay_TopTitle" style="display:flex;justify-content: space-between;align-items:center;">
<div><span class="Pay_Line"></span>收入</div>
<q-btn label="新增收款" color="accent q-px-md" size="sm" style="font-weight:400 !important;"
<q-btn label="新增收款" v-if="isShowBtn" color="accent q-px-md" size="sm" style="font-weight:400 !important;"
@click="goShoukuan(1)" />
</div>
<div class="pay_TopTitle" style="margin:15px 0 15px 20px;font-size:12px;">
......@@ -390,7 +390,7 @@
<div class="pay_TopTitle"
style="margin-top:30px;display:flex;justify-content: space-between;align-items:center;">
<div><span class="Pay_Line" style="background:#F72E52;"></span>支出</div>
<q-btn label="新增付款" color="accent q-px-md" size="sm" style="font-weight:400 !important;"
<q-btn label="新增付款" v-if="isShowBtn" color="accent q-px-md" size="sm" style="font-weight:400 !important;"
@click="goShoukuan(2)" />
</div>
<div class="pay_TopTitle" style="margin:15px 0 15px 20px;font-size:12px;">
......@@ -467,6 +467,7 @@
School_Id: 0
},
ClassName:'',
isShowBtn:true
}
},
created() {},
......@@ -480,6 +481,9 @@
if (this.$route.query && this.$route.query.ClassName) {
this.ClassName = this.$route.query.ClassName;
}
if(this.$route.query && this.$route.query.isFromMyClass){
this.isShowBtn = false
}
this.getData();
},
methods: {
......
<style>
.OtherCourseNum {
display: inline-block;
width: 25px;
height: 25px;
text-align: center;
line-height: 25px;
border: 1px solid #2961FE;
border-radius: 50%;
cursor: pointer;
color:#2961FE;
}
.OCourseTable {
width: 400px;
text-align: center;
}
.OCourseTable tr td {
height: 40px;
}
.OCourseTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
</style>
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.ClassName"
label="班级名称" @clear="getClassList" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="msg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
</div>
<div class="col-3">
<q-input @change="getClassList" clearable standout="bg-primary text-white" v-model="msg.CourseName"
label="学习课程" @clear="getClassList" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="getClassList" standout="bg-primary text-white" option-value="SId" option-label="SName"
v-model="msg.School_Id" :options="schoolList" emit-value map-options label="关联校区" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">班级信息</div>
<q-space />
</template>
<template v-slot:body-cell-ClassName="props">
<q-td auto-width :props="props">
<div style="display: flex;align-items: center;">
<q-avatar size="md" style="background:#d4dfff;color:#2961FE;font-weight:bold;" v-if="props.row.ClassName">
{{GetFirst(props.row.ClassName)}}</q-avatar>
<div >
<span style="color:#2961FE;margin-left:10px;cursor:pointer;" @click="getClassInfo(props.row)"
title="点击查看详情">{{props.row.ClassName}}</span>
<div style="margin-left: 10px;">{{props.row.ClassNo}}</div>
</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-OtherCourseName="props">
<q-td auto-width :props="props">
<template v-if="props.row.OtherCourseList">
<template v-if="props.row.OtherCourseList.length==1">
{{props.row.OtherCourseList[0].CourseName}}{{props.row.OtherCourseList[0].ClassHours}}课时】
</template>
<template v-if="props.row.OtherCourseList.length>1">
{{props.row.OtherCourseList[0].CourseName}}
<span class="OtherCourseNum">
{{props.row.OtherCourseList.length}}
<q-popup-proxy>
<q-banner>
<table class="OCourseTable" style="border-collapse:collapse;">
<tr>
<th>课程名称</th>
<th>课时数</th>
</tr>
<tr v-for="(sItem,sIndex) in props.row.OtherCourseList" style="border-bottom:1px dashed #d1d1d1;">
<td>{{sItem.CourseName}}</td>
<td>{{sItem.ClassHours}}</td>
</tr>
</table>
</q-banner>
</q-popup-proxy>
</span>
</template>
<template v-if="props.row.OtherCourseList.length==0">
</template>
</template>
</q-td>
</template>
<template v-slot:body-cell-TeacherName="props">
<q-td auto-width :props="props">
<span style="color:#3FC4FF;">{{props.row.TeacherName}}</span>
</q-td>
</template>
<template v-slot:body-cell-CompleteProgress="props">
<q-td auto-width :props="props">
{{props.row.UsePlanNum}}/{{props.row.TotalPlanNum}}
</q-td>
</template>
<!--班级状态-->
<template v-slot:body-cell-ClassStatusStr="props">
<q-td>
<span>{{props.row.ClassStatusStr}}</span>&nbsp;
<i class="iconfont icon-edit" @click.stop="getClassItem(props.row)" title="点击修改班级状态">
<q-popup-proxy>
<q-banner v-if="isShowEdit">
<div class="calenderDialog">
<div style="margin:10px 0 15px 0;">设置班级状态</div>
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="statusMsg.ClassStatus" :options="classStatusList" emit-value map-options label="班级状态" />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowEdit=false"
style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="setClassStatus()" />
</q-card-actions>
</div>
</q-banner>
</q-popup-proxy>
</i>
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left:10px;">
<q-list>
<q-item clickable v-close-popup @click="gotoOrder(props.row)">
<q-item-section>
<q-item-label>订单中心</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="goPayment(props.row)">
<q-item-section>
<q-item-label>收支明细</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="showOtherCourse(props.row)" style="display:none;">
<q-item-section>
<q-item-label>关联其他课程</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="gomonthLessonCost(props.row)">
<q-item-section>
<q-item-label>月度课耗</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</q-td>
</template>
</q-table>
<class-form v-if="isShowClassForm" :save-obj="classObjOption" @close="closeClassSaveForm" @success="refreshPage">
</class-form>
<classinfo-form v-if="isShowClassInfo" :seting-obj="classObjOption" :isShowEditBtn="1" @close="closeClassSaveForm"
@success="refreshPage">
</classinfo-form>
<othercourseForm v-if="IsShowOtherCourse" :seting-obj="classObjOption" @close="closeClassSaveForm"
@success="refreshPage">
</othercourseForm>
</div>
</div>
</template>
<script>
import {
queryClassStatusList,
saveClassStatus, //修改班级状态
} from '../../api/course/class';
import {
GetClassPageList
} from '../../api/teacher/index';
//获取校区列表
import {
getSchoolDropdown,
deleteClass
} from '../../api/school/index';
import classForm from '../../components/course/class-form';
import classinfoForm from '../../components/course/classinfo-form';
import othercourseForm from '../../components/course/othercourse-form';
export default {
meta: {
title: "班级管理"
},
components: {
classForm,
classinfoForm,
othercourseForm
},
data() {
return {
columns: [{
name: 'ClassName',
label: '班级名称',
field: 'ClassName',
align: 'left'
},
{
name: 'SchoolName',
label: '校区',
field: 'SchoolName',
align: 'left',
},
{
name: 'CourseName',
label: '课程',
field: 'CourseName',
align: 'left'
},
{
name: 'OtherCourseName',
label: '关联其他课程',
field: 'OtherCourseName',
align: 'left'
},
{
name: 'TeacherName',
label: '带班老师',
field: 'TeacherName',
align: 'left'
},
{
name: 'OpenTime',
label: '开班时间',
field: 'OpenTime',
align: 'left'
},
{
name: 'CompleteProgress',
label: '课程进度',
field: 'CompleteProgress',
align: 'left'
},
{
name: 'ClassStatusStr',
label: '状态',
align: 'left',
field: 'ClassStatusStr'
},
{
name: 'optioned',
label: '操作',
field: 'CourseId'
}
],
data: [],
loading: false,
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
ClassName: '', //班级名称
ClassStatus: 0, //班级状态
TeacherName: '', //带班老师
Teacher_Id:0,
CourseName: '', //学习课程
School_Id: -1, //关联校区
},
//班级状态
classStatusList: [],
//关联校区列表
schoolList: [],
pageCount: 0,
classObjOption: null,
isShowEdit: false,
statusMsg: {
ClassId: 0,
ClassStatus: 0
},
isShowClassForm: false, //是否显示新增修改弹窗
isShowClassInfo: false, //是否显示课程信息
IsShowOtherCourse: false, //是否显示其他课程
}
},
created() {
if (this.$route.query && this.$route.query.ClassName) {
this.msg.ClassName = decodeURI(this.$route.query.ClassName)
}
let userInfo = this.getLocalStorage();
this.msg.Teacher_Id = userInfo.AccountId;
this.getClassStatus();
this.getSchool();
},
mounted() {
this.getClassList();
},
methods: {
//删除班级
removeClass(item, status) {
let delMsg = {
ClassId: item.ClassId,
Status: status
};
var message = "是否要删除该班级?";
if (status == 0) {
message = "是否要恢复该班级?";
}
this.$q.dialog({
title: '提示信息',
message: message,
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消",
}).onOk(() => {
deleteClass(delMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '删除成功!',
position: 'top'
})
this.getClassList();
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
}
})
}).onCancel(() => {
});
},
//当前点击的班级
getClassItem(item) {
this.isShowEdit = true;
var Obj = JSON.parse(JSON.stringify(item));
this.statusMsg.ClassStatus = Obj.ClassStatus;
this.statusMsg.ClassId = Obj.ClassId;
},
//更新班级状态
setClassStatus() {
saveClassStatus(this.statusMsg).then(res => {
this.isShowEdit = false;
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '设置成功!',
position: 'top'
})
this.getClassList();
} else {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
}
});
},
gotoOrder(item) {
var tempStr = '/course/classorder?ClassId=' + item.ClassId + '&isFromMyclass=1';
this.$router.push({
path: tempStr
});
},
//跳转到收支明细
goPayment(item) {
this.$router.push({
path: '/course/paymentDetail',
query: {
ClassId: item.ClassId,
School_Id: item.School_Id,
ClassName: item.ClassName,
isFromMyClass : 1,
blank: 'y'
}
})
},
//获取校区列表
getSchool() {
getSchoolDropdown({}).then(res => {
if (res.Code == 1) {
var tempArray = res.Data;
if (!tempArray) {
tempArray = [];
}
tempArray.unshift({
SId: -1,
SName: "不限"
})
this.schoolList = tempArray;
}
})
},
//获取班级状态列表
getClassStatus() {
queryClassStatusList({}).then(res => {
if (res.Code == 1) {
this.classStatusList = res.Data;
}
}).catch(() => {})
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getClassList()
},
//获取菜单分页列表
getClassList() {
this.loading = true;
GetClassPageList(this.msg).then(res => {
this.loading = false;
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
}).catch(() => {
this.loading = false
})
},
//刷新页面
refreshPage() {
this.isShowClassForm = false;
this.getClassList();
},
//新增修改菜单
EditCourse(obj) {
if (obj) {
this.classObjOption = obj
} else {
this.classObjOption = null
}
this.isShowClassForm = true
},
//关闭弹窗
closeClassSaveForm() {
//关闭新增修改弹窗
this.isShowClassForm = false;
//关闭班级信息弹窗
this.isShowClassInfo = false;
//关闭关联其他课程弹窗
this.IsShowOtherCourse = false;
},
GetFirst(val) {
if (val) {
return val.substr(0, 1);
}
},
//获取进度条
getProgress(num, total) {
if (num == 0 || total == 0) {
return 0;
}
return (Math.round(num / total * 100) / 100.00);
},
//显示关联课程
showOtherCourse(item) {
this.IsShowOtherCourse = true;
this.classObjOption = item;
},
//点击班级名称
getClassInfo(obj) {
this.classObjOption = null;
this.isShowClassInfo = false;
this.classObjOption = obj;
this.isShowClassInfo = true;
},
gomonthLessonCost(row){
let ClassName = encodeURI(row.ClassName)
this.OpenNewUrl('teachMonthLessonCost' , {
ClassId: row.ClassId,
ClassName: ClassName,
});
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style>
@import "../financial/css/cssReset.css";
.baseSet_Title {
width: 120px !important;
padding: 18px 0 0 16px;
text-align: right;
}
.monthLessonCost .border-bottom {
/* border-bottom: 1px dashed #EEE; */
padding-bottom: 5px;
margin-bottom: 5px;
}
.monthLessonCost .text-bottom {
height: 32px;
line-height: 32px;
margin-bottom: 10px;
}
.monthLessonCost .singeRowTable tr th {
border: 1px solid #d2d2d2;
}
</style>
<template>
<div class="page-body monthLessonCost">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-select filled stack-label use-input input-debounce="0" option-value="ClassId" @input="getList"
option-label="ClassName" v-model="ClassId" :options="ClassList" label="班级" :dense="false"
emit-value map-options @filter="filterFn">
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</div>
</div>
</div>
<template>
<div class="cm_content" style="width: 100%;">
<table class="po_content singeRowTable" style="border:1px solid #E6E6E6;" cellspacing="0"
cellpadding="0" v-loading="loading">
<tr>
<th rowspan="2">月份</th>
<th colspan="4">老师列表</th>
<th rowspan="2">学生数量</th>
<th rowspan="2">学生总课时</th>
<th rowspan="2">学生消费总金额</th>
<th colspan="3">学生列表</th>
</tr>
<tr>
<th width="">老师名称</th>
<th width="">总课时</th>
<th width="">基础课时</th>
<th width="">课时费</th>
<th width="">学生名称</th>
<th width="">学习课时</th>
<th width="">耗费金额</th>
</tr>
<tr v-for=" ( item , index ) in dataList ">
<td>
<span>{{item.Month}}</span>
</td>
<td>
<p v-for="( son , sIndex ) in item.TeacherList"><span
style="cursor: pointer;text-decoration: underline;"
@click="gourlteacher('teacherclassfee',son,item)">{{son.TeacherName}}</span></p>
</td>
<td>
<p v-for="( son , sIndex ) in item.TeacherList">{{son.HoursNum}}</p>
</td>
<td>
<p v-for="( son , sIndex ) in item.TeacherList">{{son.BaseHoursNum}}</p>
</td>
<td>
<p v-for="( son , sIndex ) in item.TeacherList">{{son.HoursMoney}}</p>
</td>
<td>
<span>{{item.StuNum}}</span>
</td>
<td>
<span>{{item.StuSumHours}}</span>
</td>
<td>
<span>{{item.StuSumMoney}}</span>
</td>
<td>
<span v-if='item.show == true'>
<p v-for="( son , sIndex ) in item.StudentList"><span style="cursor: pointer;text-decoration: underline;" @click="gourlteacher2('studentsClassfee',son,item)">{{son.StudentName}}</span>
</p>
</span>
<span v-if='item.show == false'>
<p v-for="( son , sIndex ) in item.StudentList"> <span v-if='sIndex<3'> <span
style="cursor: pointer;text-decoration: underline;" @click="gourlteacher2('studentsClassfee',son,item)">{{son.StudentName}}</span></span>
</p>
</span>
</td>
<td>
<span v-if='item.show == true'>
<p v-for="( son , sIndex ) in item.StudentList">{{son.HoursNum}}</p>
</span>
<span v-if='item.show == false'>
<p v-for="( son , sIndex ) in item.StudentList"> <span
v-if='sIndex<3'>{{son.HoursNum}}</span></p>
</span>
</td>
<td style="position: relative;">
<span v-if='item.show == true'>
<p v-for="( son , sIndex ) in item.StudentList">{{son.HoursMoney}}
<span
style="position: absolute;right: 5px;cursor: pointer;text-decoration: underline;color: #409EFF;"
v-if='(sIndex+1)==item.StudentList.length && item.show == true && item.StudentList.length>3'
@click="dataList[index].show = false,$forceUpdate()">
<i class="el-icon-top"></i>
收起
</span>
</p>
</span>
<span v-if='item.show == false'>
<p v-for="( son , sIndex ) in item.StudentList"> <span
v-if='sIndex<3'>{{son.HoursMoney}}</span>
<span
style="position: absolute;right: 5px;cursor: pointer;text-decoration: underline;color: #409EFF;"
v-if='sIndex==2 && item.show == false'
@click="dataList[index].show = true,$forceUpdate()">
<i class="el-icon-bottom"></i>
展开
</span>
</p>
</span>
</td>
</tr>
</table>
<div v-if='dataList.length==0'
style="width: 100%;border:1px solid #E6E6E6;display: flex;align-items: center;justify-content: center;height: 60px;">
暂无数据
</div>
</div>
</template>
</div>
</template>
<script>
import {
GetClassMonthStatistics,
} from '../../api/teacher/index';
import {
getClassDropDownList
} from '../../api/school/index'
export default {
meta: {
title: "班级月度课耗"
},
props: {},
components: {},
data() {
return {
ClassId: 0,
ClassName:'',
loading: false,
dataList: [], //列表数据
ClassList: [],
allClassList: [],
}
},
created() {
if (this.$route.query && this.$route.query.ClassId) {
this.ClassId = Number(this.$route.query.ClassId)
this.ClassName = this.$route.query.ClassName
}
},
mounted() {
this.getList(); //获取规则
this.setClass()
},
methods: {
getList() {
this.loading = true;
GetClassMonthStatistics({ ClassId: this.ClassId }).then(res => {
if (res.Code == 1) {
this.loading = false;
this.dataList = res.Data
this.dataList.forEach(x => {
if (x.StudentList.length > 3) {
x.show = false
} else {
x.show = true
}
});
}
})
},
setClass(item) {//班级
this.isShowClass = true;
getClassDropDownList({
CourseId: 0,
IsAddDefault: 0, //添加默认选项
}).then(res => {
if (res.Code == 1) {
var jsonData = res.Data;
if (jsonData && jsonData.length > 0) {
this.ClassList = JSON.parse(JSON.stringify(jsonData));
this.allClassList = JSON.parse(JSON.stringify(jsonData));;
}
}
});
},
//筛选班级
filterFn(val, update) {
update(() => {
if (val === '') {
this.ClassList = JSON.parse(JSON.stringify(this.allClassList))
} else {
const needle = val.toLowerCase()
this.ClassList = this.allClassList.filter(v => v.ClassName.toLowerCase().indexOf(needle) > -1)
}
})
},
gourlteacher(path,row,item) {
this.OpenNewUrl('/financial/'+path, {
ClassName: this.ClassName,
id: row.TeacherId,
datetype:'2',
StartMonth:item.Month,
EndMonth:item.Month,
});
},
gourlteacher2(path,row,item) {
this.OpenNewUrl('/financial/'+path, {
ClassId: this.ClassId,
StudentName:row.StudentName,
datetype:'2',
StartMonth:item.Month,
EndMonth:item.Month,
});
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -929,7 +929,16 @@ const routes = [{
component: () =>
import("pages/classroom/courseInfo")
},
{
path: "/teacher/myClass", //我的班级
component: () =>
import("pages/teacher/myClass")
},
{
path: "/teacher/teachMonthLessonCost", //月度课耗
component: () =>
import("pages/teacher/teachMonthLessonCost")
},
],
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment