2023-02-07 17:59:54 +08:00
|
|
|
|
<template>
|
2023-08-02 09:10:45 +08:00
|
|
|
|
<Cn-page :loading="loading">
|
|
|
|
|
|
<view slot="body">
|
|
|
|
|
|
<view class="about">
|
|
|
|
|
|
<view class="about-title">{{ deviceInfo.name }}</view>
|
2023-08-24 15:35:45 +08:00
|
|
|
|
<view class="about-text">设备类型:{{ deviceInfo.devTypeName }}</view>
|
|
|
|
|
|
<view class="about-text">设备型号:{{ deviceInfo.devModelName }}</view>
|
2023-08-02 09:10:45 +08:00
|
|
|
|
<view class="about-text"
|
2023-11-02 13:40:48 +08:00
|
|
|
|
>设备接入方式:{{ deviceInfo.devAccessMethod === 'cloud' ? 'CLD' : 'MQTT' }}</view
|
2023-08-02 09:10:45 +08:00
|
|
|
|
>
|
2023-08-24 15:35:45 +08:00
|
|
|
|
<!-- <view class="about-text">设备注册时间:永久使用</view> -->
|
2023-08-02 09:10:45 +08:00
|
|
|
|
<view class="about-text">程序版本:{{ deviceInfo.programVersionName }}</view>
|
|
|
|
|
|
<view class="about-text">网络设备ID:{{ deviceInfo.ndid }}</view>
|
2023-02-07 17:59:54 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</Cn-page>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script>
|
2023-08-02 09:10:45 +08:00
|
|
|
|
import { queryDeivceById } from '@/common/api/device'
|
|
|
|
|
|
import { queryByCode, queryCsDictTree, queryByid, queryEdDataPage } from '@/common/api/dictionary'
|
2023-02-07 17:59:54 +08:00
|
|
|
|
export default {
|
2023-08-02 09:10:45 +08:00
|
|
|
|
data() {
|
2023-02-07 17:59:54 +08:00
|
|
|
|
return {
|
2023-08-02 09:10:45 +08:00
|
|
|
|
loading: true,
|
|
|
|
|
|
deviceInfo: {},
|
2023-02-07 17:59:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2023-08-02 09:10:45 +08:00
|
|
|
|
methods: {},
|
|
|
|
|
|
onLoad(options) {
|
|
|
|
|
|
queryDeivceById(options.id).then((res) => {
|
|
|
|
|
|
console.log(res)
|
|
|
|
|
|
this.deviceInfo = res.data[0]
|
|
|
|
|
|
queryByCode('Device_Type').then((res) => {
|
|
|
|
|
|
Promise.all([queryCsDictTree(res.data.id), queryByid(res.data.id), queryEdDataPage()]).then((resp) => {
|
|
|
|
|
|
console.log(resp)
|
|
|
|
|
|
this.deviceInfo.devTypeName = resp[0].data.find((item) => item.id === this.deviceInfo.devType)?.name
|
|
|
|
|
|
this.deviceInfo.devModelName = resp[1].data.find(
|
|
|
|
|
|
(item) => item.id === this.deviceInfo.devModel,
|
|
|
|
|
|
)?.name
|
|
|
|
|
|
this.loading = false
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-02-07 17:59:54 +08:00
|
|
|
|
}
|
|
|
|
|
|
</script>
|
2023-08-02 09:10:45 +08:00
|
|
|
|
<style lang="scss">
|
2023-02-07 17:59:54 +08:00
|
|
|
|
.about {
|
2023-08-02 09:10:45 +08:00
|
|
|
|
padding: 34rpx;
|
2023-02-07 17:59:54 +08:00
|
|
|
|
.about-title {
|
|
|
|
|
|
font-size: 34rpx;
|
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
|
color: #333333;
|
|
|
|
|
|
margin-bottom: 34rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
.about-text {
|
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
|
color: #666666;
|
|
|
|
|
|
margin-bottom: 34rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2023-08-02 09:10:45 +08:00
|
|
|
|
</style>
|