Commit e69ed114 authored by 罗超's avatar 罗超

2

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