# renane from count to logs
This commit is contained in:
parent
f1e6a20a0c
commit
364c0f9a61
|
@ -8,9 +8,9 @@ export function fetchDeviceList(query) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function fetchDeviceCount(query) {
|
export function fetchDeviceLogs(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/api/counter/count/',
|
url: '/api/counter/logs/',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { fetchDeviceCount } from '@/api/counter'
|
import { fetchDeviceLogs } from '@/api/counter'
|
||||||
export default {
|
export default {
|
||||||
name: 'count',
|
name: 'count',
|
||||||
data() {
|
data() {
|
||||||
|
@ -66,8 +66,8 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getDeviceCount(params) {
|
getDeviceLogs(params) {
|
||||||
fetchDeviceCount(params).then(response => {
|
fetchDeviceLogs(params).then(response => {
|
||||||
this.deviceCount = response.data.results
|
this.deviceCount = response.data.results
|
||||||
// 页码
|
// 页码
|
||||||
// this.total = Math.ceil(response.data.count / 8) * 10
|
// this.total = Math.ceil(response.data.count / 8) * 10
|
||||||
|
@ -82,15 +82,15 @@ export default {
|
||||||
handleCurrentChange(page) {
|
handleCurrentChange(page) {
|
||||||
// console.log(page)
|
// console.log(page)
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
this.getDeviceCount({ page })
|
this.getDeviceLogs({ page })
|
||||||
},
|
},
|
||||||
handleSizeChange(page) {
|
handleSizeChange(page) {
|
||||||
this.listLoading = true
|
this.listLoading = true
|
||||||
this.getDeviceCount({ page })
|
this.getDeviceLogs({ page })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getDeviceCount()
|
this.getDeviceLogs()
|
||||||
},
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
this.$destroy(true)
|
this.$destroy(true)
|
||||||
|
|
Loading…
Reference in New Issue