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

2

parent 6cfdf77e
......@@ -58,7 +58,8 @@ export function SetAdminScrollAppointment(data) {
method: 'post',
data
})
}/**
}
/**
* 后台取消预约
*/
export function CancelAppointment(data) {
......@@ -67,7 +68,8 @@ export function CancelAppointment(data) {
method: 'post',
data
})
}/**
}
/**
* 后台确认约课
*/
export function SetSureAppointment(data) {
......@@ -76,4 +78,14 @@ export function SetSureAppointment(data) {
method: 'post',
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>
This diff is collapsed.
......@@ -501,6 +501,7 @@ export default {
this.changeDig(false);
});
}else if(this.editType==2){
this.changeDig(false);
this.$q.notify({
message: "操作成功",
position: "top",
......
......@@ -67,6 +67,7 @@
placeholder="开始日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
:clearable="false"
@change="getData"
>
</el-date-picker>
......@@ -636,15 +637,15 @@ export default {
// width: 100%
position: absolute
font-size: 12px
.full-width
left: 0
width: 100%
.left-side
left: 0
width: 49.75%
.right-side
left: 50.25%
width: 49.75%
// .full-width
// left: 0
// width: 100%
// .left-side
// left: 0
// width: 49.75%
// .right-side
// left: 50.25%
// width: 49.75%
</style>
<style lang="scss">
.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