|
|
@@ -113,6 +113,7 @@
|
|
|
<el-table ref="multipleTable"
|
|
|
:data="activitiescourse"
|
|
|
border
|
|
|
+ @row-click="opencourseDetails"
|
|
|
fit
|
|
|
tooltip-effect="dark"
|
|
|
style="width: 100%"
|
|
|
@@ -128,29 +129,31 @@
|
|
|
label="学期"
|
|
|
align="center"
|
|
|
min-width="160px"
|
|
|
- show-overflow-tooltip></el-table-column>
|
|
|
+ show-overflow-tooltip
|
|
|
+ :formatter="formatTerm"></el-table-column>
|
|
|
<el-table-column prop="Title"
|
|
|
label="标题"
|
|
|
align="center"
|
|
|
min-width="160px"
|
|
|
show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="CourseWeek"
|
|
|
- label="教学周"
|
|
|
- align="center"
|
|
|
- min-width="160px"
|
|
|
- show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="content"
|
|
|
+ <!-- <el-table-column prop="CourseWeek"-->
|
|
|
+ <!-- label="教学周"-->
|
|
|
+ <!-- align="center"-->
|
|
|
+ <!-- min-width="160px"-->
|
|
|
+ <!-- show-overflow-tooltip></el-table-column>-->
|
|
|
+ <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"
|
|
|
+ :formatter="formatStatus"></el-table-column>
|
|
|
+ <el-table-column prop="CreatedTime"
|
|
|
align="center"
|
|
|
min-width="120px"
|
|
|
label="创建时间"
|
|
|
@@ -170,7 +173,7 @@
|
|
|
|
|
|
<el-row :gutter="15"
|
|
|
style="margin-top: 10px;">
|
|
|
- <el-card>
|
|
|
+ <!-- <el-card>
|
|
|
<div style="font-size:20px">
|
|
|
值班表
|
|
|
</div>
|
|
|
@@ -257,7 +260,7 @@
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="searchcourse.page.total">
|
|
|
</el-pagination>
|
|
|
- </el-card>
|
|
|
+ </el-card> -->
|
|
|
</el-row>
|
|
|
|
|
|
<!-- 信息发布 -->
|
|
|
@@ -265,6 +268,11 @@
|
|
|
@handleClose="handleClose"
|
|
|
:informationId="informationId"
|
|
|
width="75"></informationInfoDialog>
|
|
|
+ <!-- 课程管理 -->
|
|
|
+ <courseInfoDialog ref="courseDialog"
|
|
|
+ @handleClose="handleClose"
|
|
|
+ :courselist="courselist"
|
|
|
+ width="75"></courseInfoDialog>
|
|
|
</d2-container>
|
|
|
</template>
|
|
|
|
|
|
@@ -275,18 +283,24 @@ import InformationApi from '@/api/information'
|
|
|
import CourseApi from '@/api/course'
|
|
|
import DutyApi from '@/api/duty'
|
|
|
import informationInfoDialog from './components/informationInfoDialog'
|
|
|
+import courseInfoDialog from './components/courseInfoDialog'
|
|
|
export default {
|
|
|
name: 'informationIndex',
|
|
|
components: {
|
|
|
- informationInfoDialog
|
|
|
+ informationInfoDialog,
|
|
|
+ courseInfoDialog
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
dialogvisible: false,
|
|
|
years: [],
|
|
|
details: false,
|
|
|
+ classList: [], // 班级列表
|
|
|
+ statusList: [], // 状态列表
|
|
|
+ termList: [], // 学期
|
|
|
activities: [],
|
|
|
activitiescourse: [],
|
|
|
+ courselist: [],
|
|
|
activitiesduty: [],
|
|
|
activitiesclass: [],
|
|
|
informationId: -1,
|
|
|
@@ -301,14 +315,23 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
term: [],
|
|
|
+ // searchcourse: {
|
|
|
+ // title: '',
|
|
|
+ // status: 1,
|
|
|
+ // content: '',
|
|
|
+ // page: {
|
|
|
+ // total: 0,
|
|
|
+ // current: 1,
|
|
|
+ // size: 5
|
|
|
+ // }
|
|
|
+ // },
|
|
|
searchcourse: {
|
|
|
- title: '',
|
|
|
- status: 1,
|
|
|
- content: '',
|
|
|
+ Term: '',
|
|
|
+ Year: '',
|
|
|
page: {
|
|
|
total: 0,
|
|
|
current: 1,
|
|
|
- size: 5
|
|
|
+ size: 10
|
|
|
}
|
|
|
},
|
|
|
status: [{
|
|
|
@@ -338,19 +361,25 @@ export default {
|
|
|
// this.initDatas_duty()
|
|
|
this.initDatas_class()
|
|
|
this.getTerm()
|
|
|
+ this.getClassList()
|
|
|
},
|
|
|
methods: {
|
|
|
openDetails (row) {
|
|
|
this.informationId = row.id
|
|
|
this.$refs.informationDialog.dialogvisible = true
|
|
|
- console.log('-----row--', row)
|
|
|
},
|
|
|
-
|
|
|
+ opencourseDetails (row) {
|
|
|
+ this.courselist = []
|
|
|
+ this.courselist.CourseId = row.Id
|
|
|
+ this.courselist.Year = row.Year
|
|
|
+ this.courselist.Term = row.Term
|
|
|
+ this.courselist.ClassId = row.ClassId
|
|
|
+ this.$refs.courseDialog.dialogvisible = true
|
|
|
+ },
|
|
|
// 获取字典表
|
|
|
getTerm () {
|
|
|
itemDetailApi.getItemDetailByItemCode({ ItemCode: 'Term' })
|
|
|
.then(res => {
|
|
|
- console.log('---res--', res)
|
|
|
this.term = res
|
|
|
// this.initDatas()
|
|
|
})
|
|
|
@@ -371,6 +400,63 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 发布状态
|
|
|
+ getStatus () {
|
|
|
+ let _this = this
|
|
|
+ itemDetailApi.getItemDetailByItemCode({ ItemCode: 'PublishStatus' })
|
|
|
+ .then(res => {
|
|
|
+ _this.statusList = res
|
|
|
+ // this.initDatas()
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 匹配状态
|
|
|
+ formatStatus (row, column) {
|
|
|
+ for (var i = 0; i < this.statusList.length; i++) {
|
|
|
+ if (parseInt(this.statusList[i].ItemValue) === parseInt(row.Status)) {
|
|
|
+ return this.statusList[i].ItemName
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 匹配班级
|
|
|
+ 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
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取学期
|
|
|
+ getTerm () {
|
|
|
+ itemDetailApi.getItemDetailByItemCode({ ItemCode: 'Term' })
|
|
|
+ .then(res => {
|
|
|
+ this.termList = res
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 匹配学期
|
|
|
+ formatTerm (row, column) {
|
|
|
+ for (var i = 0; i < this.termList.length; i++) {
|
|
|
+ if (parseInt(this.termList[i].ItemValue) === parseInt(row.Term)) {
|
|
|
+ return this.termList[i].ItemName
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取班级列表
|
|
|
+ getClassList () {
|
|
|
+ let params = {
|
|
|
+ _currentPage: 1,
|
|
|
+ _size: 9999
|
|
|
+ }
|
|
|
+ ClassApi.getAllClass(params)
|
|
|
+ .then(res => {
|
|
|
+ this.classList = res.records
|
|
|
+ })
|
|
|
+ },
|
|
|
initSelectYear (year) {
|
|
|
for (let i = 0; i < 5; i++) {
|
|
|
this.years.push({ value: (year - i), label: (year - i) + '年' })
|
|
|
@@ -390,10 +476,12 @@ export default {
|
|
|
},
|
|
|
// 初始化列表数据课程
|
|
|
initDatasCourse () {
|
|
|
+ console.log('-----this.searchcourse----', this.searchcourse)
|
|
|
CourseApi.getPageList(this.searchcourse)
|
|
|
.then(res => {
|
|
|
+ console.log('------res---', res)
|
|
|
this.activitiescourse = res.records
|
|
|
- this.searchcourse.page = res
|
|
|
+ this.searchcourse.page.total = res.total
|
|
|
})
|
|
|
},
|
|
|
formatStatus (row, column) {
|
|
|
@@ -418,10 +506,10 @@ export default {
|
|
|
size: 10
|
|
|
}
|
|
|
},
|
|
|
- // 打开 添加弹窗
|
|
|
- openinformationadd () {
|
|
|
- this.$refs.informationDialog.dialogvisible = true
|
|
|
- },
|
|
|
+ // // 打开 添加弹窗
|
|
|
+ // openinformationadd () {
|
|
|
+ // this.$refs.informationDialog.dialogvisible = true
|
|
|
+ // },
|
|
|
// // 打开 编辑弹窗
|
|
|
// informationedit (informationId) {
|
|
|
// this.informationId = informationId
|
|
|
@@ -459,12 +547,13 @@ export default {
|
|
|
},
|
|
|
// 课程管理
|
|
|
handleSizeChange_course (val) {
|
|
|
- this.search.page.size = val
|
|
|
- this.search.page.current = 1
|
|
|
+ console.log('----val--111--', val)
|
|
|
+ this.searchcourse.page.size = val
|
|
|
+ this.searchcourse.page.current = 1
|
|
|
this.initDatasCourse()
|
|
|
},
|
|
|
handleCurrentChange_course (val) {
|
|
|
- this.search.page.current = val
|
|
|
+ this.searchcourse.page.current = val
|
|
|
this.initDatasCourse()
|
|
|
},
|
|
|
searchCommand (command) {
|
|
|
@@ -475,7 +564,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
clearSearch () {
|
|
|
- this.initDatasCourse()
|
|
|
+ // this.initDatasCourse()
|
|
|
}
|
|
|
|
|
|
}
|