# rename detail view name, because will be chached if named 'detail'
This commit is contained in:
parent
920b1da28d
commit
14919161eb
|
@ -57,13 +57,12 @@
|
|||
<script>
|
||||
import { fetchDeviceLogs } from '@/api/counter'
|
||||
export default {
|
||||
name: 'detail',
|
||||
name: 'deviceDetail',
|
||||
data() {
|
||||
return {
|
||||
listLoading: true,
|
||||
deviceLogs: [],
|
||||
total: 0,
|
||||
deviceId: 868575028779264
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -79,17 +78,17 @@ export default {
|
|||
},
|
||||
handleCurrentChange(page) {
|
||||
this.listLoading = true
|
||||
const device_id = this.deviceId
|
||||
const device_id = this.$store.getters.deviceID
|
||||
this.getDeviceLogs({ device_id, page })
|
||||
},
|
||||
handleSizeChange(page) {
|
||||
this.listLoading = true
|
||||
const device_id = this.deviceId
|
||||
const device_id = this.$store.getters.deviceID
|
||||
this.getDeviceLogs({ device_id, page })
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const device_id = this.deviceId
|
||||
const device_id = this.$store.getters.deviceID
|
||||
this.getDeviceLogs({ device_id })
|
||||
console.log(this.$store.getters.deviceID)
|
||||
}
|
||||
|
|
|
@ -141,7 +141,7 @@ export default {
|
|||
handleDeviceClick(deviceID) {
|
||||
// console.log(deviceID)
|
||||
this.$store.dispatch('chnageDeviceID', deviceID).then(() => {
|
||||
// this.$router.push('/counter/detail')
|
||||
this.$router.push('/counter/detail')
|
||||
}).catch(() => {
|
||||
console.log('Err: get device_id failed in device page')
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue