# rename detail view name, because will be chached if named 'detail'

This commit is contained in:
xianfuxing 2018-08-20 21:29:03 +08:00
parent 920b1da28d
commit 14919161eb
2 changed files with 6 additions and 7 deletions

View File

@ -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)
}

View File

@ -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')
})