Commit f4b5bd60 authored by 黄奎's avatar 黄奎

页面修改

parent b5834441
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
</thead> </thead>
</table> </table>
<div class="planTabDiv" ref="planTabDiv"> <div class="planTabDiv" ref="planTabDiv">
<table class="ClassPlanTable planClass-table" ref="PlanTable" style="border-collapse:collapse;margin-top:0;"> <table class="ClassPlanTable planClass-table" ref="PlanTable" style="border-collapse:collapse;margin-top:0;" v-loading="loading">
<tbody> <tbody>
<tr v-for="(item,index) in dataList.fridayList" :key="index"> <tr v-for="(item,index) in dataList.fridayList" :key="index">
<td> <td>
...@@ -176,6 +176,10 @@ ...@@ -176,6 +176,10 @@
type: Object, type: Object,
default: null default: null
}, },
loading:{
type:Boolean,
default:false,
}
}, },
components: { components: {
mateitem, mateitem,
......
...@@ -2,157 +2,74 @@ ...@@ -2,157 +2,74 @@
<div class="page-body MainPlan xg"> <div class="page-body MainPlan xg">
<div class="col row wrap q-col-gutter-md"> <div class="col row wrap q-col-gutter-md">
<div class="col-2 flex"> <div class="col-2 flex">
<el-select <el-select v-model="msg.TeacherId" style="width: 100%" placeholder="教师" size="small" @change="getPlanList()">
v-model="msg.TeacherId" <el-option v-for="item in TeacherList" :key="item.TeacherName" :label="item.TeacherName" :value="item.TId">
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-option>
<div <div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
教师: 教师:
</div> </div>
</el-select> </el-select>
</div> </div>
<div class="col-2"> <div class="col-2">
<el-select <el-select v-model="msg.ClassRoomId" style="width: 100%" placeholder="教室" size="small" @change="getTypeWay()">
v-model="msg.ClassRoomId" <el-option v-for="item in ClassRoomList" :key="item.RoomName" :label="item.RoomName" :value="item.RoomId">
style="width: 100%"
placeholder="教室"
size="small"
@change="getTypeWay()"
>
<el-option
v-for="item in ClassRoomList"
:key="item.RoomName"
:label="item.RoomName"
:value="item.RoomId"
>
</el-option> </el-option>
<div <div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
教室: 教室:
</div> </div>
</el-select> </el-select>
</div> </div>
<div class="col-2" style="width: 13%"> <div class="col-2" style="width: 13%">
<el-date-picker <el-date-picker v-model="msg.StartTime" type="date" value-format="yyyy-MM-dd" placeholder="开始日期" size="small"
v-model="msg.StartTime" style="width: 100%" @change="getTypeWay()" :picker-options="picker" :clearable="false">
type="date"
value-format="yyyy-MM-dd"
placeholder="开始日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
:picker-options="picker"
:clearable="false"
>
</el-date-picker> </el-date-picker>
</div> </div>
<div class="col-2" style="width: 13%"> <div class="col-2" style="width: 13%">
<el-date-picker <el-date-picker v-model="msg.EndTime" type="date" value-format="yyyy-MM-dd" placeholder="结束日期" size="small"
v-model="msg.EndTime" style="width: 100%" @change="getTypeWay()" clear-icon="iconfont icon-guanbi" :picker-options="pickerEnd">
type="date"
value-format="yyyy-MM-dd"
placeholder="结束日期"
size="small"
style="width: 100%"
@change="getTypeWay()"
clear-icon="iconfont icon-guanbi"
:picker-options="pickerEnd"
>
</el-date-picker> </el-date-picker>
</div> </div>
<div class="col-1" style="width: 10%"> <div class="col-1" style="width: 10%">
<el-select <el-select v-model="msg.ClassType" style="width: 100%" placeholder="类型" size="small" @change="getTypeWay()">
v-model="msg.ClassType"
style="width: 100%"
placeholder="类型"
size="small"
@change="getTypeWay()"
>
<el-option :key="0" label="全部" :value="0"> </el-option> <el-option :key="0" label="全部" :value="0"> </el-option>
<el-option :key="1" label="正常" :value="1"> </el-option> <el-option :key="1" label="正常" :value="1"> </el-option>
<el-option :key="2" label="试听课" :value="2"> </el-option> <el-option :key="2" label="试听课" :value="2"> </el-option>
<div <div slot="prefix" class="full-height flex items-center" style="color: #000; padding-right: 10px">
slot="prefix"
class="full-height flex items-center"
style="color: #000; padding-right: 10px"
>
状态: 状态:
</div> </div>
</el-select> </el-select>
</div> </div>
<div class="col-3" style="width: 30%"> <div class="col-3" style="width: 30%">
<q-btn <q-btn color="accent" size="sm" class="q-mr-md" style="margin-top: 2px" @click="exchangeType"
color="accent" :label="typeName" />
size="sm" <q-btn color="accent" size="sm" class="q-mr-md" label="下载计划" @click="downLoadPlan()" />
class="q-mr-md" <q-btn color="negative" size="sm" label="调课申请" @click="openForm"></q-btn>
style="margin-top: 2px"
@click="exchangeType"
:label="typeName"
/>
<q-btn
color="accent"
size="sm"
class="q-mr-md"
label="下载计划"
@click="downLoadPlan()"
/>
<q-btn
color="negative"
size="sm"
label="调课申请"
@click="openForm"
></q-btn>
</div> </div>
</div> </div>
<classmateForm :dataList="dataList" v-if="commonType == 1"></classmateForm> <classmateForm :dataList="dataList" v-if="commonType == 1" :loading="loading"></classmateForm>
<change-class-form <change-class-form v-if="persistent" @close="closeSaveForm" @success="refreshPage"></change-class-form>
v-if="persistent" <teachTable v-if="commonType == 2" :tableData="tableData" :PageCount="PageCount" :setMsg="tabMsg" :showCZ="false"
@close="closeSaveForm" @getChange="getChange" :loading="loading"></teachTable>
@success="refreshPage"
></change-class-form>
<teachTable
v-if="commonType == 2"
:tableData="tableData"
:PageCount="PageCount"
:setMsg="tabMsg"
:showCZ="false"
@getChange="getChange"
></teachTable>
</div> </div>
</template> </template>
<script> <script>
import { import {
getTeacherDropDownList, getTeacherDropDownList,
queryClassRoomList, queryClassRoomList,
} from "../../api/school/index"; } from "../../api/school/index";
import { import {
GetClassPlanStatistical, GetClassPlanStatistical,
GetClassPlanStatisticalPage, GetClassPlanStatisticalPage,
} from "../../api/teacher/index"; } from "../../api/teacher/index";
import { EduDownLoad } from "../../api/common/common"; import {
import classmateForm from "../../components/course/classmate-form"; EduDownLoad
import teachTable from "../teacher/components/teachTable"; } from "../../api/common/common";
import changeClassForm from "../../components/teacher/changeClassForm.vue"; import classmateForm from "../../components/course/classmate-form";
import teachTable from "../teacher/components/teachTable";
import changeClassForm from "../../components/teacher/changeClassForm.vue";
export default { export default {
meta: { meta: {
title: "教师课表", title: "教师课表",
}, },
...@@ -213,6 +130,7 @@ export default { ...@@ -213,6 +130,7 @@ export default {
} }
}, },
}, },
loading:false,
}; };
}, },
created() { created() {
...@@ -223,9 +141,9 @@ export default { ...@@ -223,9 +141,9 @@ export default {
let today = let today =
date.getFullYear() + date.getFullYear() +
"-" + "-" +
(date.getMonth() < 9 (date.getMonth() < 9 ?
? "0" + (date.getMonth() + 1) "0" + (date.getMonth() + 1) :
: date.getMonth() + 1) + date.getMonth() + 1) +
"-" + "-" +
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()); (date.getDate() < 10 ? "0" + date.getDate() : date.getDate());
this.msg.StartTime = today; this.msg.StartTime = today;
...@@ -301,7 +219,9 @@ export default { ...@@ -301,7 +219,9 @@ export default {
this.tabMsg.EndTime = this.msg.EndTime; this.tabMsg.EndTime = this.msg.EndTime;
this.tabMsg.ClassRoomId = this.msg.ClassRoomId; this.tabMsg.ClassRoomId = this.msg.ClassRoomId;
this.tabMsg.ClassType = this.msg.ClassType; this.tabMsg.ClassType = this.msg.ClassType;
this.loading=true;
GetClassPlanStatisticalPage(this.tabMsg).then((res) => { GetClassPlanStatisticalPage(this.tabMsg).then((res) => {
this.loading=false;
if (res.Code == 1) { if (res.Code == 1) {
this.tableData = res.Data.PageData; this.tableData = res.Data.PageData;
this.PageCount = res.Data.PageCount; this.PageCount = res.Data.PageCount;
...@@ -320,10 +240,10 @@ export default { ...@@ -320,10 +240,10 @@ export default {
} }
}, },
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.xg .el-input--prefix .el-input__inner { .xg .el-input--prefix .el-input__inner {
padding-left: 50px; padding-left: 50px;
} }
</style> </style>
\ No newline at end of file
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
</div> </div>
</div> </div>
<teachTable v-if="commonType == 2" :tableData="tableData" :PageCount="PageCount" :setMsg="tabMsg" :showCZ="true" <teachTable v-if="commonType == 2" :tableData="tableData" :PageCount="PageCount" :setMsg="tabMsg" :showCZ="true"
@getChange="getChange"></teachTable> @getChange="getChange" :loading="loading"></teachTable>
</div> </div>
</template> </template>
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
TeacherId: 0, TeacherId: 0,
ClassRoomId: 0, ClassRoomId: 0,
dataList: {}, dataList: {},
loading:false,
msg: { msg: {
StartTime: "", StartTime: "",
EndTime: "", EndTime: "",
...@@ -211,7 +212,9 @@ ...@@ -211,7 +212,9 @@
this.tabMsg.ClassRoomId = this.msg.ClassRoomId; this.tabMsg.ClassRoomId = this.msg.ClassRoomId;
this.tabMsg.ClassType = this.msg.ClassType; this.tabMsg.ClassType = this.msg.ClassType;
this.tabMsg.TeacherId=this.msg.TeacherId; this.tabMsg.TeacherId=this.msg.TeacherId;
this.loading=true;
GetClassPlanStatisticalPage(this.tabMsg).then((res) => { GetClassPlanStatisticalPage(this.tabMsg).then((res) => {
this.loading=false;
if (res.Code == 1) { if (res.Code == 1) {
this.tableData = res.Data.PageData; this.tableData = res.Data.PageData;
this.PageCount = res.Data.PageCount; this.PageCount = res.Data.PageCount;
......
<template> <template>
<div style="padding: 20px 0"> <div style="padding: 20px 0">
<div class="page-content"> <div class="page-content">
<q-table <q-table :pagination="setMsg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table sticky-right-column-table"
:pagination="setMsg" separator="none" :data="tableData" :columns="showCZ ? columns : columns2" row-key="name">
no-data-label="暂无相关数据"
flat
class="sticky-column-table sticky-right-column-table"
separator="none"
:data="tableData"
:columns="showCZ ? columns : columns2"
row-key="name"
>
<template v-slot:body-cell-GuestList="props"> <template v-slot:body-cell-GuestList="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
<span <span v-for="(item, index) in props.row.GuestList" style="margin-right: 5px" :key="index">
v-for="(item, index) in props.row.GuestList"
style="margin-right: 5px"
>
{{ item.GuestName }} {{ item.GuestName }}
</span> </span>
</q-td> </q-td>
...@@ -31,44 +20,22 @@ ...@@ -31,44 +20,22 @@
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td> <q-td>
<q-btn <q-btn flat size="xs" icon="iconfont icon-view" v-if="props.row.ClassType == 1" color="accent"
flat style="font-weight: 400" label="课程回顾" @click="goCourseRecord(props.row)" />
size="xs" <q-btn flat size="xs" icon="iconfont icon-view" v-if="props.row.ClassType == 1" color="accent"
icon="iconfont icon-view" style="font-weight: 400" label="课程反馈" @click="goFeedBack(props.row)" />
v-if="props.row.ClassType == 1"
color="accent"
style="font-weight: 400"
label="课程回顾"
@click="goCourseRecord(props.row)"
/>
<q-btn
flat
size="xs"
icon="iconfont icon-view"
v-if="props.row.ClassType == 1"
color="accent"
style="font-weight: 400"
label="课程反馈"
@click="goFeedBack(props.row)"
/>
</q-td> </q-td>
</template> </template>
<template v-slot:bottom> <template v-slot:bottom>
<q-pagination <q-pagination class="full-width justify-end" v-model="PageIndex" color="primary" :max="PageCount"
class="full-width justify-end" :input="true" @input="changePage" />
v-model="PageIndex"
color="primary"
:max="PageCount"
:input="true"
@input="changePage"
/>
</template> </template>
</q-table> </q-table>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
setMsg: { setMsg: {
type: Object, type: Object,
...@@ -87,6 +54,10 @@ export default { ...@@ -87,6 +54,10 @@ export default {
Type: Boolean, Type: Boolean,
default: true, default: true,
}, },
loading:{
type:Boolean,
default:false,
}
}, },
meta: { meta: {
title: "我的课表", title: "我的课表",
...@@ -94,8 +65,7 @@ export default { ...@@ -94,8 +65,7 @@ export default {
components: {}, components: {},
data() { data() {
return { return {
columns: [ columns: [{
{
name: "ClassDate", name: "ClassDate",
label: "日期", label: "日期",
field: "ClassDate", field: "ClassDate",
...@@ -143,8 +113,7 @@ export default { ...@@ -143,8 +113,7 @@ export default {
field: "Id", field: "Id",
}, },
], ],
columns2: [ columns2: [{
{
name: "ClassDate", name: "ClassDate",
label: "日期", label: "日期",
field: "ClassDate", field: "ClassDate",
...@@ -221,8 +190,8 @@ export default { ...@@ -221,8 +190,8 @@ export default {
}); });
}, },
}, },
}; };
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
\ No newline at end of file
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