Commit 77700208 authored by 黄奎's avatar 黄奎

页面修改

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