diff --git a/src/views/projectFront/safetyEducation/addCourse.vue b/src/views/projectFront/safetyEducation/addCourse.vue index 3707c0b8..b30f33f5 100644 --- a/src/views/projectFront/safetyEducation/addCourse.vue +++ b/src/views/projectFront/safetyEducation/addCourse.vue @@ -30,15 +30,15 @@ - - + @@ -331,8 +331,8 @@ export default { questionList: [], totalScore: "", videoType: 1, - classifyId:'', - classifyName:"" + classifyId:"", + classifyName:"", }, indexList: [ "A", @@ -397,7 +397,7 @@ export default { // 请选择课程类型 { required: true, message: this.$t('message.safetyEducation.rulesA2'), trigger: "change" }, ], - classifyName:[ + classifyId:[ // 请选择课程分类 { required: true, message: this.$t('message.safetyEducation.rulesA3'), trigger: "change" } ], @@ -429,21 +429,29 @@ export default { }, mounted(){ // console.log(process.env.NODE_ENV) + console.log("进入 mounted--1", this.classifyId); if(this.classifyId != ''){ + this.ruleForm.classifyName= this.$route.query.name console.log('=====',this.ruleForm.classifyName) - this.ruleForm.classifyId=parseInt(this.classifyId) + this.ruleForm.classifyId=this.classifyId + console.log("this.ruleForm.classifyId", this.ruleForm.classifyId); } + console.log("进入 mounted--2", this.classifyId); this.styleType = this.$store.state.userInfo.styleType console.log(this.styleType) if(this.eduId==''){ + console.log("进入 mounted--3", this.classifyId); if(this.$route.path.indexOf('/project/')!=-1){ this.ruleForm.projectSn=this.$store.state.projectSn }else{ this.ruleForm.projectSn=this.$store.state.userInfo.headquartersSn } - this.getClassifyList() + console.log("进入 mounted--4", this.classifyId); + this.getClassifyList() + }else{ + console.log("进入 mounted--5", this.eduId); this.createQRcode('') this.getDetailData() } @@ -514,6 +522,12 @@ export default { safeEducationQuestionDetailApi({eduId:this.eduId}).then(res=>{ this.ruleForm=res.result.safeEducation this.ruleForm.classifyName = this.$route.query.name + console.log('分类详细数据',this.ruleForm.classifyName); + console.log('详细数据',this.ruleForm); + if(this.ruleForm.projectSn != null) { + console.log("getDetailData 调用 getClassifyList -- ",this.ruleForm.projectSn); + this.getClassifyList() + } }) }, addOptions() { @@ -686,6 +700,7 @@ export default { type=1 } this.ruleForm.type=type + console.log("this.ruleForm",this.ruleForm); safeEducationQuestionAddApi(this.ruleForm).then(res=>{ // 保存成功! this.$message.success(this.$t('message.safetyEducation.savedSuccess')) diff --git a/src/views/projectFront/safetyEducation/courseManage.vue b/src/views/projectFront/safetyEducation/courseManage.vue index 424f1820..a39a097f 100644 --- a/src/views/projectFront/safetyEducation/courseManage.vue +++ b/src/views/projectFront/safetyEducation/courseManage.vue @@ -1,38 +1,75 @@