Commit 0642d88e authored by 罗超's avatar 罗超

2

parent 6cfdf77e
...@@ -58,7 +58,8 @@ export function SetAdminScrollAppointment(data) { ...@@ -58,7 +58,8 @@ export function SetAdminScrollAppointment(data) {
method: 'post', method: 'post',
data data
}) })
}/** }
/**
* 后台取消预约 * 后台取消预约
*/ */
export function CancelAppointment(data) { export function CancelAppointment(data) {
...@@ -67,7 +68,8 @@ export function CancelAppointment(data) { ...@@ -67,7 +68,8 @@ export function CancelAppointment(data) {
method: 'post', method: 'post',
data data
}) })
}/** }
/**
* 后台确认约课 * 后台确认约课
*/ */
export function SetSureAppointment(data) { export function SetSureAppointment(data) {
...@@ -77,3 +79,13 @@ export function SetSureAppointment(data) { ...@@ -77,3 +79,13 @@ export function SetSureAppointment(data) {
data data
}) })
} }
/**
* 学生合并
*/
export function SetAppointmentStuTransfer(data) {
return request({
url: '/Scroll/SetAppointmentStuTransfer',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<div class="">
<q-dialog
v-model="show"
persistent
transition-show="scale"
transition-hide="scale"
@input="changeDig"
>
<q-card style="width: 600px;max-width:900px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">调课</div>
<q-space />
<q-btn icon="close" flat round dense @click="changeDig(false)" />
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<div class="row col q-mr-lg q-col-gutter-md changeCourse">
<q-field filled dense label="日期" stack-label class="col-12">
<template v-slot:control>
<el-date-picker
v-model="msg.StartDate"
type="date"
size="mini"
placeholder="开始日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:clearable="false"
@change="getData"
:picker-options="pickerOptions"
/>
</template>
</q-field>
<q-field filled dense label="上课时段" stack-label class="col-12">
<template v-slot:control>
<div v-for="(item, index) in dataList" :key="index">
<q-radio
v-model="courseCheckList"
v-for="(_item, _index) in item.SubList"
:key="_index"
:val="_item"
@input="courseCheck(item.TeacherId, _item)"
>
{{ item.TeacherName }} {{ _item.CourseName }}
{{ _item.RoomName }} {{ _item.StartTime }}-{{
_item.EndTime
}}
</q-radio>
</div>
</template>
</q-field>
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="changeDig(false)" />
<q-btn label="确认" color="accent" size="sm" @click="saveData" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import { GetAppointmentPlanStat,SetAppointmentStuTransfer } from "../../../api/studyabroad/subscribe.js";
export default {
model: {
prop: "show",
event: "changeshow"
},
props: {
saveObj: {
type: Object,
default: null
},
show: {
type: Boolean,
default: false
}
},
watch: {
show(val) {
if (val) {
this.msg.StartDate = this.saveObj.date;
console.log(99, this.saveObj);
this.getData();
}
}
},
data() {
return {
pickerOptions: {
disabledDate: time => {
return time.getTime() < Date.now() - 8.64e7;
}
},
msg: {
StartDate: "",
EndDate: "",
TeacherId: 0,
ClassRoomId: 0,
ClassType: 3,
AppointState: 1
},
dataList: [],
saveMsg: {
AppointmentIds:"",
TeacherId:"",
Date:"",
ShiftSort:""
},
courseCheckList:"",
};
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
getData() {
this.msg.EndDate = this.msg.StartDate;
GetAppointmentPlanStat(this.msg).then(res => {
if (res.Data && res.Data.length > 0) {
this.dataList = res.Data[0].RList;
//排除当前课程
this.dataList.map((e,i)=>{
if(e.SubList){
e.SubList.map((_e,_i)=>{
if(_e.GuestList&&_e.GuestList.length>0){
let ids=_e.GuestList.map(x=>x.AppointmentId).toString()
console.log(130,ids.indexOf(this.saveObj.ids))
if(ids.indexOf(this.saveObj.ids)>-1){
this.dataList[i].SubList.splice(_i,1)
}
}
})
}
})
}
});
},
courseCheck(id,item){
this.saveMsg.TeacherId=id
this.saveMsg.ShiftSort=item.ShiftSort
},
saveData(){
this.saveMsg.Date=this.msg.StartDate
this.saveMsg.AppointmentIds=this.saveObj.ids
SetAppointmentStuTransfer(this.saveMsg).then(res=>{
this.changeDig(false)
this.$q.notify({
message: "操作成功",
position: "top"
});
this.$emit('success')
})
}
}
};
</script>
<style>
.changeCourse .el-input__inner {
border: none;
background-color: transparent;
width: 100%;
}
</style>
<template> <template>
<div>
<div class="row col flex q-col-gutter-md"> <div class="row col flex q-col-gutter-md">
<q-field filled label="老师" stack-label class="col-6"> <q-field filled label="老师" stack-label class="col-6">
<template v-slot:control> <template v-slot:control>
...@@ -53,9 +54,7 @@ ...@@ -53,9 +54,7 @@
</q-field> </q-field>
<q-field filled label="进度" stack-label class="col-6"> <q-field filled label="进度" stack-label class="col-6">
<template v-slot:control> <template v-slot:control>
<div> <div>{{ saveObj.Ranks }}/{{ saveObj.TotalPlanNum }}</div>
{{ saveObj.Ranks}}/{{saveObj.TotalPlanNum}}
</div>
</template> </template>
</q-field> </q-field>
<q-field <q-field
...@@ -112,6 +111,14 @@ ...@@ -112,6 +111,14 @@
<template v-slot:control> <template v-slot:control>
<div v-if="saveObj.AppointState == 1"> <div v-if="saveObj.AppointState == 1">
<div class="q-mt-sm flex justify-start"> <div class="q-mt-sm flex justify-start">
<q-btn
color="accent"
size="xs"
label="调课"
@click="showChangeCourse"
:disable="checkStuType2.length == 0"
class="q-mr-sm"
/>
<q-btn <q-btn
color="accent" color="accent"
size="xs" size="xs"
...@@ -150,13 +157,19 @@ ...@@ -150,13 +157,19 @@
</template> </template>
</q-field> </q-field>
</div> </div>
<ChangeCourse v-model="showChangeDig" :saveObj="CourseObj" @success="ChangeCourseSuccessHandle"/>
</div>
</template> </template>
<script> <script>
import { import {
CancelAppointment, CancelAppointment,
SetSureAppointment SetSureAppointment
} from "../../../api/studyabroad/subscribe.js"; } from "../../../api/studyabroad/subscribe.js";
import ChangeCourse from "./changeCourse";
export default { export default {
components: {
ChangeCourse
},
props: { props: {
dateObj: { dateObj: {
type: Object, type: Object,
...@@ -169,7 +182,9 @@ export default { ...@@ -169,7 +182,9 @@ export default {
}, },
data() { data() {
return { return {
checkStuType2: [] // checkStuType2: [] ,//
showChangeDig:false,
CourseObj:{}
}; };
}, },
methods: { methods: {
...@@ -178,7 +193,7 @@ export default { ...@@ -178,7 +193,7 @@ export default {
const msg = { const msg = {
Date: this.dateObj.date, Date: this.dateObj.date,
TeacherId: this.saveObj.Tid, TeacherId: this.saveObj.Tid,
AppointIds : this.checkStuType2.toString() AppointIds: this.checkStuType2.toString()
}; };
CancelAppointment(msg).then(res => { CancelAppointment(msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
...@@ -216,6 +231,18 @@ export default { ...@@ -216,6 +231,18 @@ export default {
this.$emit("success"); this.$emit("success");
} }
}); });
},
//显示调课弹窗
showChangeCourse(){
this.CourseObj={
date:this.dateObj.date,
ids:this.checkStuType2.toString()
}
this.showChangeDig=true
},
ChangeCourseSuccessHandle(){
this.$emit("success");
} }
} }
}; };
......
...@@ -501,6 +501,7 @@ export default { ...@@ -501,6 +501,7 @@ export default {
this.changeDig(false); this.changeDig(false);
}); });
}else if(this.editType==2){ }else if(this.editType==2){
this.changeDig(false);
this.$q.notify({ this.$q.notify({
message: "操作成功", message: "操作成功",
position: "top", position: "top",
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
placeholder="开始日期" placeholder="开始日期"
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
:clearable="false"
@change="getData" @change="getData"
> >
</el-date-picker> </el-date-picker>
...@@ -636,15 +637,15 @@ export default { ...@@ -636,15 +637,15 @@ export default {
// width: 100% // width: 100%
position: absolute position: absolute
font-size: 12px font-size: 12px
.full-width // .full-width
left: 0 // left: 0
width: 100% // width: 100%
.left-side // .left-side
left: 0 // left: 0
width: 49.75% // width: 49.75%
.right-side // .right-side
left: 50.25% // left: 50.25%
width: 49.75% // width: 49.75%
</style> </style>
<style lang="scss"> <style lang="scss">
.searchBox .el-input__inner { .searchBox .el-input__inner {
......
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