系统项目按钮调整
This commit is contained in:
parent
bf42fd1d64
commit
f61a3ff980
|
@ -59,6 +59,7 @@ export default {
|
||||||
}, //生命周期 - 销毁完成
|
}, //生命周期 - 销毁完成
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
path: [],
|
||||||
title: '',
|
title: '',
|
||||||
currentTab: 0,
|
currentTab: 0,
|
||||||
currentTab: 0,
|
currentTab: 0,
|
||||||
|
@ -120,6 +121,9 @@ export default {
|
||||||
//下一步
|
//下一步
|
||||||
nextStep(childValue, beChange) {
|
nextStep(childValue, beChange) {
|
||||||
console.log('进入下一步', childValue, beChange)
|
console.log('进入下一步', childValue, beChange)
|
||||||
|
|
||||||
|
//缓存当前步骤,用于上一步时往回跳tab
|
||||||
|
this.path.push(this.currentTab);
|
||||||
if (beChange) {
|
if (beChange) {
|
||||||
this.courseChange = beChange
|
this.courseChange = beChange
|
||||||
}
|
}
|
||||||
|
@ -134,11 +138,12 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log('currentTab key:', this.$refs.steps.$slots.default)
|
console.log('currentTab key:', this.$refs.steps.$slots.default)
|
||||||
console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
|
console.log('currentTab:', this.currentTab, 'path:', this.path)
|
||||||
console.log('ProjectStepForm表单数据', this.form)
|
console.log('ProjectStepForm表单数据', this.form)
|
||||||
},
|
},
|
||||||
//上一步
|
//上一步
|
||||||
prevStep(childValue, beChange) {
|
prevStep(childValue, beChange) {
|
||||||
|
|
||||||
if (beChange) {
|
if (beChange) {
|
||||||
this.courseChange = beChange
|
this.courseChange = beChange
|
||||||
}
|
}
|
||||||
|
@ -147,11 +152,9 @@ export default {
|
||||||
if (childValue) {
|
if (childValue) {
|
||||||
this.form = childValue
|
this.form = childValue
|
||||||
}
|
}
|
||||||
if (this.form.projectType == 0 && this.currentTab == 2) {
|
//跳到上一个tab页,剔除最后一个页码
|
||||||
this.currentTab = 1
|
let tab = this.path.pop();
|
||||||
} else {
|
this.currentTab = tab;
|
||||||
this.currentTab -= 1
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
|
console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
|
||||||
console.log('ProjectStepForm表单数据', this.form)
|
console.log('ProjectStepForm表单数据', this.form)
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
<a-button type="primary" size="default" @click="toPrep" style="margin-right: 8px;">上一步</a-button>
|
<a-button type="primary" size="default" @click="toPrep" style="margin-right: 8px;">上一步</a-button>
|
||||||
<a-button v-if="['2','4'].includes(form.trainWay) || form.projectType != 0 " type="primary" size="default" @click="toNext">下一步</a-button>
|
<a-button v-if="['2','4'].includes(form.trainWay) || form.projectType != 0 " type="primary" size="default" @click="toNext">下一步</a-button>
|
||||||
<a-button v-if="['1','3'].includes(form.trainWay) && form.projectType == 0 " type="primary" size="default" @click="toSaveOrIssue('save')" style="margin-right: 8px;">保存</a-button>
|
<a-button v-if="['1','3'].includes(form.trainWay) && form.projectType == 0 " type="primary" size="default" @click="toSaveOrIssue('save')" style="margin-right: 8px;">保存</a-button>
|
||||||
<a-button v-if="['1','3'].includes(form.trainWay) || form.projectType != 0 " type="primary" size="default" @click="toSaveOrIssue('issue')">发布</a-button>
|
<a-button v-if="(['1','3'].includes(form.trainWay) && form.projectType == 0) && form.projectType != 0 " type="primary" size="default" @click="toSaveOrIssue('issue')">发布</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-drawer title="课程预览" :destroyOnClose="true" placement="right" width="1200" :closable="true" :visible="courseVisible" @close="drawerClose">
|
<a-drawer title="课程预览" :destroyOnClose="true" placement="right" width="1200" :closable="true" :visible="courseVisible" @close="drawerClose">
|
||||||
<courseware-list :courseId="selectCourseId"></courseware-list>
|
<courseware-list :courseId="selectCourseId"></courseware-list>
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<a-button type="primary" size="default" @click="toPrev" style="margin-right: 8px;">上一步</a-button>
|
<a-button type="primary" size="default" @click="toPrev" style="margin-right: 8px;">上一步</a-button>
|
||||||
<a-button v-if="['2','4'].includes(form.trainWay)" type="primary" size="default" @click="toNext">下一步</a-button>
|
<a-button v-if="['2','4'].includes(form.trainWay)" type="primary" size="default" @click="toNext">下一步</a-button>
|
||||||
<a-button v-if="['1','3'].includes(form.trainWay)" type="primary" size="default" @click="toSaveOrIssue('save')" style="margin-right: 8px;">保存</a-button>
|
<a-button v-if="['1','3'].includes(form.trainWay)" type="primary" size="default" @click="toSaveOrIssue('save')" style="margin-right: 8px;">保存</a-button>
|
||||||
<a-button v-if="['1','3'].includes(form.trainWay) || form.projectType != 0" type="primary" size="default" @click="toSaveOrIssue('issue')">发布</a-button>
|
<a-button v-if="['1','3'].includes(form.trainWay) && form.projectType != 0" type="primary" size="default" @click="toSaveOrIssue('issue')">发布</a-button>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue