Commit 77700208 authored by 黄奎's avatar 黄奎

页面修改

parent e9857fc2
......@@ -15,6 +15,11 @@
<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">
<el-button size="small" type="primary">导入单词</el-button>
</el-upload>
</div>
<div class="q-mt-lg" style="height:calc(100% - 140px)">
<q-scroll-area :thumb-style="thumbStyle" :content-style="contentStyle"
......@@ -28,9 +33,8 @@
<div class="row chapter-node full-width" slot-scope="{ node, data }">
<div class="q-mr-md">{{ data.ChapterNo.length>1?data.ChapterNo:`0${data.ChapterNo}` }}</div>
<div class="col q-mr-xs" v-if="editorNodeId==data.ChapterId">
<input type="text" @blur="changeChapterName(data)" maxlength="100"
draggable="true" class="tree-input" v-focus v-model="data.ChapterName"
@focus="selectValue($event)" />
<input type="text" @blur="changeChapterName(data)" maxlength="100" draggable="true"
class="tree-input" v-focus v-model="data.ChapterName" @focus="selectValue($event)" />
</div>
<div class="col q-mr-md ellipsis" v-if="editorNodeId!=data.ChapterId">{{data.ChapterName}}</div>
<div class="oops-box q-mr-xs" v-if="editorNodeId!=data.ChapterId">
......@@ -63,7 +67,6 @@
v-model="defauRateObj"></q-select>
</div>
</div>
<!-- <div v-if="chapter.ParentId!=0"> -->
<div>
<div class="text-h6 q-mb-md">章节学习内容</div>
<div class="q-mb-md">
......@@ -80,7 +83,6 @@
</editor>
</div>
</div>
<!-- <div v-else class="text-center text-h5 text-grey-4 q-mt-lg">单元节点不支持编辑相关内容</div> -->
</div>
</div>
</template>
......@@ -112,7 +114,10 @@
} from "../../api/course/index";
import {
compareObject
} from '../../utils/validate'
} from '../../utils/validate';
import {
UploadLocalSystem
} from '../../api/common/common'
import {
extend
} from 'quasar'
......@@ -180,8 +185,8 @@
defaultChapterId: 0,
splitterModel: 30, //左侧默认占据多大
isShowChapter: false, //是否显示导入
chapterObj:{},
MyChapterNo:0
chapterObj: {},
MyChapterNo: 0
};
},
created() {
......@@ -203,6 +208,21 @@
}, 3000);
},
methods: {
//上传文件
UploadAttachment(files) {
this.questionData = [];
var fileParams = {
Analysis: 1,
CourseId: this.courseId,
CourseWords: 1,
Uid: this.getLocalStorage().Id
}
UploadLocalSystem(JSON.stringify(fileParams), files.file, res => {
if (res.Code == 1) {
this.questionData = res.Data;
}
})
},
changeContent() {},
getCourseInfo() {
queryCourseInfo({
......@@ -332,10 +352,10 @@
saveChapter(msg).then(r => {
this.submiting = false
let msg = '';
if(type==1){
msg='自动保存成功!'
}else{
msg='数据保存成功!'
if (type == 1) {
msg = '自动保存成功!'
} else {
msg = '数据保存成功!'
}
this.$q.notify({
icon: 'iconfont icon-chenggong',
......@@ -584,19 +604,18 @@
})
},
//点击导入
getImport(){
this.isShowChapter=true;
getImport() {
this.isShowChapter = true;
},
closeChapterForm(){
this.isShowChapter=false;
closeChapterForm() {
this.isShowChapter = false;
},
refreshPage(){
refreshPage() {
this.initTree();
this.getCourseInfo();
}
}
};
</script>
<style>
......@@ -609,9 +628,10 @@
.chapter-tree .chapter-node .rate-box {
display: block;
}
.chapter-tree .el-tree-node__content {
height: 32px !important;
padding-right:20px;
padding-right: 20px;
}
.chapter-tree .el-tree-node__content:hover,
......@@ -630,5 +650,4 @@
font-size: 14px;
width: 100%
}
</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