From 0010df4254d5c49dcdd68ce19ec5e856df62ab7b Mon Sep 17 00:00:00 2001
From: odc.xiaohui <xiaohui@Q1>
Date: 星期三, 14 六月 2023 09:04:42 +0800
Subject: [PATCH] 修改部门数据

---
 src/views/exam/question/list.vue |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)

diff --git a/src/views/exam/question/list.vue b/src/views/exam/question/list.vue
index 68ba786..2eb909b 100644
--- a/src/views/exam/question/list.vue
+++ b/src/views/exam/question/list.vue
@@ -36,7 +36,13 @@
     </el-form>
     <el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
       <el-table-column prop="id" label="Id" width="90px"/>
-      <el-table-column prop="subjectId" label="璇剧洰" :formatter="subjectFormatter" width="120px"/>
+      <el-table-column prop="subjectId" label="璇剧洰" :formatter="subjectIdFormatte" width="120px"/>
+<!--      <el-table-column prop="subjectId" label="璇剧洰">-->
+<!--        <template slot-scope="scope">-->
+<!--&lt;!&ndash;          <span>{{this.subjectIdFormatte}}</span>&ndash;&gt;-->
+<!--          <span>{{scope.row.questionSubjects.forEach(item=>{ return item.subName})}}</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
       <el-table-column prop="questionType" label="棰樺瀷" :formatter="questionTypeFormatter" width="70px"/>
       <el-table-column prop="shortTitle" label="棰樺共" show-overflow-tooltip/>
       <el-table-column prop="score" label="鍒嗘暟" width="60px"/>
@@ -142,6 +148,14 @@
     questionTypeFormatter (row, column, cellValue, index) {
       return this.enumFormat(this.questionType, cellValue)
     },
+    subjectIdFormatte(row, column, cellValue, index){
+      console.log(row, column, cellValue, index)
+      let str = ''
+      row.questionSubjects.forEach(item=>{
+        str+=item.subName+','
+      })
+      return str = str.slice(0,str.length-1)
+    },
     subjectFormatter (row, column, cellValue, index) {
       return this.subjectEnumFormat(cellValue)
     },

--
Gitblit v1.8.0