Commit a36adf11 authored by 吴春's avatar 吴春

1

parent 037830a4
<template>
<div class="page-content">
<q-table :pagination="pageMsg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
:visible-columns="visibleColumns" row-key="name">
<template v-slot:top>
<div class="col-2 q-table__title">试听开课管理</div>
<q-space />
</template>
<template v-slot:body-cell-ReservationDate="props">
<q-td>
<template>
{{timeFormatSeconds(props.row.ReservationDate)}}
</template>
</q-td>
</template>
<template v-slot:body-cell-ClassDateStr="props">
<q-td :props="props">
<div style="min-width: 150px;word-break: break-word;white-space: normal;">
{{ props.row.ClassDateStr }} {{ props.row.ClassTime }}
<template v-if="props.row.ClassDateStr&&props.row.ClassDateStr.length>0">-</template>
{{ props.row.EndTime }}
</div>
</q-td>
</template>
<template v-slot:body-cell-ClassTime="props">
<q-td :props="props">
{{props.row.ClassTime}}-{{props.row.EndTime}}
</q-td>
</template>
<template v-slot:body-cell-TeacherId="props">
<q-td :props="props">
<span @click="editVisitor(props.row)" style="cursor: pointer;margin-right:10px;">修改</span>
<span @click="DeleteVisitorReserve(props.row.Id)" style="cursor: pointer;">删除</span>
</q-td>
</template>
<template v-slot:bottom>
</template>
</q-table>
<reserveForm v-if="isShowReserve" :save-obj="reserveObj" @close="closeReserveForm" @success="refreshPage">
</reserveForm>
</div>
</template>
<script>
import {
RemoveReserveClass
} from '../../api/scheduling/schedu'
import reserveForm from '../schedul/reserve-form'
export default {
props: {
data: {
type: Array,
default: null
},
loading: {
type: Boolean,
default: false
},
authObj: {
type: Object,
default: null
}
},
components: {
reserveForm
},
data() {
return {
columns: [
{
name: 'StuName',
label: ' 学生名称',
align: 'left',
field: 'StuName',
},
{
name: 'ReservationDate',
label: '试听日期',
field: 'ReservationDate',
align: 'left'
},
{
name: 'Demand',
label: ' 试听需求',
align: 'left',
field: 'Demand',
},
{
name: 'ClassDateStr',
label: ' 预约时间',
align: 'left',
field: 'ClassDateStr',
},
{
name: 'TeacherName',
label: '主讲老师',
align: 'left',
field: 'TeacherName',
},
{
name: 'LessonName',
label: '课程名称',
align: 'left',
field: 'LessonName',
},
{
name: 'RoomName',
label: '教室',
align: 'left',
field: 'RoomName',
},
{
name: 'Feedback',
label: '学员反馈',
align: 'left',
field: 'Feedback',
},
{
name: 'TeacherId',
label: '操作',
field: 'TeacherId'
}
],
//表格可见列
visibleColumns: [
'ReservationDate', 'Demand', 'ClassDateStr', 'TeacherName', 'LessonName', 'RoomName', 'TeacherId'
], //可见列
reserveObj: {},
isShowReserve: false,
pageMsg: {
rowsPerPage: 10
},
}
},
created() {
if (this.authObj && !this.authObj.isShowEdit) {
this.visibleColumns.splice(this.visibleColumns.length - 1, 1);
this.visibleColumns.splice(7, 1);
}
},
mounted() {
},
methods: {
//获得年月日时分秒
//传入日期//例:2020-10-27T14:36:23
timeFormatSeconds(time,type) {
let timeStr="";
if(time==='0001-01-01T00:00:00'){
return timeStr;
}
var d = time ? new Date(time) : new Date();
var year = d.getFullYear();
var month = d.getMonth() + 1;
var day = d.getDate();
if (month < 10) month = '0' + month;
if (day < 10) day = '0' + day;
if(type==2){
var hours = d.getHours();
var min = d.getMinutes();
var seconds = d.getSeconds();
if (hours < 0) hours = '0' + hours;
if (min < 10) min = '0' + min;
if (seconds < 10) seconds = '0' + seconds;
timeStr+= ' ' + hours + ':' + min + ':' + seconds;
}
timeStr=year + '-' + month + '-' + day +timeStr;
return timeStr;
},
//编辑试听
editVisitor(obj) {
if (obj) {
this.reserveObj = obj
} else {
this.reserveObj = null
}
this.isShowReserve = true;
},
//关闭弹窗
closeReserveForm() {
this.isShowReserve = false
},
refreshPage() {
this.$emit('success');
},
//删除试听
DeleteVisitorReserve(Id) {
let that = this;
this.$q
.dialog({
title: "提示信息",
message: "是否确定此试听信息删除?",
cancel: true,
persistent: true,
ok: "确定",
cancel: "取消"
})
.onOk(() => {
RemoveVisitorReserve({
Id: Id
}).then(res => {
that.$q.notify({
icon: "iconfont icon-chenggong",
timeout: 2000,
message: res.Message,
position: "top"
});
that.getList();
});
})
.onCancel(() => {});
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -88,7 +88,7 @@
</div>
</el-dialog>
<el-dialog title="试听开课" :visible.sync="VisitorReserveClassMsg.IsShow" width="30%">
<el-dialog title="试听开课" :visible.sync="VisitorReserveClassMsg.IsShow" width="30%">
<div class="row wrap">
<div style="width:100%;margin-bottom:15px;">试听时间:<span style="color:red;">{{timeFormatSeconds(VisitorReserveClassMsg.ReservationDate)}}</span></div>
<div style="width:100%;margin-bottom:15px;">试听需求:<span style="color:red;">{{VisitorReserveClassMsg.Demand}}</span></div>
......
......@@ -65,10 +65,11 @@
:max="coursePageCount" :input="true" @input="changePage" />
</template>
<template v-if="mode == 2">
<yueke @select="selectCourse" :select="selectedCourseList"></yueke>
<yueke @select="selectCourse" :mode="mode" :select="selectedCourseList"></yueke>
</template>
<template v-if="mode == 3">
<vipcourse ref="vipCourse" @success="$emit('close')" :stuData="stuData"></vipcourse>
<yueke @select="selectCourse" :mode="mode" :select="selectedCourseList"></yueke>
<!-- <vipcourse ref="vipCourse" @success="$emit('close')" :stuData="stuData"></vipcourse> -->
</template>
</q-step>
<q-step :name="3" title="确认" icon="settings" :done="step > 3">
......
......@@ -17,13 +17,13 @@
<q-icon name="check" class="check-icon" />
</div>
</div>
<!-- <div class="box-businessModel" style="margin-right:0;" :class="{ 'checked-border': type == 3 }" @click="chooseChange(3)">
<div class="box-businessModel" style="margin-right:0;" :class="{ 'checked-border': type == 3 }" @click="chooseChange(3)">
<i class="iconfont icon-vipkecheng" style="font-size:38px"></i>
<div>VIP课程</div>
<div class="right" v-if="type == 3">
<q-icon name="check" class="check-icon" />
</div>
</div> -->
</div>
</div>
</template>
<script>
......@@ -74,7 +74,7 @@
align-items: center;
position: relative;
margin-right: 20px;
margin-left: 70px;
// margin-left: 70px;
.right {
position: absolute;
......
......@@ -105,7 +105,11 @@ export default {
select: {
type: Array,
default: () => []
}
},
mode: {
type: Number, //1:约课,2:班课,3-Vip
default: 1
},
},
data() {
return {
......@@ -177,7 +181,8 @@ export default {
CourseSubject: "", //所属科目
CourseName:"",
ClassScrollType :2,
IsQuerySalePlat:1
IsQuerySalePlat:1,
QIsVipCourse:0,
},
CourseSubjectList: [],
//课程分类树形列表
......@@ -203,6 +208,11 @@ export default {
},
//获取课程分页列表
getCourseList() {
if(this.mode==2){
this.msg.QIsVipCourse=1;
}else if(this.mode==3){
this.msg.QIsVipCourse=2;
}
getClassPruductList(this.msg).then(res => {
this.dataList = res.Data.PageData;
this.pageCount = res.Data.PageCount;
......
<style>
.Sysuser_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
}
</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">
<div class="col-4 Sysuser_Date">
<q-field filled>
<template v-slot:control>
<el-date-picker v-model="msg.StartClassDate" value-format="yyyy-MM-dd" type="date" placeholder="开始时间"
size="small" style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker>
<el-date-picker v-model="msg.EndClassDate" value-format="yyyy-MM-dd" type="date" placeholder="结束时间"
size="small" style="width:47%;" @change="resetSearch" clear-icon="iconfont icon-guanbi">
</el-date-picker>
</template>
</q-field>
</div>
</div>
<div class="col-3">
<q-select @input="resetSearch" filled option-value="TId" option-label="TeacherName" v-model="msg.TeacherId"
:options="TeacherList" emit-value map-options label="老师" clearable />
</div>
<div class="col-3">
<q-select @input="resetSearch" filled stack-label option-value="RoomId" option-label="RoomName"
v-model="msg.ClassRoomId" ref="ClassRoomId" :options="ClassRoomList" label="关联教室" clearable :dense="false"
class="col-6 q-pb-lg" emit-value map-options />
</div>
<div class="col-3">
<q-input @input="resetSearch" clearable filled v-model="msg.LessonName" label="试听课程名称" @clear="resetSearch"
maxlength="20" />
</div>
</div>
</div>
<reservelist :data="dataList" :authObj="authObj" :loading="loading" @success="refreshPage"></reservelist>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="PageCount" :input="true"
@input="changePage" />
</div>
</template>
<script>
import {
queryVisitorReservePage
} from '../../api/scheduling/schedu'
import {
getTeacherDropDownList,
queryClassRoomList
} from "../../api/school/index";
import reservelist from '../../components/schedul/reservestudentlist'
export default {
meta: {
title: "试听班级管理"
},
components: {
reservelist
},
data() {
return {
msg: {
pageIndex: 1,
pageSize: 10,
rowsPerPage: 10,
StartClassDate: "", //开始时间
EndClassDate: "", //结束时间
TeacherId: "", //教师编号
ClassRoomId: "", //教室编号
LessonName: '', //课程名称
Visitor_Id: 0,
IsReserve:1,
IsQNotReserveClassId:1,
},
dataList: [],
loading: false,
PageCount: 0,
TeacherList: [],
ClassRoomList: [],
authObj: {
isShowEdit: true
}
}
},
mounted() {
let nowDay = new Date();
var year = nowDay.getFullYear(); //年
var month = nowDay.getMonth() + 1; //月
var day = nowDay.getDate(); //日
this.msg.StartClassDate = year + '-' + month + '-' + day
if (this.$route.query) {
if (this.$route.query.StartClassDate) {
this.msg.StartClassDate = this.$route.query.StartClassDate;
}
if (this.$route.query.EndClassDate) {
this.msg.EndClassDate = this.$route.query.EndClassDate;
}
if (this.$route.query.TeacherId) {
this.msg.TeacherId = Number(this.$route.query.TeacherId);
}
}
this.GetTeacherList();
this.getClassRoomList();
this.getList()
},
methods: {
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getList();
},
changePage(val) {
this.msg.pageIndex = val;
this.getList()
},
//获取课程系列分页列表
getList() {
this.loading = true;
queryVisitorReservePage(this.msg).then(res => {
this.loading = false;
if (res.Code == 1) {
this.dataList = res.Data.PageData;
this.PageCount = res.Data.PageCount;
}
})
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({
IsQLeave: 0
}).then(res => {
if (res.Code == 1) {
this.TeacherList = res.Data;
}
});
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
}
})
},
//刷新页面
refreshPage() {
this.getList();
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
......@@ -1466,6 +1466,11 @@ const routes = [{
component: () =>
import("pages/sale/reserveClass.vue")
},
{
path: "/sale/reserveClassStudent", //销售 约课待分配管理
component: () =>
import("pages/sale/reserveClassStudent.vue")
},
{
path: "/sale/reserveStudentList", //销售 约课班级学员名单
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