系统项目按钮调整

This commit is contained in:
Yjhon 2022-03-30 10:58:50 +08:00
parent bf42fd1d64
commit f61a3ff980
3 changed files with 11 additions and 8 deletions

View File

@ -59,6 +59,7 @@ export default {
}, // -
data() {
return {
path: [],
title: '',
currentTab: 0,
currentTab: 0,
@ -120,6 +121,9 @@ export default {
//
nextStep(childValue, beChange) {
console.log('进入下一步', childValue, beChange)
//tab
this.path.push(this.currentTab);
if (beChange) {
this.courseChange = beChange
}
@ -134,11 +138,12 @@ export 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)
},
//
prevStep(childValue, beChange) {
if (beChange) {
this.courseChange = beChange
}
@ -147,11 +152,9 @@ export default {
if (childValue) {
this.form = childValue
}
if (this.form.projectType == 0 && this.currentTab == 2) {
this.currentTab = 1
} else {
this.currentTab -= 1
}
//tab
let tab = this.path.pop();
this.currentTab = tab;
}
console.log('currentTab:', this.currentTab, 'currentTab:', this.currentTab)
console.log('ProjectStepForm表单数据', this.form)

View File

@ -45,7 +45,7 @@
<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="['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-drawer title="课程预览" :destroyOnClose="true" placement="right" width="1200" :closable="true" :visible="courseVisible" @close="drawerClose">
<courseware-list :courseId="selectCourseId"></courseware-list>

View File

@ -59,7 +59,7 @@
<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="['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-card>
</template>