修改点击申请的提示样式

This commit is contained in:
2025-10-19 16:15:45 +08:00
parent 81017eb280
commit fa814cd8a7
8 changed files with 270 additions and 254 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="app-container">
<div v-loading.fullscreen.lock="fullLoading" :element-loading-text="loadingText" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.3)" class="app-container">
<div class="sign">
<ol>
<li>
@@ -303,6 +303,8 @@ export default {
isEmpty,
// 遮罩层
loading: true,
fullLoading: false,
loadingText: '',
// 选中数组
ids: [],
// 非单个禁用
@@ -614,13 +616,26 @@ export default {
},
/** 新增按钮操作 */
async handleAdd() {
let loading = fullLoading(this)
let res1 = await getOwnStuScoreMajorRank()
loading.close()
if (res1.code == 200) {
let data = res1.data
console.log(data)
let stuRank = Math.round(Math.round(data.majorRank / data.majorCount * 10000) / 100)
this.loadingText = '正在校验资格.....'
this.fullLoading = true
try {
const res1 = await getOwnStuScoreMajorRank()
if (res1.code !== 200) {
this.$message.error('资格校验失败,请稍后重试')
return
}
const data = res1.data
if (!data || data.majorRank == null || data.majorCount == null) {
this.$message.info('未获取到专业排名数据,请稍后重试')
return
}
const rank = Number(data.majorRank)
const count = Number(data.majorCount)
if (!isFinite(rank) || !isFinite(count) || count <= 0) {
this.$message.info('专业排名数据异常,无法校验')
return
}
const stuRank = Math.round(Math.round(rank / count * 10000) / 100)
if (stuRank > 10) {
this.$message.error('您的学业成绩未达到专业前10%')
return
@@ -629,10 +644,13 @@ export default {
this.reset()
this.open = true
this.title = '申请优秀毕业生'
} catch (e) {
console.error('handleAdd error:', e)
this.$message.error('校验数据异常,请稍后重试')
} finally {
this.fullLoading = false
this.loadingText = ''
}
},
}
}