修改排名

This commit is contained in:
zhy
2025-10-10 23:34:51 +08:00
parent e77cab9b76
commit 5f3e6e8a49

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,14 +526,15 @@ 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); console.error("Error fetching score rank:", error);
return { code: 500 }; return { code: 500 };
}); });
loading.close(); loading.close();
if (res.code === 200 && res.data && res.data.majorRank != null && res.data.majorCount != null) { let data = res.data[0];
let data = res.data; if (res.code === 200 && data&& data.stuMajorRank != null && data.majorCount != null) {
let stuRank = Math.round(Math.round(data.majorRank / data.majorCount * 10000) / 100);
let stuRank = Math.round(Math.round(data.stuMajorRank / data.majorCount * 10000) / 100);
if (stuRank <= 30) { if (stuRank <= 30) {
return true; return true;
} else { } else {