diff --git a/src/utils/request.js b/src/utils/request.js index c3bea4e..5ba50c2 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -20,7 +20,7 @@ const toast = (msg, description) => { const request = axios.create({ // API 请求的默认前缀 baseURL: process.env.VUE_APP_API_BASE_URL, - timeout: 6000 // 请求超时时间 + timeout: 60000 // 请求超时时间 }) // 异常拦截处理器 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 4aea7ba..a4ffb11 100644 --- a/src/views/project/ProjectStepForm.vue +++ b/src/views/project/ProjectStepForm.vue @@ -5,17 +5,20 @@ - - - - + + + +
- - - - - + + + + + + + +
@@ -25,6 +28,8 @@ 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 +37,16 @@ export default { Step2, Step3, Step4, + step5, + result, }, + //生命周期 - 创建完成(可以访问当前this实例) + created() { + console.log('分步表单创建完成') + }, + destroyed() { + console.log('分步表单销毁了。。。。。') + }, //生命周期 - 销毁完成 data() { return { title: '', @@ -49,7 +63,11 @@ export default { visible: false, confirmLoading: false, type: '', - form: {}, + form: { + trainWay: '1', + }, + result: true, + status: '', } }, methods: { @@ -67,23 +85,44 @@ export default { this.formLoading = false }, - // handler + //保存项目 + executeSave(childValue) { + console.log('保存项目', childValue) + if (true) { + this.status = 'success' + this.currentTab = 5 + } + }, + + //保存并发布项目 + executeIssue(childValue) { + console.log('保存并发布项目', childValue) + if (true) { + this.status = 'error' + this.currentTab = 5 + this.result = false + } + }, + //下一步 nextStep(childValue) { console.log('进入下一步', childValue) if (this.currentTab < 5) { - this.form = childValue; + this.form = childValue this.currentTab += 1 } + console.log('ProjectStepForm表单数据', this.form) }, //上一步 prevStep(childValue) { - console.log('返回上一步',childValue) + console.log('返回上一步', childValue) if (this.currentTab > 0) { this.form = childValue this.currentTab -= 1 } + console.log('ProjectStepForm表单数据', this.form) }, + finish() { this.currentTab = 0 }, diff --git a/src/views/project/form/ProjectCourseList.vue b/src/views/project/form/ProjectCourseList.vue index e12d395..75f2db1 100644 --- a/src/views/project/form/ProjectCourseList.vue +++ b/src/views/project/form/ProjectCourseList.vue @@ -10,7 +10,7 @@ - {{ index + 1 }} + {{ index + 1 }}