项目更新

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

View File

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

View File

@ -200,7 +200,7 @@ export default {
// -
destroyed() { },
// keep-alive
activated() { },
activated() {},
}
</script>
<style scoped>