From cceaa92f8f399675a437b159ba30e1c1f9b6e11a Mon Sep 17 00:00:00 2001 From: Yuanjianghong Date: Sat, 20 Nov 2021 14:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AEForm=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/project/ProjectList.vue | 2 +- src/views/project/ProjectStepForm.vue | 21 +++++++++------- src/views/project/form/Result.vue | 35 +++++++++++++++++++-------- 3 files changed, 38 insertions(+), 20 deletions(-) diff --git a/src/views/project/ProjectList.vue b/src/views/project/ProjectList.vue index ab956ad..842e280 100644 --- a/src/views/project/ProjectList.vue +++ b/src/views/project/ProjectList.vue @@ -74,7 +74,7 @@ export default { data() { return { // 查询参数 - queryParam: {}, + queryParam: this.$route.query.queryParam || {}, // 表头 columns: [ { title: '序号', key: 'id', dataIndex: 'id', width: 60, scopedSlots: { customRender: 'serial' } }, diff --git a/src/views/project/ProjectStepForm.vue b/src/views/project/ProjectStepForm.vue index da3a124..71e0cf5 100644 --- a/src/views/project/ProjectStepForm.vue +++ b/src/views/project/ProjectStepForm.vue @@ -11,13 +11,13 @@
- - - - - - - + + + + + + +
@@ -60,6 +60,7 @@ export default { type: '', form: {}, result: true, + status: '', } }, methods: { @@ -81,7 +82,8 @@ export default { executeSave(childValue) { console.log('保存项目', childValue) if (true) { - this.currentTab = 8 + this.status = 'success' + this.currentTab = 5 } }, @@ -89,7 +91,8 @@ export default { executeIssue(childValue) { console.log('保存并发布项目', childValue) if (true) { - this.currentTab = 8 + this.status = 'error' + this.currentTab = 5 this.result = false } }, diff --git a/src/views/project/form/Result.vue b/src/views/project/form/Result.vue index 5b0ca0b..69b8c93 100644 --- a/src/views/project/form/Result.vue +++ b/src/views/project/form/Result.vue @@ -1,6 +1,9 @@ @@ -12,17 +15,17 @@ export default { // import引入的组件需要注入到对象中才能使用 components: {}, props: { - projectSaveStatus: { - type: String, - default: 'success' - } + projectSaveStatus: { + type: String, + default: 'success', + }, }, data() { // 这里存放数据 return { - // status: 'success', - title: '成华大道', - description: '走成华大道到二仙桥', + // status: 'success', + // title: '项目保存', + description: '请返回列表中查看', } }, // 计算属性 类似于data概念 @@ -30,7 +33,19 @@ export default { // 监控data中的数据变化 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实例) created() {}, // 生命周期 - 挂载完成(可以访问DOM元素)