Commit 4d8b4c86 authored by zhengke's avatar zhengke

增加

parent ce8cd639
......@@ -601,5 +601,15 @@ export function SetOrderSplit(data) {
});
}
/**
* 获取上课计划冲突数据
*/
export function GetRepeatClassPlan(data) {
return request({
url: '/Class/GetRepeatClassPlan',
method: 'post',
data
});
}
<style>
.OCourseTable {
width: 400px;
text-align: center;
}
.OCourseTable tr td {
height: 40px;
color:#000;
}
.OCourseTable tr th {
height: 40px;
background-color: rgb(238, 238, 239);
}
.resStyle{
color:red;
}
</style>
<template>
<div class="page-body">
<div class="page-content">
<q-table :pagination="pMsg" :loading="loading" no-data-label="暂无相关数据" selection="multiple" flat
:selected.sync="selected" class="sticky-column-table" separator="none"
:data="dataList" :columns="columns" row-key="ClassPlanId" hide-bottom>
<template v-slot:top="props">
<div class="col-2 q-table__title">上课计划冲突调整</div>
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" label="全部重排" />
<q-btn color="accent" size="sm" class="q-mr-md" label="修改教室" />
<q-btn color="accent" size="sm" class="q-mr-md" label="修改老师" />
<q-btn color="accent" size="sm" class="q-mr-md" label="修改时段" />
</div>
</template>
<template v-slot:body-cell-PlanTimeList="props">
<q-td>
<div v-for="(item,index) in props.row.PlanTimeList" :key="index">
{{item.StartTime}}-{{item.EndTime}}
</div>
</q-td>
</template>
<template v-slot:bottom>
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<span>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="查看" />
<q-popup-proxy>
<q-banner>
<table class="OCourseTable" style="border-collapse:collapse;">
<tr>
<th>日期</th>
<th>老师</th>
<th>教室</th>
<th>上课时段</th>
</tr>
<tr v-for="(subItem,subIndex) in props.row.PlanRepeatList" :key="subIndex">
<td>{{subItem.ClassDate}}</td>
<td :class="{'resStyle':props.row.TeacherId==subItem.TeacherId}">{{subItem.TeacherName}}</td>
<td>
<span :class="{'resStyle':props.row.ClassRoomId==subItem.ClassRoomId}">{{subItem.RoomName}}</span>
</td>
<td>
<template v-if="subItem.PlanTimeList&&subItem.PlanTimeList.length>0">
<div v-for="(cItem,cIndex) in subItem.PlanTimeList" :key="cIndex">
{{cItem.StartTime}}-{{cItem.EndTime}}
</div>
</template>
</td>
</tr>
</table>
</q-banner>
</q-popup-proxy>
</span>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" />
</q-td>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
GetRepeatClassPlan
} from "../../api/school/index";
export default {
meta: {
title: "上课计划冲突调整"
},
data() {
return {
currentUrl: "",
columns: [{
name: "ClassDate",
label: "日期",
field: "ClassDate",
align: "left"
},
{
name: "TeacherName",
label: "老师",
field: "TeacherName",
align: "left"
},
{
name: "RoomName",
label: "教室",
field: "RoomName",
align: "left"
},
{
name: "PlanTimeList",
label: "上课时段",
field: "PlanTimeList",
align: "left",
},
{
name: "optioned",
label: "操作",
field: "CourseId"
}
],
dataList: [],
loading: true,
selected: [], //全选数据
pMsg: {
rowsPerPage: 1000,
},
msg: {
ClassId: 53
}
};
},
mounted() {
this.getList();
},
methods: {
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getcourselist();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getcourselist();
},
getList() {
this.loading = true;
this.dataList = [];
GetRepeatClassPlan(this.msg).then(res => {
this.loading = false;
console.log(res, '数据');
if (res.Code == 1) {
this.dataList = res.Data;
}
})
}
}
};
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -927,6 +927,11 @@ const routes = [{
component: () =>
import("pages/course/jobinfo.vue")
},
{
path: "/course/classConflict", //上课计划冲突
component: () =>
import("pages/course/classConflict.vue")
},
{
path: "/studyAbroad/studyabroad", //留学
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