Files
app-govern/pages/gateway/detail.vue

113 lines
3.0 KiB
Vue
Raw Normal View History

2023-02-23 08:44:46 +08:00
<template>
<Cn-page :loading='loading' noPadding>
<view slot='body'>
<view class='detail device'>
<view class="header">
<image src="/static/test2.pic.png" mode="widthFix" style="width: 100%;" />
</view>
<view class="title">基本信息</view>
<view class="des">
<text>名称监测网关</text>
2023-02-28 14:03:38 +08:00
<text class="ml20">项目XXX项目1</text>
2023-02-23 08:44:46 +08:00
</view>
<view class="des">
<text>设备型号PQS-882</text>
<text class="ml20">版本号v1.0.0</text>
</view>
<view class="title mb20 m340">设备列表
2023-03-01 08:48:52 +08:00
<view class="footer-btn" v-if="userInfo.role != '2' && userInfo.role != '5'" @click="newDevice">注册设备
</view>
2023-02-23 08:44:46 +08:00
</view>
2023-02-28 14:03:38 +08:00
<uni-card :title="'设备' + item" :sub-title="'XXX项目1'" extra="用能" v-for="item in 2" :key="item"
2023-03-01 08:48:52 +08:00
@click="goDevice" padding="0" thumbnail="/static/device.png">
</uni-card>
2023-02-23 08:44:46 +08:00
<uni-load-more status="nomore"></uni-load-more>
<view style="height:20rpx"></view>
</view>
</view>
</Cn-page>
</template>
<script>
export default {
data () {
return {
loading: false,
2023-03-01 08:48:52 +08:00
userInfo: {},
2023-02-23 08:44:46 +08:00
deviceList: [
{
name: '设备1',
des: '设备描述1',
type: 'APF',
project: '监测',
},
{
name: '设备2',
des: '设备描述2',
type: 'DVR',
project: '监测'
},
]
}
},
methods: {
newDevice () {
uni.navigateTo({
url: '/pages/gateway/newDevice'
})
},
goDevice (item) {
uni.navigateTo({
url: `/pages/device/${item.type}/detail`
})
}
},
onLoad (options) {
2023-03-01 08:48:52 +08:00
this.userInfo = uni.getStorageSync('userInfo')
2023-02-23 08:44:46 +08:00
},
}
</script>
<style lang='scss'>
.detail {
// background: $uni-theme-white;
.header {
position: relative;
}
.title {
display: flex;
justify-content: space-between;
padding: 20rpx 20rpx 0;
font-size: 36rpx;
color: #111;
font-weight: 700;
2023-03-01 08:48:52 +08:00
2023-02-23 08:44:46 +08:00
.footer-btn {
padding: 0 20rpx;
height: 50rpx;
background-color: #007aff;
font-size: 24rpx;
color: #fff;
text-align: center;
line-height: 50rpx;
border-radius: 10rpx;
}
}
.des {
padding: 20rpx 20rpx 0;
font-size: 28rpx;
color: #333;
}
.content {
box-sizing: border-box;
}
2023-03-01 08:48:52 +08:00
}
</style>