wszhyWx/pages/siteAdmin/siteAdmin.vue

142 lines
3.0 KiB
Vue
Raw Permalink Normal View History

2023-09-28 10:07:02 +00:00
<template>
<view class="siteAdmin">
<u-navbar :background="background" :is-back='true' back-icon-color='#FFFFFF' :border-bottom="false" title="站点管理"
title-color='#FFFFFF' :title-bold='true' title-size='32'></u-navbar>
<view class="content">
<view class="item" v-for="(item,index) in list" :key="index">
<view class="left">
{{ item.name }}
</view>
<view class="right">
<view class="edit" @click="toEditSite">
<image class="editImage" src="../../static/edit.png" mode=""></image>
<text>编辑</text>
</view>
<text class="delete">删除</text>
<text class="addSite">新增子站点</text>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
// 头部导航背景
background: {
backgroundColor: '#24B383',
},
list:[
{name:'温室#1'},
{name:'植保-植物生长'},
{name:'智慧水肥'},
{name:'大田生态四情'},
{name:'气象站'},
]
};
},
methods:{
// 跳转到编辑站点
toEditSite(){
uni.navigateTo({
url:'/pages/editSite/editSite'
})
}
}
}
</script>
<style lang="scss" scoped>
.siteAdmin{
width: 100%;
min-height: 100vh;
background-color: #F5F6FA;
.content{
box-sizing: border-box;
padding: 30rpx 25rpx 0 35rpx;
.item{
width: 690rpx;
// height: 100rpx;
padding: 23rpx 25rpx 23rpx 27rpx;
background: #FFFFFF;
box-shadow: 0rpx 4rpx 20rpx 0rpx rgba(153,153,153,0.1);
border-radius: 20rpx;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 30rpx;
.left{
font-size: 34rpx;
font-family: PingFang SC;
font-weight: bold;
color: #333333;
box-sizing: border-box;
padding-right: 30rpx;
}
.right{
display: flex;
align-items: center;
.edit{
width: 120rpx;
height: 54rpx;
background: linear-gradient(0deg, #57CFA6, #25B383);
border-radius: 10rpx;
display: flex;
justify-content: center;
align-items: center;
.editImage{
width: 25rpx;
height: 26rpx;
margin-right: 10rpx;
}
>text{
font-size: 24rpx;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: #FFFFFF;
}
}
.delete{
width: 90rpx;
height: 54rpx;
background: #FFEFEF;
border: 2px solid rgba(255,99,99,0.3);
border-radius: 10rpx;
font-size: 24rpx;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: #FF6363;
display: flex;
justify-content: center;
align-items: center;
margin: 0 15rpx;
}
.addSite{
width: 140rpx;
height: 54rpx;
background: #EFFCF7;
border: 2px solid rgba(58,187,144,0.25);
border-radius: 10rpx;
font-size: 24rpx;
font-family: PingFang-SC-Bold;
font-weight: bold;
color: #24B383;
display: flex;
justify-content: center;
align-items: center;
}
}
}
}
}
</style>