Commit 1ca725b5 authored by 黄奎's avatar 黄奎

页面修改

parent 721eae4a
......@@ -216,7 +216,7 @@
opacity: 0.75
},
defaultChapterId: 0,
defaultExpandedKeys:[],//默认展开数组
defaultExpandedKeys: [], //默认展开数组
splitterModel: 30, //左侧默认占据多大
isShowChapter: false, //是否显示导入
chapterObj: {},
......@@ -313,14 +313,16 @@
position: 'top'
})
this.questionData = res.Data;
this.getAllWords();
this.refreshWordsPage();
}
})
},
//导入成功获取所有
getAllWords(ChapterId) {
this.wordMsg.CourseId = this.courseId;
this.wordMsg.ChapterId = ChapterId;
if (ChapterId) {
this.wordMsg.ChapterId = ChapterId;
}
GetCourseWordsPage(this.wordMsg).then(res => {
if (res.Code == 1) {
this.WordData = res.Data.PageData;
......@@ -328,6 +330,11 @@
}
})
},
//刷新单词
refreshWordsPage(ChapterId) {
this.wordMsg.PageIndex = 1;
this.getAllWords(ChapterId);
},
changePage(val) {
this.wordMsg.PageIndex = val;
this.getAllWords();
......@@ -354,7 +361,7 @@
message: '删除成功!',
position: 'top'
})
this.getAllWords();
this.refreshWordsPage();
}
})
}).onCancel(() => {
......@@ -390,7 +397,7 @@
this.chapter.CourseRateName = this.defauRateObj.Name
}
if (!compareObject(this.bakObj, this.chapter, false)) {
this.saveChapterUpdate(1)
this.saveChapterUpdate(1);
if (this.bakObj.CourseRate != this.chapter.CourseRate) {
if (this.chapter.ChildList && this.chapter.ChildList.length > 0) {
this.updateRate()
......@@ -425,8 +432,7 @@
})
this.addObj.CourseId = data.CourseId;
this.addObj.ChapterId = data.ChapterId;
//点击调用章节下的单词
this.getAllWords(data.ChapterNo);
},
updateRate() {
setChaptersRate({
......@@ -434,7 +440,7 @@
CourseId: this.courseId,
ChapterNo: this.chapter.ChapterNo + "."
}).then(r => {
//this.initTree()
})
},
updateRateNode(arr) {
......@@ -500,19 +506,23 @@
msg.Requirement = encodeURIComponent(msg.Requirement)
saveChapter(msg).then(r => {
this.submiting = false
let msg = '';
let tipMsg = '';
if (type == 1) {
msg = '自动保存成功!'
tipMsg = '自动保存成功!'
} else {
msg = '数据保存成功!'
tipMsg = '数据保存成功!'
}
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: msg,
message: tipMsg,
position: 'top'
})
//点击调用章节下的单词
if (this.chapter && this.chapter.ParentId == 0) {
this.refreshWordsPage(this.chapter.ChapterNo);
}
if (this.bakObj.CourseRate != this.defauRateObj.Id) {
if (this.chapter.ChildList && this.chapter.ChildList.length > 0) {
this.updateRate()
......
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