|
- <template>
- <view style="height: 100%;">
- <u-empty marginTop="100rpx" :show="false" mode="list" text="暂无数据"></u-empty>
- <u-list @scrolltolower="scrolltolower" style="height: calc(100% - 0rpx);">
- <u-list-item v-for="(item, index) in list" :key="index">
- <view class="whiteCard">
- <view class="row1">
- 摄像头:教室(海康)、大厅(魔豆)
- </view>
- <view class="row2">
- 查询时间:2024-08-14 08:34:59
- </view>
- <view class="row3">
- <view class="">
- <text>开始时间:</text>2024-08-14 08:34:59
- </view>
- <view class="">
- <text>结束时间:</text>2024-08-14 08:34:59
- </view>
- <view class="type">
- <text>分片类型:<text style="color: #333;">小时</text></text>
- <view class="peopleNum">
- <image src="@/static/image/peopleNum.png" mode=""></image>
- <text>总人数:6</text>
- </view>
- </view>
- </view>
- <view class="bottom">
- <view class="btn" @click="NAV_TO('./passengerFlow/detail')">
- <image src="@/static/image/see.png" mode=""></image>
- <text>分片详情</text>
- </view>
- </view>
- </view>
- </u-list-item>
- <u-loadmore :status="status" />
- </u-list>
- <image class="addBtn" @click="NAV_TO('./passengerFlow/add')" src="@/static/image/add.png" mode=""></image>
- </view>
- </template>
-
- <script>
- export default {
- data() {
- return {
- list: [{}, {}, {}, {}, {}, {}, {}, {}, {}, ],
- isLoading: false,
- status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了
- page: {
- size: 8,
- page: 8,
- }
- }
- },
- methods: {
- scrolltolower() {
- this.loadmore()
- },
- loadmore() {
- if (this.status != 'loadmore') return
- this.status = 'loading'
- setTimeout(() => {
- for (let i = 0; i < 1; i++) {
- this.list.push({}, {}, {}, {})
- }
- // 获取到的总条数>=接口总条数 || 接口总条数为0
- if (this.list.length >= 14) {
- this.status = 'nomore'
- } else {
- this.status = 'loadmore'
- }
- }, 2000)
- },
- refresh() {
- this.status = 'loadmore'
- this.list = []
- this.page.page = 1
- this.loadmore()
- },
- pullDownRefresh() {
- this.refresh()
- }
- },
- onLoad() {
- this.loadmore()
- },
- }
- </script>
-
- <style lang="scss" scoped>
- .addBtn{
- width: 140rpx;
- height: 140rpx;
- position: fixed;
- right: 15rpx;
- bottom: 160rpx;
- }
- .whiteCard {
- background-color: #fff;
- border-radius: 18rpx;
- margin: 12rpx 28rpx;
- padding: 30rpx;
- color: #333333;
-
- .row1 {
- font-size: 32rpx;
- }
-
- .row2 {
- font-size: 26rpx;
- margin-top: 14rpx;
- }
-
- .row3{
- background-color: #F2F8FF;
- border-radius: 16rpx;
- font-size: 26rpx;
- padding: 18rpx 24rpx;
- line-height: 48rpx;
- margin-top: 18rpx;
- text{
- color: #777777;
- }
- .type{
- display: flex;
- justify-content: space-between;
-
- .peopleNum {
- uni-image {
- width: 34rpx;
- height: 34rpx;
- position: relative;
- top: 8rpx;
- margin-right: 10rpx;
- }
-
- uni-text {
- color: #2388FF;
- }
- }
- }
- }
-
- .bottom {
- display: flex;
- border-top: 1rpx solid rgba(0, 0, 0, 0.1);
- margin-top: 24rpx;
- padding-top: 22rpx;
- position: relative;
-
- .btn {
- width: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
-
- uni-image {
- width: 34rpx;
- height: 34rpx;
- margin-right: 6rpx;
- }
-
- uni-text {
- font-size: 30rpx;
- }
- }
- }
- }
- </style>
|