Commit 3748a040 authored by zhengke's avatar zhengke

修改

parent c948de9d
......@@ -15,7 +15,7 @@
<q-btn color="primary" size="xs" title="向下移动" :disable="!canDown" @click="moveDown" outline
icon="iconfont icon-down1"></q-btn>
<q-btn color="primary" size="xs" unelevated label="导入 ..." @click="getImport()"></q-btn>
<el-upload class="upload-demo" action="" style="display:inline-block;margin-left:80px;" :accept="accept"
:show-file-list="false" :http-request="UploadAttachment">
<q-btn color="primary" size="xs" unelevated label="导入单词"></q-btn>
......@@ -82,35 +82,35 @@
<editor v-model="chapter.Requirement" placeHolder="请输入章节学生学习要求" :config="config" ref="requirement">
</editor>
</div>
<div class="text-h6 q-mb-md">单词列表</div>
<div class="q-mb-md">
<q-table :pagination="wordMsg" no-data-label="暂无相关数据" flat
class="sticky-right-column-table sticky-column-table" separator="none" :data="WordData"
:columns="columns" row-key="name">
<template v-slot:top="">
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增单词" @click="EditWord(null)" />
</div>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="wordMsg.PageIndex" color="primary"
:max="PageCount" :input="true" @input="changePage" />
</template>
<template v-slot:body-cell-Id="props">
<q-td :props="props">
<div>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditWord(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除"
@click="delWord(props.row)"></q-btn>
</div>
</q-td>
</template>
</q-table>
</div>
</div>
</div>
<div class="text-h6 q-mb-md">单词列表</div>
<div class="q-mb-md">
<q-table :pagination="wordMsg" no-data-label="暂无相关数据" flat
class="sticky-right-column-table sticky-column-table" separator="none" :data="WordData" :columns="columns"
row-key="name">
<template v-slot:top="">
<q-space />
<div class="page-option">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增单词" @click="EditWord(null)" />
</div>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="wordMsg.PageIndex" color="primary"
:max="PageCount" :input="true" @input="changePage" />
</template>
<template v-slot:body-cell-Id="props">
<q-td :props="props">
<div>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditWord(props.row)" />
<q-btn flat size="xs" icon="delete" color="negative" style="font-weight:400" label="删除"
@click="delWord(props.row)"></q-btn>
</div>
</q-td>
</template>
</q-table>
</div>
</div>
</template>
</q-splitter>
......@@ -276,11 +276,10 @@
this.initRateList();
this.getCourseInfo();
}
this.getAllWords(0);
},
mounted() {
this.showContent = false;
this.getAllWords(0);
setTimeout(() => {
this.showContent = true;
}, 3000);
......@@ -297,13 +296,13 @@
}
UploadLocalSystem(JSON.stringify(fileParams), files.file, res => {
if (res.Code == 1) {
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '导入单词成功!',
position: 'top'
})
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '导入单词成功!',
position: 'top'
})
this.questionData = res.Data;
this.getAllWords();
}
......@@ -311,6 +310,7 @@
},
//导入成功获取所有
getAllWords(ChapterId) {
console.log(ChapterId,'ChapterId');
this.wordMsg.CourseId = this.courseId;
this.wordMsg.ChapterId = ChapterId;
GetCourseWordsPage(this.wordMsg).then(res => {
......@@ -376,6 +376,7 @@
})
},
changeNode(data, node, ev) {
console.log('进入');
if (this.chapter && this.chapter.ChapterId > 0) {
if (this.defauRateObj.Id != 0) {
this.chapter.CourseRate = this.defauRateObj.Id
......@@ -418,6 +419,7 @@
this.addObj.CourseId = data.CourseId;
this.addObj.ChapterId = data.ChapterId;
//点击调用章节下的单词
console.log('点击了');
this.getAllWords(data.ChapterNo);
},
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