css
liukangdong
2024-06-25 ebc96a1cf0424c04dceacbc42f9ad2a897223be9
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
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
<template>
  <view class="visit">
    <view class="head">拜访信息</view>
    <view class="list">
      <view class="list_item">
        <view class="list_item_label">
          <text>被访人手机</text>
          <text>*</text>
        </view>
        <view class="list_item_content">
          <input
            type="number"
            maxlength="11"
            placeholder="请输入手机号"
            placeholder-style="color: #999999;"
          />
        </view>
      </view>
      <view class="list_item">
        <view class="list_item_label">
          <text>被访人姓名</text>
          <text>*</text>
        </view>
        <view class="list_item_content">
          <input
            type="text"
            placeholder="请输入姓名"
            placeholder-style="color: #999999;"
          />
        </view>
      </view>
      <view class="list_item">
        <view class="list_item_label">
          <text>劳务班次</text>
          <text>*</text>
        </view>
        <view class="list_item_content">
          <view class="list_item_content_item active">白班</view>
          <view class="list_item_content_item">夜班</view>
        </view>
      </view>
      <view class="list_item">
        <view class="list_item_label">
          <text>预计入园时间</text>
          <text>*</text>
        </view>
        <view class="list_item_content">
          <text>请选择</text>
          <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
        </view>
      </view>
      <view class="list_item">
        <view class="list_item_label">
          <text>预计离园时间</text>
          <text>*</text>
        </view>
        <view class="list_item_content">
          <text>请选择</text>
          <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
        </view>
      </view>
      <view class="list_item" @click="show = true">
        <view class="list_item_label">
          <text>访问门禁</text>
          <text>*</text>
        </view>
        <view class="list_item_content">
          <text>请选择</text>
          <u-icon name="arrow-right" color="#CCCCCC" size="20"></u-icon>
        </view>
      </view>
      <view class="list_item">
        <view class="list_item_label">
          <text>拜访事由</text>
          <text></text>
        </view>
        <view class="list_item_content">
          <input
            type="text"
            placeholder="请输入来访事由,您来做什么的"
            placeholder-style="color: #999999;"
          />
        </view>
      </view>
    </view>
    <view class="cate">
      <view class="cate_head">车辆信息</view>
      <view class="cate_list">
        <view class="cate_list_item">
          <text>皖AD12178</text>
          <u-icon name="close" color="#999999" size="20"></u-icon>
        </view>
      </view>
      <view class="cate_add" @click="show2 = true">+添加车辆</view>
    </view>
    <view class="cate">
      <view class="cate_head">随访人员信息</view>
      <view class="cate_list">
        <view class="cate_list_item">
          <text>何江宜</text>
          <u-icon name="close" color="#999999" size="20"></u-icon>
        </view>
      </view>
      <view class="cate_add" @click="show1 = true">+添加随访人员</view>
    </view>
    <view class="zw"></view>
    <view class="footer">
      <view class="footer_btn">提交</view>
    </view>
    <!-- 门禁 -->
    <u-picker
      :show="show"
      :columns="columns"
      :immediateChange="true"
      keyName="name"
      @cancel="show = false"
      @confirm="confirm"
    ></u-picker>
    <!-- 随行人员 -->
    <!-- 选择随行人员 -->
    <u-popup
      :show="show1"
      :round="10"
      :safeAreaInsetBottom="true"
      :closeable="true"
      mode="bottom"
      @close="show1 = false"
    >
      <view class="popup-content">
        <view class="respondent-title"> 选择随行人员 </view>
        <view class="search-box">
          <view class="search-box-top">
            <view class="search-box-top-ipt">
              <image src="@/static/ic_search@2x.png" mode="widthFix"></image>
              <input type="text" placeholder="搜索姓名/手机号" />
            </view>
            <text
              @click="
                show1 = false;
                show3 = true;
              "
              >新增</text
            >
          </view>
          <view class="search-box-total">共0条数据</view>
        </view>
        <scroll-view scroll-y class="list">
          <view class="item" v-for="(item, index) in 8" :key="index">
            <view class="item_a">
              <!-- <image src="@/static/checkbox.png" mode="widthFix" v-if="!item.active" /> -->
              <image src="@/static/checkbox_sel@2x.png" mode="widthFix" />
            </view>
            <view class="item_b">
              <image src="@/static/ic_mima@2x.png" mode="widthFix" />
            </view>
            <view class="item_c">
              <text>用户名</text>
              <text>已拉黑</text>
            </view>
          </view>
        </scroll-view>
        <view class="footer1">
          <view class="footer_left">
            <text class="footer_left_a">已选择:0人</text>
            <text class="footer_left_b">李伟;</text>
          </view>
          <view class="footer_btn">确认 0/0</view>
        </view>
      </view>
    </u-popup>
    <!-- 车辆 -->
    <u-popup
      :show="show2"
      :round="10"
      :safeAreaInsetBottom="true"
      :closeable="true"
      mode="bottom"
      @close="show2 = false"
    >
      <view class="addcar">
        <view class="addcar_head">添加车辆</view>
        <view class="addcar_ipt">
          <input type="text" placeholder="请输入车牌号" />
        </view>
        <view class="addcar_footer">
          <view class="addcar_footer_item">取消</view>
          <view class="addcar_footer_item t">提交</view>
        </view>
      </view>
    </u-popup>
    <!-- 添加随行人员 -->
    <u-popup
      :show="show3"
      :round="10"
      :safeAreaInsetBottom="true"
      :closeable="true"
      mode="bottom"
      @close="show3 = false"
    >
      <view class="adduser">
        <view class="adduser_head">随行人员</view>
        <view class="adduser_list">
          <view class="adduser_list_item">
            <view class="adduser_list_item_label">
              <text>姓名</text>
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="text"
                placeholder-style="color: #999999;"
                placeholder="请输入您的真实姓名"
              />
            </view>
          </view>
          <view class="adduser_list_item">
            <view class="adduser_list_item_label">
              <text>手机号</text>
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="number"
                maxlength="11"
                placeholder-style="color: #999999;"
                placeholder="请输入您的手机号"
              />
            </view>
          </view>
          <view class="adduser_list_item">
            <view class="adduser_list_item_label">
              <text>证件类型</text>
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <text>身份证</text>
              <u-icon name="arrow-right" color="#CCCCCC" size="16"></u-icon>
            </view>
          </view>
          <view class="adduser_list_item">
            <view class="adduser_list_item_label">
              <text>证件号码</text>
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="text"
                placeholder-style="color: #999999;"
                placeholder="请输入您的证件号码"
              />
            </view>
          </view>
          <view class="adduser_list_item">
            <view class="adduser_list_item_label">
              <text>公司</text>
              <text></text>
            </view>
            <view class="adduser_list_item_ipt">
              <input
                type="text"
                placeholder-style="color: #999999;"
                placeholder="请输入您的公司名称"
              />
            </view>
          </view>
          <view class="adduser_list_item">
            <view class="adduser_list_item_label">
              <text>人脸照片</text>
              <text>*</text>
            </view>
            <view class="adduser_list_item_ipt1">
              <u-upload
                :fileList="fileList"
                @afterRead="afterRead"
                @delete="deletePic"
                name="1"
                multiple
                :maxCount="1"
              ></u-upload>
            </view>
          </view>
          <view class="adduser_list_item">
            <view class="adduser_list_item_label">
              <text>健康证照片</text>
              <text></text>
            </view>
            <view class="adduser_list_item_ipt1">
              <u-upload
                :fileList="fileList"
                @afterRead="afterRead"
                @delete="deletePic"
                name="1"
                multiple
                :maxCount="1"
              ></u-upload>
            </view>
          </view>
        </view>
        <view class="adduser_footer">
          <view class="adduser_footer_item">取消</view>
          <view class="adduser_footer_item t">提交</view>
        </view>
      </view>
    </u-popup>
  </view>
