Compare commits
2 Commits
5f3e6e8a49
...
01c9c42ad6
| Author | SHA1 | Date | |
|---|---|---|---|
| 01c9c42ad6 | |||
| e6d3ba305a |
1
CYJS-APP
Submodule
1
CYJS-APP
Submodule
Submodule CYJS-APP added at e8aceb16e9
@@ -250,10 +250,10 @@
|
|||||||
import { boolImg, CheckImgExists, isEmpty, fullLoading } from "@/api/helpFunc";
|
import { boolImg, CheckImgExists, isEmpty, fullLoading } from "@/api/helpFunc";
|
||||||
import { getTokenKeySessionStorage as getToken } from "@/utils/auth";
|
import { getTokenKeySessionStorage as getToken } from "@/utils/auth";
|
||||||
|
|
||||||
import {listOwnSportScore} from "@/api/comprehensive/biyeapply";
|
import {selectTestStu} from "@/api/stuCQS/info-fill/sportTest";
|
||||||
import { getDicts } from "@/api/system/dict/data";
|
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 { listOwnScoreClassRank } from "@/api/stuCQS/good/apply";
|
||||||
|
|
||||||
import TufaApply from "@/views/comprehensive/knzzZzqApply/cpnt/TufaApply.vue";
|
import TufaApply from "@/views/comprehensive/knzzZzqApply/cpnt/TufaApply.vue";
|
||||||
import TufaLook from "@/views/comprehensive/knzzZzqApply/cpnt/TufaLook.vue";
|
import TufaLook from "@/views/comprehensive/knzzZzqApply/cpnt/TufaLook.vue";
|
||||||
@@ -395,7 +395,7 @@ export default {
|
|||||||
async checkAllConditions() {
|
async checkAllConditions() {
|
||||||
try {
|
try {
|
||||||
const [sportResult, disciplinaryResult, scoreResult] = await Promise.all([
|
const [sportResult, disciplinaryResult, scoreResult] = await Promise.all([
|
||||||
this.fetchSportScoreData(),
|
this.fetchTestScoreData(),
|
||||||
this.fetchcfwjc(),
|
this.fetchcfwjc(),
|
||||||
this.fetchcjpm()
|
this.fetchcjpm()
|
||||||
]);
|
]);
|
||||||
@@ -405,27 +405,27 @@ export default {
|
|||||||
this.applyV = false;
|
this.applyV = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchSportScoreData() {
|
async fetchTestScoreData() {
|
||||||
const res = await listOwnSportScore().catch(() => {
|
const res = await selectTestStu().catch(() => {
|
||||||
this.$message.info("体能测试数据获取失败");
|
this.$message.info("体能测试数据获取失败");
|
||||||
return { code: 500, data: [] };
|
return { code: 500, rows: [] };
|
||||||
});
|
});
|
||||||
if (res.code === 200 && res.data && res.data.length > 1) {
|
if (res.code === 200 && res.rows && res.rows.length > 0) {
|
||||||
const sportScore = res.data[res.data.length - 1].sportScore;
|
const testScore = res.rows[res.rows.length - 1].testScore;
|
||||||
if (sportScore >= 60) {
|
if (testScore >= 60) {
|
||||||
return true;
|
return true;
|
||||||
} else if (sportScore === 0) {
|
} else if (testScore === 0) {
|
||||||
this.$message.info("当前学年没有您的体能成绩");
|
this.$message.info("没有您的体能成绩");
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
this.$message.info("您的体能成绩不达标");
|
this.$message.info("您的体能成绩不达标");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.info("请先完成体能测试");
|
this.$message.info("请先完成体能测试");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async fetchcfwjc() {
|
async fetchcfwjc() {
|
||||||
try {
|
try {
|
||||||
const response1 = await getDicts('rt_penalty_status');
|
const response1 = await getDicts('rt_penalty_status');
|
||||||
@@ -457,14 +457,14 @@ 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) {
|
if (res.code === 200 && data&& data.stuMajorRank != null && data.majorCount != null) {
|
||||||
let data = res.data;
|
|
||||||
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 <= 10) {
|
if (stuRank <= 10) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user