设备编辑
This commit is contained in:
@@ -1,33 +1,56 @@
|
||||
<template>
|
||||
<Cn-page :loading='loading'>
|
||||
<view slot='body'>
|
||||
<view class='about'>
|
||||
<view class='about-title'>灿能APF</view>
|
||||
<view class='about-text'>杋器码:0000000</view>
|
||||
<view class='about-text'>软件版本:1.0.0</view>
|
||||
<view class='about-text'>使用期限:永久使用</view>
|
||||
<view class='about-text'>软件版本:380-250/250-4-0-1</view>
|
||||
|
||||
<Cn-page :loading="loading">
|
||||
<view slot="body">
|
||||
<view class="about">
|
||||
<view class="about-title">{{ deviceInfo.name }}</view>
|
||||
<view class="about-text">装置类型:{{ deviceInfo.devTypeName }}</view>
|
||||
<view class="about-text">装置型号:{{ deviceInfo.devModelName }}</view>
|
||||
<view class="about-text"
|
||||
>装置接入方式:{{ deviceInfo.devAccessMethod === 'cloud' ? '云直连' : 'mqtt' }}</view
|
||||
>
|
||||
<!-- <view class="about-text">装置注册时间:永久使用</view> -->
|
||||
<view class="about-text">程序版本:{{ deviceInfo.programVersionName }}</view>
|
||||
<view class="about-text">网络设备ID:{{ deviceInfo.ndid }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</Cn-page>
|
||||
</template>
|
||||
<script>
|
||||
import { queryDeivceById } from '@/common/api/device'
|
||||
import { queryByCode, queryCsDictTree, queryByid, queryEdDataPage } from '@/common/api/dictionary'
|
||||
export default {
|
||||
data () {
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
|
||||
loading: true,
|
||||
deviceInfo: {},
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
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
|
||||
console.log(resp[2])
|
||||
this.deviceInfo.programVersionName = resp[2].data.records.find(
|
||||
(item) => item.id === this.deviceInfo.programVersion,
|
||||
)?.versionNo
|
||||
this.loading = false
|
||||
})
|
||||
})
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style lang='scss'>
|
||||
<style lang="scss">
|
||||
.about {
|
||||
padding: 34rpx;
|
||||
padding: 34rpx;
|
||||
.about-title {
|
||||
font-size: 34rpx;
|
||||
font-weight: bold;
|
||||
@@ -40,5 +63,4 @@ export default {
|
||||
margin-bottom: 34rpx;
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user