</template>
 
<script>
export default {
  data() {
    return {
      show: false,
      show1: false,
      show2: false,
      show3: false,
      fileList: [],
      columns: [
        [{
          name: '东门',
          id: 1
        },
        {
          name: '西门',
          id: 2
        }
        ]
      ]
    }
  },
  methods: {
    confirm(e) {
      console.log(e)
      this.show = false
    },
    // 删除图片
    deletePic(event) {
      this[`fileList${event.name}`].splice(event.index, 1)
    },
    // 新增图片
    async afterRead(event) {
      // 当设置 multiple 为 true 时, file 为数组格式,否则为对象格式
      let lists = [].concat(event.file)
      let fileListLen = this[`fileList${event.name}`].length
      lists.map((item) => {
        this[`fileList${event.name}`].push({
          ...item,
          status: 'uploading',
          message: '上传中'
        })
      })
      for (let i = 0; i < lists.length; i++) {
        const result = await this.uploadFilePromise(lists[i].url)
        let item = this[`fileList${event.name}`][fileListLen]
        this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
          status: 'success',
          message: '',
          url: result
        }))
        fileListLen++
      }
    },
    uploadFilePromise(url) {
      return new Promise((resolve, reject) => {
        let a = uni.uploadFile({
          url: 'http://192.168.2.21:7001/upload', // 仅为示例,非真实的接口地址
          filePath: url,
          name: 'file',
          formData: {
            user: 'test'
          },
          success: (res) => {
            setTimeout(() => {
              resolve(res.data.data)
            }, 1000)
          }
        })
      })
    },
  }
}
</script>
<style>
page {
  background-color: #f7f7f7 !important;
}
.u-upload__button {
  margin: 0 !important;
}
</style>
<style lang="scss" scoped>
.visit {
  width: 100%;
 
  .adduser {
    padding: 30rpx;
    width: 100%;
    box-sizing: border-box;
    .adduser_head {
      width: 100%;
      text-align: center;
      font-size: 32rpx;
      font-family: PingFangSC, PingFang SC;
      font-weight: 600;
      color: #222222;
    }
    .adduser_list {
      width: 100%;
      margin-top: 40rpx;
      .adduser_list_item {
        width: 100%;
        padding: 24rpx 0;
        box-sizing: border-box;
        border-bottom: 1rpx solid #e5e5e5;
        display: flex;
        align-items: center;
        justify-content: space-between;
        .adduser_list_item_label {
          flex-shrink: 0;
          display: flex;
          align-items: center;
          text {
            &:nth-child(1) {
              font-size: 30rpx;
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              color: #222222;
            }
            &:nth-child(2) {
              font-size: 30rpx;
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              color: #e0312a;
            }
          }
        }
        .adduser_list_item_ipt {
          flex: 1;
          text-align: right;
          font-size: 28rpx;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #333333;
          margin-left: 30rpx;
          display: flex;
          align-items: center;
          justify-content: flex-end;
          text {
            font-size: 28rpx;
            font-family: PingFangSC, PingFang SC;
            font-weight: 400;
            color: #333333;
          }
        }
      }
    }
    .adduser_footer {
      width: 100%;
      margin-top: 60rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      .t {
        background: #025eef !important;
        color: #ffffff !important;
      }
      .adduser_footer_item {
        width: 336rpx;
        height: 88rpx;
        line-height: 88rpx;
        text-align: center;
        border-radius: 44rpx;
        border: 1rpx solid #025eef;
        font-size: 32rpx;
        font-family: PingFangSC, PingFang SC;
        font-weight: 400;
        color: #025eef;
        margin-right: 18rpx;
        &:last-child {
          margin: 0 !important;
        }
      }
    }
  }
 
  .addcar {
    padding: 30rpx;
    width: 100%;
    box-sizing: border-box;
    .addcar_head {
      text-align: center;
      font-size: 32rpx;
      font-family: PingFangSC, PingFang SC;
      font-weight: 600;
      color: #222222;
    }
    .addcar_ipt {
      width: 100%;
      height: 100rpx;
      line-height: 100rpx;
      text-align: center;
      background: #f7f7f7;
      border-radius: 50rpx;
      margin-top: 60rpx;
      input {
        width: 100%;
        height: 100%;
        font-size: 28rpx;
        font-weight: 400;
        color: #999999;
        text-align: center;
      }
    }
    .addcar_footer {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 60rpx;
      .t {
        background: #025eef !important;
        color: #ffffff !important;
      }
      .addcar_footer_item {
        flex: 1;
        height: 88rpx;
        line-height: 88rpx;
        font-size: 32rpx;
        font-weight: 400;
        color: #025eef;
        text-align: center;
        border-radius: 44rpx;
        border: 1rpx solid #025eef;
        margin-right: 18rpx;
        &:last-child {
          margin-right: 0 !important;
        }
      }
    }
  }
 
  .popup-content {
    padding: 30rpx 30rpx 0 30rpx;
    overflow: hidden;
    display: flex;
    flex-flow: column;
    .respondent-title {
      width: 100%;
      text-align: center;
      font-size: 32rpx;
      font-weight: 600;
      color: #222222;
    }
    .search-box {
      width: 100%;
      margin-top: 40rpx;
      .search-box-top {
        width: 100%;
        height: 68rpx;
        display: flex;
        align-items: center;
        .search-box-top-ipt {
          flex: 1;
          height: 100%;
          padding: 0 30rpx;
          box-sizing: border-box;
          background: #f7f7f7;
          border-radius: 4rpx;
          display: flex;
          align-items: center;
          image {
            width: 36rpx;
            height: 36rpx;
            flex-shrink: 0;
            margin-right: 22rpx;
          }
          input {
            flex: 1;
            height: 100%;
            font-size: 26rpx;
            font-weight: 400;
            color: #b2b2b2;
          }
        }
        text {
          flex-shrink: 0;
          margin-left: 30rpx;
          font-size: 28rpx;
          font-weight: 400;
          color: #025eef;
        }
      }
      .search-box-total {
        font-size: 26rpx;
        font-weight: 400;
        color: #666666;
        margin-top: 24rpx;
      }
    }
    .list {
      width: 100%;
      height: 800rpx;
      margin-top: 30rpx;
      padding: 0 !important;
      .item {
        width: 100%;
        height: 102rpx;
        display: flex;
        align-items: center;
        border-bottom: 1rpx solid #e5e5e5;
        .item_a {
          flex-shrink: 0;
          width: 36rpx;
          height: 36rpx;
          margin-right: 24rpx;
          image {
            width: 100%;
            height: 100%;
          }
        }
        .item_b {
          flex-shrink: 0;
          width: 80rpx;
          height: 80rpx;
          display: flex;
          align-items: center;
          justify-content: center;
          overflow: hidden;
          margin-right: 24rpx;
          image {
            width: 100%;
            height: 100%;
          }
        }
        .item_c {
          flex: 1;
          display: flex;
          align-items: center;
          text {
            &:nth-child(1) {
              font-size: 30rpx;
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              color: #222222;
            }
            &:nth-child(2) {
              font-size: 20rpx;
              font-family: PingFangSC, PingFang SC;
              font-weight: 400;
              color: #999999;
              padding: 1rpx 4rpx;
              box-sizing: border-box;
              background-color: #eeeeee;
              margin-left: 12rpx;
            }
          }
        }
      }
    }
    .footer1 {
      width: 100%;
      height: 100rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14rpx 0 0 0;
      box-sizing: border-box;
      .footer_left {
        flex: 1;
        display: flex;
        flex-direction: column;
        .footer_left_a {
          font-size: 26rpx;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #333333;
        }
        .footer_left_b {
          font-size: 24rpx;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #999999;
        }
      }
      .footer_btn {
        flex-shrink: 0;
        width: 216rpx;
        height: 72rpx;
        line-height: 72rpx;
        text-align: center;
        background: #025eef;
        border-radius: 8rpx;
        font-size: 28rpx;
        font-weight: 600;
        color: #ffffff;
      }
    }
  }
 
  .head {
    width: 100%;
    padding: 20rpx 30rpx;
    box-sizing: border-box;
    font-size: 28rpx;
    font-weight: 400;
    color: #666666;
  }
 
  .list {
    width: 100%;
    padding: 0 30rpx;
    box-sizing: border-box;
    background-color: #ffffff;
 
    .list_item {
      width: 100%;
      height: 98rpx;
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1rpx solid #e5e5e5;
 
      .list_item_label {
        flex-shrink: 0;
        display: flex;
        align-items: center;
 
        text {
          &:nth-child(1) {
            font-size: 30rpx;
            font-weight: 400;
            color: #222222;
          }
 
          &:nth-child(2) {
            font-size: 30rpx;
            font-weight: 400;
            color: #e42d2d;
          }
        }
      }
 
      .list_item_content {
        flex: 1;
        height: 100%;
        margin-left: 30rpx;
        display: flex;
        align-items: center;
        justify-content: flex-end;
 
        .active {
          background: #025eef !important;
          color: #ffffff !important;
        }
 
        .list_item_content_item {
          width: 104rpx;
          height: 64rpx;
          line-height: 64rpx;
          text-align: center;
          background: #eeeeee;
          border-radius: 4rpx;
          font-size: 28rpx;
          font-weight: 400;
          color: #333333;
          margin-left: 20rpx;
        }
 
        text {
          font-size: 28rpx;
          font-weight: 400;
          color: #999999;
          margin-right: 6rpx;
        }
 
        input {
          width: 100%;
          height: 100%;
          text-align: right;
          font-size: 28rpx;
          font-weight: 400;
          color: #222222;
        }
      }
    }
  }
 
  .cate {
    width: 100%;
    padding: 30rpx;
    box-sizing: border-box;
    background-color: #ffffff;
    margin-top: 20rpx;
 
    .cate_head {
      font-size: 32rpx;
      font-family: PingFangSC, PingFang SC;
      font-weight: 600;
      color: #222222;
    }
 
    .cate_list {
      width: 100%;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      margin-top: 30rpx;
 
      .cate_list_item {
        height: 64rpx;
        padding: 0 20rpx;
        box-sizing: border-box;
        background-color: #eeeeee;
        border-radius: 4rpx;
        margin-right: 20rpx;
        margin-bottom: 20rpx;
        display: flex;
        align-items: center;
 
        &:last-child {
          margin-right: 0 !important;
        }
 
        text {
          font-size: 26rpx;
          font-family: PingFangSC, PingFang SC;
          font-weight: 400;
          color: #333333;
          margin-right: 30rpx;
        }
      }
    }
 
    .cate_add {
      width: 200rpx;
      height: 50rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(2, 94, 239, 0);
      border-radius: 25rpx;
      border: 1rpx solid #025eef;
      font-size: 22rpx;
      font-family: PingFangSC, PingFang SC;
      font-weight: 400;
      margin-top: 20rpx;
      color: #025eef;
      margin: 0 auto;
    }
  }
 
  .zw {
    width: 100%;
    height: calc(env(safe-area-inset-bottom) + 118rpx);
  }
 
  .footer {
    width: 100%;
    padding: 0 30rpx;
    padding-bottom: env(safe-area-inset-bottom);
    box-sizing: border-box;
    position: fixed;
    left: 0;
    bottom: 30rpx;
 
    .footer_btn {
      width: 100%;
      height: 88rpx;
      line-height: 88rpx;
      text-align: center;
      background: #025eef;
      border-radius: 44rpx;
      font-size: 32rpx;
      font-weight: 600;
      color: #ffffff;
    }
  }
}
</style>