Commit 60fc11bc authored by zhengke's avatar zhengke

修改

parent c1246b6a
......@@ -12,7 +12,7 @@ export default {
<style>
@import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_xijn75rrmj.css');
@import url('//at.alicdn.com/t/font_2077629_6atqorrshm8.css');
html,
body,
......
......@@ -381,3 +381,16 @@ export function saveMakeUpStatus(data) {
data
})
}
/**
* 获取课时统计列表
* @param {JSON参数} data
*/
export function GetTeacherClassHours(data) {
return request({
url: '/Class/GetTeacherClassHoursStatistical',
method: 'post',
data
})
}
<style>
.classHourReward .el-input__inner {
border: none !important;
background: transparent !important;
}
</style>
<template>
<div class="classHourReward 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-select @input="getList" standout="bg-primary text-white" option-value="TId" option-label="TeacherName"
v-model="msg.TeacherId" :options="TeacherList" emit-value map-options label="带班老师" />
</div>
<div class="col-4 Sysuser_Date">
<q-field filled>
 <template v-slot:control>
<el-date-picker v-model="msg.StartTime" type="date" placeholder="开学日期" value-format="yyyy-MM-dd" size="small" style="width:47%;"
@change="getList" clear-icon="iconfont icon-guanbi">
</el-date-picker>
<el-date-picker v-model="msg.EndTime" type="date" placeholder="结束日期" value-format="yyyy-MM-dd" size="small" style="width:47%;"
@change="getList" clear-icon="iconfont icon-guanbi">
</el-date-picker>
</template>
</q-field>
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table no-bottom-table"
separator="none" title="" :data="dataList" :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-TeacherId="props">
<q-td :props="props">
<q-btn flat size="xs" icon="iconfont icon-View" color="accent" @click="goStatic(props.row)"
style="font-weight:400" label="查看" />
</q-td>
</template>
<template v-slot:bottom>
<div>&nbsp;</div>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
GetTeacherClassHours //课时统计
} from '../../api/course/class'
import {
getTeacherDropDownList,
} from '../../api/school/index';
export default {
meta: {
title: "课时统计"
},
name: "classHourStatistic",
data() {
return {
dataList: [],
loading: false,
msg: {
StartTime: "",
EndTime: '',
TeacherId: 0,
},
//公告column
columns: [{
name: 'TeacherName',
field: 'TeacherName',
label: '教师',
align: 'left'
},
{
name: 'ClassHours',
field: 'ClassHours',
label: '课时',
align: 'left',
},
{
name: 'TeacherId',
label: '操作',
field: 'TeacherId'
}
],
TeacherList: [], //关联教师下拉数据
}
},
created() {
this.getList();
this.GetTeacherList()
},
methods: {
getList() {
this.loading = true;
GetTeacherClassHours(this.msg).then(res => {
this.loading = false
if (res.Code == 1) {
this.dataList = res.Data;
}
console.log(res, '数据');
}).catch(() => {
this.loading = false
})
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
this.TeacherList.unshift({
TId: 0,
TeacherName: "不限"
})
this.AllTeacherList = this.TeacherList
}
})
},
//去查看哈
goStatic(item){
// let obj = {
// StartTime: this.msg.StartTime,
// EndTime: this.msg.EndTime,
// TeacherId: item.TeacherId
// }
let routeUrl = this.$router.resolve({
path: "/course/classPlan",
query: {
StartTime: this.msg.StartTime,
EndTime:this.msg.EndTime,
TeacherId:item.TeacherId
}
});
window.open(routeUrl.href, '_blank');
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<style>
.planTable {
width: 100%;
margin: 10px;
color: #000;
}
.PlanRight th,
.PlanRight td {
.MainPlan th,
.MainPlan td {
border: 1px solid #d1d1d1;
height: 40px;
}
.PlanRight td {
.MainPlan td {
vertical-align: top;
padding: 5px;
min-width: 225px;
width: 14%;
}
.MainPlan {
margin: 20px;
}
.plan_ClassDate {
height: 30px;
line-height: 30px;
font-size: 16px;
font-weight: bold;
}
.plantHead th{
border-bottom:0;
}
.planTabDiv{
max-height:calc(100vh - 235px);
height:calc(100vh - 235px);
overflow-y:auto;
margin-right:-3px;
}
.planTabDiv::-webkit-scrollbar {
width: 3px;
height: 3px;
background-color: #F5F5F5;
}
/*!*定义滚动条轨道 内阴影+圆角*!*/
.planTabDiv::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
border-radius: 10px;
background-color: #F5F5F5;
}
.moreInfo {
margin-left: 20px;
color: blue;
cursor: pointer;
/*!*定义滑块 内阴影+圆角*!*/
.planTabDiv::-webkit-scrollbar-thumb {
border-radius: 10px;
-webkit-box-shadow: -webkit-gradient(linear, 0 0, 0 100%, color-stop(.5, rgba(255, 255, 255, .2)), color-stop(.5, transparent), to(transparent));
background-color: #0ae;
}
.MainPlan .el-collapse-item__header{
font-size:12px;
line-height: normal;
color:#000;
}
.plan_Inner{
font-size:12px;
color:#000;
display: flex;
margin-top:5px;
}
.plan_LeftTitle{
width:60px;
text-align: right;
flex-shrink: 0
}
.plan_RightInner{
width:100%;
}
.commonTimeStr{
display:inline-block;
color:#fff;
padding:1px 3px;
border-radius: 5px;
}
.greenTime{
background-color:green;
}
.blueTime{
background-color:blue;
}
.orangeTime{
background-color:orange;
}
</style>
<template>
<div class="page-body MainPlan">
<div class="Planleft">
<el-date-picker v-model="msg.StartTime" type="date" value-format="yyyy-MM-dd" placeholder="开始日期" size="small"
style="width:100%;" @change="getPlanList" clear-icon="iconfont icon-guanbi">
</el-date-picker>
<el-date-picker v-model="msg.EndTime" type="date" value-format="yyyy-MM-dd" placeholder="结束日期" size="small"
style="width:100%;margin-top:10px;" @change="getPlanList" clear-icon="iconfont icon-guanbi">
</el-date-picker>
<el-select v-model="msg.TeacherId" style="width:100%;margin-top:10px;" placeholder="教师团队" size="small"
@change="getPlanList()">
<el-option v-for="item in TeacherList" :key="item.TeacherName" :label="item.TeacherName" :value="item.TId">
</el-option>
</el-select>
<el-select v-model="msg.ClassRoomId" style="width:100%;margin-top:10px;" placeholder="教师团队" size="small"
@change="getPlanList()">
<el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId">
</el-option>
</el-select>
<div class="col row wrap q-col-gutter-md">
<div class="col-2">
<el-select v-model="msg.TeacherId" style="width:100%;" placeholder="教师团队" size="small"
@change="getPlanList()">
<el-option v-for="item in TeacherList" :key="item.TeacherName" :label="item.TeacherName" :value="item.TId">
</el-option>
</el-select>
</div>
<div class="col-2">
<el-select v-model="msg.ClassRoomId" style="width:100%;" placeholder="教室" size="small"
@change="getPlanList()">
<el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId">
</el-option>
</el-select>
</div>
<div class="col-2">
<el-date-picker v-model="msg.StartTime" type="date" value-format="yyyy-MM-dd" placeholder="开始日期" size="small"
style="width:100%;" @change="getPlanList" clear-icon="iconfont icon-guanbi">
</el-date-picker>
</div>
<div class="col-2">
<el-date-picker v-model="msg.EndTime" type="date" value-format="yyyy-MM-dd" placeholder="结束日期" size="small"
style="width:100%;" @change="getPlanList" clear-icon="iconfont icon-guanbi">
</el-date-picker>
</div>
</div>
<div class="PlanRight" style="width:100%;overflow:auto;">
<table class="planTable" style="border-collapse:collapse;">
<thead>
<tr>
<th colspan="16">甲鹤校区教室使用情况</th>
</tr>
<tr>
<th>周一</th>
<th>周二</th>
<th>周三</th>
<th>周四</th>
<th>周五</th>
<th>周六</th>
<th>周日</th>
</tr>
</thead>
<table class="planTable plantHead" style="border-collapse:collapse;width:100%;margin:15px 0 0 0;">
<thead>
<tr>
<th colspan="16">甲鹤校区教室使用情况</th>
</tr>
<tr>
<th>周一</th>
<th>周二</th>
<th>周三</th>
<th>周四</th>
<th>周五</th>
<th>周六</th>
<th>周日</th>
</tr>
</thead>
</table>
<div class="planTabDiv">
<table class="planTable" style="border-collapse:collapse;margin-top:0;">
<tbody>
<tr v-for="(item,index) in dataList.fridayList" :key="index">
<td>
<div class="plan_ClassDate">{{dataList.mondayList[index].ClassDate}}</div>
<el-collapse v-if="dataList.mondayList[index].SubList&&dataList.mondayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.mondayList[index].SubList" :key="subIndex" :title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div>上课时间:{{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div>班级:{{subItem.ClassName}}</div>
<div>课程名称:{{subItem.CourseName}}</div>
<div>学生名称:
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
<el-collapse-item v-for="(subItem,subIndex) in dataList.mondayList[index].SubList" :key="subIndex"
:name="subIndex">
<template slot="title">
<span v-if="subItem.TimeStr==='早上'" class="commonTimeStr greenTime">{{subItem.TimeStr}}</span>
<span v-if="subItem.TimeStr==='下午'" class="commonTimeStr blueTime">{{subItem.TimeStr}}</span>
<span v-if="subItem.TimeStr==='晚上'" class="commonTimeStr orangeTime">{{subItem.TimeStr}}</span>
老师:<span style="color:red;">{{subItem.TeacherName}}</span>
<span style="margin-left:5px;">{{subItem.RoomName}}</span>
</template>
<div class="plan_Inner">
<div class="plan_LeftTitle">上课时间:</div>
<div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">班级:</div>
<div class="plan_RightInner">{{subItem.ClassName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">课程名称:</div>
<div class="plan_RightInner">{{subItem.CourseName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">学生名称:</div>
<div class="plan_RightInner">
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
</div>
</div>
</el-collapse-item>
</el-collapse>
</td>
<td>
<div class="plan_ClassDate">{{dataList.tuesdayList[index].ClassDate}}</div>
<el-collapse v-if="dataList.tuesdayList[index].SubList&&dataList.tuesdayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.tuesdayList[index].SubList" :key="subIndex" :title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div>上课时间:{{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div>班级:{{subItem.ClassName}}</div>
<div>课程名称:{{subItem.CourseName}}</div>
<div>学生名称:
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
<el-collapse-item v-for="(subItem,subIndex) in dataList.tuesdayList[index].SubList" :key="subIndex"
:title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div class="plan_Inner">
<div class="plan_LeftTitle">上课时间:</div>
<div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">班级:</div>
<div class="plan_RightInner">{{subItem.ClassName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">课程名称:</div>
<div class="plan_RightInner">{{subItem.CourseName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">学生名称:</div>
<div class="plan_RightInner">
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
</div>
</div>
</el-collapse-item>
</el-collapse>
</td>
<td>
<div class="plan_ClassDate">{{dataList.wednesdayList[index].ClassDate}}</div>
<el-collapse v-if="dataList.wednesdayList[index].SubList&&dataList.wednesdayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.wednesdayList[index].SubList" :key="subIndex" :title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div>上课时间:{{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div>班级:{{subItem.ClassName}}</div>
<div>课程名称:{{subItem.CourseName}}</div>
<div>学生名称:
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
<el-collapse-item v-for="(subItem,subIndex) in dataList.wednesdayList[index].SubList" :key="subIndex"
:title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div class="plan_Inner">
<div class="plan_LeftTitle">上课时间:</div>
<div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">班级:</div>
<div class="plan_RightInner">{{subItem.ClassName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">课程名称:</div>
<div class="plan_RightInner">{{subItem.CourseName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">学生名称:</div>
<div class="plan_RightInner">
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
</div>
</div>
</el-collapse-item>
</el-collapse>
</td>
<td>
<div class="plan_ClassDate">{{dataList.thursdayList[index].ClassDate}}</div>
<el-collapse v-if="dataList.thursdayList[index].SubList&&dataList.thursdayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.thursdayList[index].SubList" :key="subIndex" :title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div>上课时间:{{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div>班级:{{subItem.ClassName}}</div>
<div>课程名称:{{subItem.CourseName}}</div>
<div>学生名称:
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
<el-collapse v-if="dataList.thursdayList[index].SubList&&dataList.thursdayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.thursdayList[index].SubList" :key="subIndex"
:title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div class="plan_Inner">
<div class="plan_LeftTitle">上课时间:</div>
<div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">班级:</div>
<div class="plan_RightInner">{{subItem.ClassName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">课程名称:</div>
<div class="plan_RightInner">{{subItem.CourseName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">学生名称:</div>
<div class="plan_RightInner">
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
</div>
</div>
</el-collapse-item>
</el-collapse>
</td>
<td>
<div class="plan_ClassDate">{{dataList.fridayList[index].ClassDate}}</div>
<el-collapse v-if="dataList.fridayList[index].SubList&&dataList.fridayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.fridayList[index].SubList" :key="subIndex" :title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div>上课时间:{{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div>班级:{{subItem.ClassName}}</div>
<div>课程名称:{{subItem.CourseName}}</div>
<div>学生名称:
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
<el-collapse-item v-for="(subItem,subIndex) in dataList.fridayList[index].SubList" :key="subIndex"
:title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div class="plan_Inner">
<div class="plan_LeftTitle">上课时间:</div>
<div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">班级:</div>
<div class="plan_RightInner">{{subItem.ClassName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">课程名称:</div>
<div class="plan_RightInner">{{subItem.CourseName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">学生名称:</div>
<div class="plan_RightInner">
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
</div>
</div>
</el-collapse-item>
</el-collapse>
</td>
<td>
<div class="plan_ClassDate">{{dataList.saturdayList[index].ClassDate}}</div>
<el-collapse v-if="dataList.saturdayList[index].SubList&&dataList.saturdayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.saturdayList[index].SubList" :key="subIndex" :title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div>上课时间:{{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div>班级:{{subItem.ClassName}}</div>
<div>课程名称:{{subItem.CourseName}}</div>
<div>学生名称:
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
<el-collapse-item v-for="(subItem,subIndex) in dataList.saturdayList[index].SubList" :key="subIndex"
:title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div class="plan_Inner">
<div class="plan_LeftTitle">上课时间:</div>
<div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">班级:</div>
<div class="plan_RightInner">{{subItem.ClassName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">课程名称:</div>
<div class="plan_RightInner">{{subItem.CourseName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">学生名称:</div>
<div class="plan_RightInner">
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
</div>
</div>
</el-collapse-item>
</el-collapse>
</td>
<td>
<div class="plan_ClassDate">{{dataList.sundayList[index].ClassDate}}</div>
<el-collapse v-if="dataList.sundayList[index].SubList&&dataList.sundayList[index].SubList.length>0">
<el-collapse-item v-for="(subItem,subIndex) in dataList.sundayList[index].SubList" :key="subIndex" :title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div>上课时间:{{subItem.StartTime}}-{{subItem.EndTime}}</div>
<div>班级:{{subItem.ClassName}}</div>
<div>课程名称:{{subItem.CourseName}}</div>
<div>学生名称:
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
<el-collapse-item v-for="(subItem,subIndex) in dataList.sundayList[index].SubList" :key="subIndex"
:title="'老师:'+subItem.TeacherName+' 教室:'+subItem.RoomName" :name="subIndex">
<div class="plan_Inner">
<div class="plan_LeftTitle">上课时间:</div>
<div class="plan_RightInner">{{subItem.StartTime}}-{{subItem.EndTime}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">班级:</div>
<div class="plan_RightInner">{{subItem.ClassName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">课程名称:</div>
<div class="plan_RightInner">{{subItem.CourseName}}</div>
</div>
<div class="plan_Inner">
<div class="plan_LeftTitle">学生名称:</div>
<div class="plan_RightInner">
<span style="margin-right:10px;" v-for="tItem in subItem.GuestList">{{tItem.GuestName}}</span>
</div>
</div>
</el-collapse-item>
</el-collapse>
</td>
......@@ -185,7 +357,7 @@
ClassRoomId: 0
},
dataList: [],
activeNames:[1]
activeNames: [1]
};
},
created() {
......@@ -193,6 +365,16 @@
this.getClassRoomList();
},
mounted() {
if (this.$route.query.StartTime) {
this.msg.StartTime = this.$route.query.StartTime
}
if (this.$route.query.EndTime) {
this.msg.EndTime = this.$route.query.EndTime
}
if (this.$route.query.TeacherId) {
this.msg.TeacherId = JSON.parse(this.$route.query.TeacherId);
}
this.getPlanList();
},
methods: {
......@@ -233,30 +415,8 @@
this.ClassRoomList.unshift(obj);
}
})
},
getWeek(item) {
console.log(item.substring(2, 3));
return item.substring(2, 3)
}
}
};
</script>
<style>
.MainPlan {
padding: 5px !important;
display: flex;
}
.MainPlan .Planleft {
width: 200px;
background-color: rgb(245, 246, 247);
padding: 5px;
flex-shrink: 0;
}
.plan_ClassDate{
height:30px;
line-height: 30px;
}
</style>
......@@ -628,6 +628,11 @@ const routes = [{
component: () =>
import("pages/course/classHourReward.vue")
},
{
path: "/course/classHourStatistic", //教学奖励 课时统计
component: () =>
import("pages/course/classHourStatistic.vue")
},
{
path: "/course/rewardDetailed", //教学奖励 奖励明细
component: () =>
......
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