|
@@ -206,7 +206,8 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return {
|
|
return {
|
|
- roomList: [],
|
|
|
|
|
|
+ tableHeight:400,
|
|
|
|
+ // roomList: [],
|
|
filterYear: 'all',
|
|
filterYear: 'all',
|
|
studentColumn: [
|
|
studentColumn: [
|
|
{
|
|
{
|
|
@@ -247,9 +248,9 @@ export default {
|
|
],
|
|
],
|
|
editIndex: -1,
|
|
editIndex: -1,
|
|
resetNoBef: 0,
|
|
resetNoBef: 0,
|
|
- schoolBase: {
|
|
|
|
- period: []
|
|
|
|
- },
|
|
|
|
|
|
+ // schoolBase: {
|
|
|
|
+ // period: []
|
|
|
|
+ // },
|
|
delSelections: [],//需要移除的学生
|
|
delSelections: [],//需要移除的学生
|
|
selections: [],//添加的学生
|
|
selections: [],//添加的学生
|
|
addStuStatus: false,
|
|
addStuStatus: false,
|
|
@@ -265,7 +266,7 @@ export default {
|
|
isSaveLoading: false,
|
|
isSaveLoading: false,
|
|
isInit: true,
|
|
isInit: true,
|
|
updated: false,
|
|
updated: false,
|
|
- classList: [],
|
|
|
|
|
|
+ // classList: [],
|
|
classListShow: [],
|
|
classListShow: [],
|
|
curClassIndex: 0,
|
|
curClassIndex: 0,
|
|
keyword: '',
|
|
keyword: '',
|
|
@@ -299,6 +300,9 @@ export default {
|
|
computed: {
|
|
computed: {
|
|
...mapGetters({
|
|
...mapGetters({
|
|
periods: 'user/getPeriods', // 學制s
|
|
periods: 'user/getPeriods', // 學制s
|
|
|
|
+ schoolBase: 'user/getSchoolBase',
|
|
|
|
+ classList: 'user/getClasses',
|
|
|
|
+ roomList: 'user/getRooms'
|
|
}),
|
|
}),
|
|
filterYearName() {
|
|
filterYearName() {
|
|
if (this.filterYear == 'all') {
|
|
if (this.filterYear == 'all') {
|
|
@@ -679,7 +683,7 @@ export default {
|
|
)
|
|
)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
this.$Message.error(this.$t('system.authErr'))
|
|
this.$Message.error(this.$t('system.authErr'))
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -817,27 +821,47 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- this.isListLoading = true
|
|
|
|
- this.$store.dispatch('user/getSchoolProfile').then(
|
|
|
|
- res => {
|
|
|
|
- this.schoolBase = res.school_base
|
|
|
|
- this.classList = res.school_classes
|
|
|
|
- this.roomList = res.school_rooms
|
|
|
|
|
|
+ // this.isListLoading = true
|
|
|
|
+ // this.$store.dispatch('user/getSchoolProfile').then(
|
|
|
|
+ // res => {
|
|
|
|
+ // // this.schoolBase = res.school_base
|
|
|
|
+ // this.classList = res.school_classes
|
|
|
|
+ // this.roomList = res.school_rooms
|
|
|
|
+ // if (this.classList.length > 0) {
|
|
|
|
+ // this.updateBefore = JSON.stringify(this.classList[0])
|
|
|
|
+ // }
|
|
|
|
+ // this.filterClassname()
|
|
|
|
+ // // 預設搜尋給第一個
|
|
|
|
+ // if (this.periods) this.filterPeriod = this.periods[0].id
|
|
|
|
+ // this.filterByPeriod()
|
|
|
|
+ // }
|
|
|
|
+ // ).finally(() => {
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
+ // this.isListLoading = false
|
|
|
|
+ // }, 500)
|
|
|
|
+ // })
|
|
|
|
+ if (this.$access.can('admin.*|classroom-upd')) this.editStatus = this.noStatus
|
|
|
|
+ this.$store.dispatch('teachers/getTeacherList').then(res => { })
|
|
|
|
+ },
|
|
|
|
+ watch: {
|
|
|
|
+ classList: {
|
|
|
|
+ handler(n, o) {
|
|
if (this.classList.length > 0) {
|
|
if (this.classList.length > 0) {
|
|
this.updateBefore = JSON.stringify(this.classList[0])
|
|
this.updateBefore = JSON.stringify(this.classList[0])
|
|
}
|
|
}
|
|
this.filterClassname()
|
|
this.filterClassname()
|
|
- // 預設搜尋給第一個
|
|
|
|
- if (this.periods) this.filterPeriod = this.periods[0].id
|
|
|
|
|
|
+ },
|
|
|
|
+ deep: true,
|
|
|
|
+ immediate: true
|
|
|
|
+ },
|
|
|
|
+ periods: {
|
|
|
|
+ handler(n, o) {
|
|
|
|
+ if (this.periods && this.periods.length) this.filterPeriod = this.periods[0].id
|
|
this.filterByPeriod()
|
|
this.filterByPeriod()
|
|
- }
|
|
|
|
- ).finally(() => {
|
|
|
|
- setTimeout(() => {
|
|
|
|
- this.isListLoading = false
|
|
|
|
- }, 500)
|
|
|
|
- })
|
|
|
|
- if (this.$access.can('admin.*|classroom-upd')) this.editStatus = this.noStatus
|
|
|
|
- this.$store.dispatch('teachers/getTeacherList').then(res => { })
|
|
|
|
|
|
+ },
|
|
|
|
+ deep: true,
|
|
|
|
+ immediate: true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|