| | |
| | | </el-form-item> |
| | | <el-form-item label="课目:" > |
| | | <el-select v-model="queryParam.subjectId" clearable> |
| | | <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option> |
| | | <el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' '"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | </el-form-item> |
| | | </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="name" label="名称" /> |
| | | <el-table-column prop="createTime" label="创建时间" width="160px"/> |
| | |
| | | created () { |
| | | this.initSubject() |
| | | this.search() |
| | | this.queryParam.subjectId = null |
| | | this.subjectFilter = this.subjects |
| | | }, |
| | | methods: { |
| | | submitForm () { |
| | |
| | | }, |
| | | levelChange () { |
| | | this.queryParam.subjectId = null |
| | | this.subjectFilter = this.subjects.filter(data => data.level === this.queryParam.level) |
| | | this.subjectFilter = this.subjects |
| | | }, |
| | | subjectFormatter (row, column, cellValue, index) { |
| | | console.log(row, column, cellValue, index) |