Commit df6c2670 authored by 罗超's avatar 罗超

2

parent 6785b234
......@@ -93,7 +93,12 @@
<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 q-px-md" @click="save" />
<q-btn
label="保存"
color="accent q-px-md"
:loading="loading"
@click="save"
/>
</q-card-actions>
</q-card>
</q-dialog>
......@@ -116,12 +121,9 @@ export default {
}
},
watch: {
saveObj: {
handler(val) {
console.log(56, val);
},
deep: true
}
show(){
this.loading = false
},
},
data() {
return {
......@@ -134,7 +136,8 @@ export default {
ChapterNos: "",
SChapterNo: 0
},
endSChapterNo: 0
endSChapterNo: 0,
loading: false
};
},
mounted() {},
......@@ -177,19 +180,32 @@ export default {
this.msg.ChapterNos = arr.toString();
},
save() {
this.msg.StuId=this.saveObj.Student_Id
this.msg.GuestId=this.saveObj.Id
this.msg.CourseId=this.saveObj.CourseId
setGuestStartChapter(this.msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: '操作成功',
position: "top",
if (this.endSChapterNo == 0) {
this.$q.notify({
message: "请输入跳课的章节",
position: "top"
});
return;
}
this.msg.StuId = this.saveObj.Student_Id;
this.msg.GuestId = this.saveObj.Id;
this.msg.CourseId = this.saveObj.CourseId;
this.loading = true;
setGuestStartChapter(this.msg)
.then(res => {
this.loading = false;
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.changeDig(false);
this.$emit("success");
}
})
.catch(err => {
this.loading = false;
});
this.changeDig(false);
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