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

update

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