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

update

上级 77304bb4
import httpRequest from '@/utils/httpRequest'
// 获取新闻列表
export function getNewsList(params) {
return httpRequest.get(`/zws/v1/cms/news`, { params })
}
// 获取新闻详情
export function getNewsDetails(params) {
return httpRequest.get(`/zws/v1/cms/new`, { params })
}
/**
* 发送验证码
*/
export function sendCode(data) {
return httpRequest.post('/api/usercenter/user/send-code', data)
}
/**
* 检验验证码
*/
export function checkCode(params) {
return httpRequest.get('/api/usercenter/user/check-code', { params })
}
/**
* 提交留咨信息
*/
export function postNes(data) {
return httpRequest.post('/api/enrollment/v1.0/applications', data)
}
import httpRequest from '@/utils/httpRequest'
const projectId = process.env.projectId
/**
* 获取用户信息
*/
export function getUser() {
return httpRequest.get('/api/passport/account/get-user-info')
}
/**
* 修改用户信息
*/
export function updateUser(data) {
return httpRequest.post('/api/usercenter/user/update-user', data)
}
/**
* 修改密码
*/
export function updatePassword(data) {
return httpRequest.post('/api/usercenter/user/update-pwd', data)
}
/**
* 发送验证码
*/
export function sendCode(data) {
return httpRequest.post('/api/usercenter/user/send-code', data)
}
/**
* 检验验证码
*/
export function checkCode(params) {
return httpRequest.get('/api/usercenter/user/check-code' + params)
}
/**
* 获取报名信息
*/
export function getApplication(params) {
return httpRequest.get(`/api/enrollment/v1.0/application-materials/${projectId}`, params)
}
/**
* 获取报名信息
*/
export function updateApplication(data) {
return httpRequest.post(`/api/enrollment/v1.0/application-materials/${projectId}/put`, data, {
headers: { 'Content-Type': 'application/json' }
})
}
/**
* 获取报名审核状态
*/
export function getApplicationStatus() {
return httpRequest.get(`/api/enrollment/v1.0/application-materials/profile/${projectId}`)
}
/**
* 获取支付二维码
*/
export function getOrder(params) {
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/payment-records/request/${projectId}/APPLICATION_FEE`,
params
)
}
/**
* 检查支付状态
*/
export function checkPay(id, params) {
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/payment-records/check-status/${projectId}/APPLICATION_FEE/${id}`,
params
)
}
/**
* 写推荐信
*/
export function addLetter(userId, letterId, data) {
return httpRequest.post(
`/api/enrollment/v1.0/application-materials/reco-letters/submit/${projectId}/${userId}/${letterId}/put`,
data,
{
headers: { 'Content-Type': 'application/json' }
}
)
}
/**
* 更换推荐人
*/
export function updateProvider(letterId, data) {
return httpRequest.post(
`/api/enrollment/v1.0/application-materials/reco-letters/change-provider/${projectId}/${letterId}/put`,
data,
{
headers: { 'Content-Type': 'application/json' }
}
)
}
/**
* 再次邀请
*/
export function sendToProvider(letterId) {
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/reco-letters/send-invitation-to-provider/${projectId}/${letterId}`
)
}
/**
* 退出登录
*/
export function logout() {
return httpRequest.get('/api/passport/rest/logout')
}
/**
* 更改附件状态
*/
export function changeFileStatus(userId, recordId, status) {
return httpRequest.get(
`/api/enrollment/v1.0/application-materials/attachments/change-status/${projectId}/${userId}/${recordId}`,
{ status }
)
}
/**
* 修改用户信息
*/
export function getOpenId(data) {
return httpRequest.post('/api/usercenter/v1/wechat/get-openid', data)
}
/**
* 签名
*/
export function createSign(data) {
return httpRequest.post('/api/usercenter/v1/sign/sign', data)
}
/**
* 获取签名文档
*/
export function getSignDocument(data) {
return httpRequest.get('/api/usercenter/v1/sign/document', data)
}
/**
* 提交留咨信息
*/
export function postNes(obj) {
return httpRequest.post('/new-app/v1.0/applications', obj, {
headers: { 'Content-Type': 'application/x-www-form-urlencoded' }
})
}
差异被折叠。
<template>
<el-button v-bind="$attrs" :disabled="currentDisabled" @click="start">{{ curretnValue }}</el-button>
</template>
<script>
export default {
name: 'Countdown',
props: {
step: { type: Number, default: 1000 },
disabled: { type: Boolean, default: false },
seconds: { type: Number, default: 60 },
defaultValue: { type: String, default: '获取验证码' }
},
data() {
return {
currentDisabled: false,
currentSeconds: 0,
timer: null
}
},
watch: {
disabled: {
immediate: true,
handler(value) {
this.currentDisabled = value
}
}
},
computed: {
curretnValue() {
const longTime = this.seconds - this.currentSeconds
return longTime < this.seconds ? `${longTime}秒后重发` : this.defaultValue
}
},
methods: {
genTimer() {
this.clearTimer()
this.timer = setInterval(() => {
this.currentSeconds++
if (this.currentSeconds === this.seconds) {
this.stop()
}
}, this.step)
},
clearTimer() {
this.timer && clearInterval(this.timer)
},
start() {
this.currentDisabled = true
this.genTimer()
this.$emit('start')
},
stop() {
this.clearTimer()
this.currentSeconds = 0
this.currentDisabled = false
this.$emit('stop')
}
}
}
</script>
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div v-swiper:mySwiper="swiperOption" ref="mySwiper"> <div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index"> <div class="swiper-slide" v-for="(item, index) in listData" :key="index">
<img :src="item.photo_uri" @click="goPage(item)"> <img :src="item.photo_uri" @click="goPage(item)" />
</div> </div>
</div> </div>
<!-- <div class="swiper-pagination swiper-pagination-bullets"></div> --> <!-- <div class="swiper-pagination swiper-pagination-bullets"></div> -->
...@@ -13,99 +13,98 @@ ...@@ -13,99 +13,98 @@
</div> </div>
</template> </template>
<script> <script>
const _this = this const _this = this
export default { export default {
name: 'banner', name: 'banner',
data () { data() {
return { return {
listData: [], listData: [],
// 轮播图配置信息, 更多请参考 swiper.js 中文网,上面很详细。 // 轮播图配置信息, 更多请参考 swiper.js 中文网,上面很详细。
swiperOption: { swiperOption: {
speed: 400, speed: 400,
autoplay: true, autoplay: true,
delay: 3000, delay: 3000,
observer: true, observer: true,
observerParent: true, observerParent: true,
navigation: { navigation: {
nextEl: '.next-button', nextEl: '.next-button',
prevEl: '.prev-button' prevEl: '.prev-button'
}, },
loop: true loop: true
}
}
},
// async fetch() {
// const params = {
// terminal_type: 'WWW',
// ad_position_uri: 'www.ezijing.com'
// }
// this.bannerData = await this.$axios.$get('/api/zws/v1/marketing/advertisements', { params }).then(res => {
// return res.filter((item, index) => {
// return index < 4
// })
// })
// },
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 69,
project_id: 1001
}
this.listData = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => {
return res
})
},
computed: {
swiper() {
return this.$refs.mySwiper.swiper;
} }
}
},
// async fetch() {
// const params = {
// terminal_type: 'WWW',
// ad_position_uri: 'www.ezijing.com'
// }
// this.bannerData = await this.$axios.get('/api/zws/v1/marketing/advertisements', { params }).then(res => {
// return res.filter((item, index) => {
// return index < 4
// })
// })
// },
async fetch() {
const params = {
page: 1,
per_page: 100,
type: 69,
project_id: process.env.projectId
}
this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
return res
})
},
computed: {
swiper() {
return this.$refs.mySwiper.swiper
}
},
mounted() {},
methods: {
// openPage(path) {
// path !== '' && window.open(path)
// }
swiperStop() {
this.swiper.autoplay.stop()
}, },
mounted() { swiperStart() {
this.swiper.autoplay.start()
}, },
methods: { goPage(item) {
// openPage(path) { if (item.source === '') {
// path !== '' && window.open(path) this.$router.push({
// } path: '/about/news-detail',
swiperStop() { query: {
this.swiper.autoplay.stop() id: item.id
}, }
swiperStart() { })
this.swiper.autoplay.start() } else {
}, window.open(item.source)
goPage(item) {
if (item.source === '') {
this.$router.push({
path: '/about/news-detail',
query: {
id: item.id
}
})
} else {
window.open(item.source)
}
} }
} }
} }
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.banner-content{ .banner-content {
position: relative; position: relative;
width: 100%; width: 100%;
.swiper-wrapper{ .swiper-wrapper {
width: 100%; width: 100%;
display: flex; display: flex;
.swiper-slide{ .swiper-slide {
width: 100%; width: 100%;
// float: left; // float: left;
img{ img {
width: 100%; width: 100%;
display: block; display: block;
} }
} }
} }
.prev-button{ .prev-button {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 30px; left: 30px;
...@@ -116,7 +115,7 @@ ...@@ -116,7 +115,7 @@
z-index: 999; z-index: 999;
cursor: pointer; cursor: pointer;
} }
.next-button{ .next-button {
position: absolute; position: absolute;
top: 50%; top: 50%;
right: 30px; right: 30px;
......
<template> <template>
<div class="news-content-box"> <div class="news-content-box">
<m-title :data="titleParams"/> <m-title :data="titleParams" />
<div class="content-box"> <div class="content-box">
<div class="news-left" @click="goPage(listData.first)"> <div class="news-left" @click="goPage(listData.first)">
<img :src="listData.first.photo_uri" alt=""> <img :src="listData.first.photo_uri" alt="" />
<div class="mantle-box"> <div class="mantle-box">
<div class="tit">{{ listData.first.title }}</div> <div class="tit">{{ listData.first.title }}</div>
<div class="con-txt">{{listData.first.summary}}</div> <div class="con-txt">{{ listData.first.summary }}</div>
</div> </div>
</div> </div>
<ul class="news-right"> <ul class="news-right">
<li v-for="(item, index) in listData.list" :key="index" @click="goPage(item)"> <li v-for="(item, index) in listData.list" :key="index" @click="goPage(item)">
<div class="time">{{ item.created_time }}</div> <div class="time">{{ item.created_time }}</div>
<div class="news-r-title">{{ item.title }}</div> <div class="news-r-title">{{ item.title }}</div>
<div class="del">{{item.summary}}</div> <div class="del">{{ item.summary }}</div>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -29,30 +29,17 @@ export default { ...@@ -29,30 +29,17 @@ export default {
async fetch() { async fetch() {
const params = { const params = {
page: 1, page: 1,
per_page: 100, per_page: 4,
type: 80, type: 80,
project_id: 1001 project_id: process.env.projectId
} }
await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => { await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
res.map((item, index) => { this.data = res || []
if (index === 0) {
this.listData.first = item
} else {
if (index < 4) {
this.listData.list.push(item)
}
}
})
console.log(this.listData)
return res
}) })
}, },
data() { data() {
return { return {
listData: { data: [],
first: {},
list: []
},
titleParams: { titleParams: {
name: '最新动态', name: '最新动态',
more: { more: {
...@@ -64,7 +51,11 @@ export default { ...@@ -64,7 +51,11 @@ export default {
} }
} }
}, },
mounted() { computed: {
listData() {
const [first = {}, ...list] = this.data
return { first, list: list || [] }
}
}, },
methods: { methods: {
goPage(item) { goPage(item) {
...@@ -83,45 +74,45 @@ export default { ...@@ -83,45 +74,45 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.news-content-box{ .news-content-box {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;
padding-top: 65px; padding-top: 65px;
.content-box{ .content-box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding-top: 26px; padding-top: 26px;
.news-left{ .news-left {
width: 780px; width: 780px;
height: 500px; height: 500px;
position: relative; position: relative;
img{ img {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
.mantle-box{ .mantle-box {
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
background: rgba(0,0,0,.2); background: rgba(0, 0, 0, 0.2);
padding: 30px 37px; padding: 30px 37px;
.tit{ .tit {
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
line-height: 100%; line-height: 100%;
color: #FFFFFF; color: #ffffff;
width: 696px; width: 696px;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
.con-txt{ .con-txt {
width: 461px; width: 461px;
font-size: 14px; font-size: 14px;
line-height: 24px; line-height: 24px;
color: #FFFFFF; color: #ffffff;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
...@@ -130,20 +121,20 @@ export default { ...@@ -130,20 +121,20 @@ export default {
} }
} }
} }
.news-right{ .news-right {
li{ li {
width: 366px; width: 366px;
border-bottom: 1px solid #e3e3e3; border-bottom: 1px solid #e3e3e3;
padding-bottom: 19px; padding-bottom: 19px;
margin-bottom: 30px; margin-bottom: 30px;
cursor: pointer; cursor: pointer;
.time{ .time {
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: normal;
line-height: 100%; line-height: 100%;
color: #8E1E22; color: #8e1e22;
} }
.news-r-title{ .news-r-title {
font-size: 22px; font-size: 22px;
font-weight: bold; font-weight: bold;
line-height: 30px; line-height: 30px;
...@@ -154,10 +145,10 @@ export default { ...@@ -154,10 +145,10 @@ export default {
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
overflow: hidden; overflow: hidden;
} }
.del{ .del {
width: 350px; width: 350px;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
font-size: 14px; font-size: 14px;
line-height: 100%; line-height: 100%;
...@@ -165,7 +156,6 @@ export default { ...@@ -165,7 +156,6 @@ export default {
margin-top: 15px; margin-top: 15px;
} }
} }
} }
} }
} }
......
<template> <template>
<div class="alumni-content max-width"> <div class="alumni-content max-width">
<m-title :data="titleParams" class="m-title"/> <m-title :data="titleParams" class="m-title" />
<div class="swiper-content" @mouseenter="swiperStop" @mouseleave="swiperStart"> <div class="swiper-content" @mouseenter="swiperStop" @mouseleave="swiperStart">
<div v-swiper:mySwiper="swiperOption" ref="mySwiper"> <div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)"> <div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<img :src="item.photo_uri"> <img :src="item.photo_uri" />
<div class="text">{{ item.title }}</div> <div class="text">{{ item.title }}</div>
</div> </div>
</div> </div>
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
components: { components: {
mTitle mTitle
}, },
data () { data() {
const _this = this const _this = this
return { return {
titleParams: { titleParams: {
...@@ -52,20 +52,19 @@ export default { ...@@ -52,20 +52,19 @@ export default {
page: 1, page: 1,
per_page: 100, per_page: 100,
type: 72, type: 72,
project_id: 1001 project_id: process.env.projectId
} }
this.listData = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => { this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
console.log(res) console.log(res)
return res return res
}) })
}, },
computed: { computed: {
swiper() { swiper() {
return this.$refs.mySwiper.swiper; return this.$refs.mySwiper.swiper
} }
}, },
created() { created() {},
},
mounted() { mounted() {
if (document.documentElement.clientWidth < 1400) { if (document.documentElement.clientWidth < 1400) {
// this.isScale = true // this.isScale = true
...@@ -94,22 +93,22 @@ export default { ...@@ -94,22 +93,22 @@ export default {
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.max-width{ .max-width {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;
} }
.alumni-content{ .alumni-content {
padding-top: 89px; padding-top: 89px;
.title-content{ .title-content {
display: flex; display: flex;
.left-title{ .left-title {
display: flex; display: flex;
.line{ .line {
width: 6px; width: 6px;
height: 34px; height: 34px;
background: #AA1941; background: #aa1941;
} }
.text{ .text {
font-size: 34px; font-size: 34px;
font-weight: bold; font-weight: bold;
line-height: 34px; line-height: 34px;
...@@ -118,50 +117,50 @@ export default { ...@@ -118,50 +117,50 @@ export default {
} }
} }
} }
.small-tit{ .small-tit {
font-size: 24px; font-size: 24px;
font-weight: bold; font-weight: bold;
line-height: 34px; line-height: 34px;
color: #424242; color: #424242;
margin-top: 12px; margin-top: 12px;
} }
.swiper-content{ .swiper-content {
padding-top: 37px; padding-top: 37px;
// width: 100%; // width: 100%;
.swiper-slide{ .swiper-slide {
position: relative; position: relative;
width: 360px; width: 360px;
height: 230px; height: 230px;
margin-top: 10px; margin-top: 10px;
.text{ .text {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
background: rgba(0,0,0,0.5); background: rgba(0, 0, 0, 0.5);
padding: 0 20px; padding: 0 20px;
box-sizing: border-box; box-sizing: border-box;
font-size: 20px; font-size: 20px;
color: #FEFEFE; color: #fefefe;
overflow: hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
} }
img{ img {
width: 100%; width: 100%;
height:100%; height: 100%;
} }
} }
.swiper-slide-active{ .swiper-slide-active {
width:438px; width: 438px;
height:246px; height: 246px;
margin-top: 0; margin-top: 0;
} }
} }
} }
.scale{ .scale {
transform: scale(0.85); transform: scale(0.85);
} }
</style> </style>
<template> <template>
<div class="presence-content-box"> <div class="presence-content-box">
<m-title :data="titleParams" class="m-title"/> <m-title :data="titleParams" class="m-title" />
<div class="content-mian"> <div class="content-mian">
<div class="banner-box" @mouseenter="swiperStop" @mouseleave="swiperStart"> <div class="banner-box" @mouseenter="swiperStop" @mouseleave="swiperStart">
<div v-swiper:mySwiper="swiperOption" ref="mySwiper"> <div v-swiper:mySwiper="swiperOption" ref="mySwiper">
<div class="swiper-wrapper"> <div class="swiper-wrapper">
<div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)"> <div class="swiper-slide" v-for="(item, index) in listData" :key="index" @click="goPage(item)">
<img :src="item.photo_uri"> <img :src="item.photo_uri" />
</div> </div>
</div> </div>
<div class="swiper-pagination swiper-pagination-bullets"></div> <div class="swiper-pagination swiper-pagination-bullets"></div>
...@@ -20,21 +20,13 @@ ...@@ -20,21 +20,13 @@
<div class="right-content"> <div class="right-content">
<div class="li"> <div class="li">
<el-select v-model="form.years" placeholder="请选择工作年限"> <el-select v-model="form.years" placeholder="请选择工作年限">
<el-option <el-option v-for="item in yearsOptions" :key="item.value" :label="item.label" :value="item.value">
v-for="item in yearsOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div class="li"> <div class="li">
<el-select v-model="form.degree" placeholder="请选择学历/学位"> <el-select v-model="form.degree" placeholder="请选择学历/学位">
<el-option <el-option v-for="item in degreeOptions" :key="item.value" :label="item.label" :value="item.value">
v-for="item in degreeOptions"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
...@@ -53,7 +45,7 @@ ...@@ -53,7 +45,7 @@
<script> <script>
import mTitle from '../../components/home/moduleTitle' import mTitle from '../../components/home/moduleTitle'
import { postNes } from '../../plugins/api' import { postNes } from '@/api'
export default { export default {
name: 'presence', name: 'presence',
components: { components: {
...@@ -61,39 +53,49 @@ export default { ...@@ -61,39 +53,49 @@ export default {
}, },
data() { data() {
return { return {
yearsOptions: [{ yearsOptions: [
value: '0~2', {
label: '0-2年' value: '0~2',
}, { label: '0-2年'
value: '3~5', },
label: '3-5年' {
}, { value: '3~5',
value: '5~10', label: '3-5年'
label: '5-10年' },
}, { {
value: '10+', value: '5~10',
label: '10年及以上' label: '5-10年'
}], },
degreeOptions: [{ {
value: '2', value: '10+',
label: '普通本科' label: '10年及以上'
}, { }
value: '3', ],
label: '本科/学士' degreeOptions: [
}, { {
value: '5', value: '2',
label: '硕士' label: '普通本科'
}, { },
value: '7', {
label: '博士' value: '3',
}], label: '本科/学士'
},
{
value: '5',
label: '硕士'
},
{
value: '7',
label: '博士'
}
],
form: { form: {
years: '', years: '',
degree: '', degree: '',
name: '', name: '',
phone: '', phone: '',
// channel: 19960, // channel: 19960,
project_id: 1001, project_id: process.env.projectId
}, },
value: '', value: '',
titleParams: { titleParams: {
...@@ -123,23 +125,24 @@ export default { ...@@ -123,23 +125,24 @@ export default {
page: 1, page: 1,
per_page: 100, per_page: 100,
type: 81, type: 81,
project_id: 1001 project_id: process.env.projectId
} }
this.listData = await this.$axios.$get('/api/zws/v1/cms/news', { params }).then(res => { this.listData = await this.$axios.get('/api/zws/v1/cms/news', { params }).then(res => {
console.log(params) console.log(params)
return res return res
}) })
}, },
computed: { computed: {
swiper() { swiper() {
return this.$refs.mySwiper.swiper; return this.$refs.mySwiper.swiper
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
submit() { submit() {
const findNull = Object.values(this.form).findIndex(item => { return item === '' }) const findNull = Object.values(this.form).findIndex(item => {
return item === ''
})
if (findNull !== -1) { if (findNull !== -1) {
this.$message('请完善信息') this.$message('请完善信息')
return return
...@@ -186,24 +189,24 @@ export default { ...@@ -186,24 +189,24 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.presence-content-box{ .presence-content-box {
padding-top: 80px; padding-top: 80px;
.m-title{ .m-title {
width: 1200px; width: 1200px;
margin: 0 auto; margin: 0 auto;
} }
.content-mian{ .content-mian {
padding-top: 24px; padding-top: 24px;
.banner-box{ .banner-box {
height: 500px; height: 500px;
overflow: hidden; overflow: hidden;
img{ img {
width: 100%; width: 100%;
height: 520px; height: 520px;
display: block; display: block;
} }
} }
.enroll-box{ .enroll-box {
width: 1200px; width: 1200px;
height: 540px; height: 540px;
margin: 80px auto 0; margin: 80px auto 0;
...@@ -211,50 +214,50 @@ export default { ...@@ -211,50 +214,50 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.left-content{ .left-content {
width: 592px; width: 592px;
height: 223px; height: 223px;
background:rgba(170, 25, 65, .63); background: rgba(170, 25, 65, 0.63);
box-shadow: 0px 0px 122px rgba(0, 0, 0, 0.07); box-shadow: 0px 0px 122px rgba(0, 0, 0, 0.07);
margin-top: 127px; margin-top: 127px;
.tit{ .tit {
font-size: 48px; font-size: 48px;
font-weight: bold; font-weight: bold;
line-height: 58px; line-height: 58px;
color: #FFFFFF; color: #ffffff;
text-align: center; text-align: center;
margin-top: 30px; margin-top: 30px;
} }
.tips{ .tips {
font-size: 14px; font-size: 14px;
line-height: 100%; line-height: 100%;
color: #FFFFFF; color: #ffffff;
margin-top: 30px; margin-top: 30px;
text-align: center; text-align: center;
} }
} }
.right-content{ .right-content {
width: 401px; width: 401px;
height: 382px; height: 382px;
background: #FFFFFF; background: #ffffff;
margin-top: 54px; margin-top: 54px;
box-sizing: border-box; box-sizing: border-box;
padding: 63px 56px 56px 64px; padding: 63px 56px 56px 64px;
margin-right: 116px; margin-right: 116px;
::v-deep{ ::v-deep {
.el-select{ .el-select {
width: 100%; width: 100%;
} }
} }
.li{ .li {
margin-bottom: 20px; margin-bottom: 20px;
} }
.btn{ .btn {
font-size: 18px; font-size: 18px;
line-height: 32px; line-height: 32px;
color: #FFFFFF; color: #ffffff;
width: 281px; width: 281px;
background: #AA1941; background: #aa1941;
border-radius: 4px; border-radius: 4px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</div> </div>
</template> </template>
<script> <script>
import { sendCode, checkCode, postNes } from '../plugins/api' import { sendCode, checkCode, postNes } from '@/api'
const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/ const MOBILE_REG = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
export default { export default {
data() { data() {
...@@ -166,7 +166,10 @@ export default { ...@@ -166,7 +166,10 @@ export default {
} }
}, },
checkSendcode() { checkSendcode() {
const checkCodeParam = '?account=' + this.formInfo.phone + '&code=' + this.sendCode + '&countryCode=86' const checkCodeParam = {
account: this.formInfo.phone,
code:this.sendCode
}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
checkCode(checkCodeParam).then(res => { checkCode(checkCodeParam).then(res => {
console.log(res) console.log(res)
......
<template> <template>
<div> <div>
<Head /> <Nuxt :key="$route.fullPath" />
<Nuxt />
<Foot />
</div> </div>
</template> </template>
<style>
html {
font-family:
'Source Sans Pro',
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
'Helvetica Neue',
Arial,
sans-serif;
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
}
.button--green {
display: inline-block;
border-radius: 4px;
border: 1px solid #3b8070;
color: #3b8070;
text-decoration: none;
padding: 10px 30px;
}
.button--green:hover {
color: #fff;
background-color: #3b8070;
}
.button--grey {
display: inline-block;
border-radius: 4px;
border: 1px solid #35495e;
color: #35495e;
text-decoration: none;
padding: 10px 30px;
margin-left: 15px;
}
.button--grey:hover {
color: #fff;
background-color: #35495e;
}
</style>
<template>
<div class="main-container">
<h1 v-if="error.statusCode === 404">Page not found</h1>
<h1 v-else>An error occurred</h1>
<NuxtLink to="/">返回首页</NuxtLink>
</div>
</template>
<script>
export default {
props: ['error'],
layout: 'error',
middleware: [
function ({ redirect }) {
return redirect(301, '/el?e=rnf')
}
]
}
</script>
<template>
<div>
<Head />
<Nuxt :key="$route.fullPath" />
<Foot />
</div>
</template>
<style>
html {
font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
sans-serif;
font-size: 16px;
word-spacing: 1px;
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
box-sizing: border-box;
}
*,
*::before,
*::after {
box-sizing: border-box;
margin: 0;
}
.button--green {
display: inline-block;
border-radius: 4px;
border: 1px solid #3b8070;
color: #3b8070;
text-decoration: none;
padding: 10px 30px;
}
.button--green:hover {
color: #fff;
background-color: #3b8070;
}
.button--grey {
display: inline-block;
border-radius: 4px;
border: 1px solid #35495e;
color: #35495e;
text-decoration: none;
padding: 10px 30px;
margin-left: 15px;
}
.button--grey:hover {
color: #fff;
background-color: #35495e;
}
</style>
<template>
<div class="letter">
<header class="header">
<div class="inner">
<div class="logo">
<router-link to="/"
><img src="https://webapp-pub.ezijing.com/project/application/images/ezijing-logo.png"
/></router-link>
</div>
</div>
</header>
<nav class="nav"><h1 class="title">美国印第安纳大学Kelley商学院金融学硕士项目推荐信</h1></nav>
<section class="content">
<el-form
:model="ruleForm"
:rules="rules"
ref="form"
label-width="100px"
:label-position="labelPosition"
@submit.native.prevent
style="max-width: 680px"
>
<el-form-item label="姓名" prop="provider_name">
<el-input v-model="ruleForm.provider_name" @blur="onBlur('provider_name')"></el-input>
</el-form-item>
<el-form-item label="推荐信内容" prop="letter_content">
<el-input
type="textarea"
:autosize="{ minRows: 6 }"
v-model="ruleForm.letter_content"
@blur="onBlur('letter_content')"
></el-input>
</el-form-item>
<el-form-item label="手机号" prop="provider_phone_number">
<el-input v-model="ruleForm.provider_phone_number"></el-input>
</el-form-item>
<el-form-item label="工作单位" prop="provider_company_name">
<el-input v-model="ruleForm.provider_company_name" @blur="onBlur('provider_company_name')"></el-input>
</el-form-item>
<el-form-item label="职务" prop="provider_job_title">
<el-input v-model="ruleForm.provider_job_title" @blur="onBlur('provider_job_title')"></el-input>
</el-form-item>
</el-form>
<div class="buttons">
<el-button type="primary" @click="handleSubmit">确认提交</el-button>
</div>
</section>
<el-dialog title="推荐信提交成功" :visible.sync="dialogVisible" :center="true" width="348px">
<div style="text-align: center">
<img src="https://webapp-pub.ezijing.com/project/application/images/icon_success.png" />
</div>
<template #footer>
<el-button type="primary" @click="toHome">了解项目</el-button>
</template>
</el-dialog>
</div>
</template>
<script>
import * as api from '@/api/my'
export default {
layout: 'normal',
name: 'LetterIndex',
data() {
return {
ruleForm: {
provider_name: '',
letter_content: '',
provider_phone_number: '',
provider_company_name: '',
provider_job_title: ''
},
rules: {
provider_name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
letter_content: [{ required: true, message: '请输入推荐信内容', trigger: 'blur' }],
provider_phone_number: [{ required: true, pattern: /^1[3-9]\d{9}$/, message: '请输入手机号', trigger: 'blur' }],
provider_company_name: [{ required: true, message: '请输入工作单位', trigger: 'blur' }],
provider_job_title: [{ required: true, message: '请输入职务', trigger: 'blur' }]
},
dialogVisible: false,
clientWidth: 0
}
},
computed: {
userId() {
return this.$route.params.userId
},
letterId() {
return this.$route.params.letterId
},
labelPosition() {
return this.clientWidth < 768 ? 'top' : 'left'
}
},
methods: {
// 提交
handleSubmit() {
this.$refs.form.validate().then(() => {
this.handleAddRequest()
})
},
// 提交推荐信
handleAddRequest() {
api.addLetter(this.userId, this.letterId, this.ruleForm).then(response => {
console.log(response)
const { error, message } = response
if (error.toString() === '0') {
this.dialogVisible = true
} else {
this.$message.error(message)
}
})
},
toHome() {
this.$router.push('/')
},
getClientWidth() {
this.clientWidth = document.body.clientWidth
},
onBlur(key) {
if (this.ruleForm[key]) {
this.ruleForm[key] = this.ruleForm[key].trim()
}
}
},
mounted() {
this.getClientWidth()
document.body.style = 'background-color:#eee;'
window.addEventListener('resize', this.getClientWidth)
},
destroyed() {
document.body.style = ''
window.removeEventListener('resize', this.getClientWidth)
}
}
</script>
<style lang="scss" scoped>
.letter {
.header {
background-color: #fff;
.inner {
max-width: 1000px;
margin: 0 auto;
}
.logo {
padding: 14px 0;
img {
height: 50px;
}
}
}
.nav {
background-color: var(--main-color);
.title {
font-size: 24px;
font-weight: 600;
color: #fff;
line-height: 60px;
text-align: center;
}
}
.content {
max-width: 1000px;
margin: 20px auto;
padding: 20px;
background-color: #fff;
box-sizing: border-box;
}
::v-deep .el-input {
max-width: 270px;
}
::v-deep .el-form--label-top {
.el-form-item__label {
line-height: 20px;
}
.el-input {
max-width: 100%;
}
}
::v-deep .el-input__inner,
::v-deep .el-textarea__inner {
border-radius: 0;
}
.buttons {
border-top: 1px solid #f1f1f1;
padding: 20px 100px;
}
@media (max-width: 767px) {
.logo {
text-align: center;
}
.buttons {
padding: 20px 0;
.el-button {
width: 100%;
display: block;
}
}
}
}
</style>
<template>
<div class="my">
<div class="card">
<div class="result">
<div class="result-left">
<img src="https://webapp-pub.ezijing.com/project/application/images/my_icon.png" />招生办反馈
</div>
<div class="result-right">{{ result.submit_status_desc || '未收到报名信息' }}</div>
</div>
</div>
<div class="card" style="min-height: 360px">
<ul class="nav">
<li class="nav-application" @click="toApplication"></li>
<li class="nav-interview" @click="toInterview"></li>
<li class="nav-admission" @click="toAdmission"></li>
</ul>
<div class="progress">
<el-steps :active="activeProgress" finish-status="success" align-center>
<el-step v-for="(item, index) in 3" :key="index">
<template #title>{{ getProgressStatusText(index) }}</template>
</el-step>
</el-steps>
</div>
</div>
<div class="welcome" v-if="welcomeShow">
<div class="inner">
<div class="welcome-close" @click="handleClose"></div>
<div class="welcome-main">
<img src="https://webapp-pub.ezijing.com/project/application/images/welcome.png" width="350" />
<div class="welcome-content">
<h1>欢迎您报考</h1>
<h2>美国印第安纳大学</h2>
<div class="welcome-button" @click="handleStart">马上开始</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import * as api from '@/api/my'
import Driver from 'driver.js'
import 'driver.js/dist/driver.min.css'
export default {
name: 'AppHome',
data() {
const user = window.G.UserInfo
return {
user,
material: {},
progress: {},
submissionStage: {
0: ['FILLING', 'PREPAYMENT'],
1: ['INTERVIEW_APPLICATION', 'AUDITION', 'INTERVIEW', 'PAYMENT'],
2: ['REGISTRATION'],
3: ['CLOSED']
},
result: {},
welcomeShow: false
}
},
computed: {
activeProgress() {
for (const key in this.submissionStage) {
const list = this.submissionStage[key]
if (list.includes(this.material.submission_stage)) {
return parseInt(key)
}
}
return 0
}
},
methods: {
// 获取进度值
getProgressStatusText(index) {
if (this.activeProgress === index) {
return '进行中'
} else {
return this.activeProgress > index ? '已完成' : '待进行'
}
},
// 获取报名信息
getApplication() {
api.getApplication().then(response => {
const { data, error, message } = response
if (error.toString() === '0') {
const { material, progress } = data
this.material = material
this.progress = progress
const welcomeShowed = window.localStorage.getItem(this.user.id) === 'true'
material.attachments = material.attachments || []
if (!material.attachments.length && !welcomeShowed) {
this.welcomeShow = true
}
} else {
this.$message.error(message)
}
})
},
// 获取报名审核状态
getApplicationStatus() {
api.getApplicationStatus().then(response => {
this.result = response.data
})
},
// 报名申请
toApplication() {
this.$router.push('/my/application?active=application_info')
},
// 申请面试
toInterview() {
if (this.activeProgress < 1) {
this.$message.warning('请完成报名申请并缴报名费')
return
}
this.$router.push('/my/interview')
},
// 办理入学
toAdmission() {
if (this.activeProgress < 2) {
this.$message.warning('请等待面试结果')
return
}
this.$router.push('/my/admission')
},
handleStart() {
this.welcomeShow = false
this.createDriver()
},
handleClose() {
this.welcomeShow = false
window.localStorage.setItem(this.user.id, true)
},
createDriver() {
const driver = new Driver({
opacity: '0.8',
padding: 5,
allowClose: false,
doneBtnText: '我知道了',
nextBtnText: '下一步',
onReset: () => {
window.localStorage.setItem(this.user.id, true)
}
})
// Define the steps for introduction
driver.defineSteps([
{
element: '.nav-application',
popover: {
className: 'first-step-popover-class',
title: '第一步:',
description: '点击<span style="color:#af1b40">报名申请</span>,进入基本信息的填写。',
position: 'bottom-right'
}
},
{
element: '.nav-interview',
popover: {
title: '第二步:',
description: '点击<span style="color:#af1b40">申请面试</span>,进入面试所需材料的上传。',
position: 'bottom-right'
}
},
{
element: '.nav-admission',
popover: {
title: '第三步:',
description: '点击<span style="color:#af1b40">办理入学</span>,进入办理入学材料的上传。',
position: 'bottom-right'
}
}
])
driver.start()
}
},
beforeMount() {
this.getApplication()
this.getApplicationStatus()
}
}
</script>
<style lang="scss" scoped>
.card {
background: #fff;
border-radius: 5px;
}
.card + .card {
margin-top: 10px;
}
.nav {
display: flex;
justify-content: space-between;
padding: 40px 70px 20px;
li {
position: relative;
width: 188px;
height: 128px;
cursor: pointer;
background-repeat: no-repeat;
background-size: contain;
background-position: center 2px;
}
}
.nav-application {
background-image: url('https://webapp-pub.ezijing.com/project/application/images/my_01.png');
&:hover {
background-image: url('https://webapp-pub.ezijing.com/project/application/images/my_01_hover.png');
}
}
.nav-interview {
background-image: url('https://webapp-pub.ezijing.com/project/application/images/my_02.png');
&:hover {
background-image: url('https://webapp-pub.ezijing.com/project/application/images/my_02_hover.png');
}
}
.nav-admission {
background-image: url('https://webapp-pub.ezijing.com/project/application/images/my_03.png');
&:hover {
background-image: url('https://webapp-pub.ezijing.com/project/application/images/my_03_hover.png');
}
}
.result {
min-height: 40px;
padding: 0 20px;
display: flex;
align-items: center;
}
.result-left {
line-height: 14px;
color: var(--main-color);
img {
margin-right: 10px;
}
}
.result-right {
padding-left: 40px;
color: #666;
}
.progress {
margin: 0 40px;
}
.welcome {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
background-color: rgba(0, 0, 0, 0.8);
z-index: 999;
}
.welcome-close {
float: right;
width: 23px;
height: 23px;
background: url('https://webapp-pub.ezijing.com/project/application/images/welcome_close.png') no-repeat;
background-size: contain;
cursor: pointer;
}
.welcome-main {
display: flex;
align-items: center;
}
.welcome-content {
text-align: center;
h1 {
font-size: 40px;
font-weight: 600;
color: #fff;
line-height: 56px;
}
h2 {
font-size: 26px;
font-weight: normal;
color: #fff;
line-height: 26px;
}
}
.welcome-button {
margin-top: 40px;
display: inline-block;
padding: 10px 32px;
font-size: 20px;
font-weight: 600;
color: #fff;
line-height: 20px;
border-radius: 5px;
border: 3px solid #fff;
cursor: pointer;
&:hover {
color: #af1b40;
background-color: #fff;
}
}
</style>
<style>
div#driver-popover-item {
padding: 10px;
max-width: 178px;
min-width: auto;
}
div#driver-popover-item .driver-popover-title {
font-size: 16px;
}
.driver-close-btn,
.driver-prev-btn {
display: none !important;
}
#driver-highlighted-element-stage {
border-radius: 8px !important;
}
div#driver-popover-item .driver-popover-footer {
text-align: center;
}
div#driver-popover-item .driver-popover-footer button {
background-color: #af1b40;
line-height: 36px;
color: #fff;
border-radius: 4px;
padding: 0 26px;
text-shadow: none;
border: 0;
}
div#driver-popover-item .driver-popover-footer .driver-btn-group {
float: none;
}
.driver-highlighted-element {
pointer-events: none;
}
</style>
<template>
<app-layout>
<vue-form
:menus="menus"
:default-active="currentActive"
@page-change="handlePageChange"
@success="handleSuccess"
@error="handleError"
@back="$router.push('/my/account')"
>
<template #aside-append>
<div class="aside-logout" @click="$store.dispatch('logout')"><span>退出登录</span></div>
</template>
<!-- 首页 -->
<app-home v-if="currentActive === 'account'" />
<template #content>
<!-- 基本信息 -->
<app-info v-if="currentActive === 'account_info'" />
<!-- 密码修改 -->
<app-password v-if="currentActive === 'account_password'" />
</template>
</vue-form>
</app-layout>
</template>
<script>
import AppLayout from '../layout.vue'
import AppHome from './home.vue'
import AppInfo from './info.vue'
import AppPassword from './password.vue'
export default {
components: { AppLayout, AppHome, AppInfo, AppPassword },
data() {
return {
menus: [
{
id: 'account',
title: '个人信息',
children: [
{ id: 'account_info', title: '基本信息' },
{ id: 'account_password', title: '密码修改' }
]
}
],
currentActive: 'account'
}
},
watch: {
$route: {
immediate: true,
handler(route) {
const { query = {} } = route
this.currentActive = query.active || 'account'
}
}
},
methods: {
handlePageChange(value) {
this.currentActive = value
this.$router.push({ path: this.$route.path, query: { active: value } })
console.log('页面切换了', value)
},
handleSuccess(data) {
console.log('提交成功了', data)
this.$message({ type: 'success', message: data.message })
},
handleError(data) {
console.log('提交失败了', data)
this.$message({ type: 'error', message: data.message })
}
}
}
</script>
<template>
<div>
<el-form
:model="ruleForm"
:rules="rules"
ref="form"
label-width="100px"
@submit.native.prevent
style="max-width: 680px"
>
<el-form-item label="姓名" prop="real_name">
<el-input v-model.trim="ruleForm.real_name"></el-input>
</el-form-item>
<el-form-item label="手机号" prop="mobile">
<el-input v-model.trim="ruleForm.mobile"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSubmit">确认修改</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import * as api from '@/api/my'
export default {
name: 'MyInfo',
data() {
return {
ruleForm: {
real_name: '',
mobile: ''
},
rules: {
real_name: [{ required: true, message: '请输入姓名', trigger: 'blur' }],
mobile: [{ required: true, message: '请输入手机号', trigger: 'blur' }]
}
}
},
methods: {
getUser() {
api.getUser().then(response => {
const data = response.data
this.ruleForm.real_name = data.realname
this.ruleForm.mobile = data.mobile
})
},
// 提交
handleSubmit() {
this.$refs.form.validate().then(this.handleRequest)
},
// 接口请求
handleRequest() {
this.loading = true
api.updateUser(this.ruleForm).then(response => {
response.code === 0 ? this.handleSuccess(response) : this.$message.error(response.msg)
this.loading = false
})
},
// 成功
handleSuccess(response) {
this.$alert('基本信息修改成功', {
type: 'success',
confirmButtonText: '返回报名系统',
callback: action => {
this.$router.push('/my')
}
})
}
},
beforeMount() {
this.getUser()
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-input {
max-width: 270px;
}
</style>
<template>
<div>
<el-form :model="ruleForm" :rules="rules" ref="form" label-width="100px" @submit.native.prevent>
<el-form-item label="手机号" prop="account">
<el-input v-model.trim="ruleForm.account"></el-input>
</el-form-item>
<el-form-item prop="code" label="验证码">
<el-input v-model.trim="ruleForm.code" placeholder="请输入验证码">
<countdown
slot="suffix"
size="mini"
:disabled="disabledSend"
@start="sendCodeRequest"
ref="countdown"
></countdown>
</el-input>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input type="password" v-model.trim="ruleForm.password"></el-input>
</el-form-item>
<el-form-item label="确认密码" prop="passwordR">
<el-input type="password" v-model.trim="ruleForm.passwordR"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="handleSubmit">确认修改</el-button>
</el-form-item>
</el-form>
</div>
</template>
<script>
import * as api from '@/api/my'
import countdown from '@/components/countdown.vue'
export default {
name: 'MyPassword',
components: { countdown },
data() {
const validatePass = (rule, value, callback) => {
if (value === '') {
callback(new Error('请再次输入密码'))
} else if (value !== this.ruleForm.password) {
callback(new Error('两次输入密码不一致!'))
} else {
callback()
}
}
return {
ruleForm: { account: '', code: '', password: '', passwordR: '' },
rules: {
account: [{ required: true, message: '请输入手机号', trigger: 'blur' }],
code: [{ required: true, message: '请输入验证码', trigger: 'blur' }],
password: [
{ required: true, message: '请输入新密码', trigger: 'blur' },
{ min: 6, max: 20, message: '长度为6-20个字符', trigger: 'blur' }
],
passwordR: [
{ required: true, message: '请输入新密码', trigger: 'blur' },
{ validator: validatePass, trigger: 'blur' }
]
}
}
},
computed: {
disabledSend() {
const value = this.ruleForm.account
return !(/^1[3-9]\d{9}$/.test(value) || /@/.test(value))
}
},
methods: {
// 提交
handleSubmit() {
this.$refs.form.validate().then(this.handleRequest)
},
// 接口请求
handleRequest() {
this.loading = true
api.updatePassword(this.ruleForm).then(response => {
response.code === 0 ? this.handleSuccess(response) : this.$message.error(response.msg)
this.loading = false
})
},
// 成功
handleSuccess(response) {
this.$alert('密码修改成功,快去登录吧', '提示', {
type: 'success',
confirmButtonText: '去登录',
callback: action => {
this.$router.push('/login')
}
})
},
// 验证码
sendCodeRequest() {
api
.sendCode({ account: this.ruleForm.account })
.then(response => {
console.log(response)
if (response.code === 0) {
this.$message({ type: 'success', message: '验证码已发送' })
} else {
// 停止计时
this.$refs.countdown.stop()
this.$message({ type: 'error', message: response.msg })
}
})
.catch(this.$refs.countdown.stop)
}
}
}
</script>
<style lang="scss" scoped>
::v-deep .el-input {
max-width: 270px;
}
</style>
<template>
<div class="collapse" :class="classes">
<div class="collapse-hd">
<div class="collapse-icon" @click="toggle">
<i class="el-icon-remove-outline" v-if="isActive"></i>
<i class="el-icon-circle-plus-outline" v-else></i>
</div>
<div class="collapse-title">
<slot name="title">{{ title }}</slot>
</div>
</div>
<div class="collapse-bd" v-show="isActive">
<slot>{{ content }}</slot>
</div>
</div>
</template>
<script>
export default {
props: {
value: { type: Boolean, default: false },
title: { type: String },
content: { type: String }
},
data() {
return {
isActive: false
}
},
computed: {
classes() {
return { 'is-active': this.isActive }
}
},
methods: {
toggle() {
this.isActive = !this.isActive
this.$emit('input', this.isActive)
}
}
}
</script>
<style lang="scss" scoped>
.collapse {
margin-top: 10px;
}
.collapse-hd {
display: flex;
font-size: 14px;
line-height: 20px;
color: #222;
}
.collapse-icon {
margin-right: 6px;
font-size: 14px;
cursor: pointer;
color: #999;
}
.collapse-bd {
padding-left: 20px;
color: #666;
p {
color: #666 !important;
}
}
</style>
export default function(_this) {
return {
id: 'admission_cjd',
title: '成绩单(中+英)',
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [
'FILLING',
'PREPAYMENT',
'INTERVIEW_APPLICATION',
'AUDITION',
'INTERVIEW',
'PAYMENT',
'REGISTRATION',
'CLOSED'
]
this.form.options.disabled = stageList.findIndex(item => item === submissionStage) > 6
return attachments.reduce(
(result, item) => {
if (item.file_type_id === 'REPORT_CARD_CN') {
result.REPORT_CARD_CN.push(item)
}
if (item.file_type_id === 'REPORT_CARD_EN') {
result.REPORT_CARD_EN.push(item)
}
return result
},
{ REPORT_CARD_CN: [], REPORT_CARD_EN: [] }
)
}
},
form: {
next: { to: { query: { active: 'admission_xy' } } },
hasButton: false,
options: { 'label-position': 'top' },
hint: `
<p>请将中英文成绩单原件扫描或者拍照后提交。</p>
<p>获取途径:联系大学时就读学校相关部门(档案馆/教务处)获取成绩单。</p>
`,
items: [
{
type: 'v-upload',
label: '中文成绩单',
model: 'REPORT_CARD_CN',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'REPORT_CARD_CN' }
}
},
{
type: 'v-upload',
label: '英文成绩单',
model: 'REPORT_CARD_EN',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'REPORT_CARD_EN' }
}
}
]
}
}
}
import cjd from './cjd'
import xy from './xy'
import xfjn from './xfjn'
export default function(_this) {
return {
id: 'admission',
title: '入学办理',
children: [cjd(_this), xy(_this), xfjn(_this)]
}
}
export default function(_this) {
return {
id: 'admission_xfjn',
title: '缴费凭证',
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [
'FILLING',
'PREPAYMENT',
'INTERVIEW_APPLICATION',
'AUDITION',
'INTERVIEW',
'PAYMENT',
'REGISTRATION',
'CLOSED'
]
this.form.options.disabled = stageList.findIndex(item => item === submissionStage) > 6
const PAYMENT_VOUCHER = attachments.filter(item => {
return item.file_type_id === 'PAYMENT_VOUCHER'
})
return { PAYMENT_VOUCHER }
}
},
form: {
prev: { to: { query: { active: 'admission_xy' } } },
hasButton: false,
options: { 'label-position': 'top' },
hint: `
<p><strong>一、对公收款银行信息:</strong></p>
<p>户名:清控紫荆( 北京)教育科技股份有限公司</p>
<p>帐号:694485289</p>
<p>开户行:中国民生银行股份有限公司北京魏公村支行</p>
<p style="margin-top:30px;"><strong>二、支付宝收款账户信息:</strong></p>
<p>支付宝账号:service@ezijing.com</p>
<p>支付宝户名:清控紫荆(北京)教育科技股份有限公司</p>`,
items: [
{
type: 'v-upload',
model: 'PAYMENT_VOUCHER',
label: '上传缴费凭证',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'PAYMENT_VOUCHER' }
},
append: `申请者可将转账/支付缴费凭证截图或拍照后提交。<br>
上传多个文件,请打印出来检查无误后再上传。用A4纸打印后内容需显示完整、格式整齐、字迹清晰可辨。上传文件仅限“jpg,jpeg,pdf,png”格式,文件小于10Mb。`
}
]
}
}
}
export default function(_this) {
return {
id: 'admission_xy',
title: '入学协议',
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { attachments = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [
'FILLING',
'PREPAYMENT',
'INTERVIEW_APPLICATION',
'AUDITION',
'INTERVIEW',
'PAYMENT',
'REGISTRATION',
'CLOSED'
]
this.form.options.disabled = stageList.findIndex(item => item === submissionStage) > 6
const ADMISSION_AGREEMENT = attachments.filter(item => {
return item.file_type_id === 'ADMISSION_AGREEMENT'
})
return { ADMISSION_AGREEMENT }
}
},
form: {
prev: { to: { query: { active: 'admission_cjd' } } },
next: { to: { query: { active: 'admission_xfjn' } } },
hasButton: false,
options: {},
items: [
{
type: 'v-upload',
required: true,
model: 'ADMISSION_AGREEMENT',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'ADMISSION_AGREEMENT' }
},
prepend: `
<p><a href="https://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/pc/kelley/%E5%85%A5%E5%AD%A6%E5%8D%8F%E8%AE%AE.pdf" target="_blank" download="入学协议">下载入学协议</a></p>
<p>申请者可将签字后的入学协议原件扫描或拍照后提交。</p>
<p>学员应仔细阅读《入学协议》以及课程介绍,如对入学协议或课程有异议,请第一时间与课程顾问咨询确认。请用A4纸打印后,在入学协议上签上姓名和日期,内容需显示完整、格式整齐、字迹清晰可辨。上传文件仅限“jpg,jpeg,pdf,png”格式,文件小于10Mb。</p>
`
}
]
}
}
}
<template>
<app-layout>
<vue-form
:menus="menus"
:default-active="currentActive"
@page-change="handlePageChange"
@success="handleSuccess"
@error="handleError"
@back="$router.push('/my/account')"
@prev="handlePrev"
@next="handleNext"
@uploaded="getApplication"
>
<template #aside-append>
<div class="aside-logout" @click="$store.dispatch('logout')"><span>退出登录</span></div>
</template>
<!-- 入学协议 -->
<!-- <template #content v-if="currentActive === 'admission_xy'">
<app-xy />
</template> -->
</vue-form>
<el-dialog
title="办理入学资料提交成功"
:visible.sync="dialogVisible"
:center="true"
:close-on-click-modal="false"
width="348px"
>
<div class="dialog-tips">
<p>请确认是否已缴费,如未缴费点击下方缴费按钮 <br />(已缴费,请忽略)</p>
<div class="icon"><img src="https://webapp-pub.ezijing.com/project/application/images/icon_success.png" /></div>
</div>
<template #footer>
<el-button type="primary" @click="toPay">立即缴费</el-button>
<el-button type="primary" @click="dialogVisible = false">忽略</el-button>
</template>
</el-dialog>
</app-layout>
</template>
<script>
import AppLayout from '../layout.vue'
import getMenu from './form'
import * as api from '@/api/my'
import AppXy from './xy'
export default {
components: { AppLayout, AppXy },
data() {
const menus = getMenu(this)
return {
menus: [menus],
currentActive: 'admission_cjd',
dialogVisible: false,
detail: null
}
},
watch: {
$route: {
immediate: true,
handler(route) {
const { query = {} } = route
this.currentActive = query.active || 'admission_cjd'
}
},
showSubmitedDialog(value) {
this.dialogVisible = value
}
},
computed: {
isSubmited() {
if (this.detail) {
return !!this.detail.material.attachments.find(item => item.file_type_id === 'ADMISSION_AGREEMENT')
}
return false
},
showSubmitedDialog() {
return this.isSubmited && this.currentActive === 'admission_xy'
}
},
methods: {
// 获取报名信息
getApplication() {
api.getApplication().then(response => {
const { data, error, message } = response
if (error.toString() === '0') {
this.detail = data
} else {
this.$message.error(message)
}
})
},
handlePageChange(value) {
this.currentActive = value
this.$router.push({ path: this.$route.path, query: { active: value } }).catch(() => {})
console.log('页面切换了', value)
},
handleSuccess(data) {
console.log('提交成功了', data)
this.$message({ type: 'success', message: data.message })
},
handleError(data) {
console.log('提交失败了', data)
this.$message({ type: 'error', message: data.message })
},
handlePrev(to) {
this.$router.push(to)
},
handleNext(to) {
this.$router.push(to)
},
toPay() {
this.dialogVisible = false
this.$router.push({ path: '/my/admission', query: { active: 'admission_xfjn' } })
}
},
beforeMount() {
this.getApplication()
}
}
</script>
<style lang="scss" scoped>
.dialog-tips {
text-align: center;
p {
color: #262626;
line-height: 20px;
}
.icon {
margin-top: 20px;
text-align: center;
}
}
</style>
差异被折叠。
<template>
<el-dialog
title="您当前完成进度如下:"
width="348px"
:center="true"
:close-on-click-modal="false"
:visible.sync="dialogVisible"
@open="handleOpen"
@close="handleClose"
>
<div>
<ul v-if="detail">
<li
v-for="item in currentOptions"
:class="progress[item.code].progress === 1 ? 'is-success' : 'is-error'"
:key="item.code"
>
<span class="name">{{ item.title }}</span>
<span class="line"></span>
<span class="status">{{ progress[item.code].progress === 1 ? '已完成' : '未完成' }}</span>
<span class="view" @click="handleView(item.view.to)">立即查看</span>
</li>
</ul>
</div>
<template #footer>
<el-button type="primary" @click="dialogVisible = false">我知道啦</el-button>
</template>
</el-dialog>
</template>
<script>
import * as api from '@/api/my'
export default {
props: { value: { type: Boolean, default: false }, type: { type: Number, default: 0 } },
data() {
return {
dialogVisible: false,
detail: null,
progress: {},
options: [
[
{
title: '个人资料',
code: 'applicaitonInfo',
view: { to: { path: '/my/application', query: { active: 'application_info' } } }
}
// {
// title: '推荐信',
// code: 'applicationTjx',
// view: { to: { path: '/my/application', query: { active: 'application_tjx' } } }
// }
// {
// title: '无犯罪证明',
// code: 'applicationWfzzm',
// view: { to: { path: '/my/application', query: { active: 'application_wfzzm' } } }
// }
],
[
{
title: '毕业证书',
code: 'interviewByzs',
view: { to: { path: '/my/interview', query: { active: 'interview_byzs' } } }
},
{
title: '学位证书',
code: 'interviewXwzs',
view: { to: { path: '/my/interview', query: { active: 'interview_xwzs' } } }
},
// {
// title: '学位证书英文证明',
// code: 'interviewXwzsEnglish',
// view: { to: { path: '/my/interview', query: { active: 'interview_xwzsywzm' } } }
// },
{
title: '英文简历',
code: 'interviewYwjl',
view: { to: { path: '/my/interview', query: { active: 'interview_ywjl' } } }
},
{
title: '2寸照片',
code: 'interviewZp',
view: { to: { path: '/my/interview', query: { active: 'interview_zp' } } }
}
// {
// title: '成绩单',
// code: 'interviewCjd',
// view: { to: { path: '/my/interview', query: { active: 'interview_cjd' } } }
// },
// {
// title: '推荐信',
// code: 'interviewTjx',
// view: { to: { path: '/my/application', query: { active: 'application_tjx' } } }
// }
]
]
}
},
watch: {
value: {
immediate: true,
handler(value) {
this.dialogVisible = value
}
}
},
computed: {
currentOptions() {
return this.options[this.type]
}
},
methods: {
// 获取报名信息
getApplication() {
api.getApplication(this.$route.query).then(response => {
const { data, error, message } = response
if (error.toString() === '0') {
const { progress } = data
this.detail = data
const fillingMissedRequiredList = progress.FILLING.attachments.missed_required_list
// 个人资料
const applicaitonInfo = { progress: 0 }
const infoRequriedList = ['basic_info', 'educations', 'careers', 'answers']
for (const key of infoRequriedList) {
if (progress.FILLING[key].progress < 1) {
applicaitonInfo.progress = 0
break
}
applicaitonInfo.progress = 1
}
if (applicaitonInfo.progress === 1 && !fillingMissedRequiredList.ID_CARD_PHOTO) {
applicaitonInfo.progress = 1
} else {
applicaitonInfo.progress = 0
}
// 推荐信
const applicationTjx = { progress: 0 }
applicationTjx.progress = progress.FILLING.reco_letters ? progress.FILLING.reco_letters.progress : 0
// 无犯罪证明
const applicationWfzzm = { progress: 0 }
applicationWfzzm.progress = fillingMissedRequiredList.NO_CRIMINAL_CERT ? 0 : 1
const missedRequiredList = progress.INTERVIEW_APPLICATION.attachments.missed_required_list
// 2寸照片
const interviewZp = { progress: 0 }
interviewZp.progress = missedRequiredList.PERSONAL_PHOTO_FOR_ID ? 0 : 1
// 毕业证书
const interviewByzs = { progress: 0 }
interviewByzs.progress = missedRequiredList.DIPLOMA_CN ? 0 : 1
// 学位证书
const interviewXwzs = { progress: 0 }
interviewXwzs.progress = missedRequiredList.DEGREE_CERT_CN ? 0 : 1
// 学位证书英文
const interviewXwzsEnglish = { progress: 0 }
interviewXwzsEnglish.progress = missedRequiredList.DEGREE_CERT_EN ? 0 : 1
// 英文简历
const interviewYwjl = { progress: 0 }
interviewYwjl.progress = missedRequiredList.RESUME_EN ? 0 : 1
// 成绩单
const interviewCjd = { progress: 0 }
interviewCjd.progress = missedRequiredList.REPORT_CARD_CN || missedRequiredList.REPORT_CARD_EN ? 0 : 1
// 推荐信
const interviewTjx = { progress: 0 }
interviewTjx.progress = progress.INTERVIEW_APPLICATION.reco_letters
? progress.INTERVIEW_APPLICATION.reco_letters.progress
: 0
this.progress = {
applicaitonInfo,
applicationTjx,
applicationWfzzm,
interviewZp,
interviewByzs,
interviewXwzs,
interviewXwzsEnglish,
interviewYwjl,
interviewCjd,
interviewTjx
}
} else {
this.$message.error(message)
}
})
},
handleView(to) {
this.dialogVisible = false
this.$router.push(to)
},
handleOpen() {
this.getApplication()
},
handleClose() {
this.$emit('input', this.dialogVisible)
}
}
}
</script>
<style lang="scss" scoped>
li {
padding: 10px 0;
display: flex;
align-items: center;
}
.name {
width: 80px;
text-align: right;
}
.line {
width: 40px;
height: 1px;
margin: 0 10px;
background-color: #ccc;
}
.is-success {
.status {
color: #33c011;
}
}
.is-error {
.status {
color: #af1b40;
}
}
.view {
margin-left: 40px;
color: #57acff;
text-decoration: underline;
cursor: pointer;
}
</style>
<template>
<div class="h5pay">
<el-button type="primary" @click="handlePay">去支付</el-button>
</div>
</template>
<script>
import * as api from '@/api/my'
export default {
data() {
return {
openId: window.localStorage.getItem('open_id')
}
},
computed: {
pageUrl() {
return window.location.origin + this.$route.path + '?active=application_pay'
}
},
methods: {
// 获取订单
getOrder(callback) {
api.getOrder({ wx_open_id: this.openId, payment_method: 'WX_PAY' }).then(response => {
const { data, error, message } = response
if (error.toString() === '0') {
this.order = data
this.$emit('update', this.order)
callback && callback(this.order)
} else {
this.$message.error(message)
}
})
},
// 获取微信code
getCode() {
const redirectURI = `https://pages.ezijing.com/given/auth.html?redirect_uri=${encodeURIComponent(this.pageUrl)}`
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx451c01d40d090d7a&redirect_uri=${redirectURI}&response_type=code&scope=snsapi_base#wechat_redirect`
},
// 获取微信openid
getOpenId(code) {
api.getOpenId({ code, identity: 'ezijing' }).then(response => {
if (response.code === 0) {
this.openId = response.openid
window.localStorage.setItem('open_id', this.openId)
this.getOrder()
} else {
this.getCode()
}
})
},
// 去支付
handlePay() {
this.getOrder(() => {
window.location.href = `https://web-pay.ezijing.com/wxpay/h5?prepay_id=${this.order.wx_prepay_id}&open_id=${
this.openId
}&redirect_uri=${encodeURIComponent(this.pageUrl)}`
})
}
},
beforeMount() {
if (!this.openId) {
const { code } = this.$route.query
code ? this.getOpenId(code) : this.getCode()
}
}
}
</script>
<style scoped>
.h5pay {
padding: 40px;
text-align: center;
}
</style>
<template>
<div class="qrpay">
<div class="qrpay-hd">
<div class="pic">
<img src="https://webapp-pub.ezijing.com/project/application/images/my_pay_01.png" />
</div>
<h1>欢迎您</h1>
<p class="t1">
紫荆-印第安纳大学Kelley商学院金融硕士(MSF)项目申请费<span>700</span>元,请扫描二维码支付完成报名。
</p>
</div>
<div class="qrcode-error" v-if="qrcodeError">
生成二维码失败请刷新<i class="el-icon-refresh-left" @click="getOrder" title="刷新"></i>
</div>
<div class="qrcode" v-else>
<qrcode-vue :value="qrcodeValue" size="100"></qrcode-vue>
<span @click="getOrder">刷新</span>
</div>
</div>
</template>
<script>
import QrcodeVue from 'qrcode.vue'
import * as api from '@/api/my'
export default {
components: { QrcodeVue },
data() {
return {
order: { id: '', payment_url: '' },
qrcodeError: false
}
},
computed: {
// 二维码地址
qrcodeValue() {
return this.order.payment_url
}
},
methods: {
// 获取订单
getOrder() {
api.getOrder({ payment_method: 'WX_PAY_QR' }).then(response => {
const { data, error, message } = response
this.qrcodeError = error.toString() === '1'
if (error.toString() === '0') {
this.order = data
this.$emit('update', this.order)
} else {
this.$message.error(message)
}
})
}
},
beforeMount() {
this.getOrder()
}
}
</script>
<style lang="scss" scoped>
.qrpay-hd {
.pic {
text-align: center;
}
h1 {
padding: 10px 0;
font-size: 24px;
font-weight: 500;
color: #222;
line-height: 1;
text-align: center;
}
}
.qrcode {
padding: 20px 0;
text-align: center;
span {
margin-top: 10px;
font-size: 12px;
color: #999;
cursor: pointer;
}
}
.qrcode-error {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
width: 100px;
height: 100px;
padding: 10px;
margin: 20px auto;
color: var(--main-color);
border-style: dashed;
border-width: 1px;
border-color: var(--main-color);
box-sizing: border-box;
text-align: center;
i {
margin-top: 10px;
cursor: pointer;
}
}
.t1 {
font-size: 14px;
color: #303030;
line-height: 20px;
text-align: center;
span {
color: #ffa448;
}
}
</style>
/**
* 申请声明
*/
export default function(_this) {
return {
id: 'application_declare',
title: '申请声明',
visible() {
return _this.visible
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { submission_stage: submissionStage = 'FILLING' } = data.data.material
const isSubmited = submissionStage !== 'FILLING'
this.form.options.disabled = isSubmited
if (isSubmited) {
return { isAgree: [1] }
}
return { isAgree: [] }
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/submit/${webConf.others.projectId}`,
callback() {
_this.getApplication()
this.form.options.disabled = true
_this.$router.push({ path: this.$route.path, query: { active: 'application_pay' } })
// _this.$router.push({ path: '/my/interview' })
},
errorCallback() {
_this.completeVisible = true
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } } },
submitText: '提交报名申请',
model: { isAgree: [] },
options: {},
items: [
{
type: 'v-checkbox',
values: [{ label: '同意', value: 1 }],
model: 'isAgree',
rules: [{ required: true, message: '请阅读协议', trigger: 'change' }],
prepend:
'<p>我提供的所有报名材料信息皆准确和完整。我同意在需要的情况下提交原件以确认我的报名资格。由于报名材料中的虚假、错误信息或重大遗漏导致不录取或取消学籍的后果由我个人承担。 我理解并同意所有报名材料归紫荆教育所有,无论考生录取与否均不退回。我授权紫荆教育使用报名表中的信息查询本人学习和工作记录。</p>'
}
]
}
}
}
import info from './info'
// import tjx from './tjx'
// import wfzsm from './wfzzm'
import declare from './declare'
export default function(_this) {
return {
id: 'application',
title: '报名申请',
children: [
info(_this),
// tjx(_this),
// wfzsm(_this),
declare(_this),
{
id: 'application_pay',
title: '缴报名费',
show: false,
visible() {
return _this.visible
}
}
]
}
}
import first from './info/first'
import profile from './info/profile'
import education from './info/education'
import career from './info/career'
import honor from './info/honor'
import training from './info/training'
import answer from './info/answer'
export default function(_this) {
return {
id: 'application_info',
title: '个人资料',
tabs: [first(_this), profile(_this), education(_this), career(_this), answer(_this), training(_this), honor(_this)]
}
}
/**
* 学习目的
*/
export default function(_this) {
return {
id: 'application_info_answer',
title: '学习目的',
required: true,
visible() {
return _this.visible
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { answers = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
const [first = {}, second = {}] = answers
return {
qid1: first.qid || '1',
question1: '您为什么要申请美国印第安纳大学Kelley商学院金融学硕士项目?(200字以上,1000字以内)',
answer1: first.answer,
qid2: second.qid || '2',
question2: '您的短期和长期职业发展目标是什么?您打算如何达成此愿景?(200字以上,1000字以内)',
answer2: second.answer
}
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) {
return {
answers: [
{ qid: data.qid1, question: data.question1, answer: data.answer1 },
{ qid: data.qid2, question: data.question2, answer: data.answer2 }
]
}
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true },
options: {},
items: [
{
type: 'v-input',
label: '您为什么要申请美国印第安纳大学Kelley商学院金融学硕士项目?(200字以上,1000字以内)',
model: 'answer1',
attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' },
rules: [
{ required: true, message: '请输入', trigger: 'blur' },
{ min: 200, max: 1000, message: '长度在 200 到 1000 个字符', trigger: 'blur' }
]
},
{
type: 'v-input',
label: '您的短期和长期职业发展目标是什么?您打算如何达成此愿景?(200字以上,1000字以内)',
model: 'answer2',
attrs: { type: 'textarea', rows: '8', maxlength: '1000', style: 'width:100%' },
rules: [
{ required: true, message: '请输入', trigger: 'blur' },
{ min: 200, max: 1000, message: '长度在 200 到 1000 个字符', trigger: 'blur' }
]
}
]
}
}
}
/**
* 工作经验
*/
export default function(_this) {
return {
id: 'application_info_career',
title: '工作经验',
required: true,
visible() {
return _this.visible
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { careers: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
return list.length ? list : [{}]
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) {
const careers = data.map(item => {
return [
'start_date',
'end_date',
'company_name_cn',
'industry',
'dept_cn',
'position_cn',
'job_desc_cn'
].reduce((result, key) => {
result[key] = item[key]
return result
}, {})
})
return { careers }
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_education' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
items: [
{
type: 'v-datepicker',
label: '开始时间',
model: 'start_date',
attrs: {
type: 'month',
placeholder: '请选择工作开始时间',
valueFormat: 'yyyy-MM'
},
rules: [{ required: true, message: '请选择工作开始时间', trigger: 'blur' }]
},
{
type: 'v-datepicker',
label: '结束时间',
model: 'end_date',
attrs: {
type: 'month',
placeholder: '请选择工作结束时间',
valueFormat: 'yyyy-MM'
},
rules: [{ required: true, message: '请选择工作结束时间', trigger: 'blur' }]
},
{
type: 'v-input',
label: '工作单位',
model: 'company_name_cn',
attrs: { placeholder: '请输入工作单位' },
rules: [{ required: true, message: '请输入工作单位', trigger: 'blur' }]
},
{
type: 'v-select',
values: [
{ value: '互联网/电子商务' },
{ value: '基金/证券/期货/投资' },
{ value: '保险' },
{ value: '银行' },
{ value: '信托/担保/拍卖/典当' },
{ value: '计算机软件' },
{ value: 'IT服务(系统/数据/维护)' },
{ value: '电子技术/半导体/集成电路' },
{ value: '计算机硬件' },
{ value: '通信/电信/网络设备' },
{ value: '通信/电信运营、增值服务' },
{ value: '网络游戏' },
{ value: '房地产/建筑/建材/工程' },
{ value: '家居/室内设计/装饰装潢' },
{ value: '物业管理/商业中心' },
{ value: '专业服务/咨询(财会/法律/人力资源等)' },
{ value: '广告/会展/公关' },
{ value: '中介服务' },
{ value: '检验/检测/认证' },
{ value: '外包服务' },
{ value: '快速消费品(食品/饮料/烟酒/日化)' },
{ value: '耐用消费品(服饰/纺织/皮革/家具/家电)' },
{ value: '贸易/进出口' },
{ value: '零售/批发' },
{ value: '租赁服务' },
{ value: '教育/培训/院校' },
{ value: '礼品/玩具/工艺美术/收藏品/奢侈品' },
{ value: '汽车/摩托车' },
{ value: '大型设备/机电设备/重工业' },
{ value: '加工制造(原料加工/模具)' },
{ value: '仪器仪表及工业自动化' },
{ value: '印刷/包装/造纸' },
{ value: '办公用品及设备' },
{ value: '医药/生物工程' },
{ value: '医疗设备/器械' },
{ value: '航空/航天研究与制造' },
{ value: '交通/运输,物流/仓储' },
{ value: '医疗/护理/美容/保健/卫生服务' },
{ value: '酒店/餐饮,旅游/度假,媒体/出版/影视/文化传播' },
{ value: '娱乐/体育/休闲' },
{ value: '能源/矿产/采掘/冶炼' },
{ value: '石油/石化/化工,电气/电力/水利' },
{ value: '环保' },
{ value: '政府/公共事业/非盈利机构' },
{ value: '学术/科研,农/林/牧/渔跨领域经营' },
{ value: '其他' }
],
label: '行业类别',
model: 'industry',
rules: [{ required: true, message: '请选择行业类别', trigger: 'change' }]
},
{
type: 'v-input',
label: '工作部门',
model: 'dept_cn',
attrs: { placeholder: '请输入工作部门' },
rules: [{ required: true, message: '请输入工作部门', trigger: 'blur' }]
},
{
type: 'v-input',
label: '工作职位',
model: 'position_cn',
attrs: { placeholder: '请输入工作职位' },
rules: [{ required: true, message: '请输入工作职位', trigger: 'blur' }]
},
{
type: 'v-input',
label: '工作描述',
model: 'job_desc_cn',
attrs: {
type: 'textarea',
placeholder: '请输入工作描述',
rows: '8',
maxlength: '3000'
},
rules: [{ required: true, message: '请输入工作描述', trigger: 'blur' }]
}
]
}
}
}
差异被折叠。
/**
* 教育背景
*/
export default function(_this) {
return {
id: 'application_info_education',
title: '教育背景',
required: true,
visible() {
return _this.visible
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { educations: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
return list.length ? list : [{}]
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) {
const educations = data.map(item => {
return ['start_date', 'end_date', 'school_name_cn', 'major_cn', 'degree'].reduce((result, key) => {
result[key] = item[key]
return result
}, {})
})
return { educations }
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_profile' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_career' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
items: [
{
type: 'v-datepicker',
label: '开始时间',
model: 'start_date',
attrs: {
type: 'month',
placeholder: '请选择教育开始时间',
valueFormat: 'yyyy-MM'
},
rules: [{ required: true, message: '请选择教育开始时间', trigger: 'blur' }]
},
{
type: 'v-datepicker',
label: '结束时间',
model: 'end_date',
attrs: {
type: 'month',
placeholder: '请选择教育结束时间',
valueFormat: 'yyyy-MM'
},
rules: [{ required: true, message: '请选择教育结束时间', trigger: 'blur' }]
},
{
type: 'v-input',
label: '学校名称',
model: 'school_name_cn',
attrs: { placeholder: '请输入学校名称' },
rules: [{ required: true, message: '请输入学校名称', trigger: 'blur' }]
},
{
type: 'v-input',
label: '专业名称',
model: 'major_cn',
attrs: { placeholder: '请输入专业名称' },
rules: [{ required: true, message: '请输入专业名称', trigger: 'blur' }]
},
{
type: 'v-select',
values: [
{ value: '专科' },
{ value: '本科' },
{ value: '本科/学士' },
{ value: '硕士研究生' },
{ value: '研究生/硕士' },
{ value: '博士研究生' },
{ value: '研究生/博士' },
{ value: '其他' }
],
label: '学历/学位',
model: 'degree',
rules: [{ required: true, message: '请选择学历/学位', trigger: 'change' }]
}
]
}
}
}
/**
* 个人信息
*/
export default function(_this) {
return {
id: 'application_info_first',
title: '个人信息',
required: true,
visible() {
return this.tabActive === 'application_info_first'
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const {
basic_info: basicInfo = {},
attachments = [],
submission_stage: submissionStage = 'FILLING'
} = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
const attachment = attachments.reduce(
(result, item) => {
const types = ['ID_CARD_FRONT', 'ID_CARD_BACK', 'HK_ID_CARD', 'PASSPORT', 'OTHER_ID_CARD_PHOTO']
types.forEach(type => {
if (item.file_type_id === type) {
result[type].push(item)
}
})
return result
},
{ ID_CARD_FRONT: [], ID_CARD_BACK: [], HK_ID_CARD: [], PASSPORT: [], OTHER_ID_CARD_PHOTO: [] }
)
basicInfo.id_type = basicInfo.id_type === '护照' ? '中国护照' : basicInfo.id_type
return Object.assign({}, basicInfo, attachment)
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) {
const basicInfo = ['phone_number', 'email', 'id_type'].reduce((result, key) => {
result[key] = data[key]
return result
}, {})
return { basic_info: basicInfo }
}
},
form: {
hasButton: false,
next: { to: { query: { active: 'application_info', tab: 'application_info_profile' } }, isSubmit: true },
options: { labelWidth: '140px' },
items: [
{
type: 'v-input',
label: '手机号',
model: 'phone_number',
attrs: { placeholder: '请输入手机号', maxlength: 11 },
rules: [{ required: true, pattern: /^1[3-9]\d{9}$/, message: '请输入手机号', trigger: 'blur' }]
},
{
type: 'v-input',
label: '邮箱',
model: 'email',
attrs: { placeholder: '请输入邮箱' },
rules: [{ type: 'email', required: true, message: '请输入邮箱', trigger: 'blur' }]
},
{
type: 'v-select',
values: [{ value: '居民身份证' }, { value: '港澳台身份证' }, { value: '中国护照' }, { value: '其他' }],
label: '证件类型',
model: 'id_type',
attrs: { placeholder: '请选择证件类型' },
rules: [{ required: true, message: '请选择证件类型', trigger: 'change' }]
},
// 身份证照片(背面)
{
type: 'v-upload',
label: '身份证人像面',
model: 'ID_CARD_BACK',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'ID_CARD_BACK' },
limit: 1,
accept: 'image/*',
image: 'https://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/pc/cu/id_card_back.png'
},
rules: [{ type: 'array', required: true, message: '请上传身份证照片人像面', trigger: 'change' }],
isShow(data) {
return data.id_type === '居民身份证'
}
},
// 身份证照片(正面)
{
type: 'v-upload',
label: '身份证国徽面',
model: 'ID_CARD_FRONT',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'ID_CARD_FRONT' },
limit: 1,
accept: 'image/*',
image: 'https://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/pc/cu/id_card_front.png'
},
rules: [{ type: 'array', required: true, message: '请上传身份证照片国徽面', trigger: 'change' }],
isShow(data) {
return data.id_type === '居民身份证'
}
},
// 港澳台身份证
{
type: 'v-upload',
label: '港澳台身份证',
model: 'HK_ID_CARD',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'HK_ID_CARD' },
limit: 1,
accept: 'image/*'
},
rules: [{ type: 'array', required: true, message: '请上传港澳台身份证', trigger: 'change' }],
isShow(data) {
return data.id_type === '港澳台身份证'
}
},
// 中国护照
{
type: 'v-upload',
label: '中国护照',
model: 'PASSPORT',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'PASSPORT' },
limit: 1,
accept: 'image/*'
},
rules: [{ type: 'array', required: true, message: '请上传中国护照', trigger: 'change' }],
isShow(data) {
return data.id_type === '中国护照'
}
},
// 其他证件
{
type: 'v-upload',
label: '其他证件',
model: 'OTHER_ID_CARD_PHOTO',
attrs: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/put`,
deleteAction: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/attachments/${webConf.others.projectId}/delete`,
data: { file_type: 'OTHER_ID_CARD_PHOTO' },
limit: 1,
accept: 'image/*'
},
rules: [{ type: 'array', required: true, message: '请上传其他证件', trigger: 'change' }],
isShow(data) {
return data.id_type === '其他'
}
}
]
}
}
}
/**
* 荣誉奖励
*/
export default function(_this) {
return {
id: 'application_info_honor',
title: '荣誉奖励',
visible() {
return _this.visible
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { honors: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
return list.length ? list : [{}]
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) {
const honors = data.map(item => {
return ['time', 'title', 'institution_cn'].reduce((result, key) => {
result[key] = item[key] || ''
return result
}, {})
})
return { honors }
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_training' } }, isSubmit: true },
next: { to: { query: { active: 'application_declare' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
items: [
{
type: 'v-datepicker',
label: '获取时间',
model: 'time',
attrs: { type: 'date', valueFormat: 'yyyy-MM-dd', placeholder: '请选择获取时间' }
// rules: [{ required: true, message: '请选择获取时间', trigger: 'blur' }]
},
{
type: 'v-input',
label: '荣誉奖励',
model: 'title',
attrs: { placeholder: '请输入荣誉奖励' }
// rules: [{ required: true, message: '请输入荣誉奖励', trigger: 'blur' }]
},
{
type: 'v-input',
label: '证书颁发机构',
model: 'institution_cn',
attrs: { placeholder: '请输入证书颁发机构' }
// rules: [{ required: true, message: '请输入证书颁发机构', trigger: 'blur' }]
}
]
}
}
}
差异被折叠。
/**
* 所受培训
*/
export default function(_this) {
return {
id: 'application_info_training',
title: '所受培训',
visible() {
return _this.visible
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { trainings: list = [], submission_stage: submissionStage = 'FILLING' } = data.data.material
this.form.options.disabled = submissionStage !== 'FILLING'
return list.length ? list : [{}]
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) {
const trainings = data.map(item => {
return ['start_date', 'end_date', 'institution_cn', 'course_cn'].reduce((result, key) => {
result[key] = item[key] || ''
return result
}, {})
})
return { trainings }
}
},
form: {
prev: { to: { query: { active: 'application_info', tab: 'application_info_answer' } }, isSubmit: true },
next: { to: { query: { active: 'application_info', tab: 'application_info_honor' } }, isSubmit: true },
hasAdd: true,
options: { labelWidth: '140px' },
items: [
{
type: 'v-datepicker',
label: '开始时间',
model: 'start_date',
attrs: {
type: 'month',
placeholder: '请选择培训开始时间',
valueFormat: 'yyyy-MM'
}
// rules: [{ required: true, message: '请选择培训开始时间', trigger: 'blur' }]
},
{
type: 'v-datepicker',
label: '结束时间',
model: 'end_date',
attrs: {
type: 'month',
placeholder: '请选择培训结束时间',
valueFormat: 'yyyy-MM'
}
// rules: [{ required: true, message: '请选择培训结束时间', trigger: 'blur' }]
},
{
type: 'v-input',
label: '培训机构',
model: 'institution_cn',
attrs: { placeholder: '请输入培训机构' }
// rules: [{ required: true, message: '请输入培训机构', trigger: 'blur' }]
},
{
type: 'v-input',
label: '课程名称',
model: 'course_cn',
attrs: { placeholder: '请输入课程名称' }
// rules: [{ required: true, message: '请输入课程名称', trigger: 'blur' }]
}
]
}
}
}
/**
* 推荐信
*/
export default function(_this) {
return {
id: 'application_tjx',
title: '推荐信',
visible() {
return _this.visible
},
get: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}`,
callback(data) {
const { submission_stage: submissionStage = 'FILLING' } = data.data.material
const stageList = [
'FILLING',
'PREPAYMENT',
'INTERVIEW_APPLICATION',
'AUDITION',
'INTERVIEW',
'PAYMENT',
'REGISTRATION',
'CLOSED'
]
this.form.options.disabled = stageList.findIndex(item => item === submissionStage) > 3
const list = data.data.material.reco_letters || []
return list.length ? list : [{}, {}]
}
},
update: {
action: `${webConf.apiBaseURL}/enrollment/v1.0/application-materials/${webConf.others.projectId}/put`,
beforeRequest(data) {
return { reco_letters: data }
}
},
form: {
minlength: 2,
prev: { to: { query: { active: 'application_info', tab: 'application_info_honor' } }, isSubmit: true },
next: { to: { query: { active: 'application_wfzzm' } }, isSubmit: true },
hasAdd: true,
disabled(data) {
return !!data.letter_content
},
aside: {
prepend: {
html: '<p style="color:#33C011;">推荐人已完成</p>',
visible(data) {
return !!data.letter_content
}
},
buttons: [
{
text: '再次邀请',
visible(data) {
const editable = ['PREPAYMENT', 'INTERVIEW_APPLICATION', 'AUDITION'].includes(
_this.detail.material.submission_stage
)
return data.id && !data.letter_content && editable
},
onClick(data) {
_this.sendToProvider(data)
}
},
{
text: '更换推荐人',
visible(data) {
const editable = ['PREPAYMENT', 'INTERVIEW_APPLICATION', 'AUDITION'].includes(
_this.detail.material.submission_stage
)
return data.id && !data.letter_content && editable
},
onClick(data, $form) {
$form.validate().then(() => {
_this.changeProvider(data)
})
}
}
]
},
options: { labelWidth: '140px' },
items: [
{
type: 'v-input',
label: '推荐人姓名',
model: 'provider_name',
attrs: { placeholder: '请输入推荐人姓名' },
rules: [{ required: true, message: '请输入推荐人姓名', trigger: 'blur' }]
},
{
type: 'v-input',
label: '推荐人电话',
model: 'provider_phone_number',
attrs: { placeholder: '请输入推荐人电话', maxlength: 11 },
rules: [{ required: true, pattern: /^1[3-9]\d{9}$/, message: '请输入推荐人电话', trigger: 'blur' }]
},
{
type: 'v-input',
label: '推荐人邮箱',
model: 'provider_email',
attrs: { placeholder: '请输入推荐人邮箱' },
rules: [{ type: 'email', required: true, message: '请输入推荐人邮箱', trigger: 'blur' }]
},
{
type: 'v-select',
values: [
{ value: '老师/导师' },
{ value: '领导' },
{ value: '同学' },
{ value: '同事' },
{ value: '亲属' },
{ value: '朋友' },
{ value: '其他' }
],
label: '与推荐人关系',
model: 'provider_relationship',
rules: [{ required: true, message: '请选择与推荐人关系', trigger: 'change' }]
}
]
}
}
}
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论