设备编辑
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>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
<uni-data-checkbox multiple v-model="checkbox" :localdata="hobby"></uni-data-checkbox>
|
||||
<view class="charts-box">
|
||||
<qiun-data-charts ontouch onzoom type="line" :opts="opts" :chartData="chartData" />
|
||||
<qiun-data-charts ontouch onzoom type="line" :opts="opts" :chartData="chartData" />
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="content" v-if="deviceInfo">
|
||||
<view v-if="navMenuActive == 0">
|
||||
<basic :deviceInfo="deviceInfo"></basic>
|
||||
</view>
|
||||
@@ -95,8 +95,8 @@
|
||||
@trigger="trigger"
|
||||
/>
|
||||
<uni-popup ref="share" type="share" :safe-area="false">
|
||||
<uni-popup-share title="分享到" ></uni-popup-share>
|
||||
<view style="height: 40rpx;background: #fff;"></view>
|
||||
<uni-popup-share title="分享到"></uni-popup-share>
|
||||
<view style="height: 40rpx; background: #fff"></view>
|
||||
</uni-popup>
|
||||
</view>
|
||||
</view>
|
||||
@@ -213,7 +213,7 @@ export default {
|
||||
} else if (e.item.text === '告警') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/report' })
|
||||
} else if (e.item.text === '关于') {
|
||||
uni.navigateTo({ url: '/pages/device/APF/about' })
|
||||
uni.navigateTo({ url: '/pages/device/APF/about?id=' + this.devId })
|
||||
} else if (e.item.text === '移交') {
|
||||
uni.navigateTo({ url: '/pages/device/transfer?id=' + this.devId })
|
||||
} else if (e.item.text === '反馈') {
|
||||
@@ -226,6 +226,10 @@ export default {
|
||||
this.$util.toast('功能暂未开放')
|
||||
} else if (e.item.text === '模版') {
|
||||
this.$util.toast('效果是功能暂未开放直接打开报表')
|
||||
} else if (e.item.text === '编辑') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/device/edit?deviceInfo=' + encodeURIComponent(JSON.stringify(this.deviceInfo)),
|
||||
})
|
||||
}
|
||||
this.$refs.fab.close()
|
||||
},
|
||||
@@ -388,6 +392,10 @@ export default {
|
||||
iconPath: '/static/delate.png',
|
||||
text: '删除',
|
||||
})
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/feedback.png',
|
||||
text: '编辑',
|
||||
})
|
||||
this.content.splice(0, 0, {
|
||||
iconPath: '/static/transfer.png',
|
||||
text: '移交',
|
||||
|
||||
Reference in New Issue
Block a user