|
|
@@ -99,18 +99,19 @@
|
|
|
align="center"
|
|
|
min-width="160px"
|
|
|
show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="content"
|
|
|
+ <el-table-column prop="ClassId"
|
|
|
label="班级"
|
|
|
align="center"
|
|
|
min-width="160px"
|
|
|
- show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="status"
|
|
|
+ show-overflow-tooltip
|
|
|
+ :formatter="formatClass"
|
|
|
+ ></el-table-column>
|
|
|
+ <!--<el-table-column prop="Status"
|
|
|
align="center"
|
|
|
min-width="40px"
|
|
|
label="状态"
|
|
|
- show-overflow-tooltip
|
|
|
- :formatter="formatStatus"></el-table-column>
|
|
|
- <el-table-column prop="createdtime"
|
|
|
+ show-overflow-tooltip></el-table-column>-->
|
|
|
+ <el-table-column prop="CreatedTime"
|
|
|
align="center"
|
|
|
min-width="120px"
|
|
|
label="创建时间"
|
|
|
@@ -139,6 +140,7 @@
|
|
|
<script>
|
|
|
|
|
|
import CourseApi from '@/api/course'
|
|
|
+import ClassApi from '@/api/class'
|
|
|
import courseInfoDialog from './components/courseInfoDialog'
|
|
|
export default {
|
|
|
name: 'course',
|
|
|
@@ -151,6 +153,7 @@ export default {
|
|
|
details: false,
|
|
|
activities: [],
|
|
|
courseId: -1,
|
|
|
+ classList:[], // 班级列表
|
|
|
search: {
|
|
|
Term: '',
|
|
|
Year: '',
|
|
|
@@ -188,10 +191,11 @@ export default {
|
|
|
this.initDatas()
|
|
|
},
|
|
|
methods: {
|
|
|
- formatStatus (row, column) {
|
|
|
- for (var i = 0; i < this.status.length; i++) {
|
|
|
- if (this.status[i].value === row.status) {
|
|
|
- return this.status[i].key
|
|
|
+ // 匹配班级
|
|
|
+ formatClass (row, column) {
|
|
|
+ for (var i = 0; i < this.classList.length; i++) {
|
|
|
+ if (parseInt(this.classList[i].Id) === row.ClassId) {
|
|
|
+ return this.classList[i].Name
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
@@ -237,6 +241,7 @@ export default {
|
|
|
this.activities = res.records
|
|
|
this.search.page = res
|
|
|
})
|
|
|
+ this.getClassList()
|
|
|
},
|
|
|
handleSizeChange (val) {
|
|
|
this.search.page.size = val
|
|
|
@@ -293,6 +298,18 @@ export default {
|
|
|
this.initSearchInfo()
|
|
|
this.initPageInfo()
|
|
|
this.initDatas()
|
|
|
+ },
|
|
|
+
|
|
|
+ // 获取班级列表
|
|
|
+ getClassList() {
|
|
|
+ let params = {
|
|
|
+ _currentPage: 1,
|
|
|
+ _size: 9999,
|
|
|
+ }
|
|
|
+ ClassApi.getAllClass(params)
|
|
|
+ .then(res => {
|
|
|
+ this.classList = res.records
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
}
|