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 }}
@@ -60,11 +60,15 @@ export default {
STable,
ProjectCourseSelect,
},
- props: {},
+ props: {
+ projectForm: {
+ type: Object,
+ },
+ },
data() {
//这里存放数据
return {
- form: {},
+ form: this.projectForm,
labelCol: {},
wrapperCol: {},
vertical: 'vertical',
@@ -93,6 +97,7 @@ export default {
} else {
/** 新建的没有项目id,传当前的所选的课程id */
return getCourseListByCourseIds(Object.assign(parameter, this.queryParam)).then((res) => {
+
return res.data
})
}
@@ -105,14 +110,37 @@ export default {
watch: {},
//方法集合
methods: {
+ //下一步
toNext() {
+ this.form.lessonIds = []
+ let ids = this.queryParam.ids.split(',')
+ ids.forEach((id, index, arr) => {
+ console.log('id-----------------------',id)
+ this.form.lessonIds.push({ ids: id, sort: index })
+ })
+
console.log('ProjectCourseSelect-toNext', this.form)
- this.$emit('nextStep')
+ this.$emit('nextStep',this.form)
},
+ //上一步
toPrep() {
+ this.form.lessonIds = []
+ let ids = this.queryParam.ids.split(',')
+ ids.forEach((id, index, arr) => {
+ this.form.lessonIds.push({ ids: id, sort: index })
+ })
+
console.log('toPrep', this.form)
this.$emit('prevStep', this.form)
},
+ //初始化ids
+ initIds(){
+ let str = this.projectForm.lessonIds.join(',')
+ console.log('initIds',str)
+ if(str){
+ this.queryParam.ids = str
+ }
+ },
/**查询了列表数据 */
getProjectCourseList() {
// if (this.$route.query.projectId) {
@@ -138,7 +166,7 @@ export default {
//生命周期 - 创建完成(可以访问当前this实例)
created() {
- // this.getProjectCourseList()
+ this.initIds()
},
mounted() {}, //生命周期 - 挂载完成(可以访问DOM元素)
beforeCreate() {}, //生命周期 - 创建之前
diff --git a/src/views/project/form/ProjectForm.vue b/src/views/project/form/ProjectForm.vue
index 1af5ea5..e837528 100644
--- a/src/views/project/form/ProjectForm.vue
+++ b/src/views/project/form/ProjectForm.vue
@@ -126,10 +126,9 @@ import { classList } from '@/api/project/class'
export default {
props: {
- // form: {
- // type: Object,
- // default: () => ({}),
- // },
+ projectForm: {
+ type: Object,
+ },
},
data() {
return {
@@ -140,7 +139,7 @@ export default {
visible: false,
confirmLoading: false,
trainClass: [],
- form: {},
+ form: this.projectForm,
}
},
components: {
diff --git a/src/views/project/form/ProjectPersonForm.vue b/src/views/project/form/ProjectPersonForm.vue
index e67ef79..5a02790 100644
--- a/src/views/project/form/ProjectPersonForm.vue
+++ b/src/views/project/form/ProjectPersonForm.vue
@@ -1,50 +1,219 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - 全 部 -
+ 类 型 一
+ 类 型 二
+ 类 型 三
+
+
+ 查询
+ (queryParam = {})">重置
+
+
+
+
+ {{ index + 1 }}
+
+
-
- 人员选择
+
+ 点击列表项取消选择或【清空所有】
+
+
+ {{ item.name + '(' + item.userName + ')' }}
+
+
-
-
下一步
-
上一步
-
-
+
+
+
下一步
+
上一步
+
\ No newline at end of file
diff --git a/src/views/project/form/ProjectTestPaperFormationStrategy.vue b/src/views/project/form/ProjectTestPaperFormationStrategy.vue
new file mode 100644
index 0000000..8fb748c
--- /dev/null
+++ b/src/views/project/form/ProjectTestPaperFormationStrategy.vue
@@ -0,0 +1,68 @@
+
+
+
+ hahahahhahahahahhahahah
+
+
+
+ ppppppsdapppsdapppp
+
+
保 存
+
发 布
+
上一步
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/project/form/ProjectUnitSelect.vue b/src/views/project/form/ProjectUnitSelect.vue
index 772f29c..6f73085 100644
--- a/src/views/project/form/ProjectUnitSelect.vue
+++ b/src/views/project/form/ProjectUnitSelect.vue
@@ -107,13 +107,13 @@ function handleTreeData(data, targetKeys = []) {
export default {
props: {
- form:{
+ projectForm: {
type: Object,
- default: ()=>({}),
},
},
data() {
return {
+ form: this.projectForm,
targetKeys: [],
dataSource: transferDataSource,
@@ -127,7 +127,7 @@ export default {
},
}
},
- created(){
+ created() {
console.log('第2个表单创建了')
},
computed: {
@@ -137,8 +137,9 @@ export default {
},
methods: {
toNext() {
+ this.form.unitIds = this.targetKeys
console.log('toNext', this.form)
- this.$emit('nextStep',this.form)
+ this.$emit('nextStep', this.form)
// const {
// form: { validateFields },
// } = this
@@ -150,6 +151,7 @@ export default {
// })
},
toPrep() {
+ this.form.unitIds = this.targetKeys
console.log('toPrep', this.form)
this.$emit('prevStep', this.form)
},
diff --git a/src/views/project/form/Result.vue b/src/views/project/form/Result.vue
new file mode 100644
index 0000000..34b5420
--- /dev/null
+++ b/src/views/project/form/Result.vue
@@ -0,0 +1,74 @@
+
+
+
+ 返回修改
+ 去列表页
+
+
+
+
+
+
\ No newline at end of file