This commit is contained in:
仲么了
2023-02-01 16:59:32 +08:00
parent ce0b8967f7
commit d1a1396164
18 changed files with 889 additions and 51 deletions

View File

@@ -2,11 +2,49 @@
<Cn-page :loading="loading">
<view slot="body">
<view class="index">
<Cn-grid title="工作准备">
<Cn-grid-item background="#fff" src="/static/zantai.png" text="灿能"></Cn-grid-item>
<div class="header">
<div class="header-content">
<div class="header-content-item">
<div class="header-content-item-value">38</div>
<div class="header-content-item-label">正常设备</div>
</div>
<div class="header-content-item">
<div class="header-content-item-value">5</div>
<div class="header-content-item-label">报警设备</div>
</div>
<div class="header-content-item">
<div class="header-content-item-value">3</div>
<div class="header-content-item-label">离线设备</div>
</div>
</div>
</div>
<Cn-grid title="常用功能" class="mt20">
<Cn-grid-item background="#fff" src="/static/zantai.png" text="设备管理"
@click="jump('/pages/device/list')"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="网关管理" @click="send"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="直连装置管理" @click="send"></Cn-grid-item>
</Cn-grid>
<!-- <Cn-grid title="统计" class="mt20">
<Cn-grid-item background="#fff" src="/static/zantai.png" text="设备数量"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="设备状态" @click="send"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="告警数量" @click="send"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="暂态事件数量" @click="send"></Cn-grid-item>
<Cn-grid-item background="#fff"></Cn-grid-item>
<Cn-grid-item background="#fff"></Cn-grid-item>
</Cn-grid> -->
<!-- <Cn-grid title="能耗分析" class="mt20">
<Cn-grid-item background="#fff" src="/static/zantai.png" text="稳态治理"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="稳态报表" @click="send"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="暂态治理"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="暂态报表"></Cn-grid-item>
<Cn-grid-item background="#fff"></Cn-grid-item>
<Cn-grid-item background="#fff"></Cn-grid-item>
</Cn-grid>
<Cn-grid title="日志" class="mt20">
<Cn-grid-item background="#fff" src="/static/zantai.png" text="设备操作"></Cn-grid-item>
<Cn-grid-item background="#fff" src="/static/zantai.png" text="运维" @click="send"></Cn-grid-item>
<Cn-grid-item background="#fff"></Cn-grid-item>
</Cn-grid> -->
</view>
</view>
</Cn-page>
@@ -15,10 +53,22 @@
export default {
data () {
return {
loading: true
loading: false
}
},
methods: {
send () {
uni.createPushMessage({
title: '灿能',
content: '灿能推送',
success: function (res) {
console.log('推送成功')
},
fail: function (res) {
console.log('推送失败')
}
})
},
jump (url) {
uni.navigateTo({
url: url
@@ -35,5 +85,29 @@ export default {
<style lang="scss">
.index {
padding: 34rpx;
.header {
background: #fff;
border-radius: 12rpx;
background: $uni-color-primary;
padding: 30rpx 10rpx 40rpx;
.header-content {
display: flex;
justify-content: space-around;
.header-content-item {
display: flex;
flex-direction: column;
align-items: center;
color: #fff;
font-size: 28rpx;
.header-content-item-value {
margin-bottom: 10rpx;
}
}
}
}
}
</style>

View File

@@ -9,11 +9,11 @@
</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="mine-nav" @click="jump('upgrade')">
<!-- <view class="mine-nav" @click="jump('upgrade')">
<image mode="aspectFill" class="mine-nav-icon" src="/static/server.png" />
<view class="mine-nav-label">角色升级</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
</view> -->
<view class="mine-nav" @click="jump('message')"
style="border-bottom: none; box-shadow: 0 4rpx 8rpx #e7e7e74c;">
<image mode="aspectFill" class="mine-nav-icon" src="/static/message2.png" />

View File

@@ -1,52 +1,27 @@
<template>
<view class="content">
<image class="logo" src="/static/logo.png"></image>
<view class="text-area">
<text class="title">{{title}}</text>
</view>
</view>
<view class="content">
<uni-list :border="false">
<uni-list-item title="输入电压异常" rightText="2023-02-01 15:10:29" v-for="item in 5" />
</uni-list>
</view>
</template>
<script>
export default {
data() {
return {
title: '灿能'
}
},
onLoad() {
export default {
data () {
return {
title: '灿能'
}
},
onLoad () {
},
methods: {
},
methods: {
}
}
}
}
</script>
<style>
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.logo {
height: 200rpx;
width: 200rpx;
margin-top: 200rpx;
margin-left: auto;
margin-right: auto;
margin-bottom: 50rpx;
}
.text-area {
display: flex;
justify-content: center;
}
.title {
font-size: 36rpx;
color: #8f8f94;
}
.content {}
</style>