|
|
|
@ -12,12 +12,12 @@ |
|
|
|
|
<div class="p-title">内容设置</div> |
|
|
|
|
<div class="btns" style="top: -10px"> |
|
|
|
|
<template v-if="!sorting"> |
|
|
|
|
<el-button type="primary" size="small" round v-throttle @click="addChapter">添加章节</el-button> |
|
|
|
|
<el-button type="primary" size="small" round v-throttle @click="sort">编辑顺序</el-button> |
|
|
|
|
<el-button type="primary" round v-throttle @click="addChapter">添加章节</el-button> |
|
|
|
|
<el-button type="primary" round v-throttle @click="sort">编辑顺序</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<el-button type="primary" size="small" round v-throttle @click="cancelSort">取消</el-button> |
|
|
|
|
<el-button type="primary" size="small" round v-throttle @click="saveSort">保存</el-button> |
|
|
|
|
<el-button type="primary" round v-throttle @click="cancelSort">取消</el-button> |
|
|
|
|
<el-button type="primary" round v-throttle @click="saveSort">保存</el-button> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -28,9 +28,9 @@ |
|
|
|
|
<div>{{ chapter.name }}</div> |
|
|
|
|
<div> |
|
|
|
|
<template v-if="!sorting"> |
|
|
|
|
<el-button class="action-btn" type="primary" size="small" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button> |
|
|
|
|
<el-button class="action-btn" type="primary" size="small" round v-throttle @click="addSection(chapter.id)">添加小节</el-button> |
|
|
|
|
<el-button class="action-btn" type="primary" size="small" round v-throttle @click="delChapter(chapter.id)">删除</el-button> |
|
|
|
|
<el-button class="action-btn" type="primary" round v-throttle @click="editChapter(chapter)">修改章节名称</el-button> |
|
|
|
|
<el-button class="action-btn" type="primary" round v-throttle @click="addSection(chapter.id)">添加小节</el-button> |
|
|
|
|
<el-button class="action-btn" type="primary" round v-throttle @click="delChapter(chapter.id)">删除</el-button> |
|
|
|
|
</template> |
|
|
|
|
<template v-else> |
|
|
|
|
<i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i> |
|
|
|
@ -72,8 +72,8 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" @click="chapterVisible = false">取消</el-button> |
|
|
|
|
<el-button size="small" type="primary" @click="chapterSubmit">确定</el-button> |
|
|
|
|
<el-button @click="chapterVisible = false">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="chapterSubmit">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -101,8 +101,8 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" @click="sectionVisible = false">取消</el-button> |
|
|
|
|
<el-button size="small" type="primary" @click="sectionSubmit">确定</el-button> |
|
|
|
|
<el-button @click="sectionVisible = false">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="sectionSubmit">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -124,8 +124,8 @@ |
|
|
|
|
</el-upload> |
|
|
|
|
</div> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" @click="switchVisible = false">取消</el-button> |
|
|
|
|
<el-button size="small" type="primary" @click="switchSubmit">确定</el-button> |
|
|
|
|
<el-button @click="switchVisible = false">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="switchSubmit">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -136,8 +136,8 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
|
<el-button size="small" @click="sectionNameVisible = false">取消</el-button> |
|
|
|
|
<el-button size="small" type="primary" @click="sectionNameSubmit">确定</el-button> |
|
|
|
|
<el-button @click="sectionNameVisible = false">取消</el-button> |
|
|
|
|
<el-button type="primary" @click="sectionNameSubmit">确定</el-button> |
|
|
|
|
</span> |
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
@ -459,9 +459,10 @@ export default { |
|
|
|
|
this.sectionId = ""; |
|
|
|
|
}, |
|
|
|
|
preview(row) { |
|
|
|
|
// console.log(JSON.stringify(row)); |
|
|
|
|
if (this.transferType(row.fileType) == "视频") { |
|
|
|
|
this.$get(`${this.api.getPlayAuth}/${row.fileId}`).then(res => { |
|
|
|
|
this.playAuth = res.data.playAuth; |
|
|
|
|
this.playAuth = res.playAuth; |
|
|
|
|
if (this.player) { |
|
|
|
|
this.player.replayByVidAndPlayAuth(row.fileId, this.playAuth); |
|
|
|
|
} else { |
|
|
|
@ -503,7 +504,7 @@ export default { |
|
|
|
|
this.isWord = false; |
|
|
|
|
this.isExcel = false; |
|
|
|
|
} |
|
|
|
|
this.iframeSrc = res.data.previewUrl; |
|
|
|
|
this.iframeSrc = res.previewUrl; |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
this.iframeOnload(); |
|
|
|
|
}); |
|
|
|
|