fix a bug which cannot include teacher in the params
This commit is contained in:
parent
36533e38f4
commit
ef945d02ff
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue