Commit fff615b3 authored by 吴春's avatar 吴春

1

parent d4a44b2d
......@@ -211,6 +211,19 @@ export function SetVisitorReserve(data) {
data
})
}
/**
* 设置约课开课信息
* @param {JSON参数} data
*/
export function SetVisitorReserveClass(data) {
return request({
url: '/VisitorReserve/SetVisitorReserveClass',
method: 'post',
data
})
}
/**
* 新增留学需求
* @param {JSON参数} data
......@@ -222,6 +235,18 @@ export function SetStudyAbroad(data) {
data
})
}
/**
* 新增学员反馈信息
* @param {JSON参数} data
*/
export function SetVisitorReserveFeedback(data) {
return request({
url: '/VisitorReserve/SetVisitorReserveFeedback',
method: 'post',
data
})
}
/**
* 约课管理
* @param {JSON参数} data
......
<style scoped>
.Student_Date .el-input__inner {
background: transparent !important;
border: 0 !important;
padding-right: 0 !important;
}
</style>
<template>
<div>
<div class="row wrap">
<q-btn label="选择试听课" color="accent q-mb-lg" size="sm" @click="isShowTeacher = true" />
</div>
<template v-if="isShowReserve">
<div class="row studentDate">
<q-field filled class="col-6 q-pb-lg q-pr-lg" dense>
<template v-slot:control>
<el-date-picker v-model="addMsg.ClassDate" ref="ClassDate" :rules="[val => !!val || '请选择预约日期']"
style="width:225px" size="mini" type="date" placeholder="预约日期" value-format="yyyy-MM-dd">
</el-date-picker>
</template>
</q-field>
<div class="col-6 q-pr-lg Student_Date ">
<q-field filled class="q-pb-lg" dense>
<template v-slot:control>
<el-time-select v-model="addMsg.ClassTime" size="mini" ref="ClassTime" style="width:50%" :picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
maxTime: addMsg.EndTime
}" placeholder="预约开始时间">
</el-time-select>
<el-time-select v-model="addMsg.EndTime" size="mini" dense ref="EndTime" style="width:50%"
:picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
minTime: addMsg.ClassTime
}" placeholder="预约结束时间">
</el-time-select>
</template>
</q-field>
</div>
</div>
<div class="row wrap">
<q-select filled stack-label option-value="Name" dense option-label="Name"
@input="getTeacherChoose(addMsg.ClassContent)" v-model="addMsg.ClassContent" ref="ClassContent"
:options="ContentList" :rules="[val => !!val || '请选择主讲内容']" label="主讲内容" class="col-6 q-pb-lg q-pr-lg"
emit-value map-options />
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId"
ref="TeacherId" :options="TeacherList" label="选择教师" dense class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
</div>
<div class="row wrap">
<q-select filled stack-label option-value="RoomId" dense option-label="RoomName" v-model="addMsg.ClassRoomId"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
<q-select filled stack-label option-value="Id" dense option-label="LessonName" v-model="addMsg.TrialLessonId"
:options="TrialList" label="试听课程" class="col-6 q-pb-lg q-pr-lg" emit-value map-options />
</div>
<div class="row wrap">
<q-field label="类型" filled dense stack-label class="col-6 q-pb-lg q-pr-lg" v-if="addMsg.ReserveType==1">
<template v-slot:control>
<div >跟班</div>
</template>
</q-field>
<!-- <q-field label="班级" filled dense stack-label class="col-6 q-pb-lg q-pr-lg" v-if="addMsg.ReserveType==1&&showObj.className">
<template v-slot:control>
<div>{{showObj.className}}</div>
</template>
</q-field> -->
<q-field label="课程" filled dense stack-label class="col-6 q-pb-lg q-pr-lg" v-if="addMsg.ReserveType==1&&showObj.courseName">
<template v-slot:control>
<div>{{showObj.courseName}}</div>
</template>
</q-field>
</div>
<div class="row wrap justify-end q-pr-lg" style="margin-bottom:10px;">
<q-btn label="关闭" flat color="accent q-mb-lg" size="md" style="margin-right:10px;" @click="closeClassForm" />
<q-btn label="保存" color="accent q-mb-lg" size="md" @click="saveAppointForm()" />
</div>
</template>
<ShitingCourseList-form v-if="isShowTeacher" @close="closeAuditForm" @getchildInfo="getchildInfo">
</ShitingCourseList-form>
</div>
</template>
<script>
import {
SetVisitorReserve
} from "../../../api/scheduling/schedu";
import {
getTeacherDropDownList,
queryClassRoomList,
GetTrialLessonList
} from "../../../api/school/index";
// import auditionForm from "../../schedul/audition-form";
import ShitingCourseListForm from "./shitingCourseList-form.vue"
export default {
components: {
// auditionForm,
ShitingCourseListForm
},
props: {
saveObj: {
type: Object,
default: null
}
},
data() {
return {
isShowReserve: false,
addMsg: {
Id: 0, //编号
Visitor_Id: 0, //访客编号
ReserveClassId: 0, //选中的班级编号
ClassDate: "", //预约日期
ClassTime: "", //预约开始时间
EndTime: "", //预约结束时间
TeacherId: 0, //教师编号
ClassRoomId: 0, //教室编号
ClassContent: "", //主讲内容
TrialLessonId: "",
ReserveType: 0,
ClassPlanId: 0,
},
ContentList: [{
Id: 1,
Name: "少儿类:主要以丰富可与时间和兴趣为主,要求课堂轻松活跃。趣味性十足"
},
{
Id: 2,
Name: "兴趣类:成年人,对日语学习从兴趣开始,要求课堂丰富有趣"
},
{
Id: 3,
Name: "实用类:对于日语学习有一定的需求(考研、就业等),要求学习过程专业,干货多"
},
{
Id: 4,
Name: "留学类:打算去往日本留学(本科、硕士、语言学校、私塾等)"
}
],
ClassRoomList: [], //教师列表
TeacherList: [], //教师列表
AllTeacherList: [], //全部教师列表
TrialList: [], //试听课程列表
isShowTeacher: false, //是否显示试听课弹窗
showObj:{
className:"",
courseName:"",
}
};
},
created() {
this.GetTrialDrop();
this.getClassRoomList();
this.GetTeacherList();
},
mounted() {
if (this.saveObj) {
this.addMsg.Visitor_Id = this.saveObj.StuId;
}
},
methods: {
//关闭窗口
closeClassForm() {
this.isShowReserve = false;
this.$emit("success");
},
//选择主讲内容赋值选择教师
getTeacherChoose(content) {
var TList = [];
this.addMsg.TeacherId = "";
this.TeacherList = this.AllTeacherList;
this.TeacherList.forEach(x => {
this.ContentList.forEach(y => {
if (y.Name == content) {
if (x.TId > 0) {
if (x.ChooseSpecialty.indexOf(y.Id) > -1) {
TList.push(x);
}
}
}
});
});
this.TeacherList = TList;
},
//试听课程列表
GetTrialDrop() {
GetTrialLessonList({}).then(res => {
if (res.Code == 1) {
this.TrialList = res.Data;
}
});
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
var obj = {
RoomName: "请选择",
RoomId: 0
};
this.ClassRoomList.unshift(obj);
}
});
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = JSON.parse(JSON.stringify(res.Data));
this.AllTeacherList = JSON.parse(JSON.stringify(res.Data));
var obj = {
TeacherName: "请选择",
TId: 0
};
this.TeacherList.unshift(obj);
this.AllTeacherList.unshift(obj);
}
});
},
//清除
clearMsg() {
this.addMsg.Id = 0;
this.addMsg.ReserveClassId = 0;
this.addMsg.ClassDate = "";
this.addMsg.ClassTime = "";
this.addMsg.EndTime = "";
this.addMsg.TeacherId = 0;
this.addMsg.ClassRoomId = 0;
this.addMsg.ClassContent = "";
this.addMsg.TrialLessonId = "";
this.addMsg.ReserveType = 0;
this.addMsg.ClassPlanId = 0;
},
//保存
saveAppointForm() {
if (this.addMsg.ClassDate == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约日期!"
});
return;
}
if (this.addMsg.ClassTime == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约开始时间!"
});
return;
}
if (this.addMsg.EndTime == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约结束时间!"
});
return;
}
if (!this.$refs.ClassContent.hasError) {
SetVisitorReserve(this.addMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: res.Message,
position: "top"
});
this.$emit("success");
} else {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: res.Message
});
}
this.clearMsg();
this.isShowReserve = false;
});
}
},
closeAuditForm() {
this.isShowTeacher = false;
},
//子组件选中传值
getchildInfo(obj) {
if (obj) {
this.addMsg.ReserveType = obj.ReserveType;
this.addMsg.ClassPlanId = obj.ClassPlanId;
this.addMsg.TeacherId = obj.TeacherId;
this.addMsg.ClassRoomId = obj.ClassRoomId;
this.addMsg.ReserveClassId = obj.ReserveClassId;
this.addMsg.ClassDate = obj.ClassDateStr;
this.addMsg.ClassTime = obj.ClassTime;
this.addMsg.EndTime = obj.EndTime;
this.addMsg.ClassContent = obj.ClassContent;
this.addMsg.TrialLessonId = obj.TrialLessonId;
if (obj.ReserveType == 1) {
this.addMsg.TrialLessonId = obj.TrialLessonId ? obj.TrialLessonId : this.TrialList[0].Id
this.addMsg.ClassContent = obj.ClassContent ? obj.ClassContent : this.ContentList[0].Name
this.showObj.courseName=obj.courseName
this.showObj.className=obj.className
}
this.isShowReserve = true;
}
}
}
};
</script>
......@@ -51,10 +51,16 @@
<div class="StuCom_Remark">
<span class="StuCom_Left">教室</span>:{{ tItem.RoomName }}
</div>
<div class="StuCom_Remark" v-if="tItem.Feedback&&tItem.Feedback.length>0">
<div style="flex-shrink:0">学员反馈:</div>
<div class="StuCom_Inner" v-html="tItem.Feedback "></div>
</div>
<div @click="DeleteVisitorReserve(tItem.Id)" style="margin-top:10px;"
</div>
<div style="margin-top:10px;width:150px;"
class="visit_delete text-negative">
删除
<span @click="DeleteVisitorReserve(tItem.Id)" style="margin-right:10px;" >删除</span>
<span v-if="tItem.ReserveClassId>0" style="margin-right:10px;" @click="fabkuiMsg.IsShow=true,fabkuiMsg.Id=tItem.Id,fabkuiMsg.Feedback=tItem.Feedback">反馈</span>
<span v-if="tItem.ReserveClassId==0" @click="ShitingKaiKe(tItem)">试听课开课</span>
</div>
</div>
</template>
......@@ -72,27 +78,94 @@
<q-pagination class="full-width justify-end" v-model="qMsg.pageIndex" color="primary" :max="page_Count" input
@input="changePage" />
</div>
<el-dialog title="试听反馈" :visible.sync="fabkuiMsg.IsShow" >
<div class="row studentDate" >
<UeEditor v-model="fabkuiMsg.Feedback" class="q-pb-sm" :config="config"></UeEditor>
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="fabkuiMsg.IsShow=false,fabkuiMsg.Id=0,fabkuiMsg.Feedback=''">取 消</el-button>
<el-button type="primary" @click="saveFankuiForm()">确 定</el-button>
</div>
</el-dialog>
<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>
</div>
<div class="row studentDate">
<q-field filled class="col-6 q-pb-lg q-pr-lg" dense>
<template v-slot:control>
<el-date-picker v-model="VisitorReserveClassMsg.ClassDate" ref="ClassDate" :rules="[val => !!val || '请选择预约日期']"
style="width:225px" size="mini" type="date" placeholder="预约日期" value-format="yyyy-MM-dd">
</el-date-picker>
</template>
</q-field>
<div class="col-6 q-pr-lg Student_Date ">
<q-field filled class="q-pb-lg" dense>
<template v-slot:control>
<el-time-select v-model="VisitorReserveClassMsg.ClassTime" size="mini" ref="ClassTime" style="width:50%" :picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
maxTime: VisitorReserveClassMsg.EndTime
}" placeholder="预约开始时间">
</el-time-select>
<el-time-select v-model="VisitorReserveClassMsg.EndTime" size="mini" dense ref="EndTime" style="width:50%"
:picker-options="{
start: '09:00',
step: '00:15',
end: '21:00',
minTime: VisitorReserveClassMsg.ClassTime
}" placeholder="预约结束时间">
</el-time-select>
</template>
</q-field>
</div>
</div>
<div class="row wrap">
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="VisitorReserveClassMsg.TeacherId"
ref="TeacherId" :options="TeacherList" label="选择教师" dense class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
<q-select filled stack-label option-value="RoomId" dense option-label="RoomName" v-model="VisitorReserveClassMsg.ClassRoomId"
ref="ClassRoomId" :options="ClassRoomList" label="关联教室" class="col-6 q-pb-lg q-pr-lg" emit-value
map-options />
<q-select filled stack-label option-value="Id" dense option-label="LessonName" v-model="VisitorReserveClassMsg.TrialLessonId"
:options="TrialList" label="试听课程" class="col-6 q-pb-lg q-pr-lg" emit-value map-options />
</div>
<div slot="footer" class="dialog-footer">
<el-button @click="closeShitingKaiKe()">取 消</el-button>
<el-button type="primary" @click="SetVisitorReserveClass()">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
SetVisitorReserve,
queryVisitorReservePage,
RemoveVisitorReserve
RemoveVisitorReserve,
SetVisitorReserveFeedback,
SetVisitorReserveClass
} from "../../../api/scheduling/schedu";
import UeEditor from "../../editor/UeEditor";
import {
getTeacherDropDownList,
queryClassRoomList,
GetTrialLessonList
} from "../../../api/school/index";
import reserveclassForm from "./reserveclass-form";
import reserveclasskaikeform from "./reserveclasskaikeform";
export default {
meta: {
title: ""
},
components: {
reserveclassForm
reserveclassForm,
reserveclasskaikeform,
UeEditor
},
props: {
saveObj: {
......@@ -102,6 +175,10 @@
},
data() {
return {
config: {
initialFrameWidth: null,
initialFrameHeight: 90
},
isShowAdd: false,
qMsg: {
pageIndex: 1,
......@@ -111,7 +188,34 @@
},
dataList: [],
page_Count: 0,
userInfo: {}
userInfo: {},
fabkuiMsg:{
Id:0,
Feedback:"",
IsShow:false,
},
ClassRoomList: [], //教师列表
TeacherList: [], //教师列表
AllTeacherList: [], //全部教师列表
TrialList: [], //试听课程列表
VisitorReserveClassMsg:{
Id:0,
Visitor_Id:0,
Remark:"",
ReserveClassId:0,
ClassDate:"",
ReservationDate:"",
ClassTime:"",
TeacherId:0,
ClassRoomId:0,
ClassContent:"",
EndTime:"",
TrialLessonId:0,
ReserveType:0,
ClassPlanId:0,
Demand:"",
IsShow:false,
}
};
},
created() {
......@@ -149,11 +253,139 @@
timeStr=year + '-' + month + '-' + day +timeStr;
return timeStr;
// return (year + '-' + month + '-' + day + ' ' + hours + ':' + min + ':' + seconds);
},
//保存
SetVisitorReserveClass() {
if (this.VisitorReserveClassMsg.ClassDate == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约日期!"
});
return;
}
if (this.VisitorReserveClassMsg.ClassTime == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约开始时间!"
});
return;
}
if (this.VisitorReserveClassMsg.EndTime == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请选择预约结束时间!"
});
return;
}
SetVisitorReserveClass(this.VisitorReserveClassMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: res.Message,
position: "top"
});
this.$emit("success");
} else {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: res.Message
});
}
this.closeShitingKaiKe();
this.getList();
});
},
closeShitingKaiKe(){
this.VisitorReserveClassMsg.Id=0;
this.VisitorReserveClassMsg.Visitor_Id=0;
this.VisitorReserveClassMsg.Remark="";
this.VisitorReserveClassMsg.ReserveClassId=0;
this.VisitorReserveClassMsg.ClassDate="";
this.VisitorReserveClassMsg.ReservationDate="";
this.VisitorReserveClassMsg.ClassTime="";
this.VisitorReserveClassMsg.TeacherId=0;
this.VisitorReserveClassMsg.ClassRoomId=0;
this.VisitorReserveClassMsg.ClassContent="";
this.VisitorReserveClassMsg.EndTime="";
this.VisitorReserveClassMsg.TrialLessonId=0;
this.VisitorReserveClassMsg.ReserveType=0;
this.VisitorReserveClassMsg.ClassPlanId=0;
this.VisitorReserveClassMsg.Demand="";
this.VisitorReserveClassMsg.IsShow=false;
},
//试听课开课
ShitingKaiKe(item){
let obj = JSON.parse(JSON.stringify(item));
this.GetTrialDrop();
this.getClassRoomList();
this.GetTeacherList();
this.VisitorReserveClassMsg=obj;
this.VisitorReserveClassMsg.Id=obj.Id;
this.VisitorReserveClassMsg.Visitor_Id=obj.Visitor_Id;
this.VisitorReserveClassMsg.Remark=obj.Remark;
this.VisitorReserveClassMsg.ReserveClassId=obj.ReserveClassId;
this.VisitorReserveClassMsg.ClassDate=obj.ClassDate;
this.VisitorReserveClassMsg.ReservationDate=obj.ReservationDate;
this.VisitorReserveClassMsg.ClassTime=obj.ClassTime;
this.VisitorReserveClassMsg.TeacherId=obj.TeacherId;
this.VisitorReserveClassMsg.ClassRoomId=obj.ClassRoomId;
this.VisitorReserveClassMsg.ClassContent=obj.ClassContent;
this.VisitorReserveClassMsg.EndTime=obj.EndTime;
this.VisitorReserveClassMsg.TrialLessonId=obj.TrialLessonId;
this.VisitorReserveClassMsg.ReserveType=obj.ReserveType;
this.VisitorReserveClassMsg.ClassPlanId=obj.ClassPlanId;
this.VisitorReserveClassMsg.Demand=obj.Demand;
if( this.VisitorReserveClassMsg.ClassDate=='0001-01-01T00:00:00'){
this.VisitorReserveClassMsg.ClassDate=new Date(obj.ReservationDate);
}
this.VisitorReserveClassMsg.IsShow=true;
},
//试听课程列表
GetTrialDrop() {
GetTrialLessonList({}).then(res => {
if (res.Code == 1) {
this.TrialList = res.Data;
}
});
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
var obj = {
RoomName: "请选择",
RoomId: 0
};
this.ClassRoomList.unshift(obj);
}
});
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
this.TeacherList = JSON.parse(JSON.stringify(res.Data));
this.AllTeacherList = JSON.parse(JSON.stringify(res.Data));
var obj = {
TeacherName: "请选择",
TId: 0
};
this.TeacherList.unshift(obj);
this.AllTeacherList.unshift(obj);
}
});
},
//获取试听列表
getList() {
queryVisitorReservePage(this.qMsg).then(res => {
......@@ -193,6 +425,42 @@ return timeStr;
});
})
.onCancel(() => {});
},
//试听反馈
//保存
saveFankuiForm() {
if (this.fabkuiMsg.Feedback == "") {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: "请输入学员反馈内容!"
});
return;
}
SetVisitorReserveFeedback(this.fabkuiMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: res.Message,
position: "top"
});
this.getList();
this.$emit("success");
} else {
this.$q.notify({
type: "negative",
position: "top",
timeout: 2000,
message: res.Message
});
}
this.fabkuiMsg.IsShow=false;
this.fabkuiMsg.Id=0;
this.fabkuiMsg.Feedback='';
});
},
closeReserveForm() {
this.isShowAdd = false;
......
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