fix a bug which cannot include teacher in the params

This commit is contained in:
David 2019-05-25 22:56:11 +08:00
parent 36533e38f4
commit ef945d02ff
1 changed files with 3 additions and 1 deletions

View File

@ -181,7 +181,6 @@
page: 1,
ordering: '-last_login',
role: '',
teacher: this.$store.getters.role === 'TEACHER' ? this.$store.getters.userid : '',
},
state: {
loading: false,
@ -202,6 +201,9 @@
methods: {
getData () {
this.state.loading = true
if (this.$store.getters.role === 'TEACHER') {
this.params.teacher = this.$store.getters.userid
}
api.getUserList(this.params)
.then(data => {
this.userList = data.results