项目更新
This commit is contained in:
parent
531551249e
commit
66eab01261
|
@ -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
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
|
@ -200,7 +200,7 @@ export default {
|
||||||
// 生命周期 - 销毁完成
|
// 生命周期 - 销毁完成
|
||||||
destroyed() { },
|
destroyed() { },
|
||||||
// 如果页面有keep-alive缓存功能,这个函数会触发
|
// 如果页面有keep-alive缓存功能,这个函数会触发
|
||||||
activated() { },
|
activated() {},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
Loading…
Reference in New Issue