智慧保安APP验收版本
zengh
2021-12-06 886a9f2deb311453f12cb0302bcb882a9d331d7a
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
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
<template>
    <view class="information">
        <view class="bodys">
            <view class="once sole">
                <i>照片</i>
                <u-image class="img" width="136rpx" height="136rpx" :src="datalist.avatar">
                    <view slot="error" style="font-size: 24rpx;">暂无照片</view>
                </u-image>
            </view>
            <view class="once">
                <i>姓名</i> <span> {{ datalist.realName }} </span>
            </view>
            <view class="once">
                <i>性别</i> <span> {{ datalist.sex == 2 ? '女' : datalist.sex == 1 ? '男' : ' ' }} </span>
            </view>
            <view class="once">
                <i>身份证</i> <span> {{ datalist.cardid }} </span>
            </view>
            <view class="once">
                <i>保安员证</i> <span> {{ datalist.securitynumber }} </span>
            </view>
            <view class="once">
                <i>籍贯</i> <span> {{ datalist.nativeplace }} </span>
            </view>
            <view class="once">
                <i>学历</i> <span> {{ datalist.education }} </span>
            </view>
            <view class="once">
                <i>政治面貌</i> <span> {{ datalist.politicaloutlook }} </span>
            </view>
            <view class="once">
                <i>联系电话</i> <span> {{ datalist.phone }} </span>
            </view>
            <view class="once">
                <i>所属公司</i> <span> {{ datalist.deptName }} </span>
            </view>
            <view class="once">
                <i>入职时间</i> <span> {{ datalist.rtime }} </span>
            </view>
 
            <view class="once">
                <u-button class="ubut" type="success" @click="openCongye" size="medium" :ripple="true"
                    ripple-bg-color="#fff">从业单位</u-button>
                <u-button class="ubut" type="success" @click="openCertificates" size="medium" :ripple="true"
                    ripple-bg-color="#fff">查看证件</u-button>
            </view>
        </view>
        <u-popup class="certificates" v-model="showi" mode="bottom" border-radius="10">
            <view class="certificatesnj">
                <view class="titleonce">
                    保安员证
                </view>
                <view class="once">
                    姓名: <view class="o-once"> {{datalist.realName}}</view>
                </view>
                <view class="once">
                    性别:<view class="o-once"> {{datalist.sex == 1 ? '男' : '女'}}</view>
                </view>
                <view class="once">
                    编号:<view class="o-once"> {{datalist.securitynumber}}</view>
                </view>
                <view class="once">
                    发证机关:<view class="o-once"> 南昌市公安局 </view>
                </view>
                <view class="once">
                    发证日期:<view class="o-once"> {{datalist.updateTime}}</view>
                </view>
 
                <u-image class="img" width="150rpx" height="150rpx" :src="datalist.avatar">
                    <view slot="error" style="font-size: 1rem;">暂无照片</view>
                </u-image>
 
                <view class="imger">
                    <img :src="erImg" v-show='erImg.length > 0' alt="">
                    <div v-show="erImg == ''">
                        暂无信息
                    </div>
                </view>
 
            </view>
        </u-popup>
        <u-popup v-model="showc" mode="bottom" border-radius="10">
            <view class="">
                <u-empty text="没有数据" :color="'#0BB9C8'" :icon-color="'#0BB9C8'" mode="list" :show="cylist.length == 0">
                </u-empty>
            </view>
            <view class="Congye">
                <u-time-line>
                    <u-time-line-item nodeTop="2" v-for="(item,index) in cylist" :key="index">
                        <!-- 此处自定义了左边内容,用一个图标替代 -->
                        <template v-slot:node>
                            <view class="u-node" style="background: #19be6b;">
                                <!-- 此处为uView的icon组件 -->
                                <u-icon name="pushpin-fill" color="#fff" :size="24"></u-icon>
                            </view>
                        </template>
                        <template v-slot:content>
                            <view>
                                <view class="u-order-title">派遣时间:<view class="titles">
                                        {{item.dispatchertime}}至 {{item.endTime}}
                                    </view>
                                </view>
                                <view class="u-order-desc">派遣单位名称:{{item.dispatcheraddress}}</view>
                                <view class="u-order-desc">派遣单位地址:{{item.dispatcherAddress}}</view>
                                <view class="u-order-desc">负责人:{{item.dispatcherPerson}}</view>
                                <view class="u-order-time">联系方式:{{item.dispatcherPhone}}</view>
                            </view>
                        </template>
                    </u-time-line-item>
                    <!-- <u-time-line-item>
                        <template v-slot:content>
                            <view>
                                <view class="u-order-desc">【深圳市】日照香炉生紫烟,遥看瀑布挂前川,飞流直下三千尺,疑是银河落九天。</view>
                                <view class="u-order-time">2019-12-06 22:30</view>
                            </view>
                        </template>
                    </u-time-line-item> -->
                </u-time-line>
            </view>
        </u-popup>
 
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                datalist: {
                    // realName: '原俊袆',
                    // age: '男',
                    // obj: '适普科技',
                    // honor: '扶老奶奶过马路',
                    // punishment: '不看红绿灯',
                    // avatar: "https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png",
                    // cardid: 342,
                    // baoanzheng: "赣06284538",
                    // fzobj: '南昌市公安局',
                    // fztime: "2014.04.20",
                    // politicaloutlook: '党员'
                },
                erImg: "",
                showi: false,
                showc: false,
                cylist: []
            }
        },
        onLoad(event) {
 
            var that = this;
 
            this.datalist = JSON.parse(decodeURIComponent(event.detailData))
 
        },
        methods: {
            openCertificates() {
                this.showi = true;
                uni.request({
                    url: this.$store.state.piAPI + '/qrCode/getQrCodeBase64',
                    data: {
                        securityNumber: this.datalist.securitynumber
                    },
                    method: 'get',
                    success: (res) => {
                        console.log(123)
                        this.erImg = res.data
                    }
 
                })
            },
            openCongye() {
                this.showc = true;
            },
            getcongye() {
                var url = this.$store.state.piAPI + '/dispatcher/queryDispatcher',
                    data = {
                        userIds: this.datalist.id
                    },
                    that = this;
 
                uni.request({
                    url: url,
                    data: data,
                    method: 'get',
                    success: (res) => {
                        var d = res.data.data.records;
                        var a = []
                        // for(var k = 1 ;k < 30; k++){
                        a.push(...d)
                        // }
                        that.cylist = a;
 
                        console.log(that.cylist, 456)
                    }
 
                })
 
 
                // axios({
                //     url: url,
                //     params: data
                // }).then(res => {
                //     var d = res.data.data;
                //     var a = []
                //     // for(var k = 1 ;k < 30; k++){
                //     a.push(...d)
                //     // }
                //     console.log(d);
                //     that.cylist = a;
                // })
            }
        },
        mounted() {
 
            this.getcongye();
 
        }
    }
