Merge branch '20251117-new-employee' of http://10.251.129.121/boeu/learning-system-portal into master-20251210

This commit is contained in:
joshen
2025-12-11 23:31:49 +08:00

View File

@@ -81,7 +81,11 @@
<script> <script>
import { mapGetters } from "vuex"; import { mapGetters } from "vuex";
import { getWelcomeData, enrollRequest } from "@/api/new-employee/newEmployee"; import {
getWelcomeData,
enrollRequest,
getSzxygProjectInfo,
} from "@/api/new-employee/newEmployee";
import NewEmployeeGuideDialog from "@/components/NewEmployeeGuideDialog.vue"; import NewEmployeeGuideDialog from "@/components/NewEmployeeGuideDialog.vue";
import CustomErrorMessage from "@/components/CustomErrorMessage.vue"; import CustomErrorMessage from "@/components/CustomErrorMessage.vue";
@@ -113,12 +117,19 @@ export default {
try { try {
// 从后端获取用户信息和报名状态 // 从后端获取用户信息和报名状态
const res = await getWelcomeData(); const res = await getWelcomeData();
const szxygProjectInfo = await getSzxygProjectInfo();
this.allowSelfRegistration =
szxygProjectInfo.data.allowSelfRegistration;
if (res.status === 200 && res.data) { if (res.status === 200 && res.data) {
if (typeof res.data === "string") {
this.approvalResults = null;
return;
}
this.userName = res.data.studentName; this.userName = res.data.studentName;
// 1报名失败、2审核中、3审核通过、4审核失败 // 1报名失败、2审核中、3审核通过、4审核失败
if (res.data.approvalResults) { if (res.data.approvalResults) {
this.approvalResults = res.data.approvalResults; this.approvalResults = res.data.approvalResults;
this.allowSelfRegistration = res.data.allowSelfRegistration;
if (res.data.approvalResults != 1) { if (res.data.approvalResults != 1) {
this.$router.push("/new-employee/study"); this.$router.push("/new-employee/study");
} }