Commit e69ed114 authored by 罗超's avatar 罗超

2

parent 064965a5
......@@ -96,7 +96,8 @@
style="position:absolute;top:0;right:0"
class="q-ml-sm"
v-if="
saveObj.AppointState == 1 &&isShowTag(saveObj.GuestList,saveObj.ScrollMinNum)
saveObj.AppointState == 1 &&
isShowTag(saveObj.GuestList, saveObj.ScrollMinNum)
"
/>
</template>
......@@ -268,28 +269,40 @@ export default {
methods: {
//取消预约
cancelSub() {
const msg = {
Date: this.dateObj.date,
TeacherId: this.saveObj.Tid,
AppointIds: this.checkStuType2.toString()
};
CancelAppointment(msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.checkStuType2.map(e => {
this.saveObj.GuestList.map((_e, _i) => {
if (e == _e.AppointmentId) {
this.saveObj.GuestList.splice(_i, 1);
}
});
let that = this;
this.$q
.dialog({
title: "提示信息",
message: "是否要取消预约",
cancel: true,
ok: "是",
cancel: "否"
})
.onOk(() => {
const msg = {
Date: that.dateObj.date,
TeacherId: that.saveObj.Tid,
AppointIds: that.checkStuType2.toString()
};
CancelAppointment(msg).then(res => {
if (res.Code == 1) {
that.$q.notify({
message: "操作成功",
position: "top"
});
that.checkStuType2.map(e => {
that.saveObj.GuestList.map((_e, _i) => {
if (e == _e.AppointmentId) {
that.saveObj.GuestList.splice(_i, 1);
}
});
});
that.checkStuType2 = [];
that.$emit("success");
}
});
this.checkStuType2 = [];
this.$emit("success");
}
});
})
.onCancel(() => {});
},
//确认约课
......@@ -343,18 +356,18 @@ export default {
this.$emit("success");
},
isShowTag(arr, min) {
let n=0
arr.map((e)=>{
if(e.AppointType!==3){
n+=1
let n = 0;
arr.map(e => {
if (e.AppointType !== 3) {
n += 1;
}
})
});
if (n < min) {
return true;
} else {
return false;
}
},
}
}
};
</script>
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