“dzb”
2022-09-26 ccd7b3c5b24fa115a732ea915e2e586de717ea1c
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
<template>
    <div class="law-enforcement">
        <MyTable :tableData="list" :tableOption="tableOption" @openDialog="changeDialog">
        </MyTable>
        <!-- 组件区 -->
        <div class="dialog">
            <el-dialog v-if="visible" :visible.async="visible" title="问题登记" width="60%" :before-close="handleClose">
                <checkIn></checkIn>
            </el-dialog>
        </div>
    </div>
</template>
<script>
import MyTable from '@/components/Table'
export default {
    components: {
        MyTable,
    },
    data() {
        return {
            list: [
                {
                    name: '张三',
                    sex: '男',
                    age: '23',
                    'min-width': '10',
                },
                {
                    name: '张四',
                    sex: '男',
                    age: '23',
                    'min-width': '10',
                },
                {
                    name: '丸小儿',
                    sex: '女',
                    age: '11',
                    'min-width': '10',
                },
            ],
            tableOption: {
                group: [
                    {
                        label: '姓名',
                        type: 'text',
                        prop: 'name',
                    },
                    {
                        label: '年龄',
                        type: 'text',
                        prop: 'age',
                    },
                    {
                        label: '性别',
                        type: 'text',
                        prop: 'sex',
                    },
                    {
                        label: '操作',
                        type: 'operation',
                        prop: 'operation',
                        children: [
                            {
                                operationName: '查看',
                                mykey : 'look',
                            },
                            {
                                operationName: '修改',
                                mykey:'update',
                            }
                        ]
                    },
                ]
            },
            visible:false
        }
    },
    methods:{
        // 关闭对话框
        handleClose(done) {
            this.$confirm('确认关闭?')
                .then(_ => {
                    this.visible = false;
                    done();
                })
                .catch(_ => { });
        },
        // 获取操作结果
        changeDialog({index,mykey}){
            console.log(index,mykey);
        }
    }
}
</script>
<style lang="scss" scoped>
 
</style>