项目Form更新
This commit is contained in:
parent
0265c7103d
commit
cceaa92f8f
|
@ -74,7 +74,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParam: {},
|
queryParam: this.$route.query.queryParam || {},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
|
{ title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } },
|
||||||
|
|
|
@ -11,13 +11,13 @@
|
||||||
<a-step :title="this.result ? '完成' : '失败'" />
|
<a-step :title="this.result ? '完成' : '失败'" />
|
||||||
</a-steps>
|
</a-steps>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<keep-alive>
|
<keep-alive exclude="result">
|
||||||
<step1 v-if="currentTab === 0" @nextStep="nextStep" />
|
<step1 v-if="currentTab === 0" :projectForm="form" @nextStep="nextStep" />
|
||||||
<step2 v-if="currentTab === 1" @nextStep="nextStep" @prevStep="prevStep" />
|
<step2 v-if="currentTab === 1" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||||
<step3 v-if="currentTab === 2" @nextStep="nextStep" @prevStep="prevStep" />
|
<step3 v-if="currentTab === 2" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||||
<step4 v-if="currentTab === 3" @nextStep="nextStep" @prevStep="prevStep" />
|
<step4 v-if="currentTab === 3" :projectForm="form" @nextStep="nextStep" @prevStep="prevStep" />
|
||||||
<step5 v-if="currentTab === 4" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
<step5 v-if="currentTab === 4" :projectForm="form" @prevStep="prevStep" @executeSave="executeSave" @executeIssue="executeIssue" />
|
||||||
<result v-if="currentTab === 8" @nextStep="nextStep" />
|
<result v-if="currentTab === 5" :projectForm="form" @nextStep="nextStep" :projectSaveStatus="status"/>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
@ -60,6 +60,7 @@ export default {
|
||||||
type: '',
|
type: '',
|
||||||
form: {},
|
form: {},
|
||||||
result: true,
|
result: true,
|
||||||
|
status: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -81,7 +82,8 @@ export default {
|
||||||
executeSave(childValue) {
|
executeSave(childValue) {
|
||||||
console.log('保存项目', childValue)
|
console.log('保存项目', childValue)
|
||||||
if (true) {
|
if (true) {
|
||||||
this.currentTab = 8
|
this.status = 'success'
|
||||||
|
this.currentTab = 5
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -89,7 +91,8 @@ export default {
|
||||||
executeIssue(childValue) {
|
executeIssue(childValue) {
|
||||||
console.log('保存并发布项目', childValue)
|
console.log('保存并发布项目', childValue)
|
||||||
if (true) {
|
if (true) {
|
||||||
this.currentTab = 8
|
this.status = 'error'
|
||||||
|
this.currentTab = 5
|
||||||
this.result = false
|
this.result = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<a-result :status="projectSaveStatus" :title="title" :sub-title="description">
|
<a-result :status="projectSaveStatus" :title="projectSaveStatus" :sub-title="description">
|
||||||
<p>{{ this.description }}</p>
|
<template #extra>
|
||||||
|
<a-button type="primary" @click="toPrev">返回修改</a-button>
|
||||||
|
<a-button type="primary" @click="toProjectList">去列表页</a-button>
|
||||||
|
</template>
|
||||||
</a-result>
|
</a-result>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -12,17 +15,17 @@ export default {
|
||||||
// import引入的组件需要注入到对象中才能使用
|
// import引入的组件需要注入到对象中才能使用
|
||||||
components: {},
|
components: {},
|
||||||
props: {
|
props: {
|
||||||
projectSaveStatus: {
|
projectSaveStatus: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'success'
|
default: 'success',
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
// 这里存放数据
|
// 这里存放数据
|
||||||
return {
|
return {
|
||||||
// status: 'success',
|
// status: 'success',
|
||||||
title: '成华大道',
|
// title: '项目保存',
|
||||||
description: '走成华大道到二仙桥',
|
description: '请返回列表中查看',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 计算属性 类似于data概念
|
// 计算属性 类似于data概念
|
||||||
|
@ -30,7 +33,19 @@ export default {
|
||||||
// 监控data中的数据变化
|
// 监控data中的数据变化
|
||||||
watch: {},
|
watch: {},
|
||||||
// 方法集合
|
// 方法集合
|
||||||
methods: {},
|
methods: {
|
||||||
|
toPrev(){
|
||||||
|
// this.$emit('prevStep',this.selectedRowKeys)
|
||||||
|
console.log('结果页返回修改')
|
||||||
|
this.$emit('prevStep', { tab: 1 })
|
||||||
|
},
|
||||||
|
toProjectList() {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/project/list',
|
||||||
|
query: {projectPageNum: 1,},
|
||||||
|
})
|
||||||
|
},
|
||||||
|
},
|
||||||
// 生命周期 - 创建完成(可以访问当前this实例)
|
// 生命周期 - 创建完成(可以访问当前this实例)
|
||||||
created() {},
|
created() {},
|
||||||
// 生命周期 - 挂载完成(可以访问DOM元素)
|
// 生命周期 - 挂载完成(可以访问DOM元素)
|
||||||
|
|
Loading…
Reference in New Issue