From 236fdf92ecb6ff876d400f6c360efca8ab085f5c Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期四, 30 十一月 2023 09:04:38 +0800
Subject: [PATCH] 修改青羊后台部门bug
---
src/store/modules/exam.js | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js
index 816c71d..d1fcbbe 100644
--- a/src/store/modules/exam.js
+++ b/src/store/modules/exam.js
@@ -6,19 +6,30 @@
const getters = {
subjectEnumFormat: (state) => (key) => {
- for (let item of state.subjects) {
- if (item.id === key) {
- return item.name + ' ( ' + item.levelName + ' )'
+ // console.log(state.subjects,key)
+ let str = ''
+ for (const j of state.subjects) {
+ for (let k of key) {
+ // console.log(j,k)
+ if (j.id ==k){
+ str+= j.name + ' /'
+ }
}
}
+ return str.slice(0,str.length-1)
+ // for (let item of state.subjects) {
+ // if (item.id === key) {
+ // return item.name + ' ( ' + item.levelName + ' )'
+ // }
+ // }
return null
}
}
// actions
const actions = {
- initSubject ({ commit }, action) {
- subjectApi.list().then(re => {
+ async initSubject ({ commit }, action) {
+ await subjectApi.list().then(re => {
commit('setSubjects', re.response)
if (action !== undefined) {
action()
--
Gitblit v1.8.0