jsy-app/components/custom-index-mp/custom-index-mp.vue

222 lines
4.0 KiB
Vue
Raw Normal View History

2024-12-02 17:19:21 +08:00
<template>
<u-popup :show="open" mode="bottom" @close="close" closeable>
2024-12-03 09:57:05 +08:00
<view class="lock">
2024-12-02 18:38:17 +08:00
<view class="title">土壤墒情
<view class="iconfont icon-shuaxin"></view>
</view>
<view class="list-title ">
<view class="fixed">
<view></view>
<view>深度</view>
<view>湿度</view>
<view>温度</view>
</view>
</view>
2024-12-03 09:57:05 +08:00
</view>
<view class="list-box" style="padding-top: 108px;">
2024-12-02 18:38:17 +08:00
<view class="card">
2024-12-03 12:41:26 +08:00
<uni-collapse v-if="list.length">
<uni-collapse-item title-border="none" :border="false" :open="true" v-for="item in list">
2024-12-02 18:38:17 +08:00
<template v-slot:title>
<view class="fixed" style="justify-content: space-between;">
<view>
位置墒情1-1
</view>
<view>
2024-01-12 19:21:32
</view>
</view>
</template>
<view class="list-content">
<view class="fixed">
<view>1</view>
<view>10cm</view>
<view>12.6%</view>
<view>5.4</view>
</view>
<view class="fixed">
<view>2</view>
<view>10cm</view>
<view>12.6%</view>
<view>5.4</view>
</view>
<view class="fixed">
<view>3</view>
<view>10cm</view>
<view>12.6%</view>
<view>5.4</view>
</view>
<view class="fixed">
<view>4</view>
<view>10cm</view>
<view>12.6%</view>
<view>5.4</view>
</view>
<view class="fixed">
<view>5</view>
<view>10cm</view>
<view>12.6%</view>
<view>5.4</view>
</view>
<view class="fixed">
<view>6</view>
<view>10cm</view>
<view>12.6%</view>
<view>5.4</view>
</view>
<view class="fixed">
<view>7</view>
<view>10cm</view>
<view>12.6%</view>
<view>5.4</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
2024-12-03 12:41:26 +08:00
<u-empty mode="data" style="height: 50vh;" v-else />
2024-12-02 18:38:17 +08:00
</view>
</view>
2024-12-02 17:19:21 +08:00
</u-popup>
</template>
<script>
export default {
name: "Mp",
components: {},
props: {},
data() {
return {
title: "土壤墒情",
open: false,
2024-12-03 12:41:26 +08:00
list: [],
2024-12-02 17:19:21 +08:00
}
},
created() {},
mounted() {},
methods: {
/**
* 显示方法
* @param type 1基站 2阀门
* @param row
* @param data
*/
async show() {
this.open = true;
2024-12-03 12:41:26 +08:00
this.getList();
2024-12-02 17:19:21 +08:00
},
close() {
this.open = false;
2024-12-03 12:41:26 +08:00
},
getList() {
this.list = [];
},
2024-12-02 17:19:21 +08:00
}
}
</script>
<style lang="scss" scoped>
2024-12-03 10:27:21 +08:00
::v-deep.u-popup__content__close--top-right {
z-index: 11;
}
2024-12-02 18:38:17 +08:00
.u-popup__content {
background: transparent;
2024-12-02 17:19:21 +08:00
2024-12-03 10:27:21 +08:00
2024-12-03 09:57:05 +08:00
.lock {
position: fixed;
width: 100%;
height: 108px;
z-index: 10;
background-color: #f3f3f3;
2024-12-03 10:27:21 +08:00
2024-12-03 09:57:05 +08:00
.title {
font-size: 34rpx;
position: relative;
text-align: center;
padding: 15px 0;
.icon-shuaxin {
position: absolute;
top: 15px;
right: 40px;
}
}
}
2024-12-02 18:38:17 +08:00
.list-box {
2024-12-03 09:57:05 +08:00
border-radius: 10px 10px 0 0;
2024-12-02 18:38:17 +08:00
width: 100vw;
min-height: 50vh;
max-height: calc(100vh - 100px);
background-color: #f3f3f3;
padding: 10px;
overflow-y: auto;
}
.card {
background-color: transparent;
.uni-collapse {
background-color: transparent;
border-radius: 10px;
}
::v-deep.uni-collapse-item__title {
background-color: #39ac4f;
color: #fff;
padding: 10px;
border-radius: 10px;
.uni-collapse-item__title-arrow {
width: 40px;
.uni-icons {
color: #fff !important;
}
}
}
::v-deep.uni-collapse-item__wrap {
background: transparent !important;
}
}
.list-title,
.list-content {
background: #fff;
border-radius: 10px;
margin-bottom: 10px;
box-shadow: 0 1px 9px rgb(209, 209, 209, 0.5);
.fixed {
view {
font-size: 30rpx;
padding: 10px 0;
text-align: center;
flex: 1;
}
}
}
2024-12-03 09:57:05 +08:00
.list-title {
margin: 0 10px;
}
2024-12-02 18:38:17 +08:00
.list-content {
margin-bottom: 0;
.fixed {
view {
font-size: 28rpx;
border-bottom: 1px solid #f3f3f3;
}
}
}
}
2024-12-02 17:19:21 +08:00
</style>