# renane from count to logs

This commit is contained in:
xianfuxing 2018-08-04 13:01:34 +08:00
parent f1e6a20a0c
commit 364c0f9a61
2 changed files with 8 additions and 8 deletions

View File

@ -8,9 +8,9 @@ export function fetchDeviceList(query) {
})
}
export function fetchDeviceCount(query) {
export function fetchDeviceLogs(query) {
return request({
url: '/api/counter/count/',
url: '/api/counter/logs/',
method: 'get',
params: query
})

View File

@ -55,7 +55,7 @@
</template>
<script>
import { fetchDeviceCount } from '@/api/counter'
import { fetchDeviceLogs } from '@/api/counter'
export default {
name: 'count',
data() {
@ -66,8 +66,8 @@ export default {
}
},
methods: {
getDeviceCount(params) {
fetchDeviceCount(params).then(response => {
getDeviceLogs(params) {
fetchDeviceLogs(params).then(response => {
this.deviceCount = response.data.results
//
// this.total = Math.ceil(response.data.count / 8) * 10
@ -82,15 +82,15 @@ export default {
handleCurrentChange(page) {
// console.log(page)
this.listLoading = true
this.getDeviceCount({ page })
this.getDeviceLogs({ page })
},
handleSizeChange(page) {
this.listLoading = true
this.getDeviceCount({ page })
this.getDeviceLogs({ page })
}
},
created() {
this.getDeviceCount()
this.getDeviceLogs()
},
deactivated() {
this.$destroy(true)