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


        <drawer-show ref="drawerform" @ok="getData" />
    </div>
</template>

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

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

                        {label: "站点Id", prop: "siteId", formatter: this.formatter},


                            {label: "站点名称", prop: "siteName"},


                        {label: "个人信息ID", prop: "personId", formatter: this.formatter},

                        {label: "评价号ID与办理号id一致", prop: "pjId", formatter: this.formatter},


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



                            {label: "联系方式", prop: "contact"},



                            {label: "身份证号码", prop: "idCard"},


                        {label: "窗口id", prop: "windowId", formatter: this.formatter},


                            {label: "窗口名称", prop: "windowName"},



                            {label: "部门", prop: "section"},



                            {label: "编号", prop: "flounum"},



                            {label: "评价选项", prop: "assessment"},



                            {label: "评价类型", prop: "type"},



                            {label: "评价内容", prop: "content"},



                            {label: "来源", prop: "source"},


                        {label: "评价时间", prop: "pjTime", formatter: this.formatterDate},

                        {label: "告警次数", prop: "careCount",formatter: this.formatter},

                        {label: "消息发送次数", prop: "smsCount",formatter: this.formatter},
                        {
                            label: "操作",
                            width: 240,
                            formatter: row => {
                                return (
                                    <table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
                            );
                            }
                        }
                    ]
                }
            };
        }
    };
</script>