fix:专区-社招新员工跳转逻辑调整

This commit is contained in:
zxj
2025-11-18 19:20:39 +08:00
parent d6d27121df
commit 133b35b51e
5 changed files with 9 additions and 14 deletions

View File

@@ -18,18 +18,10 @@
class="footer-btn"
type="primary"
:loading="processing"
@click="handleConfirmClick"
v-if="showBtn"
>
立即学习
</el-button>
<el-button
v-if="showBtn"
class="footer-btn"
type="text"
@click="handleCancelClick"
v-if="showBtn"
>
取消
关闭
</el-button>
</div>
</div>

View File

@@ -422,7 +422,7 @@ export default {
// 从后端获取用户信息和报名状态
const res = await getWelcomeData();
if (res.status === 200 && res.data) {
if (res.data?.approvalResults != 1) {
if (res.data?.approvalResults && res.data?.approvalResults != 1) {
this.$router.push("/new-employee/study");
return;
}

View File

@@ -426,7 +426,7 @@ export default {
// 从后端获取用户信息和报名状态
const res = await getWelcomeData();
if (res.status === 200 && res.data) {
if (res.data?.approvalResults != 1) {
if (res.data?.approvalResults && res.data?.approvalResults != 1) {
this.$router.push("/new-employee/study");
return;
}

View File

@@ -218,7 +218,7 @@
<NewEmployeeGuideDialog
:visible.sync="guideDialogVisible"
@close="guideDialogVisible = false"
:showBtn="false"
:showBtn="true"
/>
<!-- 转正流程图弹窗 -->
<el-dialog
@@ -421,10 +421,11 @@ export default {
async mounted() {
const res = await getWelcomeData();
// 社招新员工项目标识0否1是
if (res.data.approvalResults == 1) {
if (res.data.approvalResults == 1 || !res.data.approvalResults) {
this.$refs.customMessage.show("未报名或报名失败,请前往报名页面进行报名");
this.$router.push("/new-employee/welcome");
}
this.guideDialogVisible = this.$route.query?.fromWelcome == 1;
// 1报名失败、2审核中、3审核通过、4审核失败
this.approvalResults = res.data.approvalResults;
await this.initIds();

View File

@@ -132,6 +132,8 @@ export default {
this.$refs.customMessage.show(
"报名失败请稍后重试如果再次失败请联系XXXX联系方式XXXX。"
);
} else {
this.$router.push("/new-employee/study?fromWelcome=1");
}
} catch (error) {
console.error("报名请求失败:", error);