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

chore: 修改为两个专业

上级 26947bf7
import httpRequest from '@/utils/httpRequest' import httpRequest from '@/utils/httpRequest'
import store from '@/store/index'
const projectId = process.env.projectId
/** /**
* 获取用户信息 * 获取用户信息
*/ */
...@@ -34,13 +32,13 @@ export function sendCode(data) { ...@@ -34,13 +32,13 @@ export function sendCode(data) {
* 获取报名信息 * 获取报名信息
*/ */
export function getApplication(params) { export function getApplication(params) {
return httpRequest.get(`/api/enrollment/v1.0/application-materials/${projectId}`, { params }) return httpRequest.get(`/api/enrollment/v1.0/application-materials/${store().state.projectId}`, { params })
} }
/** /**
* 获取报名信息 * 获取报名信息
*/ */
export function updateApplication(data) { export function updateApplication(data) {
return httpRequest.post(`/api/enrollment/v1.0/application-materials/${projectId}/put`, data, { return httpRequest.post(`/api/enrollment/v1.0/application-materials/${store().state.projectId}/put`, data, {
headers: { 'Content-Type': 'application/json' } headers: { 'Content-Type': 'application/json' }
}) })
} }
...@@ -49,7 +47,7 @@ export function updateApplication(data) { ...@@ -49,7 +47,7 @@ export function updateApplication(data) {
* 获取报名审核状态 * 获取报名审核状态
*/ */
export function getApplicationStatus() { export function getApplicationStatus() {
return httpRequest.get(`/api/enrollment/v1.0/application-materials/profile/${projectId}`) return httpRequest.get(`/api/enrollment/v1.0/application-materials/profile/${store().state.projectId}`)
} }
/** /**
...@@ -57,7 +55,7 @@ export function getApplicationStatus() { ...@@ -57,7 +55,7 @@ export function getApplicationStatus() {
*/ */
export function getOrder(params) { export function getOrder(params) {
return httpRequest.get( return httpRequest.get(
`/api/enrollment/v1.0/application-materials/payment-records/request/${projectId}/APPLICATION_FEE`, `/api/enrollment/v1.0/application-materials/payment-records/request/${store().state.projectId}/APPLICATION_FEE`,
{ params } { params }
) )
} }
...@@ -67,7 +65,9 @@ export function getOrder(params) { ...@@ -67,7 +65,9 @@ export function getOrder(params) {
*/ */
export function checkPay(id, params) { export function checkPay(id, params) {
return httpRequest.get( return httpRequest.get(
`/api/enrollment/v1.0/application-materials/payment-records/check-status/${projectId}/APPLICATION_FEE/${id}`, `/api/enrollment/v1.0/application-materials/payment-records/check-status/${
store().state.projectId
}/APPLICATION_FEE/${id}`,
{ params } { params }
) )
} }
...@@ -77,7 +77,9 @@ export function checkPay(id, params) { ...@@ -77,7 +77,9 @@ export function checkPay(id, params) {
*/ */
export function addLetter(userId, letterId, data) { export function addLetter(userId, letterId, data) {
return httpRequest.post( return httpRequest.post(
`/api/enrollment/v1.0/application-materials/reco-letters/submit/${projectId}/${userId}/${letterId}/put`, `/api/enrollment/v1.0/application-materials/reco-letters/submit/${
store().state.projectId
}/${userId}/${letterId}/put`,
data, data,
{ {
headers: { 'Content-Type': 'application/json' } headers: { 'Content-Type': 'application/json' }
...@@ -90,7 +92,9 @@ export function addLetter(userId, letterId, data) { ...@@ -90,7 +92,9 @@ export function addLetter(userId, letterId, data) {
*/ */
export function updateProvider(letterId, data) { export function updateProvider(letterId, data) {
return httpRequest.post( return httpRequest.post(
`/api/enrollment/v1.0/application-materials/reco-letters/change-provider/${projectId}/${letterId}/put`, `/api/enrollment/v1.0/application-materials/reco-letters/change-provider/${
store().state.projectId
}/${letterId}/put`,
data, data,
{ {
headers: { 'Content-Type': 'application/json' } headers: { 'Content-Type': 'application/json' }
...@@ -102,7 +106,9 @@ export function updateProvider(letterId, data) { ...@@ -102,7 +106,9 @@ export function updateProvider(letterId, data) {
*/ */
export function sendToProvider(letterId) { export function sendToProvider(letterId) {
return httpRequest.get( return httpRequest.get(
`/api/enrollment/v1.0/application-materials/reco-letters/send-invitation-to-provider/${projectId}/${letterId}` `/api/enrollment/v1.0/application-materials/reco-letters/send-invitation-to-provider/${
store().state.projectId
}/${letterId}`
) )
} }
...@@ -111,7 +117,7 @@ export function sendToProvider(letterId) { ...@@ -111,7 +117,7 @@ export function sendToProvider(letterId) {
*/ */
export function sendToProviders() { export function sendToProviders() {
return httpRequest.get( return httpRequest.get(
`/api/enrollment/v1.0/application-materials/reco-letters/send-invitation-to-providers/${projectId}` `/api/enrollment/v1.0/application-materials/reco-letters/send-invitation-to-providers/${store().state.projectId}`
) )
} }
/** /**
...@@ -126,7 +132,9 @@ export function logout() { ...@@ -126,7 +132,9 @@ export function logout() {
*/ */
export function changeFileStatus(userId, recordId, status) { export function changeFileStatus(userId, recordId, status) {
return httpRequest.get( return httpRequest.get(
`/api/enrollment/v1.0/application-materials/attachments/change-status/${projectId}/${userId}/${recordId}`, `/api/enrollment/v1.0/application-materials/attachments/change-status/${
store().state.projectId
}/${userId}/${recordId}`,
{ params: { status } } { params: { status } }
) )
} }
...@@ -151,3 +159,10 @@ export function createSign(data) { ...@@ -151,3 +159,10 @@ export function createSign(data) {
export function getSignDocument(params) { export function getSignDocument(params) {
return httpRequest.get('/api/usercenter/v1/sign/document', { params }) return httpRequest.get('/api/usercenter/v1/sign/document', { params })
} }
/**
* 获取报名信息
*/
export function getApplicationProfiles(params) {
return httpRequest.get(`/api/enrollment/v1.0/application-materials/profiles/1016,1022`, { params })
}
...@@ -24,13 +24,14 @@ ...@@ -24,13 +24,14 @@
</div> </div>
<div class="welcome" v-if="welcomeShow"> <div class="welcome" v-if="welcomeShow">
<div class="inner"> <div class="inner">
<div class="welcome-close" @click="handleClose"></div> <!-- <div class="welcome-close" @click="handleClose"></div> -->
<div class="welcome-main"> <div class="welcome-main">
<img src="https://webapp-pub.ezijing.com/project/application/images/welcome.png" width="350" /> <img src="https://webapp-pub.ezijing.com/project/application/images/welcome.png" width="350" />
<div class="welcome-content"> <div class="welcome-content">
<h1>欢迎您报考</h1> <h1>欢迎报名玛丽伍德大学1+1项目</h1>
<h2>美国玛丽伍德大学</h2> <h2>请选择您的项目</h2>
<div class="welcome-button" @click="handleStart">马上开始</div> <div class="welcome-button" @click="handleStart(1016)">工商管理硕士</div>
<div class="welcome-button" @click="handleStart(1022)">管理信息系统硕士</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -83,17 +84,17 @@ export default { ...@@ -83,17 +84,17 @@ export default {
}, },
// 获取报名信息 // 获取报名信息
getApplication() { getApplication() {
api.getApplication().then(response => { return api.getApplication().then(response => {
const { data, error, message } = response const { data, error, message } = response
if (error.toString() === '0') { if (error.toString() === '0') {
const { material, progress } = data const { material, progress } = data
this.material = material this.material = material
this.progress = progress this.progress = progress
const welcomeShowed = window.localStorage.getItem(this.user.id) === 'true' // const welcomeShowed = window.localStorage.getItem(this.user.id) === 'true'
material.attachments = material.attachments || [] // material.attachments = material.attachments || []
if (!material.attachments.length && !welcomeShowed) { // if (!material.attachments.length && !welcomeShowed) {
this.welcomeShow = true // this.welcomeShow = true
} // }
} else { } else {
this.$message.error(message) this.$message.error(message)
} }
...@@ -101,10 +102,11 @@ export default { ...@@ -101,10 +102,11 @@ export default {
}, },
// 获取报名审核状态 // 获取报名审核状态
getApplicationStatus() { getApplicationStatus() {
api.getApplicationStatus().then(response => { return api.getApplicationStatus().then(response => {
this.result = response.data this.result = response.data
}) })
}, },
// 报名申请 // 报名申请
toApplication() { toApplication() {
this.$router.push('/my/application?active=application_info') this.$router.push('/my/application?active=application_info')
...@@ -125,8 +127,11 @@ export default { ...@@ -125,8 +127,11 @@ export default {
} }
this.$router.push('/my/admission') this.$router.push('/my/admission')
}, },
handleStart() { handleStart(projectId) {
this.welcomeShow = false this.welcomeShow = false
this.$store.commit('setProjectId', projectId)
this.getApplication()
this.getApplicationStatus()
this.createDriver() this.createDriver()
}, },
handleClose() { handleClose() {
...@@ -177,9 +182,14 @@ export default { ...@@ -177,9 +182,14 @@ export default {
driver.start() driver.start()
} }
}, },
beforeMount() { async beforeMount() {
console.log(this.$store.state.projectId)
if (this.$store.state.projectId) {
this.getApplication() this.getApplication()
this.getApplicationStatus() this.getApplicationStatus()
} else {
this.welcomeShow = true
}
} }
} }
</script> </script>
...@@ -282,9 +292,16 @@ export default { ...@@ -282,9 +292,16 @@ export default {
color: #fff; color: #fff;
line-height: 26px; line-height: 26px;
} }
p {
margin-top: 40px;
font-size: 26px;
font-weight: normal;
color: #fff;
line-height: 26px;
}
} }
.welcome-button { .welcome-button {
margin-top: 40px; margin: 20px 10px 0;
display: inline-block; display: inline-block;
padding: 10px 32px; padding: 10px 32px;
font-size: 20px; font-size: 20px;
......
import store from '@/store/index'
export default { export default {
id: 'admission_byzs', id: 'admission_byzs',
title: '毕业证书注册备案表', title: '毕业证书注册备案表',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${store().state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -33,8 +35,12 @@ export default { ...@@ -33,8 +35,12 @@ export default {
required: true, required: true,
model: 'DIPLOMA_FILING_TABLE', model: 'DIPLOMA_FILING_TABLE',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, store().state.projectId
}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
store().state.projectId
}/delete`,
data: { file_type: 'DIPLOMA_FILING_TABLE' } data: { file_type: 'DIPLOMA_FILING_TABLE' }
}, },
prepend: ` prepend: `
......
...@@ -3,7 +3,7 @@ export default function(_this) { ...@@ -3,7 +3,7 @@ export default function(_this) {
id: 'admission_cjd', id: 'admission_cjd',
title: '成绩单(中+英)', title: '成绩单(中+英)',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -46,8 +46,8 @@ export default function(_this) { ...@@ -46,8 +46,8 @@ export default function(_this) {
label: '中文成绩单', label: '中文成绩单',
model: 'REPORT_CARD_CN', model: 'REPORT_CARD_CN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'REPORT_CARD_CN' } data: { file_type: 'REPORT_CARD_CN' }
} }
}, },
...@@ -56,8 +56,8 @@ export default function(_this) { ...@@ -56,8 +56,8 @@ export default function(_this) {
label: '英文成绩单', label: '英文成绩单',
model: 'REPORT_CARD_EN', model: 'REPORT_CARD_EN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'REPORT_CARD_EN' } data: { file_type: 'REPORT_CARD_EN' }
} }
} }
......
...@@ -7,7 +7,7 @@ export default function(_this) { ...@@ -7,7 +7,7 @@ export default function(_this) {
id: 'admission_tjx', id: 'admission_tjx',
title: '推荐信', title: '推荐信',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { submission_stage: submissionStage = 'FILLING' } = data.data.material const { submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -27,7 +27,7 @@ export default function(_this) { ...@@ -27,7 +27,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
return { reco_letters: data } return { reco_letters: data }
}, },
......
...@@ -3,7 +3,7 @@ export default function(_this) { ...@@ -3,7 +3,7 @@ export default function(_this) {
id: 'admission_xfjn', id: 'admission_xfjn',
title: '缴费凭证', title: '缴费凭证',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -41,8 +41,8 @@ export default function(_this) { ...@@ -41,8 +41,8 @@ export default function(_this) {
model: 'PAYMENT_VOUCHER', model: 'PAYMENT_VOUCHER',
label: '上传缴费凭证', label: '上传缴费凭证',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'PAYMENT_VOUCHER' } data: { file_type: 'PAYMENT_VOUCHER' }
}, },
append: `申请者可将转账/支付缴费凭证截图或拍照后提交。<br> append: `申请者可将转账/支付缴费凭证截图或拍照后提交。<br>
......
...@@ -3,7 +3,7 @@ export default function(_this) { ...@@ -3,7 +3,7 @@ export default function(_this) {
id: 'admission_xy', id: 'admission_xy',
title: '入学协议', title: '入学协议',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -34,8 +34,8 @@ export default function(_this) { ...@@ -34,8 +34,8 @@ export default function(_this) {
required: true, required: true,
model: 'ADMISSION_AGREEMENT', model: 'ADMISSION_AGREEMENT',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'ADMISSION_AGREEMENT' } data: { file_type: 'ADMISSION_AGREEMENT' }
}, },
prepend: ` prepend: `
......
import store from '@/store/index'
export default { export default {
id: 'admission_ywjl', id: 'admission_ywjl',
title: '英文简历', title: '英文简历',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${store().state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -33,8 +35,12 @@ export default { ...@@ -33,8 +35,12 @@ export default {
required: true, required: true,
model: 'RESUME_EN', model: 'RESUME_EN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, store().state.projectId
}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
store().state.projectId
}/delete`,
data: { file_type: 'RESUME_EN' } data: { file_type: 'RESUME_EN' }
}, },
append: ` append: `
......
...@@ -3,7 +3,7 @@ export default function(_this) { ...@@ -3,7 +3,7 @@ export default function(_this) {
id: 'admission_yynl', id: 'admission_yynl',
title: '语言能力证明', title: '语言能力证明',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -42,8 +42,8 @@ export default function(_this) { ...@@ -42,8 +42,8 @@ export default function(_this) {
label: '国内语言成绩', label: '国内语言成绩',
model: 'DOMESTIC_LANGUAGE_SCORE', model: 'DOMESTIC_LANGUAGE_SCORE',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'DOMESTIC_LANGUAGE_SCORE' } data: { file_type: 'DOMESTIC_LANGUAGE_SCORE' }
}, },
append: `<p>有大学英语四级或六级成绩,请上传凭证</p>` append: `<p>有大学英语四级或六级成绩,请上传凭证</p>`
...@@ -53,8 +53,8 @@ export default function(_this) { ...@@ -53,8 +53,8 @@ export default function(_this) {
label: '国际语言成绩', label: '国际语言成绩',
model: 'INTERNATIONAL_LANGUAGE_SCORE', model: 'INTERNATIONAL_LANGUAGE_SCORE',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'INTERNATIONAL_LANGUAGE_SCORE' } data: { file_type: 'INTERNATIONAL_LANGUAGE_SCORE' }
}, },
append: `<p>有托福,雅思,GMAT,GRE或其他考试成绩,请上传凭证</p>` append: `<p>有托福,雅思,GMAT,GRE或其他考试成绩,请上传凭证</p>`
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
</div> </div>
<h1>欢迎您</h1> <h1>欢迎您</h1>
<p class="t1"> <p class="t1">
申请玛丽伍德大学工商管理硕士(MBA1+1)项目,本项目的申请费为<span>700</span>元,请扫描二维码以完成报名。 申请玛丽伍德大学{{ projectName }}项目,本项目的申请费为<span>700</span>元,请扫描二维码以完成报名。
</p> </p>
</div> </div>
<div class="qrcode-error" v-if="qrcodeError"> <div class="qrcode-error" v-if="qrcodeError">
...@@ -35,6 +35,9 @@ export default { ...@@ -35,6 +35,9 @@ export default {
// 二维码地址 // 二维码地址
qrcodeValue() { qrcodeValue() {
return this.order.payment_url return this.order.payment_url
},
projectName() {
return this.$store.state.projectId == 1022 ? '管理信息系统硕士' : '工商管理硕士(MBA1+1)'
} }
}, },
methods: { methods: {
......
...@@ -3,6 +3,12 @@ ...@@ -3,6 +3,12 @@
*/ */
export default function(_this) { export default function(_this) {
const prepend =
_this.$store.state.projectId == 1022
? `<p>1、本人知晓此申请表及所附文件将作为申请玛丽伍德大学管理信息系统硕士和背景评估的参考依据,一旦成功录取,有关资料将作为学生信息存档。</p>
<p>2、本人声明所填资料正确无误,知晓任何不真实的信息或不诚信的行为,均会影响申请结果,已取得的成绩和资格会被取消。我理解并同意所有报名材料归紫荆教育所有,无论考生录取与否均不退回。我授权紫荆教育使用报名表中的信息查询本人学习和工作记录。</p>`
: `<p>1、本人知晓此申请表及所附文件将作为申请玛丽伍德大学MBA面试和背景评估的参考依据,一旦成功录取,有关资料将作为学生信息存档。</p>
<p>2、本人声明所填资料正确无误,知晓任何不真实的信息或不诚信的行为,均会影响申请结果,已取得的成绩和资格会被取消。我理解并同意所有报名材料归紫荆教育所有,无论考生录取与否均不退回。我授权紫荆教育使用报名表中的信息查询本人学习和工作记录。</p>`
return { return {
id: 'application_declare', id: 'application_declare',
title: '申请声明', title: '申请声明',
...@@ -10,7 +16,7 @@ export default function(_this) { ...@@ -10,7 +16,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { submission_stage: submissionStage = 'FILLING' } = data.data.material const { submission_stage: submissionStage = 'FILLING' } = data.data.material
const isSubmited = submissionStage !== 'FILLING' const isSubmited = submissionStage !== 'FILLING'
...@@ -22,7 +28,7 @@ export default function(_this) { ...@@ -22,7 +28,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${_this.$store.state.projectId}`,
callback() { callback() {
_this.getApplication() _this.getApplication()
this.form.options.disabled = true this.form.options.disabled = true
...@@ -44,8 +50,7 @@ export default function(_this) { ...@@ -44,8 +50,7 @@ export default function(_this) {
values: [{ label: '同意', value: 1 }], values: [{ label: '同意', value: 1 }],
model: 'isAgree', model: 'isAgree',
rules: [{ required: true, message: '请阅读协议', trigger: 'change' }], rules: [{ required: true, message: '请阅读协议', trigger: 'change' }],
prepend: `<p>1、本人知晓此申请表及所附文件将作为申请玛丽伍德大学MBA面试和背景评估的参考依据,一旦成功录取,有关资料将作为学生信息存档。</p> prepend: prepend
<p>2、本人声明所填资料正确无误,知晓任何不真实的信息或不诚信的行为,均会影响申请结果,已取得的成绩和资格会被取消。我理解并同意所有报名材料归紫荆教育所有,无论考生录取与否均不退回。我授权紫荆教育使用报名表中的信息查询本人学习和工作记录。</p>`
} }
] ]
} }
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
*/ */
export default function(_this) { export default function(_this) {
const question1 =
_this.$store.state.projectId == 1022
? '您为什么要申请玛丽伍德大学管理信息系统硕士项目?'
: '您为什么要申请玛丽伍德大学工商管理硕士(MBA1+1)项目?'
return { return {
id: 'application_info_answer', id: 'application_info_answer',
title: '学习目的', title: '学习目的',
...@@ -11,7 +15,7 @@ export default function(_this) { ...@@ -11,7 +15,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { answers = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { answers = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
...@@ -19,7 +23,7 @@ export default function(_this) { ...@@ -19,7 +23,7 @@ export default function(_this) {
const [first = {}, second = {}] = answers const [first = {}, second = {}] = answers
return { return {
qid1: first.qid || '1', qid1: first.qid || '1',
question1: '您为什么要申请玛丽伍德大学工商管理硕士(MBA1+1)项目?', question1: question1,
answer1: first.answer, answer1: first.answer,
qid2: second.qid || '2', qid2: second.qid || '2',
question2: '您的短期和长期职业发展目标是什么?您打算如何达成此愿景?', question2: '您的短期和长期职业发展目标是什么?您打算如何达成此愿景?',
...@@ -28,7 +32,7 @@ export default function(_this) { ...@@ -28,7 +32,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
return { return {
answers: [ answers: [
...@@ -45,7 +49,7 @@ export default function(_this) { ...@@ -45,7 +49,7 @@ export default function(_this) {
items: [ items: [
{ {
type: 'v-input', type: 'v-input',
label: '您为什么要申请玛丽伍德大学工商管理硕士(MBA1+1)项目?(60字以上,1000字以内)', label: `${question1}(60字以上,1000字以内)`,
model: 'answer1', model: 'answer1',
attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' }, attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' },
rules: [ rules: [
......
...@@ -11,7 +11,7 @@ export default function(_this) { ...@@ -11,7 +11,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { careers: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { careers: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
...@@ -19,7 +19,7 @@ export default function(_this) { ...@@ -19,7 +19,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const careers = data.map(item => { const careers = data.map(item => {
return [ return [
......
...@@ -11,7 +11,7 @@ export default function(_this) { ...@@ -11,7 +11,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { educations: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { educations: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
...@@ -19,7 +19,7 @@ export default function(_this) { ...@@ -19,7 +19,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const educations = data.map(item => { const educations = data.map(item => {
return ['start_date', 'end_date', 'school_name_cn', 'major_cn', 'degree'].reduce((result, key) => { return ['start_date', 'end_date', 'school_name_cn', 'major_cn', 'degree'].reduce((result, key) => {
......
...@@ -11,7 +11,7 @@ export default function(_this) { ...@@ -11,7 +11,7 @@ export default function(_this) {
return this.tabActive === 'application_info_first' return this.tabActive === 'application_info_first'
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { const {
basic_info: basicInfo = {}, basic_info: basicInfo = {},
...@@ -37,7 +37,7 @@ export default function(_this) { ...@@ -37,7 +37,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const basicInfo = ['phone_number', 'email', 'id_type'].reduce((result, key) => { const basicInfo = ['phone_number', 'email', 'id_type'].reduce((result, key) => {
result[key] = data[key] result[key] = data[key]
...@@ -79,8 +79,8 @@ export default function(_this) { ...@@ -79,8 +79,8 @@ export default function(_this) {
label: '身份证人像面', label: '身份证人像面',
model: 'ID_CARD_BACK', model: 'ID_CARD_BACK',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'ID_CARD_BACK' }, data: { file_type: 'ID_CARD_BACK' },
limit: 1, limit: 1,
accept: 'image/*', accept: 'image/*',
...@@ -97,8 +97,8 @@ export default function(_this) { ...@@ -97,8 +97,8 @@ export default function(_this) {
label: '身份证国徽面', label: '身份证国徽面',
model: 'ID_CARD_FRONT', model: 'ID_CARD_FRONT',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'ID_CARD_FRONT' }, data: { file_type: 'ID_CARD_FRONT' },
limit: 1, limit: 1,
accept: 'image/*', accept: 'image/*',
...@@ -115,8 +115,8 @@ export default function(_this) { ...@@ -115,8 +115,8 @@ export default function(_this) {
label: '港澳台身份证', label: '港澳台身份证',
model: 'HK_ID_CARD', model: 'HK_ID_CARD',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'HK_ID_CARD' }, data: { file_type: 'HK_ID_CARD' },
limit: 1, limit: 1,
accept: 'image/*' accept: 'image/*'
...@@ -132,8 +132,8 @@ export default function(_this) { ...@@ -132,8 +132,8 @@ export default function(_this) {
label: '中国护照', label: '中国护照',
model: 'PASSPORT', model: 'PASSPORT',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'PASSPORT' }, data: { file_type: 'PASSPORT' },
limit: 1, limit: 1,
accept: 'image/*' accept: 'image/*'
...@@ -149,8 +149,8 @@ export default function(_this) { ...@@ -149,8 +149,8 @@ export default function(_this) {
label: '其他证件', label: '其他证件',
model: 'OTHER_ID_CARD_PHOTO', model: 'OTHER_ID_CARD_PHOTO',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'OTHER_ID_CARD_PHOTO' }, data: { file_type: 'OTHER_ID_CARD_PHOTO' },
limit: 1, limit: 1,
accept: 'image/*' accept: 'image/*'
......
...@@ -10,7 +10,7 @@ export default function(_this) { ...@@ -10,7 +10,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { honors: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { honors: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
...@@ -18,7 +18,7 @@ export default function(_this) { ...@@ -18,7 +18,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const honors = data.map(item => { const honors = data.map(item => {
return ['time', 'title', 'institution_cn'].reduce((result, key) => { return ['time', 'title', 'institution_cn'].reduce((result, key) => {
......
...@@ -13,7 +13,7 @@ export default function(_this) { ...@@ -13,7 +13,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { const {
basic_info: basicInfo = {}, basic_info: basicInfo = {},
...@@ -39,7 +39,7 @@ export default function(_this) { ...@@ -39,7 +39,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
// let [province, city] = data.city.split('-') // let [province, city] = data.city.split('-')
// data.address_province = province // data.address_province = province
...@@ -101,8 +101,8 @@ export default function(_this) { ...@@ -101,8 +101,8 @@ export default function(_this) {
label: '身份证人像面', label: '身份证人像面',
model: 'ID_CARD_BACK', model: 'ID_CARD_BACK',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'ID_CARD_BACK' }, data: { file_type: 'ID_CARD_BACK' },
limit: 1, limit: 1,
accept: 'image/*', accept: 'image/*',
...@@ -119,8 +119,8 @@ export default function(_this) { ...@@ -119,8 +119,8 @@ export default function(_this) {
label: '身份证国徽面', label: '身份证国徽面',
model: 'ID_CARD_FRONT', model: 'ID_CARD_FRONT',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'ID_CARD_FRONT' }, data: { file_type: 'ID_CARD_FRONT' },
limit: 1, limit: 1,
accept: 'image/*', accept: 'image/*',
...@@ -137,8 +137,8 @@ export default function(_this) { ...@@ -137,8 +137,8 @@ export default function(_this) {
label: '港澳台身份证', label: '港澳台身份证',
model: 'HK_ID_CARD', model: 'HK_ID_CARD',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'HK_ID_CARD' }, data: { file_type: 'HK_ID_CARD' },
limit: 1, limit: 1,
accept: 'image/*' accept: 'image/*'
...@@ -154,8 +154,8 @@ export default function(_this) { ...@@ -154,8 +154,8 @@ export default function(_this) {
label: '中国护照', label: '中国护照',
model: 'PASSPORT', model: 'PASSPORT',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'PASSPORT' }, data: { file_type: 'PASSPORT' },
limit: 1, limit: 1,
accept: 'image/*' accept: 'image/*'
...@@ -171,8 +171,8 @@ export default function(_this) { ...@@ -171,8 +171,8 @@ export default function(_this) {
label: '其他证件', label: '其他证件',
model: 'OTHER_ID_CARD_PHOTO', model: 'OTHER_ID_CARD_PHOTO',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'OTHER_ID_CARD_PHOTO' }, data: { file_type: 'OTHER_ID_CARD_PHOTO' },
limit: 1, limit: 1,
accept: 'image/*' accept: 'image/*'
......
...@@ -10,7 +10,7 @@ export default function(_this) { ...@@ -10,7 +10,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { trainings: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { trainings: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
...@@ -18,7 +18,7 @@ export default function(_this) { ...@@ -18,7 +18,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
const trainings = data.map(item => { const trainings = data.map(item => {
return ['start_date', 'end_date', 'institution_cn', 'course_cn'].reduce((result, key) => { return ['start_date', 'end_date', 'institution_cn', 'course_cn'].reduce((result, key) => {
......
...@@ -10,7 +10,7 @@ export default function(_this) { ...@@ -10,7 +10,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { submission_stage: submissionStage = 'FILLING' } = data.data.material const { submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -29,7 +29,7 @@ export default function(_this) { ...@@ -29,7 +29,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}/put`,
beforeRequest(data) { beforeRequest(data) {
return { reco_letters: data } return { reco_letters: data }
} }
......
...@@ -6,7 +6,7 @@ export default function(_this) { ...@@ -6,7 +6,7 @@ export default function(_this) {
return _this.visible return _this.visible
}, },
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING' this.form.options.disabled = submissionStage !== 'FILLING'
...@@ -28,8 +28,8 @@ export default function(_this) { ...@@ -28,8 +28,8 @@ export default function(_this) {
required: true, required: true,
model: 'NO_CRIMINAL_CERT', model: 'NO_CRIMINAL_CERT',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'NO_CRIMINAL_CERT' }, data: { file_type: 'NO_CRIMINAL_CERT' },
limit: 1 limit: 1
}, },
......
...@@ -4,7 +4,7 @@ export default function(_this) { ...@@ -4,7 +4,7 @@ export default function(_this) {
id: 'interview_byzs', id: 'interview_byzs',
title: '毕业证书或在读证明', title: '毕业证书或在读证明',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -42,8 +42,8 @@ export default function(_this) { ...@@ -42,8 +42,8 @@ export default function(_this) {
type: 'v-upload', type: 'v-upload',
model: 'DIPLOMA_CN', model: 'DIPLOMA_CN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'DIPLOMA_CN' } data: { file_type: 'DIPLOMA_CN' }
}, },
append: append:
...@@ -54,8 +54,8 @@ export default function(_this) { ...@@ -54,8 +54,8 @@ export default function(_this) {
type: 'v-upload', type: 'v-upload',
model: 'PROOF_READING', model: 'PROOF_READING',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'PROOF_READING' } data: { file_type: 'PROOF_READING' }
}, },
append: append:
......
...@@ -3,7 +3,7 @@ export default function(_this) { ...@@ -3,7 +3,7 @@ export default function(_this) {
id: 'interview_cjd', id: 'interview_cjd',
title: '成绩单(中+英)', title: '成绩单(中+英)',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -45,8 +45,8 @@ export default function(_this) { ...@@ -45,8 +45,8 @@ export default function(_this) {
label: '中文成绩单', label: '中文成绩单',
model: 'REPORT_CARD_CN', model: 'REPORT_CARD_CN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'REPORT_CARD_CN' } data: { file_type: 'REPORT_CARD_CN' }
} }
}, },
...@@ -55,8 +55,8 @@ export default function(_this) { ...@@ -55,8 +55,8 @@ export default function(_this) {
label: '英文成绩单', label: '英文成绩单',
model: 'REPORT_CARD_EN', model: 'REPORT_CARD_EN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'REPORT_CARD_EN' } data: { file_type: 'REPORT_CARD_EN' }
} }
} }
......
...@@ -4,7 +4,7 @@ export default function(_this) { ...@@ -4,7 +4,7 @@ export default function(_this) {
id: 'interview_tjx', id: 'interview_tjx',
title: '推荐信', title: '推荐信',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -34,7 +34,7 @@ export default function(_this) { ...@@ -34,7 +34,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${_this.$store.state.projectId}`,
beforeRequest(data) { beforeRequest(data) {
return { submission_stage: 'INTERVIEW_APPLICATION' } return { submission_stage: 'INTERVIEW_APPLICATION' }
}, },
...@@ -57,8 +57,8 @@ export default function(_this) { ...@@ -57,8 +57,8 @@ export default function(_this) {
type: 'v-upload', type: 'v-upload',
model: 'RECOMMENDATION_LETTER', model: 'RECOMMENDATION_LETTER',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'RECOMMENDATION_LETTER' }, data: { file_type: 'RECOMMENDATION_LETTER' },
accept: 'image/*' accept: 'image/*'
}, },
......
import store from '@/store/index'
export default { export default {
id: 'interview_xwzs', id: 'interview_xwzs',
title: '学位证书', title: '学位证书',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${store().state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -33,8 +34,12 @@ export default { ...@@ -33,8 +34,12 @@ export default {
required: true, required: true,
model: 'DEGREE_CERT_CN', model: 'DEGREE_CERT_CN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, store().state.projectId
}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
store().state.projectId
}/delete`,
data: { file_type: 'DEGREE_CERT_CN' } data: { file_type: 'DEGREE_CERT_CN' }
}, },
append: append:
......
import store from '@/store/index'
export default { export default {
id: 'interview_xwzsywzm', id: 'interview_xwzsywzm',
title: '学位证书英文证明', title: '学位证书英文证明',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${store().state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -33,8 +34,12 @@ export default { ...@@ -33,8 +34,12 @@ export default {
required: true, required: true,
model: 'DEGREE_CERT_EN', model: 'DEGREE_CERT_EN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, store().state.projectId
}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${
store().state.projectId
}/delete`,
data: { file_type: 'DEGREE_CERT_EN' } data: { file_type: 'DEGREE_CERT_EN' }
}, },
append: '请将学校出具的学位证书英文证明原件扫描或者拍照后提交。' append: '请将学校出具的学位证书英文证明原件扫描或者拍照后提交。'
......
...@@ -4,7 +4,7 @@ export default function(_this) { ...@@ -4,7 +4,7 @@ export default function(_this) {
id: 'interview_ywjl', id: 'interview_ywjl',
title: '英文简历', title: '英文简历',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -25,7 +25,7 @@ export default function(_this) { ...@@ -25,7 +25,7 @@ export default function(_this) {
} }
}, },
// update: { // update: {
// action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${process.env.projectId}`, // action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${_this.$store.state.projectId}`,
// beforeRequest(data) { // beforeRequest(data) {
// return { submission_stage: 'INTERVIEW_APPLICATION' } // return { submission_stage: 'INTERVIEW_APPLICATION' }
// }, // },
...@@ -50,8 +50,8 @@ export default function(_this) { ...@@ -50,8 +50,8 @@ export default function(_this) {
type: 'v-upload', type: 'v-upload',
model: 'RESUME_EN', model: 'RESUME_EN',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'RESUME_EN' } data: { file_type: 'RESUME_EN' }
}, },
append: ` append: `
......
...@@ -3,7 +3,7 @@ export default function(_this) { ...@@ -3,7 +3,7 @@ export default function(_this) {
id: 'interview_zp', id: 'interview_zp',
title: '2寸照片', title: '2寸照片',
get: { get: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/${_this.$store.state.projectId}`,
callback(data) { callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [ const stageList = [
...@@ -24,7 +24,7 @@ export default function(_this) { ...@@ -24,7 +24,7 @@ export default function(_this) {
} }
}, },
update: { update: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${process.env.projectId}`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/submit/${_this.$store.state.projectId}`,
beforeRequest(data) { beforeRequest(data) {
return { submission_stage: 'INTERVIEW_APPLICATION' } return { submission_stage: 'INTERVIEW_APPLICATION' }
}, },
...@@ -47,8 +47,8 @@ export default function(_this) { ...@@ -47,8 +47,8 @@ export default function(_this) {
type: 'v-upload', type: 'v-upload',
model: 'PERSONAL_PHOTO_FOR_ID', model: 'PERSONAL_PHOTO_FOR_ID',
attrs: { attrs: {
action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/put`, action: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/put`,
deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${process.env.projectId}/delete`, deleteAction: `${process.env.baseURL}/api/enrollment/v1.0/application-materials/attachments/${_this.$store.state.projectId}/delete`,
data: { file_type: 'PERSONAL_PHOTO_FOR_ID' }, data: { file_type: 'PERSONAL_PHOTO_FOR_ID' },
limit: 1 limit: 1
}, },
......
export default ({ app, store }) => { export default ({ app, store }) => {
let isSetProjectId = false
app.router.beforeEach(async (to, from, next) => { app.router.beforeEach(async (to, from, next) => {
const isLogin = store.state.user.id || (await store.dispatch('checkLogin')) const isLogin = store.state.user.id || (await store.dispatch('checkLogin'))
...@@ -6,6 +7,17 @@ export default ({ app, store }) => { ...@@ -6,6 +7,17 @@ export default ({ app, store }) => {
location.href = `${process.env.loginURL}/login/index?redirect_uri=${encodeURIComponent(location.href)}` location.href = `${process.env.loginURL}/login/index?redirect_uri=${encodeURIComponent(location.href)}`
return return
} }
if (location.hostname.includes('marywood-mis')) {
store.commit('setProjectId', 1022)
}
if (to.path.includes('/my') && !isSetProjectId) {
await store.dispatch('setProjectId')
isSetProjectId = true
if (to.path !== '/my/account' && !store.state.projectId) {
next('/my/account')
return
}
}
next() next()
}) })
} }
import { getUser, logout } from '@/api/my' import Vuex from 'vuex'
import { getUser, logout, getApplicationProfiles } from '@/api/my'
export const state = () => ({ export const state = () => ({
user: {}, user: {},
isMobile: false, isMobile: false,
searchVisible: false, searchVisible: false,
menuVisible: false menuVisible: false,
projectId: process.env.projectId
}) })
export const mutations = { export const mutations = {
...@@ -21,6 +23,9 @@ export const mutations = { ...@@ -21,6 +23,9 @@ export const mutations = {
}, },
toggleMenu(state, visible) { toggleMenu(state, visible) {
state.menuVisible = visible state.menuVisible = visible
},
setProjectId(state, projectId) {
state.projectId = projectId
} }
} }
...@@ -49,5 +54,28 @@ export const actions = { ...@@ -49,5 +54,28 @@ export const actions = {
return false return false
}) })
return isLogin return isLogin
},
// 设置项目ID
async setProjectId({ commit }) {
return getApplicationProfiles().then(response => {
const [first = {}] = response.data || []
commit('setProjectId', first.project_id)
return first.project_id
})
} }
} }
let store
const initStore = () => {
return (
store ||
(store = new Vuex.Store({
state,
mutations,
actions
}))
)
}
export default initStore
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论