346149741
2024-06-22 0a2589ad83ffe64d021b009e33f8ff93b27d8536
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<template>
    <view>
        <u-sticky bgColor="white">
            <view class="set-search">
                <u-search placeholder="请输入要查询的企业" @search="search" @blur="search"  shape="square" :showAction="false"></u-search>
            </view>
            <view class="border"></view>
        </u-sticky>
        <view class="item" v-for="(item,index) in list1">
            <img src="/static/i05.png" class="img" alt="" />
            <view class="right">
                <view class="name">
                    {{item.companyName}}
                </view>
                <view class="box">
                    <view class="l">
                        <p>执法单位:{{item.executeDeptName}}</p>
                        <p>执法时间:{{item.executeTime}}</p>
                    </view>
                    <view class="r" @click="chakan(item.orderId)">
                        去查看
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    import {  showList } from '@/api/index.js'
    
    export default {
        data() {
            return {
                list1:[],
                queryParams: {
                    pageNum: 1,
                    pageSize: 10
                },
                total: 1,
            }
        },
        onShow() {
            this.list1 = []
            this.queryParams.pageNum = 1
            this.getList()
        },
        onReachBottom() {
            if(this.list1.length == this.total) {
                return
            }
            this.queryParams.pageNum++
            this.getList()
        },
        methods: {
            search(e){
                this.list1 = []
                this.queryParams.pageNum =1
                this.queryParams.companyName = e
                this.getList()
            },
            chakan(id){
                uni.navigateTo({
                    url: `/pages/message/details?id=${id}`
                })
            },
            getList() {
                showList({...this.queryParams}).then(val => {
                    // console.log(val.data)
                    this.total = val.data.total
                    this.list1 = [...this.list1,...val.data.rows]
                })
            },
        }
    }
</script>
 
<style>
    page{
        background-color: #F4F4F4;
    }
    
</style>
<style lang="scss" scoped>
    .set-search{
        margin: 0 32rpx 0;
        padding-top: 26rpx;
        
    }
    .border{
        border-bottom: 2rpx solid #F6F6F6;
        margin: 20rpx 0 0;
    }
    .item{
        background: #fff;
        border-radius: 5px;
        padding: 24rpx;
        box-sizing: border-box;
        margin: 20rpx 32rpx;
        display: flex;
        .img{
            width: 56rpx;
            height: 56rpx;
        }
        .right{
            width: 90%;
            .name{
                color: #202d44;
                font-size: 32rpx;
                line-height: 44rpx;
                margin-bottom: 24rpx;
            }
            .box{
                display: flex;
                justify-content: space-between;
                .l{
                    font-size: 26rpx;
                     color: #7e8593;
                     max-width: 80%;
                     
                }
                .r{
                    width: 132rpx;
                    height: 64rpx;
                    line-height: 64rpx;
                    border-radius: 5px;
                    border: 1px solid #ABD2FF;
                    background: #F0F8FF;
                    color: #1171e0;
                    text-align: center;
                    font-size: 30rpx;
                }
            }
        }
    }
</style>