GuLiMmo
2024-01-12 27da516e3bd834f3afb848cc60e39e97b6d8a703
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
<template>
    <el-dialog v-model="params.visible" :title="params.data?.dictValue || '人员选择'" @close="dialogClose">
        <div class="container">
            <el-transfer v-model="value" :data="data" filterable filter-placeholder="请输入人员姓名"
                :titles="['参与投票人员', '不参与投票人员']" />
        </div>
        <template #footer>
            <el-button @click="params.visible = false">取消</el-button>
            <el-button type="primary" @click="submit">确认选择</el-button>
        </template>
    </el-dialog>
</template>
 
<script>
export default {
    props: {
        params: {
            type: Object,
            default: () => {
                return {
                    visible: false,
                    data: {}
                }
            }
        }
    },
    data() {
        return {
            value: [],
            data: [
                {
                    label: '张三',
                    key: '1'
                },
                {
                    label: '李四',
                    key: '2'
                },
                {
                    label: '王五',
                    key: '3'
                },
                {
                    label: '赵六',
                    key: '4'
                },
                {
                    label: '刘七',
                    key: '5'
                }
            ]
        }
    },
    methods: {
        dialogClose() {
            this.value = []
        },
        submit() {
            console.log(this.value, this.data);
        }
    },
    
}
</script>
 
<style lang="scss" scoped>
.container {
    display: flex;
    justify-content: center;
    align-items: center;
}
:deep() {
    .el-transfer-panel {
        width: 250px;
    }
}
</style>