From ed3c060124eda08bf9b188128d34fd087097ff04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AA=86=E4=B9=90?= <342503599@qq.com> Date: Fri, 18 Nov 2022 13:54:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E9=87=91=E6=9E=97?= =?UTF-8?q?=E6=B9=BEbug=EF=BC=88=E5=AE=89=E5=85=A8=E6=95=99=E8=82=B2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=89=E5=88=86=E7=B1=BB=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E3=80=81=E6=96=B0=E5=A2=9E=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../safetyEducation/addCourse.vue | 33 +- .../safetyEducation/courseManage.vue | 461 +++++++++++------- 2 files changed, 305 insertions(+), 189 deletions(-) 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 @@