This commit is contained in:
daihh
2022-05-31 19:02:14 +08:00
2 changed files with 1121 additions and 1096 deletions

View File

@@ -36,11 +36,9 @@
</div>
</div>
<div v-else>
<div style="text-align: center;">
<!-- <div style="text-align: center;padding-top: 20px;"> -->
<!-- <el-button v-if="cware.content.id==''" @click="saveContent(1)" type="primary">保存</el-button> -->
<!-- <el-button @click="deleteContent(1)" type="danger">删除</el-button> -->
<!-- </div> -->
<!--展示内容区域-->
<!--视频-->
<div v-if="cware.content.contentType==10">
@@ -103,9 +101,16 @@
<el-image :src="fileBaseUrl+cware.content.content" fit="fill"></el-image>
</div>
<div v-if="cware.content.contentType==40">
<div style="text-align: center;padding-top: 20px;" v-if="courseFileShow">
<div style="padding: 20px;">{{cware.content.contentName}}</div>
<el-button @click="loadPdfFile();" type="primary">保存</el-button>
</div>
<div v-else>
<div style="padding: 10px;color: #767676; ">如果pdf无法显示请稍后再试文档转化是异步处理有可能是文档还未转化完成 </div>
<pdfPreview v-if="cware.content.contentType == 40" :filePath="fileBaseUrl+cware.content.pdfPath"></pdfPreview>
</div>
</div>
</div>
</div>
@@ -548,6 +553,7 @@
},
data(){
return {
courseFileShow:false,
curContent:{id:'',contentType:0,contenRefId:''},
fileBaseUrl:process.env.VUE_APP_FILE_BASE_URL,
imageShowUrl: '',
@@ -692,7 +698,6 @@
},
methods:{
init(){
//console.log('初始化处理');
this.activeName='courseware';
this.cware.content={id:'',contentType:0,sortIndex:1,contentRefId:'',pdfPath:''};
this.cware.show=1;
@@ -715,9 +720,11 @@
let fname=this.cware.content.content;
if(fname && fname.indexOf('.pdf')>-1){
this.cware.content.pdfPath=this.cware.content.content;
this.courseFileShow = false;
}else{
apiCourseFile.detail(this.cware.content.contentRefId).then(rs=>{
if(rs.status==200){
this.courseFileShow = false;
this.cware.content.pdfPath=rs.result.previewFilePath;
}
});
@@ -755,7 +762,6 @@
},
loadAssessInfo(){
if(this.assess.content && this.assess.content.content!='' && this.assess.content.content.length>10){
//console.log(this.assess.content.content,'this.assess.content.content');
this.assess.json=JSON.parse(this.assess.content.content);
this.assess.show=2;
}
@@ -801,7 +807,6 @@
if(this.cware.content.contentType==40){
this.loadPdfFile();
}
//console.log(this.cware.content,'this.cware.content');
this.saveContent(1);
},
toCWareReChoose(){
@@ -939,6 +944,10 @@
}
})
},
// 调用pdf详情接口
getPPtDetail(){
this.loadPdfFile();
},
deleteContent(index){
let $this=this;
let postData={
@@ -1031,7 +1040,6 @@
handleUploadSuccess({error,result,status}){
if(status === 200) {
//上传到课件库
//console.log(result);
let courseWare={
fileName:result.displayName,
fileType:result.fileType,
@@ -1041,13 +1049,17 @@
}
apiCourseFile.saveUpload(courseWare).then(rs=>{
if(rs.status==200){
this.courseFileShow = true;
this.cware.content.contentRefId=rs.result.id;
this.cware.content.contentName=result.displayName;
//this.cware.content.content=result.filePath;
if(rs.result.resType === 40 && rs.result.resType != 'ppt') {
this.cware.curriculumData.url = rs.result.previewFilePath;
}
this.cware.curriculumData.url = rs.result.filePath;
this.cware.content.duration=rs.result.duration;//时长
this.courseFileShow=true;
this.saveContent(1);
}else{
this.$message.error('上传课件失败');

View File

@@ -24,7 +24,7 @@
</el-select>
</div>
<div style="padding: 0px 5px;"><el-input clearable placeholder="搜索名称" v-model="pageData.keyword"></el-input></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-search" type="primary" @click="getArticleList">搜索</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-search" type="primary" @click="search">搜索</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button></div>
</div>
</div>
@@ -45,6 +45,13 @@
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination></div>
<div v-else>
<div v-if="pageData.list.length == 0">
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div>
</div>
</div>
</div>
<el-dialog title="创建文章" :visible.sync="diagSync" :close-on-click-modal="false" width="900px" custom-class="g-dialog">
<editItems v-if="diagSync" :jumpLimit="false" :editForm="{}" @success="saveSuccess"></editItems>
@@ -67,6 +74,7 @@ export default {
},
data() {
return {
isSearh:false,
pageData: {
pageIndex: 1,
pageSize: 10,
@@ -81,7 +89,10 @@ export default {
this.getArticleList();
},
methods: {
search(){
this.isSearh = true;
this.getArticleList()
},
saveSuccess(data){
this.diagSync=false;
this.articleList.pageIndex = 1;
@@ -116,9 +127,11 @@ export default {
},
reset(){
this.pageData.keyword = '',
this.pageData.status = ''
this.getArticleList()
this.getArticleList();
this.isSearh = false;
},
getQaUserData(list){
let ids=list.map((item,index)=>{