项目form表单更新

This commit is contained in:
Yuanjianghong 2021-11-19 17:00:51 +08:00
parent 4f2c3b0b11
commit 0265c7103d
4 changed files with 151 additions and 9 deletions

View File

@ -8,14 +8,17 @@
<a-step title="选择课程" />
<a-step title="选择人员" />
<a-step title="组卷策略" />
<a-step title="完成" />
<a-step :title="this.result ? '完成' : '失败'" />
</a-steps>
<div class="content">
<keep-alive>
<step1 v-if="currentTab === 0" @nextStep="nextStep" />
<step2 v-if="currentTab === 1" @nextStep="nextStep" @prevStep="prevStep" />
<step3 v-if="currentTab === 2" @nextStep="nextStep" @prevStep="prevStep" />
<step4 v-if="currentTab === 3" @nextStep="nextStep" @prevStep="prevStep" />
<step5 v-if="currentTab === 4" @prevStep="prevStep" @finish="finish" />
<step5 v-if="currentTab === 4" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
<result v-if="currentTab === 8" @nextStep="nextStep" />
</keep-alive>
</div>
</a-card>
</template>
@ -25,6 +28,9 @@ import Step1 from './form/ProjectForm'
import Step2 from './form/ProjectUnitSelect'
import Step3 from './form/ProjectCourseList'
import Step4 from './form/ProjectPersonForm'
import step5 from './form/ProjectTestPaperFormationStrategy'
import result from './form/Result'
export default {
components: {
@ -32,7 +38,10 @@ export default {
Step2,
Step3,
Step4,
step5,
result,
},
data() {
return {
title: '',
@ -50,6 +59,7 @@ export default {
confirmLoading: false,
type: '',
form: {},
result: true,
}
},
methods: {
@ -67,12 +77,28 @@ export default {
this.formLoading = false
},
// handler
//
executeSave(childValue) {
console.log('保存项目', childValue)
if (true) {
this.currentTab = 8
}
},
//
executeIssue(childValue) {
console.log('保存并发布项目', childValue)
if (true) {
this.currentTab = 8
this.result = false
}
},
//
nextStep(childValue) {
console.log('进入下一步', childValue)
if (this.currentTab < 5) {
this.form = childValue;
this.form = childValue
this.currentTab += 1
}
},
@ -84,6 +110,7 @@ export default {
this.currentTab -= 1
}
},
finish() {
this.currentTab = 0
},

View File

@ -90,8 +90,6 @@ export default {
defaultExpandedKeys: [],
selectedRowKeys: [],
selectedRows: [],
keyData: [], //key
rowsData: [], //
orgTree: [],
orgId: '',
orgType: 1,
@ -120,11 +118,11 @@ export default {
methods: {
//
toNext() {
this.$emit('nextStep')
this.$emit('nextStep',this.selectedRowKeys)
},
//
toPrev() {
this.$emit('prevStep')
this.$emit('prevStep',this.selectedRowKeys)
},
/** 表格行选中后触发 */

View File

@ -0,0 +1,62 @@
<template>
<div>
<a-card :bordered="false">
<p>hahahahhahahahahhahahah</p>
</a-card>
<a-card :bordered="false">
<p>ppppppsdapppsdapppp</p>
</a-card>
<a-button type="primary" @click="toSave"> </a-button>
<a-button type="primary" @click="toIssue"> </a-button>
<a-button type="primary" @click="toPrev">上一步</a-button>
</div>
</template>
<script>
// jsjsjson
// import from ''
export default {
// import使
components: {},
props: {},
data() {
//
return {}
},
// data
computed: {},
// data
watch: {},
//
methods: {
//
toSave() { this.$emit('executeSave') },
//
toIssue(){ this.$emit("executeIssue") },
//
toPrev() { this.$emit('prevStep') },
},
// - 访this
created() {},
// - 访DOM
mounted() {},
// -
beforeCreate() {},
// -
beforeMount() {},
// -
beforeUpdate() {},
// -
updated() {},
// -
beforeDestroy() {},
// -
destroyed() {},
// keep-alive
activated() {},
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,55 @@
<template>
<a-result :status="projectSaveStatus" :title="title" :sub-title="description">
<p>{{ this.description }}</p>
</a-result>
</template>
<script>
// jsjsjson
// import from ''
export default {
// import使
components: {},
props: {
projectSaveStatus: {
type: String,
default: 'success'
}
},
data() {
//
return {
// status: 'success',
title: '成华大道',
description: '走成华大道到二仙桥',
}
},
// data
computed: {},
// data
watch: {},
//
methods: {},
// - 访this
created() {},
// - 访DOM
mounted() {},
// -
beforeCreate() {},
// -
beforeMount() {},
// -
beforeUpdate() {},
// -
updated() {},
// -
beforeDestroy() {},
// -
destroyed() {},
// keep-alive
activated() {},
}
</script>
<style scoped>
</style>