</script>
 
<style lang="scss" scoped>
    .information {
        background-color: #f7f7f7;
        min-height: 100vh;
        overflow: hidden;
 
        .bodys {
            width: 100%;
            margin: 0 auto;
 
            .sole.once {
                line-height: 154rpx;
                height: 154rpx;
                position: relative;
 
                .img {
                    position: absolute;
                    top: 0;
                    bottom: 0;
                    margin: auto;
                }
 
                img {
                    vertical-align: middle;
                }
            }
 
            .once {
                width: 100%;
                height: auto;
                background-color: #fff;
                line-height: 44px;
                padding: 0 2.5% 0 2.5%;
 
                i {
                    font-style: normal;
                    margin-right: 20rpx;
                }
 
                span {
                    color: #999;
                }
            }
 
            .img {
                display: inline-block;
                position: relative;
                top: 10px;
            }
 
            .once:not(:nth-child(1)) {
                margin: 10px 0 10px 0;
            }
 
 
            .once:last-child {
                background-color: transparent;
                display: flex;
                align-items: center;
                justify-content: center;
            }
        }
 
        .certificatesnj {
            padding: 0.6rem 1.6rem 1.6rem 1.6rem;
            background-image: url(../../static/images/salf/bazbj.png);
            background-size: 100% 100%;
            height: 100%;
        }
 
        .certificates {
 
            .img {
                position: absolute;
                top: 3rem;
                right: 1.5rem;
            }
 
            .imger {
                position: absolute;
                bottom: 1.5rem;
                right: 1.5rem;
 
                width: 150rpx;
                height: 150rpx;
                line-height: 150rpx;
 
                img {
                    width: 100%;
                    height: 100%;
                }
                
                div {
                    position: absolute;
                    top: 0;
                    left: 0;
                    background: #F3F4F6;
                    text-align: center;
                    
                }
                
            }
 
            .titleonce {
                font-size: 1.3rem;
                width: 100%;
                height: 2.8rem;
                display: flex;
                align-items: center;
                justify-content: center;
                letter-spacing: 1rem;
                font-weight: 500;
            }
 
            .once {
                width: 100%;
                height: auto;
                line-height: 1.8rem;
                font-size: 0.72rem;
 
                .o-once {
                    display: inline-block;
                    font-size: 0.72rem;
                }
            }
        }
 
        .Congye {
            padding: 30rpx;
            max-height: 70vh;
            overflow: scroll;
        }
    }
 
    .u-node {
        width: 44rpx;
        height: 44rpx;
        border-radius: 100rpx;
        display: flex;
        justify-content: center;
        align-items: center;
        background: #d0d0d0;
    }
 
    .u-order-title {
        color: #333333;
        font-weight: bold;
        font-size: 32rpx;
 
        .titles {
            font-size: 26rpx;
        }
    }
 
    .u-order-desc {
        // color: rgb(150, 150, 150);
        font-size: 28rpx;
        margin-bottom: 6rpx;
    }
 
    .u-order-time {
        // color: rgb(200, 200, 200);
        font-size: 26rpx;
    }
</style>