<template>
    <div class="page">
        <LayoutTable :data="tableData" :config="tableConfig">
                    </LayoutTable>


        <dialog-show ref="dialogform" @ok="getData" />
    </div>
</template>

<script>
    /** 表单弹出框模式需引入 */
    import dialogShow from "./dialogshow";
    import table from "@/assets/mixins/table";
    export default {
        name: "FacePlanList",
        components: {
            dialogShow
},
        mixins: [table],
        created() {
        },
        methods: {
            /** 重写新增方法 */
            toAdd(row) {
                this.$refs.dialogform.add(row);
            },
            /** 重写编辑方法 */
            toEdit(row) {
                this.$refs.dialogform.edit(row);
            },
            /** 重写查看方法 */
            toView(row) {
                this.$refs.dialogform.view(row);
            },

        },
        data() {
            return {
                config: {
                    search: [
                    ],
                    columns: [
                        {type: "selection", width: 60},
                        {type: "index",label: "序号",width: 50},

                        {label: "重点人员计划", prop: "indexCode"},

                        {label: "名称", prop: "name"},

                        {label: "人脸分组的唯一标识集合，逗号分割", prop: "faceGroupIndexCodes"},

                        {label: "人脸分组的唯一标识集合，逗号分割", prop: "cameraIndexCodes"},

                        {label: "识别资源的唯一标识集合，逗号分割", prop: "recognitionResourceIndexCodes"},

                        {label: "识别资源类型，SUPER_BRAIN 超脑，FACE_RECOGNITION_SERVER 脸谱，COMPARISON 深眸", prop: "recognitionResourceType"},

                        {label: "识别计划的类型, BLACK_LIST-重点人员识别计划 WHITE_LIST-陌生人识别计划", prop: "recognitionPlanType"},

                        {label: "状态", prop: "status"},

                        {label: "是否启用,true:启用,false:禁用", prop: "available"},

                        {label: "描述", prop: "description"},

                        {label: "启用时间", prop: "startTime", formatter: this.formatterDate},
                        {
                            label: "操作",
                            width: 240,
                            formatter: row => {
                                return (
                                    <table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
                            );
                            }
                        }
                    ]
                }
            };
        }
    };
</script>