mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-13 12:56:43 +08:00
Merge branch '20151115-zxj' of https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal into 20251117-new-employee
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="welcome">
|
<div class="welcome" v-loading="enrollLoading">
|
||||||
<p class="top-title">欢迎来到京东方大学</p>
|
<p class="top-title">欢迎来到京东方大学</p>
|
||||||
<!-- 内容卡片 -->
|
<!-- 内容卡片 -->
|
||||||
<div class="main">
|
<div class="main">
|
||||||
@@ -33,6 +33,7 @@
|
|||||||
<button
|
<button
|
||||||
v-if="approvalResults == '1' || approvalResults == '4'"
|
v-if="approvalResults == '1' || approvalResults == '4'"
|
||||||
class="btn btn-default btn-lg send center-block start-btn"
|
class="btn btn-default btn-lg send center-block start-btn"
|
||||||
|
:disabled="enrollLoading"
|
||||||
@click="handleEnrollClick"
|
@click="handleEnrollClick"
|
||||||
>
|
>
|
||||||
报名社招新员工项目
|
报名社招新员工项目
|
||||||
@@ -40,6 +41,7 @@
|
|||||||
<button
|
<button
|
||||||
v-else
|
v-else
|
||||||
class="btn btn-default btn-lg send center-block start-btn"
|
class="btn btn-default btn-lg send center-block start-btn"
|
||||||
|
:disabled="enrollLoading"
|
||||||
@click="handleEnrollClick"
|
@click="handleEnrollClick"
|
||||||
>
|
>
|
||||||
开启学习之旅
|
开启学习之旅
|
||||||
@@ -89,6 +91,7 @@ export default {
|
|||||||
processing: false,
|
processing: false,
|
||||||
confirmBtnText: "确认",
|
confirmBtnText: "确认",
|
||||||
infoConfirmDialogVisible: false,
|
infoConfirmDialogVisible: false,
|
||||||
|
enrollLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -122,12 +125,21 @@ export default {
|
|||||||
// 报名按钮点击
|
// 报名按钮点击
|
||||||
async handleEnrollClick() {
|
async handleEnrollClick() {
|
||||||
if (this.approvalResults == "1" || this.approvalResults == "4") {
|
if (this.approvalResults == "1" || this.approvalResults == "4") {
|
||||||
|
this.enrollLoading = true;
|
||||||
|
try {
|
||||||
const res = await enrollRequest();
|
const res = await enrollRequest();
|
||||||
if (res.data.sendToOaSuccess != 0) {
|
if (res.data.sendToOaSuccess != 0) {
|
||||||
this.$refs.customMessage.show(
|
this.$refs.customMessage.show(
|
||||||
"报名失败请稍后重试,如果再次失败,请联系:XXXX,联系方式:XXXX。"
|
"报名失败请稍后重试,如果再次失败,请联系:XXXX,联系方式:XXXX。"
|
||||||
);
|
);
|
||||||
return;
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error("报名请求失败:", error);
|
||||||
|
this.$refs.customMessage.show(
|
||||||
|
"报名失败请稍后重试,如果再次失败,请联系:XXXX,联系方式:XXXX。"
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
this.enrollLoading = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$router.push("/new-employee/study?fromWelcome=1");
|
this.$router.push("/new-employee/study?fromWelcome=1");
|
||||||
@@ -274,6 +286,16 @@ export default {
|
|||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.start-btn:disabled {
|
||||||
|
opacity: 0.6;
|
||||||
|
cursor: not-allowed;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.start-btn:disabled:hover {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* 响应式样式 */
|
/* 响应式样式 */
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.top-title {
|
.top-title {
|
||||||
@@ -330,5 +352,10 @@ export default {
|
|||||||
display: none !important;
|
display: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Loading遮罩层透明度 */
|
||||||
|
.welcome ::v-deep .el-loading-mask {
|
||||||
|
background-color: rgba(255, 255, 255, 0.5) !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user