Files
wvp-platform/web/src/views/jtDevice/index.vue

45 lines
1.1 KiB
Vue
Raw Normal View History

2025-05-11 08:01:45 +08:00
<template>
2025-07-03 14:54:29 +08:00
<div id="JTDevice" class="app-container">
2025-05-15 18:32:03 +08:00
<deviceList v-show="show === 'device'" @show-channel="showChannelList" @show-param="showParam" />
<channelList v-if="show === 'channel'" :device-id="deviceId" @show-device="showDevice" />
<deviceParam v-if="show === 'param'" :phone-number="phoneNumber" @show-device="showDevice" />
2025-05-11 08:01:45 +08:00
</div>
</template>
<script>
import deviceList from './list.vue'
import channelList from './channel/index.vue'
import deviceParam from './deviceParam/index.vue'
2025-05-11 08:01:45 +08:00
export default {
2025-07-03 14:54:29 +08:00
name: 'JTDevice',
2025-05-11 08:01:45 +08:00
components: {
deviceList,
2025-05-15 18:32:03 +08:00
channelList,
deviceParam
2025-05-11 08:01:45 +08:00
},
data() {
return {
2025-05-15 18:32:03 +08:00
show: 'device',
deviceId: null,
phoneNumber: null
2025-05-11 08:01:45 +08:00
}
},
methods: {
showChannelList: function(deviceId) {
this.deviceId = deviceId
2025-05-15 18:32:03 +08:00
this.show = 'channel'
},
showParam: function(phoneNumber) {
this.phoneNumber = phoneNumber
this.show = 'param'
2025-05-11 08:01:45 +08:00
},
showDevice: function() {
this.deviceId = null
2025-05-15 18:32:03 +08:00
this.phoneNumber = null
this.show = 'device'
2025-05-11 08:01:45 +08:00
}
}
}
</script>