Commit 854e55dc authored by 黄奎's avatar 黄奎

页面修改

parent 1ca725b5
...@@ -335,6 +335,7 @@ ...@@ -335,6 +335,7 @@
this.wordMsg.PageIndex = 1; this.wordMsg.PageIndex = 1;
this.getAllWords(ChapterId); this.getAllWords(ChapterId);
}, },
//单词分页
changePage(val) { changePage(val) {
this.wordMsg.PageIndex = val; this.wordMsg.PageIndex = val;
this.getAllWords(); this.getAllWords();
...@@ -365,7 +366,6 @@ ...@@ -365,7 +366,6 @@
} }
}) })
}).onCancel(() => { }).onCancel(() => {
}); });
}, },
//新增单词 //新增单词
...@@ -411,19 +411,15 @@ ...@@ -411,19 +411,15 @@
data.Objectives = decodeURIComponent(data.Objectives) data.Objectives = decodeURIComponent(data.Objectives)
data.Requirement = decodeURIComponent(data.Requirement) data.Requirement = decodeURIComponent(data.Requirement)
} catch (error) { } catch (error) {
} }
data.StudyMinutes = data.StudyMinutes.toString() data.StudyMinutes = data.StudyMinutes.toString()
this.chapter = data this.chapter = data
extend(this.bakObj, data) extend(this.bakObj, data)
if (this.$refs.chapterContent) { if (this.$refs.chapterContent) {
this.$refs.chapterContent.reloadNewValue() this.$refs.chapterContent.reloadNewValue()
this.$refs.objectives.reloadNewValue() this.$refs.objectives.reloadNewValue()
this.$refs.requirement.reloadNewValue() this.$refs.requirement.reloadNewValue()
} }
this.checkMove(node) this.checkMove(node)
this.rateList.forEach(x => { this.rateList.forEach(x => {
if (x.Id == data.CourseRate) { if (x.Id == data.CourseRate) {
...@@ -432,7 +428,6 @@ ...@@ -432,7 +428,6 @@
}) })
this.addObj.CourseId = data.CourseId; this.addObj.CourseId = data.CourseId;
this.addObj.ChapterId = data.ChapterId; this.addObj.ChapterId = data.ChapterId;
}, },
updateRate() { updateRate() {
setChaptersRate({ setChaptersRate({
...@@ -440,7 +435,6 @@ ...@@ -440,7 +435,6 @@
CourseId: this.courseId, CourseId: this.courseId,
ChapterNo: this.chapter.ChapterNo + "." ChapterNo: this.chapter.ChapterNo + "."
}).then(r => { }).then(r => {
}) })
}, },
updateRateNode(arr) { updateRateNode(arr) {
...@@ -472,7 +466,6 @@ ...@@ -472,7 +466,6 @@
ChapterNo: data.ChapterNo + ".", ChapterNo: data.ChapterNo + ".",
ChapterId: data.ChapterId ChapterId: data.ChapterId
}).then(r => { }).then(r => {
//this.initTree()
this.$refs.chapterTree.remove(data.ChapterId) this.$refs.chapterTree.remove(data.ChapterId)
this.updateChapters = [] this.updateChapters = []
this.genernalNo("", this.dataList) this.genernalNo("", this.dataList)
...@@ -488,9 +481,7 @@ ...@@ -488,9 +481,7 @@
}) })
}) })
}).onCancel(() => { }).onCancel(() => {
}) })
}, },
saveChapterUpdate(type) { saveChapterUpdate(type) {
if (!this.submiting) { if (!this.submiting) {
...@@ -545,7 +536,6 @@ ...@@ -545,7 +536,6 @@
moveUp() { moveUp() {
let data = this.$refs.chapterTree.getCurrentNode() let data = this.$refs.chapterTree.getCurrentNode()
let node = this.$refs.chapterTree.getNode(data.ChapterId) let node = this.$refs.chapterTree.getNode(data.ChapterId)
if (node) { if (node) {
let noTemp = data.ChapterNo.toString().split('.') let noTemp = data.ChapterNo.toString().split('.')
let no = parseInt(noTemp[noTemp.length - 1]) - 1 let no = parseInt(noTemp[noTemp.length - 1]) - 1
...@@ -567,7 +557,6 @@ ...@@ -567,7 +557,6 @@
moveDown() { moveDown() {
let data = this.$refs.chapterTree.getCurrentNode() let data = this.$refs.chapterTree.getCurrentNode()
let node = this.$refs.chapterTree.getNode(data.ChapterId) let node = this.$refs.chapterTree.getNode(data.ChapterId)
if (node) { if (node) {
let noTemp = data.ChapterNo.toString().split('.') let noTemp = data.ChapterNo.toString().split('.')
let no = parseInt(noTemp[noTemp.length - 1]) - 1 let no = parseInt(noTemp[noTemp.length - 1]) - 1
...@@ -600,7 +589,6 @@ ...@@ -600,7 +589,6 @@
ChapterName: data.ChapterName ChapterName: data.ChapterName
} }
updateChapterName(msg).then(r => { updateChapterName(msg).then(r => {
}) })
}, },
addSameLevel() { addSameLevel() {
...@@ -693,7 +681,6 @@ ...@@ -693,7 +681,6 @@
this.MyChapterNo = this.dataList.length; this.MyChapterNo = this.dataList.length;
}); });
}, },
createNewNode(pid, no, rate, crn) { createNewNode(pid, no, rate, crn) {
if (this.canOptions) return; if (this.canOptions) return;
let name = "" let name = ""
...@@ -737,7 +724,6 @@ ...@@ -737,7 +724,6 @@
let noWan = num % 10000; let noWan = num % 10000;
if (noWan.toString().length < 4) noWan = "0" + noWan; if (noWan.toString().length < 4) noWan = "0" + noWan;
return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num); return overWan ? getWan(overWan) + "万" + getWan(noWan) : getWan(num);
}, },
genernalNo(parentNo, list) { genernalNo(parentNo, list) {
list.forEach((x, i) => { list.forEach((x, i) => {
...@@ -759,7 +745,6 @@ ...@@ -759,7 +745,6 @@
}, },
batchUpdate() { batchUpdate() {
batchUpdateChapterNo(this.updateChapters).then(r => { batchUpdateChapterNo(this.updateChapters).then(r => {
}) })
}, },
//点击导入 //点击导入
......
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