mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 04:16:45 +08:00
提交
This commit is contained in:
@@ -73,13 +73,12 @@
|
|||||||
<div class="content"><img src="@/assets/images/icon/remark-iocn.png" alt="" srcset="">详细介绍:<div class="content-text" v-html="courseInfo.summary"></div></div>
|
<div class="content"><img src="@/assets/images/icon/remark-iocn.png" alt="" srcset="">详细介绍:<div class="content-text" v-html="courseInfo.summary"></div></div>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="大纲" name="second">
|
<el-tab-pane label="大纲" name="second" v-if="courseInfo.type==20">
|
||||||
<div class="category" v-for="(item) in catalogTree" :key="item.id">
|
<div class="category" v-for="(item) in catalogTree" :key="item.id">
|
||||||
<div class="node">
|
<div class="node">
|
||||||
<div class="title">{{item.section.name}}</div>
|
<div class="title">{{item.section.name}}</div>
|
||||||
<div class="subnode" v-for="(it,itIdx) in item.contents" :key="it.id">
|
<div class="subnode" v-for="(it,itIdx) in item.contents" :key="it.id">
|
||||||
<div class="sub-title">
|
<div class="sub-title">
|
||||||
<!-- {{itIdx+1}}. -->
|
|
||||||
<div class="tip"><span class="tip-type">{{getType(it.contentType)}}</span>{{it.contentName}}</div>
|
<div class="tip"><span class="tip-type">{{getType(it.contentType)}}</span>{{it.contentName}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -87,6 +86,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="height: 30px;"></div>
|
<div style="height: 30px;"></div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="大纲" name="second" v-if="courseInfo.type==10">
|
||||||
|
<div class="category" v-for="(item) in contentList" :key="item.id">
|
||||||
|
<div class="node">
|
||||||
|
<div class="title">{{item.contentName}}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 30px;"></div>
|
||||||
|
</el-tab-pane>
|
||||||
<el-tab-pane :label="'评论('+commentsTtoal+')'" name="third">
|
<el-tab-pane :label="'评论('+commentsTtoal+')'" name="third">
|
||||||
<comments v-if="courseInfo.id!=''" :readonly="!stuStusts || stuStusts==0" :showTop="false" @writeTotal="showCommentsTotal" @success="addCommentSuccess" @delSuccess="delCommentSuccess" :obj-type="1" :to-users="toUsers" :obj-id="courseInfo.id" :obj-title="courseInfo.name"></comments>
|
<comments v-if="courseInfo.id!=''" :readonly="!stuStusts || stuStusts==0" :showTop="false" @writeTotal="showCommentsTotal" @success="addCommentSuccess" @delSuccess="delCommentSuccess" :obj-type="1" :to-users="toUsers" :obj-id="courseInfo.id" :obj-title="courseInfo.name"></comments>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -185,7 +192,7 @@ export default {
|
|||||||
ctoUsers.push({aid:item.teacherId,name:item.teacherName,sex:item.sex});
|
ctoUsers.push({aid:item.teacherId,name:item.teacherName,sex:item.sex});
|
||||||
})
|
})
|
||||||
this.toUsers=ctoUsers;
|
this.toUsers=ctoUsers;
|
||||||
this.loadAuthorInfo(rs.result.teachers,userIds)
|
this.loadAuthorInfo(rs.result.teachers,userIds);
|
||||||
}
|
}
|
||||||
this.courseInfo=rs.result.course;
|
this.courseInfo=rs.result.course;
|
||||||
this.courseInfo.score = rs.result.course.score;
|
this.courseInfo.score = rs.result.course.score;
|
||||||
@@ -198,7 +205,9 @@ export default {
|
|||||||
this.courseInfo.resOwner = this.resOwnerName(rs.result.course.resOwner3);
|
this.courseInfo.resOwner = this.resOwnerName(rs.result.course.resOwner3);
|
||||||
}
|
}
|
||||||
this.teachers=rs.result.teachers;
|
this.teachers=rs.result.teachers;
|
||||||
|
if(this.courseInfo.type == 10) {
|
||||||
this.contentList=rs.result.contents;
|
this.contentList=rs.result.contents;
|
||||||
|
} else {
|
||||||
let treeList=[];
|
let treeList=[];
|
||||||
rs.result.sections.forEach(sec=>{
|
rs.result.sections.forEach(sec=>{
|
||||||
let treeNode={section:sec,contents:[]}
|
let treeNode={section:sec,contents:[]}
|
||||||
@@ -210,6 +219,11 @@ export default {
|
|||||||
treeList.push(treeNode);
|
treeList.push(treeNode);
|
||||||
})
|
})
|
||||||
this.catalogTree=treeList;
|
this.catalogTree=treeList;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.showQrimage();
|
this.showQrimage();
|
||||||
this.isSignUp();
|
this.isSignUp();
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@@ -517,11 +517,11 @@ export default {
|
|||||||
//此处使用window.open有问题
|
//此处使用window.open有问题
|
||||||
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`);
|
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.id}&type=${item.type}`);
|
||||||
} else {
|
} else {
|
||||||
if (item.type == 10) {
|
// if (item.type == 10) {
|
||||||
return this.webBaseUrl + "/course/micro?id=" + item.id;
|
// return this.webBaseUrl + "/course/micro?id=" + item.id;
|
||||||
} else if (item.type == 20) {
|
// } else if (item.type == 20) {
|
||||||
return this.webBaseUrl + "/course/detail?id=" + item.id;
|
return this.webBaseUrl + "/course/detail?id=" + item.id;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
@@ -80,6 +80,15 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<el-pagination
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@current-change="handleCurrentChange"
|
||||||
|
:current-page="pageIndex"
|
||||||
|
:page-sizes="[10, 20, 30, 40]"
|
||||||
|
:page-size="paegSize"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
:total="count">
|
||||||
|
</el-pagination>
|
||||||
</div>
|
</div>
|
||||||
<el-dialog
|
<el-dialog
|
||||||
width="860px"
|
width="860px"
|
||||||
@@ -137,6 +146,7 @@ export default {
|
|||||||
components:{interactBar},
|
components:{interactBar},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
count:0,
|
||||||
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
|
||||||
options: [{
|
options: [{
|
||||||
value: '选项1',
|
value: '选项1',
|
||||||
@@ -149,7 +159,7 @@ export default {
|
|||||||
num :null,
|
num :null,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
pageIndex:1,
|
pageIndex:1,
|
||||||
paegSize:1,
|
paegSize:10,
|
||||||
orderType:true,
|
orderType:true,
|
||||||
orderField:'',
|
orderField:'',
|
||||||
courseId:'',
|
courseId:'',
|
||||||
@@ -238,7 +248,8 @@ export default {
|
|||||||
endTime:this.endTime,
|
endTime:this.endTime,
|
||||||
}
|
}
|
||||||
apiNote.query(data).then(res=>{
|
apiNote.query(data).then(res=>{
|
||||||
this.datalist = res.result.list
|
this.datalist = res.result.list;
|
||||||
|
this.count = res.result.count;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -247,9 +258,20 @@ export default {
|
|||||||
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
|
const hour = parseInt(time / 3600) < 10 ? '0' + parseInt(time / 3600) : parseInt(time / 3600)
|
||||||
const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60)
|
const min = parseInt(time % 3600 / 60) < 10 ? '0' + parseInt(time % 3600 / 60) : parseInt(time % 3600 / 60)
|
||||||
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
|
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
|
||||||
// console.log(hour + ':' + min + ':' + sec)
|
// console.log(hour + ':' + min + ':' + sec)
|
||||||
return hour + ':' + min + ':' + sec
|
return hour + ':' + min + ':' + sec
|
||||||
}
|
},
|
||||||
|
handleSizeChange(val) {
|
||||||
|
this.paegSize = val;
|
||||||
|
this.pageIndex = 1;
|
||||||
|
this.noteData(this.num);
|
||||||
|
console.log(`每页 ${val} 条`);
|
||||||
|
},
|
||||||
|
handleCurrentChange(val) {
|
||||||
|
this.pageIndex = val;
|
||||||
|
this.noteData(this.num);
|
||||||
|
console.log(`当前页: ${val}`);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user