Commit df6c2670 authored by 罗超's avatar 罗超

2

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