项目更新
This commit is contained in:
parent
531551249e
commit
66eab01261
|
@ -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
|
||||
|
|
|
@ -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() {
|
||||
|
|
Loading…
Reference in New Issue