修改资助内容

This commit is contained in:
2025-10-11 22:09:26 +08:00

View File

@@ -281,6 +281,10 @@ import { getDicts } from "@/api/system/dict/data";
import { listDisciplinaryApplication } from "@/api/routine/disciplinaryApplication"; import { listDisciplinaryApplication } from "@/api/routine/disciplinaryApplication";
import { getOwnStuScoreMajorRank } from "@/api/comprehensive/biyeapply"; import { getOwnStuScoreMajorRank } from "@/api/comprehensive/biyeapply";
import {
listOwnScoreClassRank
} from "@/api/stuCQS/good/apply";
import { listStu as listView, doEdit, doCancel, doReApply } from "@/api/comprehensive/knzzGlApply"; import { listStu as listView, doEdit, doCancel, doReApply } from "@/api/comprehensive/knzzGlApply";
export default { export default {
@@ -522,25 +526,21 @@ export default {
}, },
async fetchcjpm() { async fetchcjpm() {
let loading = fullLoading(this); let loading = fullLoading(this);
let res = await getOwnStuScoreMajorRank().catch(error => { let res = await listOwnScoreClassRank().catch(error => {
console.error("Error fetching score rank:", error);
return { code: 500 }; return { code: 500 };
}); });
loading.close(); loading.close();
if (res.code === 200 && res.data) { let data = res.data[0];
let data = res.data; if (res.code === 200 && data&& data.stuMajorRank != null && data.majorCount != null) {
// 检查必要的字段是否存在
if (data.majorRank !== undefined && data.majorCount !== undefined && data.majorCount > 0) { let stuRank = Math.round(Math.round(data.stuMajorRank / data.majorCount * 10000) / 100);
let stuRank = Math.round(Math.round(data.majorRank / data.majorCount * 10000) / 100);
if (stuRank <= 30) { if (stuRank <= 30) {
return true; return true;
} else { } else {
this.$message.info("您的学业成绩未达到专业前30%"); this.$message.info("您的学业成绩未达到专业前30%");
return false; return false;
} }
} else {
this.$message.info("专业排名数据不完整");
return false;
}
} }
this.$message.info("无法获取您的专业排名数据"); this.$message.info("无法获取您的专业排名数据");
return false; return false;