diff --git a/test_client/src/views/analyse/examtest.vue b/test_client/src/views/analyse/examtest.vue index 2cf4e3d..70c8dc8 100644 --- a/test_client/src/views/analyse/examtest.vue +++ b/test_client/src/views/analyse/examtest.vue @@ -60,6 +60,7 @@ v-loading="listLoading" highlight-current-row max-height="600" + @sort-change="changeSort" > @@ -74,10 +75,10 @@ - + - + @@ -214,6 +215,16 @@ export default { this.listQuery.start = this.value[0], this.listQuery.end = this.value[1], this.getList() + }, + changeSort (val) { + if(val.order == 'ascending'){ + this.listQuery.ordering = val.prop + }else{ + this.listQuery.ordering = '-' + val.prop + } + + this.getList() + } } }; diff --git a/test_client/src/views/crm/consumer.vue b/test_client/src/views/crm/consumer.vue index 8305d8d..15859ab 100644 --- a/test_client/src/views/crm/consumer.vue +++ b/test_client/src/views/crm/consumer.vue @@ -86,7 +86,7 @@ - + @@ -95,7 +95,7 @@ - + - + @@ -317,9 +317,9 @@ export default { if (!value) return true; return data.label.indexOf(value) !== -1; }, - getList(query = this.listQuery) { + getList() { this.listLoading = true; - getConsumerList(query).then(response => { + getConsumerList(this.listQuery).then(response => { this.consumerList = response.data.results; this.total = response.data.count; this.listLoading = false; @@ -453,7 +453,7 @@ export default { this.listQuery.ordering = '-' + val.prop } - this.getList() + this.getList() } } diff --git a/test_client/src/views/login/index.vue b/test_client/src/views/login/index.vue index 0018a1b..a8645ba 100644 --- a/test_client/src/views/login/index.vue +++ b/test_client/src/views/login/index.vue @@ -3,7 +3,7 @@