学年标签适配学生奖惩、学生资助模块

This commit is contained in:
2025-12-24 09:31:25 +08:00
parent 00d3f3f2cc
commit 3803738223
37 changed files with 410 additions and 85 deletions

View File

@@ -136,7 +136,7 @@
</template>
<script>
import { listAllEnableYear,listAllYear} from '@/api/stuCQS/basedata/year'
import { listAllEnableYear,listAllYear,getYearByTag} from '@/api/stuCQS/basedata/year'
import { listApply, getApply, delApply, addApply, updateApply, listOwn,isPoor,revoke} from '@/api/zxj/apply'
import ImportTable from '../tool/gen/importTable.vue'
@@ -221,13 +221,43 @@ export default {
methods: {
//查所有年份
listAllStuYear(){
listAllYear().then(res=>{
/* listAllYear().then(res=>{
if(res.code == 200){
this.enableYeas = res.data
this.stuYearId = this.enableYeas[0].id
}
}) */
})
/* 此处使用硬编码,请根据实际情况修改。
当前页面的功能是获取'国家助学金---ZXJ'标签对应的学年信息。
涉及到学年标签字典module_tag需要在字典管理中查询对应的信息。
如果在字典管理更改了 学年标签 的信息,此处也要进行相应修改。
尽量避免学年标签字典的更改!!!! */
const tagValue = 'ZXJ' /* <---"国家助学金---ZXJ"标签对应的标签值 */
if (!tagValue) {
this.$modal.msgError('未找到标签值')
return // 如果没有标签值,则不执行后续操作
}
getYearByTag(tagValue).then(res=>{
if(res.code == 200){
this.enableYeas = res.data
if (this.enableYeas.length > 0) {
this.stuYearId = this.enableYeas[0].id
// 只有当有数据时才更新会话信息 sessionStorage
sessionStorage.setItem('zxjSelectedYear', JSON.stringify({
stuYearName: this.enableYeas[0].stuYearName,
id: this.enableYeas[0].id
}))
} else {
// 如果没有可用学年,清除 sessionStorage 中的相关数据
sessionStorage.removeItem('zxjSelectedYear')
}
}
}).catch(error => {
console.error('获取学年信息失败:', error)
this.$modal.msgError('获取学年信息失败')
})
},
//确认选择学年
yearConfirm(){
@@ -399,7 +429,10 @@ export default {
this.download('/comprehensive/zxj/apply/export', {
...this.queryParams
}, `apply_${new Date().getTime()}.xlsx`)
}
},
mounted() {
this.listAllStuYear(); //获取所有学年
},
}
}
</script>