mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-22 09:16:44 +08:00
对接修改
This commit is contained in:
@@ -131,10 +131,10 @@
|
||||
<el-table-column label="操作" width="180px" fixed="right">
|
||||
<template slot-scope="scope" class="btn-gl">
|
||||
<el-button type="text" size="mini" v-if="scope.row.status == 5 && !scope.row.published" @click="releaseData(scope.row)">发布</el-button>
|
||||
<el-button v-if="scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
|
||||
<el-button v-if="scope.row.status == 2" @click="withdraw(scope.row)" type="text" size="mini">撤回</el-button>
|
||||
<el-button v-if="pageManage && scope.row.published" @click="showStudent(scope.row)" type="text" size="mini">学员</el-button>
|
||||
<el-button v-if="!forChoose && scope.row.published" @click="showManageStudy(scope.row)" type="text" size="mini">管理</el-button>
|
||||
<el-button v-if="!forChoose && scope.row.status == 2" @click="withdraw(scope.row)" type="text" size="mini">撤回</el-button>
|
||||
<el-button v-if="scope.row.status != 2" type="text" size="mini" @click="editCurriculum(scope.row)">编辑</el-button>
|
||||
<el-button v-if="scope.row.status != 2 && !scope.row.published" type="text" size="mini" @click="copyCourse(scope.row)">复制</el-button>
|
||||
<el-button v-if="scope.row.status != 2 && !scope.row.published" type="text" size="mini" @click="delItem(scope.row)">删除</el-button>
|
||||
<el-dropdown v-if="scope.row.published" type="text" size="mini" style="margin-left:10px">
|
||||
<el-button type="text" size="mini">更多<i class="el-icon-arrow-down el-icon--right"></i></el-button>
|
||||
@@ -143,6 +143,7 @@
|
||||
<el-dropdown-item v-if="scope.row.published" @click.native="isDisable(scope.row)">{{scope.row.enabled? '停用':'启用'}}</el-dropdown-item>
|
||||
<el-dropdown-item v-if="scope.row.published" @click.native="showQrimage(scope.row)">二维码</el-dropdown-item><!--发布之后才可以查看二维码-->
|
||||
<el-dropdown-item v-if="scope.row.published" @click.native="setTop(scope.row)">{{scope.row.isTop? '取消置顶':'置顶'}}</el-dropdown-item>
|
||||
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@@ -298,6 +299,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
forChoose:false,
|
||||
pageManage:false,
|
||||
showDetails: false,
|
||||
examin:{
|
||||
detailType: '',
|
||||
@@ -380,6 +382,10 @@ export default {
|
||||
if(chooseFlag && chooseFlag=='choose'){
|
||||
this.forChoose=true;
|
||||
}
|
||||
if(this.$route.query && this.$route.query.page && this.$route.query.page == 'manage') {
|
||||
this.pageManage=true;
|
||||
}
|
||||
|
||||
if (this.$route.query && this.$route.query.open && this.$route.query.open == 'new') {
|
||||
this.addNewCourse();
|
||||
}
|
||||
@@ -398,6 +404,10 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
showStudent(row){
|
||||
//出现学员管理
|
||||
window.parent.openSelectStu(row);
|
||||
},
|
||||
handleChoose(row){ //选择课程
|
||||
window.parent.selectCourse(row);
|
||||
},
|
||||
|
||||
@@ -32,8 +32,9 @@
|
||||
<span v-if="item.cmtask_status==0">未开始</span>
|
||||
<span v-if="item.cmtask_status==1">进行中</span>
|
||||
<span v-if="item.cmtask_status==2">已完成</span>
|
||||
</div>
|
||||
<div class="uc-course-time">推送时间:{{ formatsec(Number(item.updated_at) * 1000 )}}</div>
|
||||
</div>
|
||||
<!-- <div class="uc-course-time">推送时间:{{ formatsec(Number(item.updated_at) * 1000 )}}</div> -->
|
||||
<div class="uc-course-time">推送时间:{{ item.created_at}}</div>
|
||||
</div>
|
||||
<div class="uc-course-btns">
|
||||
<el-button @click="jumpRouter(item)" type="primary" size="small">开始学习</el-button>
|
||||
@@ -68,9 +69,10 @@
|
||||
<script>
|
||||
import studyItem from '@/components/Course/studyItem.vue';
|
||||
import apiBoeCourse from '@/api/boe/course.js';
|
||||
import apiManage from '@/api/manage/manage.js'
|
||||
import {formatsec} from '@/utils/datetime.js'
|
||||
export default {
|
||||
name: 'ucStudyCourses',
|
||||
name: 'ucStudyTask',
|
||||
components: { studyItem },
|
||||
data() {
|
||||
return {
|
||||
@@ -122,6 +124,13 @@ export default {
|
||||
jumpRouter(item) {
|
||||
//window.open(`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`,'_self' )
|
||||
location.href=`${this.webBaseUrl}/course/boeframe?id=${item.cmtask_id}`;
|
||||
if(item.cmtask_type==1){ //学习路径图
|
||||
//let params=encodeURIComponent('projectId='+courseId);
|
||||
//this.$router.push('/forward?to='+studentPath+'/projectdetails¶ms='+params);
|
||||
location.href='https://u-pre.boe.com/student-h5/projectdetails?projectId='+item.id
|
||||
}else if(item.cmtask_type==2){ //学习项目
|
||||
location.href='https://u-pre.boe.com/student-h5/projectdetails?projectId='+item.id
|
||||
}
|
||||
},
|
||||
|
||||
loadBoeData() {
|
||||
@@ -129,25 +138,35 @@ export default {
|
||||
this.params.cmtask_status = this.status;
|
||||
}
|
||||
let params={
|
||||
// keyword:this.keyword,
|
||||
page:this.page,
|
||||
size:this.size,
|
||||
pageNo:this.page,
|
||||
pageSize:this.size,
|
||||
cmtask_status:this.params.cmtask_status,
|
||||
cmtask_name:this.params.cmtask_name,
|
||||
}
|
||||
this.loading=true;
|
||||
apiBoeCourse.cmtaskList(params).then(res=>{
|
||||
if(res.status==200){
|
||||
this.total = res.result.count
|
||||
this.couresList = res.result.list;
|
||||
}else{
|
||||
this.$message.error('查询数据失败:'+res.message);
|
||||
}
|
||||
this.loading=false;
|
||||
apiManage.userTaskList(params).then(res=>{
|
||||
if(res.code==200){
|
||||
this.total = 10;
|
||||
this.couresList = res.data;
|
||||
}else{
|
||||
this.$message.error('查询数据失败:'+res.msg);
|
||||
}
|
||||
this.loading=false;
|
||||
}).catch(()=>{
|
||||
this.loading=false;
|
||||
})
|
||||
// apiBoeCourse.cmtaskList(params).then(res=>{
|
||||
// if(res.status==200){
|
||||
// this.total = res.result.count
|
||||
// this.couresList = res.result.list;
|
||||
// }else{
|
||||
// this.$message.error('查询数据失败:'+res.message);
|
||||
// }
|
||||
// this.loading=false;
|
||||
|
||||
}).catch(()=>{
|
||||
this.loading=false;
|
||||
})
|
||||
// }).catch(()=>{
|
||||
// this.loading=false;
|
||||
// })
|
||||
},
|
||||
search(){
|
||||
this.loadBoeData()
|
||||
|
||||
Reference in New Issue
Block a user