修改自治区奖学金的获取体测接口
This commit is contained in:
		
							
								
								
									
										1
									
								
								CYJS-APP
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								CYJS-APP
									
									
									
									
									
										Submodule
									
								
							 Submodule CYJS-APP added at e8aceb16e9
									
								
							@@ -250,7 +250,7 @@
 | 
			
		||||
import { boolImg, CheckImgExists, isEmpty, fullLoading } from "@/api/helpFunc";
 | 
			
		||||
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 { listDisciplinaryApplication } from "@/api/routine/disciplinaryApplication";
 | 
			
		||||
import { getOwnStuScoreMajorRank } from "@/api/comprehensive/biyeapply";
 | 
			
		||||
@@ -395,7 +395,7 @@ export default {
 | 
			
		||||
      async checkAllConditions() {
 | 
			
		||||
        try {
 | 
			
		||||
          const [sportResult, disciplinaryResult, scoreResult] = await Promise.all([
 | 
			
		||||
            this.fetchSportScoreData(),
 | 
			
		||||
            this.fetchTestScoreData(),
 | 
			
		||||
            this.fetchcfwjc(),
 | 
			
		||||
            this.fetchcjpm()
 | 
			
		||||
          ]);
 | 
			
		||||
@@ -405,27 +405,27 @@ export default {
 | 
			
		||||
          this.applyV = false;
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      async fetchSportScoreData() {
 | 
			
		||||
        const res = await listOwnSportScore().catch(() => {
 | 
			
		||||
          this.$message.info("体能测试数据获取失败");
 | 
			
		||||
          return { code: 500, data: [] };
 | 
			
		||||
        });
 | 
			
		||||
        if (res.code === 200 && res.data && res.data.length > 1) {
 | 
			
		||||
          const sportScore = res.data[res.data.length - 1].sportScore;
 | 
			
		||||
          if (sportScore >= 60) {
 | 
			
		||||
            return true;
 | 
			
		||||
          } else if (sportScore === 0) {
 | 
			
		||||
            this.$message.info("当前学年没有您的体能成绩");
 | 
			
		||||
            return false;
 | 
			
		||||
          } else {
 | 
			
		||||
            this.$message.info("您的体能成绩不达标");
 | 
			
		||||
            return false;
 | 
			
		||||
          }
 | 
			
		||||
        } else {
 | 
			
		||||
          this.$message.info("请先完成体能测试");
 | 
			
		||||
          return false;
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
        async fetchTestScoreData() {
 | 
			
		||||
            const res = await selectTestStu().catch(() => {
 | 
			
		||||
                this.$message.info("体能测试数据获取失败");
 | 
			
		||||
                return { code: 500, rows: [] };
 | 
			
		||||
            });
 | 
			
		||||
            if (res.code === 200 && res.rows && res.rows.length > 0) {
 | 
			
		||||
                const testScore = res.rows[res.rows.length - 1].testScore;
 | 
			
		||||
                if (testScore >= 60) {
 | 
			
		||||
                    return true;
 | 
			
		||||
                } else if (testScore === 0) {
 | 
			
		||||
                    this.$message.info("没有您的体能成绩");
 | 
			
		||||
                    return false;
 | 
			
		||||
                } else {
 | 
			
		||||
                    this.$message.info("您的体能成绩不达标");
 | 
			
		||||
                    return false;
 | 
			
		||||
                }
 | 
			
		||||
            } else {
 | 
			
		||||
                this.$message.info("请先完成体能测试");
 | 
			
		||||
                return false;
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
      async fetchcfwjc() {
 | 
			
		||||
        try {
 | 
			
		||||
          const response1 = await getDicts('rt_penalty_status');
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user