Commit 754ce335 authored by 罗超's avatar 罗超

1

parent 820790b2
This diff is collapsed.
<template> <template>
<div style="padding:20px 0"> <div style="padding: 20px 0">
<div class="page-content"> <div class="page-content">
<q-table :pagination="setMsg" no-data-label="暂无相关数据" flat class="sticky-column-table sticky-right-column-table" <q-table
separator="none" :data="tableData" :columns="showCZ?columns:columns2" row-key="name"> :pagination="setMsg"
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 v-for="(item,index) in props.row.GuestList" style="margin-right:5px;"> <span
{{item.GuestName}} v-for="(item, index) in props.row.GuestList"
style="margin-right: 5px"
>
{{ item.GuestName }}
</span> </span>
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-StartTime="props"> <template v-slot:body-cell-StartTime="props">
<q-td auto-width :props="props"> <q-td auto-width :props="props">
{{props.row.StartTime}}-{{props.row.EndTime}} {{ props.row.StartTime }}-{{ props.row.EndTime }}
</q-td> </q-td>
</template> </template>
<template v-slot:body-cell-TotalPlanNum="props"> <template v-slot:body-cell-TotalPlanNum="props">
<q-td> <q-td> {{ props.row.Ranks }}/{{ props.row.TotalPlanNum }} </q-td>
{{props.row.Ranks}}/{{props.row.TotalPlanNum}}
</q-td>
</template> </template>
<template v-slot:body-cell-optioned="props"> <template v-slot:body-cell-optioned="props">
<q-td> <q-td>
<q-btn flat size="xs" icon="iconfont icon-view" v-if="props.row.ClassType==1" color="accent" <q-btn
style="font-weight:400" label="课程回顾" @click="goCourseRecord(props.row)" /> flat
size="xs"
icon="iconfont icon-view"
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 class="full-width justify-end" v-model="PageIndex" color="primary" :max="PageCount" <q-pagination
:input="true" @input="changePage" /> class="full-width justify-end"
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,
default: null default: null,
}, },
tableData: { tableData: {
type: Array, type: Array,
default: null default: null,
}, },
PageCount: { PageCount: {
type: Number, type: Number,
default: null default: null,
}, },
showCZ:{//是否显示操作栏 showCZ: {
Type:Boolean, //是否显示操作栏
default:true Type: Boolean,
} default: true,
}, },
meta: {
title: "我的课表"
}, },
components: { meta: {
title: "我的课表",
}, },
components: {},
data() { data() {
return { return {
columns: [{ columns: [
name: 'ClassDate', {
label: '日期', name: "ClassDate",
field: 'ClassDate', label: "日期",
align: 'left' field: "ClassDate",
}, { align: "left",
name: 'StartTime',
label: '上课时间',
field: 'StartTime',
align: 'left'
}, {
name: 'ClassName',
label: '班级',
field: 'ClassName',
align: 'left'
}, },
{ {
name: 'CourseName', name: "StartTime",
label: '课程名称', label: "上课时间",
field: 'CourseName', field: "StartTime",
align: 'left', align: "left",
}, },
{ {
name: 'GuestList', name: "ClassName",
label: '学员名称', label: "班级",
field: 'GuestList', field: "ClassName",
align: 'left' align: "left",
}, },
{ {
name: 'TeacherName', name: "CourseName",
label: '教师', label: "课程名称",
field: 'TeacherName', field: "CourseName",
align: 'left' align: "left",
}, },
{ {
name: 'TotalPlanNum', name: "GuestList",
label: '课程进度', label: "学员名称",
field: 'TotalPlanNum', field: "GuestList",
align: 'left' align: "left",
}, },
{ {
name: 'optioned', name: "TeacherName",
label: '操作', label: "教师",
field: 'Id' field: "TeacherName",
} align: "left",
},
{
name: "TotalPlanNum",
label: "课程进度",
field: "TotalPlanNum",
align: "left",
},
{
name: "optioned",
label: "操作",
field: "Id",
},
], ],
columns2: [{ columns2: [
name: 'ClassDate', {
label: '日期', name: "ClassDate",
field: 'ClassDate', label: "日期",
align: 'left' field: "ClassDate",
}, { align: "left",
name: 'StartTime',
label: '上课时间',
field: 'StartTime',
align: 'left'
}, {
name: 'ClassName',
label: '班级',
field: 'ClassName',
align: 'left'
}, },
{ {
name: 'CourseName', name: "StartTime",
label: '课程名称', label: "上课时间",
field: 'CourseName', field: "StartTime",
align: 'left', align: "left",
}, },
{ {
name: 'GuestList', name: "ClassName",
label: '学员名称', label: "班级",
field: 'GuestList', field: "ClassName",
align: 'left' align: "left",
}, },
{ {
name: 'TeacherName', name: "CourseName",
label: '教师', label: "课程名称",
field: 'TeacherName', field: "CourseName",
align: 'left' align: "left",
}, },
{ {
name: 'TotalPlanNum', name: "GuestList",
label: '课程进度', label: "学员名称",
field: 'TotalPlanNum', field: "GuestList",
align: 'left' align: "left",
},
{
name: "TeacherName",
label: "教师",
field: "TeacherName",
align: "left",
},
{
name: "TotalPlanNum",
label: "课程进度",
field: "TotalPlanNum",
align: "left",
}, },
], ],
tabMsg: { tabMsg: {
PageIndex: 1, PageIndex: 1,
PageSize: 15, PageSize: 15,
rowsPerPage: 15, rowsPerPage: 15,
StartTime: '', StartTime: "",
EndTime: '', EndTime: "",
TeacherId: 0, TeacherId: 0,
ClassRoomId: 0, ClassRoomId: 0,
ClassType: 0 ClassType: 0,
},
PageIndex: 1
}
},
created() {
}, },
mounted() { PageIndex: 1,
};
}, },
created() {},
mounted() {},
methods: { methods: {
//翻页 //翻页
changePage(val) { changePage(val) {
this.PageIndex = val; this.PageIndex = val;
this.$emit('getChange', this.PageIndex); this.$emit("getChange", this.PageIndex);
}, },
//跳转到课程回顾 //跳转到课程回顾
goCourseRecord(item) { goCourseRecord(item) {
this.OpenNewUrl("../../classroom/courseInfo", { this.OpenNewUrl("../../classroom/courseInfo", {
id: item.Id id: item.Id,
});
},
//跳转到课程反馈
goFeedBack(item) {
this.OpenNewUrl("/teacher/feedBackList", {
id: item.Id,
}); });
} },
} },
} };
</script> </script>
<style lang="sass"> <style lang="sass">
@import url('~assets/css/table.sass') @import url('~assets/css/table.sass')
</style> </style>
This diff is collapsed.
...@@ -1047,6 +1047,11 @@ const routes = [{ ...@@ -1047,6 +1047,11 @@ const routes = [{
component: () => component: () =>
import("pages/classroom/courseInfo") import("pages/classroom/courseInfo")
}, },
{
path: "/teacher/feedBackList", //教室本次上课反馈
component: () =>
import("pages/teacher/feedBackList")
},
{ {
path: "/teacher/myClass", //我的班级 path: "/teacher/myClass", //我的班级
component: () => 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