完善工程

This commit is contained in:
仲么了
2023-03-01 08:48:52 +08:00
parent 5feb70a9c5
commit 80ba96be50
9 changed files with 110 additions and 14 deletions

View File

@@ -339,6 +339,12 @@
"style": {
"navigationBarTitleText": "角色升级审核"
}
},
{
"path": "pages/zhuanzhi/warning",
"style": {
"navigationBarTitleText": "报警设备"
}
}
],
"tabBar": {

View File

@@ -15,11 +15,12 @@
<text class="ml20">版本号v1.0.0</text>
</view>
<view class="title mb20 m340">设备列表
<view class="footer-btn" @click="newDevice">注册设备</view>
<view class="footer-btn" v-if="userInfo.role != '2' && userInfo.role != '5'" @click="newDevice">注册设备
</view>
</view>
<uni-card :title="'设备' + item" :sub-title="'XXX项目1'" extra="用能" v-for="item in 2" :key="item"
@click="goDevice" padding="0" thumbnail="/static/device.png">
</uni-card>
@click="goDevice" padding="0" thumbnail="/static/device.png">
</uni-card>
<uni-load-more status="nomore"></uni-load-more>
<view style="height:20rpx"></view>
</view>
@@ -33,6 +34,7 @@ export default {
data () {
return {
loading: false,
userInfo: {},
deviceList: [
{
name: '设备1',
@@ -62,6 +64,7 @@ export default {
}
},
onLoad (options) {
this.userInfo = uni.getStorageSync('userInfo')
},
}
@@ -83,6 +86,7 @@ export default {
font-size: 36rpx;
color: #111;
font-weight: 700;
.footer-btn {
padding: 0 20rpx;
height: 50rpx;
@@ -105,4 +109,5 @@ export default {
box-sizing: border-box;
}
}</style>
}
</style>

View File

@@ -1,18 +1,18 @@
<template>
<Cn-page :loading='loading'>
<view slot='body'>
<view class='index' :class="{ 'device': userInfo.role == '5' }">
<view class='index' :class="{ 'device': userInfo.role == '5' || userInfo.role == '2' }">
<uni-card title="监测网关" sub-title="监测" @click="look" thumbnail="/static/gateway.png"
:padding="userInfo.role == '5' ? 0 : '10px'">
<view class="footer" v-if="userInfo.role != 5">
:padding="userInfo.role == '5' || userInfo.role == '2' ? 0 : '10px'">
<view class="footer" v-if="userInfo.role != 5 && userInfo.role != 2">
<text style="flex:1"> </text>
<view class="footer-btn" @click.stop="newDevice">注册设备</view>
<view class="footer-btn ml20">查看</view>
</view>
</uni-card>
<uni-card title="用能网关" sub-title="用能" @click="look" thumbnail="/static/gateway.png"
:padding="userInfo.role == '5' ? 0 : '10px'">
<view class="footer" v-if="userInfo.role != 5">
:padding="userInfo.role == '5' || userInfo.role == '2' ? 0 : '10px'">
<view class="footer" v-if="userInfo.role != 5 && userInfo.role != 2">
<text style="flex:1"> </text>
<view class="footer-btn" @click.stop="newDevice">注册设备</view>
<view class="footer-btn ml20">查看</view>
@@ -58,6 +58,7 @@ export default {
<style lang='scss'>
.index {
padding-top: 20rpx;
.footer {
display: flex;
justify-content: space-between;

View File

@@ -141,6 +141,11 @@ export default {
}
},
methods: {
submitFeedBack () {
uni.navigateTo({
url: '/pages/device/feedback'
})
},
projectTypeChange (e) {
// 重置name
this.select.projectName = ''

View File

@@ -139,6 +139,11 @@ export default {
}
},
methods: {
submitFeedBack () {
uni.navigateTo({
url: '/pages/device/feedback'
})
},
projectTypeChange (e) {
// 重置name
this.select.projectName = ''

View File

@@ -9,7 +9,7 @@
<div class="header-item-value">1</div>
<div class="header-item-label">正常设备</div>
</div>
<div class="header-item">
<div class="header-item" @click="projectWarning">
<div class="header-item-value">0</div>
<div class="header-item-label">报警设备</div>
</div>
@@ -25,7 +25,7 @@
<div class="header-item-value">0</div>
<div class="header-item-label">事件数量</div>
</div>
<div class="header-item">
<div class="header-item" @click="projectNum">
<div class="header-item-value">3</div>
<div class="header-item-label">项目个数</div>
</div>
@@ -40,6 +40,16 @@ export default {
}
},
methods: {
projectWarning () {
uni.navigateTo({
url: '/pages/zhuanzhi/warning'
})
},
projectNum () {
uni.navigateTo({
url: '/pages/project/list'
})
},
jump (item) {
if (item.name.indexOf('APF') > -1) {
uni.navigateTo({

View File

@@ -140,6 +140,11 @@ export default {
}
},
methods: {
submitFeedBack () {
uni.navigateTo({
url: '/pages/device/feedback'
})
},
projectTypeChange (e) {
// 重置name
this.select.projectName = ''

View File

@@ -1,8 +1,8 @@
<template>
<view :loading="loading">
<!-- <uni-nav-bar left-icon="left" right-icon="cart" title="标题" /> -->
<uni-nav-bar dark :fixed="true" status-bar left-icon="left" rightIcon="plusempty" background-color="#fff"
color="#111" title="项目管理" @clickLeft="back" @clickRight="add" />
<uni-nav-bar dark :fixed="true" status-bar left-icon="left" :rightIcon="userInfo.role == '2' ? '' : 'plusempty'"
background-color="#fff" color="#111" title="项目管理" @clickLeft="back" @clickRight="add" />
<view class="message">
<uni-card title="XXX项目1" extra="用能" @click="jump('XXX项目1')">
<view class="term-list-bottom">
@@ -37,11 +37,13 @@
export default {
data () {
return {
loading: false
loading: false,
userInfo: {}
}
},
methods: {
init () {
this.userInfo = uni.getStorageSync('userInfo')
},
back () {
uni.navigateBack()

View File

@@ -0,0 +1,57 @@
<template>
<Cn-page :loading='loading'>
<view slot='body'>
<view class='index'>
<view class="content device" :style="{ minHeight: minHeight }">
<uni-card :title="item.name" :sub-title="item.project" :extra="item.type" padding="0"
v-for="(item, index) in deviceList" :key="index" thumbnail="/static/device.png">
<!-- <text>{{ item.project }} {{ item.type }}</text> -->
</uni-card>
<uni-load-more status="nomore"></uni-load-more>
</view>
</view>
</view>
</Cn-page>
</template>
<script>
export default {
data () {
return {
loading: false,
deviceList: [
{
name: '设备APF-1',
des: '设备描述1',
type: '监测',
project: 'XXX项目1',
},
{
name: '设备APF-2',
des: '设备描述1',
type: '监测',
project: 'XXX项目1',
},
{
name: '设备APF-3',
des: '设备描述2',
type: '用能',
project: 'XXX项目2'
},
{
name: '设备DVR-1',
des: '设备描述3',
type: '监测',
project: 'XXX项目3'
}
]
}
},
methods: {
}
}
</script>
<style lang='scss'>
.index {
padding: 20rpx 0;
}
</style>