mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 19:36:43 +08:00
我报名的按管理端的需求的调整
This commit is contained in:
@@ -26,8 +26,17 @@ const userDeleteStudy = function(data){
|
||||
return ajax.postJson(baseURL,'/stu/project/stuCancelEnrollment',data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新报名
|
||||
* {studentId,pid}
|
||||
*/
|
||||
const userRsSginupCourse = function(data){
|
||||
return ajax.postJson(baseURL,'/stu/project/stuCancelEnrollment',data);
|
||||
}
|
||||
|
||||
export default {
|
||||
getTaskNum,
|
||||
userTaskList,
|
||||
userDeleteStudy
|
||||
userDeleteStudy,
|
||||
userRsSginupCourse
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="uc-course-btns">
|
||||
<div style="text-align: right;">
|
||||
<!-- <div style="text-align: right;">
|
||||
<el-button class="del" @click.stop="delItem(item,idx)" type="text" icon="el-icon-delete" size="mini" title="删除"></el-button>
|
||||
<el-dropdown trigger="click" style="display: none;">
|
||||
<span class="el-dropdown-link">
|
||||
@@ -70,7 +70,7 @@
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div> -->
|
||||
<div v-if="item.courseType==30">
|
||||
<div v-if="item.applyStatus==10"><!--「报名待审核」展示为「等待审核」-->
|
||||
<div><el-button style="margin-top:30px" type="primary" disabled size="small">等待审核</el-button></div>
|
||||
@@ -78,7 +78,7 @@
|
||||
</div>
|
||||
<div v-if="item.applyStatus==20"><!--「报名取消」」-->
|
||||
<div><el-button style="margin-top:30px" type="primary" disabled size="small">已取消</el-button></div>
|
||||
<div><el-button style="margin-top:30px;text-align: right;" type="text" size="small">重新报名</el-button></div>
|
||||
<div><el-button @click.stop="reSignupCourse(item)" style="margin-top:30px;text-align: right;" type="text" size="small">重新报名</el-button></div>
|
||||
</div>
|
||||
<div v-if="item.applyStatus==30"><!--「报名审核通过」展示为「报名成功」-->
|
||||
<div><el-button style="margin-top:30px" type="primary" disabled size="small">报名成功</el-button></div>
|
||||
@@ -86,13 +86,13 @@
|
||||
<div v-if="item.applyStatus==40"><!--「审核拒绝」展示为「报名失败」-->
|
||||
<div><el-button style="margin-top:30px" type="primary" disabled size="small">报名失败</el-button></div>
|
||||
<div style="margin-top:30px;text-align: right;">
|
||||
<el-button type="text" size="small">重新报名</el-button>
|
||||
<el-button type="text" size="small">删除</el-button>
|
||||
<el-button @click.stop="reSignupCourse(item)" type="text" size="small">重新报名</el-button>
|
||||
<el-button @click.stop="delItem(item,idx)" type="text" size="small">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="item.applyStatus==50"><!--「报名已删除」展示为「报名已删除」-->
|
||||
<div><el-button style="margin-top:30px" type="primary" disabled size="small">报名已删除</el-button></div>
|
||||
<div><el-button style="margin-top:30px;text-align: right;" type="text" size="small">删除</el-button></div>
|
||||
<div><el-button @click.stop="delItem(item,idx)" style="margin-top:30px;text-align: right;" type="text" size="small">删除</el-button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else >
|
||||
@@ -209,6 +209,28 @@ export default {
|
||||
|
||||
})
|
||||
},
|
||||
//重新报名
|
||||
reSignupCourse(item){
|
||||
if(item.source==3){
|
||||
this.$confirm('您确定要重新报名学习吗?', '重新报名提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() =>{
|
||||
var reqData={ pid:item.courseId, student:item.accountId }
|
||||
apiManage.userRsSginupCourse(reqData).then(res=>{
|
||||
if(res.code==200){
|
||||
this.$message({ type: 'success', message: '报名已提交!' });
|
||||
this.findStudys();
|
||||
}else{
|
||||
this.$message({ type: 'error', message: '重新报名处理失败!' });
|
||||
}
|
||||
})
|
||||
}).catch(err=>{
|
||||
//this.$message({ type: 'error', message: '重新报名处理失败:'+err });
|
||||
})
|
||||
}
|
||||
},
|
||||
findStudys(flag){ //新的
|
||||
if(flag){
|
||||
this.page.pageIndex=1;
|
||||
|
||||
Reference in New Issue
Block a user