项目更新

This commit is contained in:
hbzgyjh 2021-12-24 10:07:53 +08:00
parent 531551249e
commit 66eab01261
3 changed files with 20 additions and 10 deletions

View File

@ -13,7 +13,7 @@
<!-- <keep-alive exclude="result"> --> <!-- <keep-alive exclude="result"> -->
<step1 v-if="currentTab === 0" :projectForm="form" @nextStep="nextStep" @close="close" @setFormType="setFormType"/> <step1 v-if="currentTab === 0" :projectForm="form" @nextStep="nextStep" @close="close" @setFormType="setFormType"/>
<step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" /> <step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
<step3 v-if="currentTab === 2" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" /> <step3 v-if="currentTab === 2" :projectForm="form" :courseChange="courseChange" @nextStep="nextStep" @prevStep="prevStep" />
<step4 v-if="currentTab === 3" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" /> <step4 v-if="currentTab === 3" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
<step5 <step5
v-if="currentTab === 4" v-if="currentTab === 4"
@ -87,7 +87,8 @@ export default {
totalScore: 0 totalScore: 0
}, },
result: true, result: true,
status: '' status: '',
courseChange: false,
} }
}, },
methods: { methods: {
@ -124,8 +125,11 @@ export default {
}, },
// //
nextStep(childValue) { nextStep(childValue,beChange) {
console.log('进入下一步', childValue) console.log('进入下一步', childValue,beChange)
if(beChange){
this.courseChange = beChange
}
if (this.currentTab < 5) { if (this.currentTab < 5) {
if (childValue) { if (childValue) {
this.form = childValue this.form = childValue
@ -135,8 +139,11 @@ export default {
console.log('ProjectStepForm表单数据', this.form) console.log('ProjectStepForm表单数据', this.form)
}, },
// //
prevStep(childValue) { prevStep(childValue,beChange) {
console.log('返回上一步', childValue) if(beChange){
this.courseChange = beChange
}
console.log('返回上一步', childValue,beChange)
if (this.currentTab > 0) { if (this.currentTab > 0) {
if (childValue) { if (childValue) {
this.form = childValue this.form = childValue

View File

@ -77,6 +77,9 @@ export default {
projectForm: { projectForm: {
type: Object, type: Object,
}, },
courseChange: {
type: Boolean,
}
}, },
data() { data() {
// //
@ -86,7 +89,7 @@ export default {
labelCol: {}, labelCol: {},
wrapperCol: {}, wrapperCol: {},
vertical: 'vertical', vertical: 'vertical',
beChange: false, // beChange: this.courseChange || false, //
totalCourseHours: 0, // totalCourseHours: 0, //
totalLearnHours: 0, // totalLearnHours: 0, //
totalTopicNumber: 0, // totalTopicNumber: 0, //
@ -167,7 +170,7 @@ export default {
this.form.lessonIds.push({ ids: id, sort: index }) this.form.lessonIds.push({ ids: id, sort: index })
}) })
if (this.form.lessonIds.length > 0) { if (this.form.lessonIds.length > 0) {
this.$emit('nextStep', this.form) this.$emit('nextStep', this.form,this.beChange)
} else { } else {
this.$message.warning('培训课程不能为空') this.$message.warning('培训课程不能为空')
} }
@ -181,7 +184,7 @@ export default {
}) })
// console.log('toPrep', this.form) // console.log('toPrep', this.form)
this.$emit('prevStep', this.form) this.$emit('prevStep', this.form,this.beChange)
}, },
//ids //ids
initIds() { initIds() {