wjt
2024-06-22 27da067243b78340dac4f75c5131059617594037
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
<template>
    <u-popup mode="button" :safeAreaInsetBottom="false" :show="show" @close="close" @open="open" z-index="8000" bgColor="#fff">
        <view class="bg-box">
            <view class="title">选择随行人员</view>
            <scroll-view scroll-y="true" style="height: 600rpx;">
                <u-checkbox-group     iconPlacement="right"  v-model="checkboxValue1" placement="column" @change="checkboxChange">
                    <u-checkbox :customStyle="{marginBottom: '40rpx', }" v-for="(item, index) in checkboxList1" :key="index"
                         :name="item.userId" :label="`${item.dept.deptName}--${item.nickName}`">
                    </u-checkbox>
                </u-checkbox-group>
            </scroll-view>
            <view class="set-flex set-flex-content-between down-options">
                <view class="button-per">
                    <u-button @click="close">取消</u-button>
                </view>
                <view class="button-per"  @click="enteryResult">
                    <u-button color="#1171E0">确认</u-button>
                </view>
            </view>
        </view>
    </u-popup>
</template>
 
<script>
    export default {
        props: {
            list: {
                type: Array,
                default: () => []
            }
        },
        data() {
            return {
                show: false,
                checkboxValue1: [],
                // 基本案列数据
                checkboxList1: [
                ],
            }
 
        },
        watch: {
            list: {
                handler(n) {
                this.checkboxList1 = n
                },
                immediate: true
            }
        },
        methods: {
            checkboxChange(n) {
                // console.log('change', n);
            },
            close(){
                this.show = false
            },
            open(list) {
            
                this.show = true
            },
            enteryResult() {
                this.$emit('selectValue', this.checkboxValue1)
                this.close()
                console.log(44)
            }
        }
    }
</script>
 
<style scoped>
    .bg-box{
        position: fixed;
        bottom: 0;
        background-color: white;
        border-radius: 20rpx 20rpx 0 0;
        padding: 20rpx 32rpx 240rpx;
        z-index: 1000000;
        width: 100%;
        box-sizing: border-box;
        min-height: 400rpx;
        max-height: 800rpx;
    }
    .title{
        font-size: 36rpx;
        font-family: 500;
        margin-bottom: 40rpx;
    }
    .button-per{
        width: 48%;
    }
    .down-options{
        position: fixed;
        bottom: 40rpx;
        width: 100%;
        box-sizing: border-box;
        padding: 0 32rpx;
        left: 0;
    }
</style>