From 4e43f5b3a19db9af5015e0200c9590c8aba3b9ed Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期四, 15 六月 2023 13:37:45 +0800 Subject: [PATCH] 修改试卷列表 --- src/store/modules/exam.js | 17 ++++++++++++++--- 1 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/store/modules/exam.js b/src/store/modules/exam.js index 816c71d..a8f8c3d 100644 --- a/src/store/modules/exam.js +++ b/src/store/modules/exam.js @@ -6,11 +6,22 @@ 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 + ' ( ' + j.levelName + ' )'+' /' + } } } + return str.slice(0,str.length-1) + // for (let item of state.subjects) { + // if (item.id === key) { + // return item.name + ' ( ' + item.levelName + ' )' + // } + // } return null } } -- Gitblit v1.8.0