页面切图
This commit is contained in:
@@ -130,14 +130,12 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.index {
|
.index {
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
margin: 0 30rpx;
|
margin: 0 30rpx;
|
||||||
background: $uni-theme-white;
|
background: $uni-theme-blue;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background: $uni-color-primary;
|
|
||||||
padding: 30rpx 10rpx 40rpx;
|
padding: 30rpx 10rpx 40rpx;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-gap: 60rpx 0;
|
grid-gap: 60rpx 0;
|
||||||
@@ -159,6 +157,34 @@ page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.nav {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
padding: 30rpx;
|
||||||
|
display: flex;
|
||||||
|
background: rgb(243, 244, 245);
|
||||||
|
z-index: 2;
|
||||||
|
.nav-menu {
|
||||||
|
padding: 10rpx 20rpx;
|
||||||
|
margin-left: 20rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
border-radius: 8rpx;
|
||||||
|
background: #ebeaec;
|
||||||
|
color: #666;
|
||||||
|
&:first-of-type {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-active {
|
||||||
|
background: #dfe5f7;
|
||||||
|
color: $uni-theme-blue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: $uni-theme-white;
|
background: $uni-theme-white;
|
||||||
height: 236rpx;
|
height: 180rpx;
|
||||||
|
|
||||||
.grid-card-content-item-icon {
|
.grid-card-content-item-icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
position: relative;
|
position: relative;
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
background: rgba(78, 159, 255, 1);
|
background: $uni-theme-yellow;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
|
|
||||||
.grid-card-content-item-icon-2 {
|
.grid-card-content-item-icon-2 {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<view class="grid-card">
|
<view class="grid-nav">
|
||||||
<view class="grid-card-title" v-if="title">{{title}}</view>
|
<view class="grid-nav-title" v-if="title">{{title}}</view>
|
||||||
<view class="grid-card-content">
|
<view class="grid-nav-content">
|
||||||
<slot />
|
<slot />
|
||||||
<Rc-grid-item background="#fff" v-for="item in seat" :key="item"></Rc-grid-item>
|
<Rc-grid-item background="#fff" v-for="item in seat" :key="item"></Rc-grid-item>
|
||||||
</view>
|
</view>
|
||||||
@@ -30,11 +30,11 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.grid-card {
|
.grid-nav {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: $uni-theme-white;
|
background: $uni-theme-white;
|
||||||
.grid-card-title {
|
.grid-nav-title {
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
text-indent: 40rpx;
|
text-indent: 40rpx;
|
||||||
@@ -42,10 +42,10 @@ export default {
|
|||||||
color: #999;
|
color: #999;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
.grid-card-content {
|
.grid-nav-content {
|
||||||
background: #f6f7f8;
|
background: #f6f7f8;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||||
grid-gap: 2rpx;
|
grid-gap: 2rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&-active {
|
&-active {
|
||||||
background: $uni-color-primary;
|
background: $uni-theme-blue;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
&-active {
|
&-active {
|
||||||
background: $uni-color-primary;
|
background: $uni-theme-blue;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
.transfer-img {
|
.transfer-img {
|
||||||
width: 500rpx;
|
width: 500rpx;
|
||||||
height: 500rpx;
|
height: 500rpx;
|
||||||
background: $uni-color-primary ;
|
background: $uni-theme-blue ;
|
||||||
}
|
}
|
||||||
|
|
||||||
.transfer-text {
|
.transfer-text {
|
||||||
@@ -63,7 +63,7 @@ export default {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background-color: $uni-color-primary;
|
background-color: $uni-theme-blue;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -14,24 +14,72 @@
|
|||||||
<div class="header-item-label">离线设备</div>
|
<div class="header-item-label">离线设备</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<uni-card title="基础设备" sub-title="副标题" :extra="item % 2 ? 'APF' : 'DVR'" v-for="item in 3" :key="item"
|
<view style="padding:30rpx 30rpx 0">
|
||||||
@click="jump(item)" thumbnail="/static/device.png">
|
<Cn-grid title="注册">
|
||||||
<text>设备基础信息 </text>
|
<Cn-grid-item src="/static/device2.png" text="设备"></Cn-grid-item>
|
||||||
|
<Cn-grid-item src="/static/gateway2.png" text="网关"></Cn-grid-item>
|
||||||
|
<Cn-grid-item background="#fff"></Cn-grid-item>
|
||||||
|
<Cn-grid-item background="#fff"></Cn-grid-item>
|
||||||
|
</Cn-grid>
|
||||||
|
</view>
|
||||||
|
<view class="nav">
|
||||||
|
<view class="nav-menu" :class="{ 'nav-menu-active': navMenuActive == index }"
|
||||||
|
v-for="(item, index) in navMenuList" :key="index" @click="navMenuClick(index)">{{ item.text }}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<uni-card :title="item.name" :sub-title="item.project" :extra="item.type" v-for="item in deviceListFilter"
|
||||||
|
:key="item" style="margin-top:4rpx" @click="jump(item)" thumbnail="/static/device.png">
|
||||||
|
<text>{{ item.project }} {{ item.type }}</text>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
|
|
||||||
<uni-load-more status="nomore"></uni-load-more>
|
<uni-load-more status="nomore"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false
|
loading: false,
|
||||||
|
navMenuList: [{
|
||||||
|
text: '全部'
|
||||||
|
}, {
|
||||||
|
text: '监测'
|
||||||
|
}, {
|
||||||
|
text: '治理'
|
||||||
|
}],
|
||||||
|
navMenuActive: 0,
|
||||||
|
deviceList: [
|
||||||
|
{
|
||||||
|
name: '设备1',
|
||||||
|
des: '设备描述1',
|
||||||
|
type: 'APF',
|
||||||
|
project: '监测',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '设备2',
|
||||||
|
des: '设备描述2',
|
||||||
|
type: 'DVR',
|
||||||
|
project: '治理'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
deviceListFilter () {
|
||||||
|
if (this.navMenuActive == 0) {
|
||||||
|
return this.deviceList
|
||||||
|
} else {
|
||||||
|
return this.deviceList.filter(item => item.project == this.navMenuList[this.navMenuActive].text)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
navMenuClick (index) {
|
||||||
|
this.navMenuActive = index
|
||||||
|
},
|
||||||
jump (item) {
|
jump (item) {
|
||||||
if (item % 2) {
|
if (item % 2) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/device/APF/detail'
|
url: '/pages/device/APF/detail'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
@@ -43,6 +91,4 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'></style>
|
||||||
.index-zhuyonghu {}
|
|
||||||
</style>
|
|
||||||
BIN
static/device2.png
Normal file
BIN
static/device2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
BIN
static/gateway2.png
Normal file
BIN
static/gateway2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.9 KiB |
2
uni.scss
2
uni.scss
@@ -81,6 +81,6 @@ $uni-font-size-paragraph:15px;
|
|||||||
/* 全局配置 */
|
/* 全局配置 */
|
||||||
|
|
||||||
$uni-theme-blue: #376cf3; // 全局主题色
|
$uni-theme-blue: #376cf3; // 全局主题色
|
||||||
$uni-theme-yellow: #f2c867; // 全局主题色
|
$uni-theme-yellow: #e8b956; // 全局主题色
|
||||||
$uni-theme-white: #fff; // 全局主题色
|
$uni-theme-white: #fff; // 全局主题色
|
||||||
$uni-theme-radius: 12rpx; // 全局主题色
|
$uni-theme-radius: 12rpx; // 全局主题色
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
color: '#3c3e49',
|
color: '#3c3e49',
|
||||||
selectedColor: '#007AFF',
|
selectedColor: '#007AFF',
|
||||||
backgroundColor: '#fff',
|
backgroundColor: '#fff',
|
||||||
buttonColor: '#007AFF',
|
buttonColor: '#376cf3',
|
||||||
iconColor: '#fff'
|
iconColor: '#fff'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user