Commit 9472de2a authored by zhengke's avatar zhengke

1

parent 7bf3ad9d
......@@ -22,7 +22,7 @@
<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" @click.stop="" @blur="changeChapterName(data)" maxlength="100" class="tree-input" v-focus v-model="data.ChapterName" @focus="selectValue($event)" />
<input type="text" @click.stop="" @blur="changeChapterName(data)" maxlength="100" @click.native="ChapterNameClick" 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">
......@@ -33,7 +33,7 @@
<q-badge class="bg-white text-grey-8">
{{data.CourseRateName.replace('课程','')}}
</q-badge>
<q-badge class="q-ml-xs bg-grey-3 text-dark">{{data.StudyHours}}分钟</q-badge>
<q-badge class="q-ml-xs bg-grey-3 text-dark">{{data.StudyMinutes}}分钟</q-badge>
</div>
</div>
</el-tree>
......@@ -45,13 +45,14 @@
<div class="text-h6 q-mb-md">章节学习内容</div>
<div class="row q-mb-md">
<div class="col q-mr-md">
<q-input square filled label="消耗分钟" v-model="chapter.StudyHours" suffix="分钟" mask="#" fill-mask="0" reverse-fill-mask></q-input>
<q-input square filled label="消耗分钟" v-model="chapter.StudyMinutes" suffix="分钟" mask="#" fill-mask="0" reverse-fill-mask></q-input>
</div>
<div class="col">
<q-select :options="rateList" option-label="Name" option-value="Id" square filled label="关联等级" v-model="defauRateObj"></q-select>
</div>
</div>
<div v-if="chapter.ParentId!=0">
<!-- <div v-if="chapter.ParentId!=0"> -->
<div>
<div class="text-h6 q-mb-md">章节学习内容</div>
<div class="q-mb-md">
<editor v-model="chapter.ChapterContent" @blur="changeContent" placeHolder="请输入章节学习内容" :config="config" ref="chapterContent"></editor>
......@@ -65,7 +66,7 @@
<editor v-model="chapter.Requirement" placeHolder="请输入章节学生学习要求" :config="config" ref="requirement"></editor>
</div>
</div>
<div v-else class="text-center text-h5 text-grey-4 q-mt-lg">单元节点不支持编辑相关内容</div>
<!-- <div v-else class="text-center text-h5 text-grey-4 q-mt-lg">单元节点不支持编辑相关内容</div> -->
</div>
</div>
<q-btn round padding="md" v-if="chapter && chapter.ChapterId>0" @click="saveChapterUpdate" :loading="submiting" color="primary" class="fixed-bottom-right" label="保存" style="z-index:9999999;right:20px;bottom:100px;">
......@@ -186,6 +187,9 @@ export default {
this.rateList=r.Data
})
},
ChapterNameClick(){
},
changeNode(data,node,ev){
if(this.chapter && this.chapter.ChapterId>0){
......@@ -210,7 +214,7 @@ export default {
} catch (error) {
}
data.StudyHours=data.StudyHours.toString()
data.StudyMinutes=data.StudyMinutes.toString()
this.chapter=data
extend(this.bakObj,data)
......@@ -504,7 +508,7 @@ export default {
Progress: 0,
Objectives: "",
Requirement: "",
StudyHours: 0,
StudyMinutes: 0,
ChildList: [],
CourseRate: rate,
CourseRateName:crn
......
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