Commit 721eae4a authored by 黄奎's avatar 黄奎

页面修改

parent 3748a040
......@@ -24,7 +24,7 @@
<div class="q-mt-lg" style="height:calc(100% - 140px)">
<q-scroll-area :thumb-style="thumbStyle" :content-style="contentStyle"
:content-active-style="contentActiveStyle" style="height: 100%; width: 100%;padding-right:10px;">
<el-tree ref="chapterTree" :default-expanded-keys="defaultChapterId" @node-click="changeNode"
<el-tree ref="chapterTree" :default-expanded-keys="defaultExpandedKeys" @node-click="changeNode"
v-loading="canOptions" class="chapter-tree" :data="dataList" empty-text="暂无章节数据,请点击”添加同级“开始录入开始吧"
:props="defaultProps" node-key="ChapterId" @node-drag-start="handleDragStart"
@node-drag-enter="handleDragEnter" @node-drag-leave="handleDragLeave" @node-drag-over="handleDragOver"
......@@ -216,6 +216,7 @@
opacity: 0.75
},
defaultChapterId: 0,
defaultExpandedKeys:[],//默认展开数组
splitterModel: 30, //左侧默认占据多大
isShowChapter: false, //是否显示导入
chapterObj: {},
......@@ -266,9 +267,17 @@
PageCount: 0
};
},
computed: {
accept: {
get() {
return '.xls,.xlsx';
},
}
},
created() {
if (this.$route.query.chapter) {
this.defaultChapterId = this.$route.query.chapter;
this.defaultExpandedKeys.push(this.defaultChapterId);
}
if (this.$route.query.courseId) {
this.courseId = this.$route.query.courseId;
......@@ -310,7 +319,6 @@
},
//导入成功获取所有
getAllWords(ChapterId) {
console.log(ChapterId,'ChapterId');
this.wordMsg.CourseId = this.courseId;
this.wordMsg.ChapterId = ChapterId;
GetCourseWordsPage(this.wordMsg).then(res => {
......@@ -376,7 +384,6 @@
})
},
changeNode(data, node, ev) {
console.log('进入');
if (this.chapter && this.chapter.ChapterId > 0) {
if (this.defauRateObj.Id != 0) {
this.chapter.CourseRate = this.defauRateObj.Id
......@@ -419,7 +426,6 @@
this.addObj.CourseId = data.CourseId;
this.addObj.ChapterId = data.ChapterId;
//点击调用章节下的单词
console.log('点击了');
this.getAllWords(data.ChapterNo);
},
updateRate() {
......@@ -760,7 +766,6 @@
}
}
};
</script>
<style>
......@@ -795,5 +800,4 @@
font-size: 14px;
width: 100%
}
</style>
</style>
\ No newline at end of file
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