# 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({
|
||||
url: '/api/counter/count/',
|
||||
url: '/api/counter/logs/',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue