提交 2e258055 authored 作者: 王鹏飞's avatar 王鹏飞

update

上级 74277515
......@@ -2,23 +2,37 @@
<div id="app">
<vue-form
:menus="menus"
default-active="profile"
:default-active="currentActive"
@change="handleChange"
@success="handleSuccess"
></vue-form>
>
<!-- 最终检查 -->
<template v-if="currentActive === 'final'">12312321</template>
</vue-form>
</div>
</template>
<script>
// import registerForm from './kelley-form'
import axios from 'axios'
import kelleyForm from './kelley-form'
import sofiaForm from './sofia-form'
function url2Json(url) {
const str = url.split('?').pop()
return str.split('&').reduce((result, item) => {
const [key, value] = item.split('=')
result[key] = value
return result
}, {})
}
const query = url2Json(location.href)
export default {
name: 'app',
data() {
return {
currentActive: null,
menus: sofiaForm
// menus: registerForm
projectId: query.projectId,
currentActive: 'profile',
menus: query.projectId === '1000' ? sofiaForm : kelleyForm
}
},
methods: {
......@@ -28,7 +42,19 @@ export default {
},
handleSuccess(data) {
console.log('提交成功了', data)
this.getProgress()
},
// 获取进度
getProgress() {
axios
.get('/zws/v1/enrollment/submissions?project_id=1000')
.then(response => {
console.log(response)
})
}
},
beforeMount() {
this.getProgress()
}
}
</script>
export default {
id: 'declare',
title: '申请声明',
showProgress: true,
progress: 0,
title: '本人郑重声明',
get: {
action: '/zws/v1/enrollment/profiles?project_id=1001',
callback(data) {
......
export default {
id: 'file',
title: '资料上传',
title: '照片/附件',
showProgress: true,
progress: 0,
get: {
......
export default {
id: 'honor',
title: '荣誉奖励',
title: '荣誉奖励(可选)',
showProgress: true,
progress: 0,
required: false,
get: {
action: '/zws/v1/enrollment/honors?project_id=1001'
},
......
export default {
id: 'training',
title: '所受培训',
title: '所受培训(可选)',
showProgress: true,
progress: 0,
required: false,
get: {
action: '/zws/v1/enrollment/trainings?project_id=1001',
callback(data) {
......
export default {
id: 'declare',
title: '申请声明',
showProgress: true,
progress: 0,
get: {
action: '/zws/v1/enrollment/profiles?project_id=1000',
callback(data) {
......
export default {
id: 'honor',
title: '荣誉奖励',
title: '荣誉奖励(可选)',
showProgress: true,
progress: 0,
required: false,
get: {
action: '/zws/v1/enrollment/honors?project_id=1000'
},
......
......@@ -21,6 +21,10 @@ export default [
file,
training,
honor,
{
id: 'final',
title: '最终检查'
},
declare
]
}
......
export default {
id: 'training',
title: '所受培训',
title: '所受培训(可选)',
showProgress: true,
progress: 0,
required: false,
get: {
action: '/zws/v1/enrollment/trainings?project_id=1000',
callback(data) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论