| | |
| | | </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">--> |
| | | <!--<!– <span>{{this.subjectIdFormatte}}</span>–>--> |
| | | <!-- <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"/> |
| | |
| | | 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) |
| | | }, |