mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 04:46:44 +08:00
修改验证
This commit is contained in:
@@ -433,6 +433,7 @@ export default {
|
|||||||
btnLoading: false,
|
btnLoading: false,
|
||||||
requireSaveCourse: false,
|
requireSaveCourse: false,
|
||||||
orgName:'',
|
orgName:'',
|
||||||
|
orgNamePath:'',
|
||||||
orgKid:'',
|
orgKid:'',
|
||||||
courseInfo: {
|
courseInfo: {
|
||||||
id: '',
|
id: '',
|
||||||
@@ -678,6 +679,7 @@ export default {
|
|||||||
if(rrs.status==200){
|
if(rrs.status==200){
|
||||||
this.orgName=rrs.result.name;
|
this.orgName=rrs.result.name;
|
||||||
this.orgKid=rrs.result.kid;
|
this.orgKid=rrs.result.kid;
|
||||||
|
this.orgNamePath=rrs.result.namePath;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -687,7 +689,6 @@ export default {
|
|||||||
this.weikeReset = editData.id;
|
this.weikeReset = editData.id;
|
||||||
this.onlineReset = editData.id;
|
this.onlineReset = editData.id;
|
||||||
//console.log("编辑课程?");
|
//console.log("编辑课程?");
|
||||||
this.orgName=editData.orgName;
|
|
||||||
this.courseInfo.orgId=editData.orgId;
|
this.courseInfo.orgId=editData.orgId;
|
||||||
this.curCourseId = editData.id; //设置
|
this.curCourseId = editData.id; //设置
|
||||||
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
this.courseInfo.type = editData.type; //设置课程类型,因为这里的课程对象可能不全,所以只能设置值,不能整个对象附值
|
||||||
@@ -790,6 +791,7 @@ export default {
|
|||||||
if(rrs.status==200){
|
if(rrs.status==200){
|
||||||
$this.orgName=rrs.result.name;
|
$this.orgName=rrs.result.name;
|
||||||
$this.orgKid=rrs.result.kid;
|
$this.orgKid=rrs.result.kid;
|
||||||
|
$this.orgNamePath=rrs.result.namePath;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@@ -802,6 +804,7 @@ export default {
|
|||||||
if(rrs.status==200){
|
if(rrs.status==200){
|
||||||
$this.orgName=rrs.result.name;
|
$this.orgName=rrs.result.name;
|
||||||
$this.orgKid=rrs.result.kid;
|
$this.orgKid=rrs.result.kid;
|
||||||
|
$this.orgNamePath=rrs.result.namePath;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -1147,27 +1150,39 @@ export default {
|
|||||||
if(this.curContent.content !== JSON.stringify(courseware.curriculumData)) {
|
if(this.curContent.content !== JSON.stringify(courseware.curriculumData)) {
|
||||||
pass = false;
|
pass = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return pass;
|
return pass;
|
||||||
},
|
},
|
||||||
unsavedWeiContent() {
|
unsavedWeiContent() {
|
||||||
// console.log(this.contentInfo.list,'contentInfo.list');
|
// console.log(this.contentInfo.list,'contentInfo.list');
|
||||||
// console.log(this.courseInfo,'courseInfo');
|
// console.log(this.courseInfo,'courseInfo');
|
||||||
console.log(this.$refs.weikeContent,'weikeContent');
|
//console.log(this.$refs.weikeContent,'weikeContent');
|
||||||
const courseware = this.$refs.weikeContent;
|
const courseware = this.$refs.weikeContent;
|
||||||
console.log(this.catalogTree,'this.catalogTree');
|
//console.log(this.catalogTree,'this.catalogTree');
|
||||||
|
if(courseware.cware.content.id==''){
|
||||||
|
this.$message.error('无课件内容,请先添加课件内容保存后再提交');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if(courseware.homework.show == 2) { // 作业
|
||||||
|
this.$message.error('请先保存作业再提交');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
let pass = true;
|
let pass = true;
|
||||||
if(courseware.homework.show == 2) { // 作业
|
if(courseware.homework.show == 2) { // 作业
|
||||||
pass = false;
|
this.$message.error('请先保存作业再提交');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if(courseware.assess.show == 1) { // 评估
|
if(courseware.assess.show == 2) { // 评估
|
||||||
pass = false;
|
this.$message.error('请先保存评估再提交');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
if(courseware.exam.show == 3) { // 评估
|
if(courseware.exam.show == 3) { // 评估
|
||||||
pass = false;
|
this.$message.error('请先保存考试再提交');
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return pass;
|
return true;
|
||||||
},
|
},
|
||||||
submitCourse() {
|
submitCourse() {
|
||||||
|
|
||||||
@@ -1176,7 +1191,7 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(this.weike.dlgShow && !this.unsavedWeiContent()){
|
if(this.weike.dlgShow && !this.unsavedWeiContent()){
|
||||||
this.$message.error('您有未保存的内容,请先保存');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1292,6 +1307,7 @@ export default {
|
|||||||
kid:hrbpUser.user_id,
|
kid:hrbpUser.user_id,
|
||||||
orgId:hrbpUser.orgnization_id
|
orgId:hrbpUser.orgnization_id
|
||||||
}
|
}
|
||||||
|
postData.course.orgName=hrbpUser.orgnization_name_path+'/'+$this.orgName;
|
||||||
apiCourse.submitCourse(postData).then(res => {
|
apiCourse.submitCourse(postData).then(res => {
|
||||||
//this.btnLoading=false;
|
//this.btnLoading=false;
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user