Commit adb284fe authored by 罗超's avatar 罗超

2

parent 19634a58
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
message: "操作成功", message: "操作成功",
position: "top" position: "top"
}); });
this.$emit("success", this.roomObj.RoomName); this.$emit("success", {Name:this.roomObj.RoomName,Id:this.roomObj.RoomId});
this.roomObj="" this.roomObj=""
this.changeDig(false) this.changeDig(false)
......
...@@ -271,8 +271,8 @@ ...@@ -271,8 +271,8 @@
this.$emit("success"); this.$emit("success");
}, },
roomHandle(val) { roomHandle(val) {
this.$set(this.saveObj, "RoomName", val); this.$set(this.saveObj, "RoomName", val.Name);
this.$emit("success"); this.$emit("success",val);
}, },
isShowTag(arr, min) { isShowTag(arr, min) {
let n = 0; let n = 0;
......
...@@ -40,12 +40,27 @@ ...@@ -40,12 +40,27 @@
<q-select v-show="teaClassMsg.CourseId > 0 && editType == 1" filled v-model="teaClassMsg.TeacherId" <q-select v-show="teaClassMsg.CourseId > 0 && editType == 1" filled v-model="teaClassMsg.TeacherId"
option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师" option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师"
class="col-6" @input="getCanTeacherTimeList" /> class="col-6" @input="getCanTeacherTimeList" />
<q-select v-show="teaClassMsg.CourseId > 0 &&teaClassMsg.TeacherId&&teacherTimeList.length >0&& editType == 1" filled v-model="saveMsg.RoomId" <q-select v-show="
option-value="RoomId" option-label="RoomName" :options="ClassRoomList" emit-value map-options label="教室" :disable="addStuList.length>0" teaClassMsg.CourseId > 0 &&
class="col-6"/> teaClassMsg.TeacherId &&
teacherTimeList.length > 0 &&
editType == 1
" filled v-model="saveMsg.RoomId" option-value="RoomId" option-label="RoomName"
:options="ClassRoomList" emit-value map-options label="教室" :disable="addStuList.length > 0"
class="col-6">
<template v-slot:selected-item="scope">
<div class="row col-12 flex justify-between"> <span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></div>
</template>
<template v-slot:option="scope">
<q-item v-bind="scope.itemProps" v-on="scope.itemEvents">
<q-item-section>
<q-item-label class="row flex justify-between"> <span>{{scope.opt.RoomName}}</span><span>{{ scope.opt.SchoolName}}</span></q-item-label>
</q-item-section>
</q-item>
</template>
</q-select>
</div> </div>
<q-field filled label-slot stack-label class="col-12" v-if="teaClassMsg.TeacherId > 0"> <q-field filled label-slot stack-label class="col-12" v-if="teaClassMsg.TeacherId > 0">
<template #label> <template #label>
<div class="row flex"> <div class="row flex">
...@@ -64,7 +79,6 @@ ...@@ -64,7 +79,6 @@
"> ">
<div v-for="(_item, _index) in item.CourseTimeList" :key="_index" class="timeItem"> <div v-for="(_item, _index) in item.CourseTimeList" :key="_index" class="timeItem">
<q-checkbox v-model="courseCheckList" :val="_item"> <q-checkbox v-model="courseCheckList" :val="_item">
{{ item.SchoolName }}
{{ _item.StartTime }}-{{ _item.EndTime }} {{ _item.StartTime }}-{{ _item.EndTime }}
</q-checkbox> </q-checkbox>
</div> </div>
...@@ -79,10 +93,13 @@ ...@@ -79,10 +93,13 @@
</div> </div>
</template> </template>
</q-field> </q-field>
<div class="row col-12" v-show="(editType == 1&&checkChapter.ChapterId>0) ||(saveObj.ClassType == 3 && saveObj.AppointState == 1)"> <div class="row col-12" v-show="
(editType == 1 && checkChapter.ChapterId > 0) ||
(saveObj.ClassType == 3 && saveObj.AppointState == 1)
">
<div class="row col-6"> <div class="row col-6">
<q-input filled stack-label v-model="stuMsg_v2.StuName" label="学员姓名" @keyup.enter.native="getStu_V2" class="col-9" <q-input filled stack-label v-model="stuMsg_v2.StuName" label="学员姓名" @keyup.enter.native="getStu_V2"
hint="提示:需输入学员姓名查询学员列表" /> class="col-9" hint="提示:需输入学员姓名查询学员列表" />
<div class="col-3 q-pt-md q-pl-md"> <div class="col-3 q-pt-md q-pl-md">
<q-btn size="sm" color="accent" label="查询" @click="getStu_V2" /> <q-btn size="sm" color="accent" label="查询" @click="getStu_V2" />
</div> </div>
...@@ -100,11 +117,13 @@ ...@@ -100,11 +117,13 @@
</template> </template>
<template v-slot:option="scope"> <template v-slot:option="scope">
<q-item v-bind="scope.itemProps" v-on="scope.itemEvents"> <q-item v-bind="scope.itemProps" v-on="scope.itemEvents">
<q-item-section > <q-item-section>
<div class="flex"> <div class="flex">
<span>{{ scope.opt.StuName }}</span> <span>{{ scope.opt.StuName }}</span>
<span v-if="scope.opt.State===3">(重)</span> <span v-if="scope.opt.State === 3">(重)</span>
<span class="q-ml-sm">{{ scope.opt.CourseName }}</span> <span class="q-ml-sm">{{
scope.opt.CourseName
}}</span>
</div> </div>
</q-item-section> </q-item-section>
</q-item> </q-item>
...@@ -117,9 +136,10 @@ ...@@ -117,9 +136,10 @@
</div> </div>
</div> </div>
</div> </div>
<q-field filled label="已约学员" stack-label disable class="col-12" v-if="editType == 1&&addStuList.length>0"> <q-field filled label="已约学员" stack-label disable class="col-12"
v-if="editType == 1 && addStuList.length > 0">
<template v-slot:control> <template v-slot:control>
<div v-for="(item,index) in addStuList" :key="index" class="q-mr-md"> <div v-for="(item, index) in addStuList" :key="index" class="q-mr-md">
{{ item }} {{ item }}
</div> </div>
</template> </template>
...@@ -146,8 +166,8 @@ ...@@ -146,8 +166,8 @@
queryChapterTree queryChapterTree
} from "../../../api/course/index"; } from "../../../api/course/index";
import { import {
queryClassRoomList, queryClassRoomList
} from '../../../api/school/index'; } from "../../../api/school/index";
import selectTree from "./select-tree"; import selectTree from "./select-tree";
import Detail from "./detail.vue"; import Detail from "./detail.vue";
export default { export default {
...@@ -192,7 +212,7 @@ ...@@ -192,7 +212,7 @@
watch: { watch: {
show(val) { show(val) {
this.addLoading = false; this.addLoading = false;
this.addStuList = [] this.addStuList = [];
if (val) { if (val) {
this.stuInfo = ""; this.stuInfo = "";
this.teaClassMsg.CourseId = 0; this.teaClassMsg.CourseId = 0;
...@@ -202,8 +222,8 @@ ...@@ -202,8 +222,8 @@
this.courseCheckList = []; this.courseCheckList = [];
this.stuList = []; this.stuList = [];
this.allStuList = []; this.allStuList = [];
this.stuMsg_v2.StuName="" this.stuMsg_v2.StuName = "";
this.checkChapter={} this.checkChapter = {};
} }
} }
}, },
...@@ -222,7 +242,7 @@ ...@@ -222,7 +242,7 @@
stuMsg_v2: { stuMsg_v2: {
StuName: "", StuName: "",
NextCourseGradeNo: 0, NextCourseGradeNo: 0,
CourseGradeId: 0, CourseGradeId: 0
}, },
detailObj: {}, detailObj: {},
detailMsg: { detailMsg: {
...@@ -238,7 +258,7 @@ ...@@ -238,7 +258,7 @@
CourseId: 0, CourseId: 0,
CourseGradeId: 0, CourseGradeId: 0,
CourseGradeNo: 0, CourseGradeNo: 0,
RoomId:0 RoomId: 0
}, },
stuInfo: "", stuInfo: "",
checkStuList: [], checkStuList: [],
...@@ -248,7 +268,7 @@ ...@@ -248,7 +268,7 @@
checkChapter: {}, //选择的章节 checkChapter: {}, //选择的章节
returnString: [], //章节默认值 returnString: [], //章节默认值
addStuList: [], //新增时展示用 addStuList: [], //新增时展示用
ClassRoomList:[],//教室下拉 ClassRoomList: [] //教室下拉
}; };
}, },
mounted() { mounted() {
...@@ -262,7 +282,7 @@ ...@@ -262,7 +282,7 @@
if (res.Code == 1) { if (res.Code == 1) {
this.ClassRoomList = res.Data; this.ClassRoomList = res.Data;
} }
}) });
}, },
//开关弹窗 //开关弹窗
changeDig(val) { changeDig(val) {
...@@ -314,17 +334,16 @@ ...@@ -314,17 +334,16 @@
//获取老师的空闲上课时段 //获取老师的空闲上课时段
getCanTeacherTimeList() { getCanTeacherTimeList() {
this.teaClassMsg.Date = this.dateObj.date; this.teaClassMsg.Date = this.dateObj.date;
this.courseCheckList = [] this.courseCheckList = [];
this.stuInfo = ""; this.stuInfo = "";
if (this.teaClassMsg.TeacherId == 0) return; if (this.teaClassMsg.TeacherId == 0) return;
GetCanTeacherClassTimeList(this.teaClassMsg).then(res => { GetCanTeacherClassTimeList(this.teaClassMsg).then(res => {
this.teacherTimeList = res.Data; this.teacherTimeList = res.Data;
if(res.Data.length>0){ if (res.Data.length > 0) {
this.saveMsg.RoomId=res.Data[0].RoomId this.saveMsg.RoomId = res.Data[0].RoomId;
}else{ } else {
this.saveMsg.RoomId=0 this.saveMsg.RoomId = 0;
} }
}); });
}, },
//筛选学生 //筛选学生
...@@ -344,24 +363,24 @@ ...@@ -344,24 +363,24 @@
getStu_V2() { getStu_V2() {
if (!this.stuMsg_v2.StuName) { if (!this.stuMsg_v2.StuName) {
this.$q.notify({ this.$q.notify({
position: 'top', position: "top",
message: "请输入学生姓名", message: "请输入学生姓名",
timeout: 2500 timeout: 2500
}) });
return return;
} }
if (this.editType == 1) { if (this.editType == 1) {
this.stuMsg_v2.NextCourseGradeNo = this.checkChapter.ChapterGradeNo this.stuMsg_v2.NextCourseGradeNo = this.checkChapter.ChapterGradeNo;
this.stuMsg_v2.CourseGradeId = this.checkChapter.CourseRate this.stuMsg_v2.CourseGradeId = this.checkChapter.CourseRate;
} }
if (this.editType == 2) { if (this.editType == 2) {
this.stuMsg_v2.NextCourseGradeNo = this.saveObj.Ranks this.stuMsg_v2.NextCourseGradeNo = this.saveObj.Ranks;
this.stuMsg_v2.CourseGradeId = this.saveObj.CourseGradeId this.stuMsg_v2.CourseGradeId = this.saveObj.CourseGradeId;
} }
getCanAppointmentStuList_V2(this.stuMsg_v2).then(res => { getCanAppointmentStuList_V2(this.stuMsg_v2).then(res => {
this.stuList = JSON.parse(JSON.stringify(res.Data)); this.stuList = JSON.parse(JSON.stringify(res.Data));
this.allStuList = JSON.parse(JSON.stringify(res.Data)); this.allStuList = JSON.parse(JSON.stringify(res.Data));
}) });
}, },
//获取章节 //获取章节
getChapterTree() { getChapterTree() {
...@@ -480,7 +499,7 @@ ...@@ -480,7 +499,7 @@
position: "top" position: "top"
}); });
if (this.editType == 1) { if (this.editType == 1) {
this.addStuList.push(this.stuInfo.StuName) this.addStuList.push(this.stuInfo.StuName);
} }
if (this.editType == 2) { if (this.editType == 2) {
this.saveObj.GuestList.push({ this.saveObj.GuestList.push({
...@@ -489,7 +508,7 @@ ...@@ -489,7 +508,7 @@
}); });
} }
this.stuInfo = ""; this.stuInfo = "";
this.stuMsg_v2.StuName="" this.stuMsg_v2.StuName = "";
this.$emit("success"); this.$emit("success");
} }
}) })
...@@ -497,17 +516,17 @@ ...@@ -497,17 +516,17 @@
this.addLoading = false; this.addLoading = false;
}); });
}, },
detailSuccessHandle() { detailSuccessHandle(val) {
// this.getStu_V2(); // this.getStu_V2();
this.stuMsg_v2.StuName="" this.stuMsg_v2.StuName = "";
this.stuList=[] this.stuList = [];
this.allStuList=[] this.allStuList = [];
this.$emit("success"); this.$emit("success");
}, },
detailCloseHandle() { detailCloseHandle() {
this.changeDig(false); this.changeDig(false);
this.$emit("success"); this.$emit("success");
}, }
} }
}; };
......
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