wjt
2024-06-25 244d89b41c0e0e995d38f635a126a0959b9ba25b
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<template>
    <view>
 
        <u-sticky bgColor="white">
            <u-navbar title="执法记录" :autoBack="true" placeholder>
                <view slot="left"></view>
            </u-navbar>
            <u-tabs :list="list" @change="click" :current="current" :scrollable="false" bgColor="white"></u-tabs>
        </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">
                    <view class="l">
                        {{item.companyName}}
                    </view>
                    <template v-if="item.orderStatus==2">
                        <view class="r color3">
                            未执法
                        </view>
                    </template>
                    <template v-if="item.isEva==0">
                        <view class="r color2">
                            待评价
                        </view>
                    </template>
                    <template v-if="item.isEva==1">
                        <view class="r color1">
                            已评价
                        </view>
                    </template>
                </view>
                <view class="box">
                    <view class="l">
                        <p>执法单位:{{item.executeDeptName|| item.applyDeptName}}</p>
                        <p>执法时间:{{item.inTime || item.planTime}}</p>
                    </view>
                    <view class="r" @click="chakan(item.orderId)">
                        去查看
                    </view>
                </view>
            </view>
        </view>
        <u-empty v-if="!list1.length"></u-empty>
        <!-- <view class="item">
            <img src="/static/i05.png" class="img" alt="" />
            <view class="right">
                <view class="name">
                    <view class="l">
                        北京尚策互动科技有限公司北京尚策互动科技有限公司北京尚策互动科技有限公司北京尚策互动科技有限公司北京尚策互动科技有限公司
                    </view>
                    <view class="r color2">
                        待评价
                    </view>
                </view>
                <view class="box">
                    <view class="l">
                        <p>执法单位:农业农村局农业农村局农业农村局农业农村局农业农村局农业农村局s</p>
                        <p>执法时间:2024-06-03 12:30:67</p>
                    </view>
                    <view class="r">
                        去查看
                    </view>
                </view>
            </view>
        </view>
        <view class="item">
            <img src="/static/i05.png" class="img" alt="" />
            <view class="right">
                <view class="name">
                    <view class="l">
                        北京尚策互动科技有限公司北京尚策互动科技有限公司北京尚策互动科技有限公司北京尚策互动科技有限公司北京尚策互动科技有限公司
                    </view>
                    <view class="r color3">
                        待评价
                    </view>
                </view>
                <view class="box">
                    <view class="l">
                        <p>执法单位:农业农村局</p>
                        <p>执法时间:2024-06-03 12:30:67</p>
                    </view>
                    <view class="r">
                        去查看
                    </view>
                </view>
            </view>
        </view> -->
        <view style="height: 150rpx;"></view>
        <tabsCom :activeNumber.sync="activeNumber"></tabsCom>
 
    </view>
</template>
 
<script>
    import tabsCom from '@/qiye/components/bottom.vue'
    import {
        companyList
    } from '@/api/qiye.js'
 
    export default {
        components: {
            tabsCom
        },
        data() {
            return {
                activeNumber: 1,
                list: [{
                    name: '全部',
                    value: {
 
                    }
                }, {
                    name: '待评价',
                    value: {
                        isEva: 0
                    }
                }, {
                    name: '未执法',
                    value: {
                        orderStatus: 2
                    }
                }, {
                    name: '已评价',
                    value: {
                        isEva: 1
                    }
                }],
                current: 0,
                list1: [],
                queryParams: {
                    pageNum: 1,
                    pageSize: 10,
                    companyId: '',
                },
                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: {
            chakan(id) {
                uni.navigateTo({
                    url: `/qiye/record/details?id=${id}`
                })
            },
            getList() {
                let data = uni.getStorageSync("qiyedata")
                this.queryParams.companyId = data.companyId
                companyList({
                    ...this.queryParams,
                    ...this.list[this.current].value
                }).then(val => {
                    // console.log(val.data)
                    this.total = val.data.total
                    this.list1 = [...this.list1, ...val.data.rows]
                })
            },
            click(i) {
                this.list1 = []
                this.queryParams.pageNum = 1
                this.current = i.index
                // console.log(i.index)
 
                // if(i.index==1){
                //     this.queryParams.isEva = 0
                // }
                // if(i.index==2){
                //     this.queryParams.orderStatus = 2
                // }
                // if(i.index==3){
                //     this.queryParams.isEva = 1
                // }
                this.getList()
            }
        }
    }
</script>
 
<style>
    page {
        background: #f4f4f4;
    }
</style>
<style lang="scss" scoped>
    .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 {
                display: flex;
                justify-content: space-between;
 
                .l {
                    color: #202d44;
                    font-size: 32rpx;
                    line-height: 44rpx;
                    margin-bottom: 24rpx;
                    width: 80%;
                }
 
                .r {
                    font-size: 28rpx;
                    width: 20%;
                    text-align: right;
                }
            }
 
            .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;
                }
            }
        }
    }
 
    .color1 {
        color: #FE7B32;
        //cheng
    }
 
    .color2 {
        color: #EB4746;
 
        //hong
    }
 
    .color3 {
        color: #3EB47A;
        //lv
    }
</style>