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


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

<script>
    /** 表单弹出框模式需引入 */
    import drawerShow from "./drawershow";
    import table from "@/assets/mixins/table";
    import session from "@/assets/utils/session";
    export default {
        name: "PhQueueList",
        components: {
            drawerShow
},
        mixins: [table],
      created() {
        const siteid = session.getSession("siteid");
        this.query["siteId"]=siteid?siteid:1;
      },
        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: [
                      {
                        name: "peopleName",
                        type: "text",
                        label: "姓名",
                        fuzzy: true,
                      },

                      {
                        name: "taketimeStart",
                        type: "date",
                        label: "取号开始时间"
                      },
                      {
                        name: "taketimeEnd",
                        type: "date",
                        label: "取号结束时间"
                      },

                    ],
                    columns: [
                        {type: "index",label: "序号",width: 50},

                      {label: "站点名称", prop: "siteName"},
                      {label: "业务名", prop: "business"},
                      {label: "预约编号", prop: "ordernumber"},

                        {label: "叫号状态 ", prop: "style"},

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

                        {label: "窗口编号", prop: "windowFromnum"},

                        {label: "流水编号", prop: "flownum"},

                        {label: "呼叫转移", prop: "formernum"},

                        {label: "身份证号", prop: "peopleIdcard"},

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

                        {label: "手机号", prop: "peoplePhone"},

                        {label: "工作人员", prop: "workmanName"},

                        {label: "工号", prop: "workmanNumber"},

                        {label: "取号方式 ", prop: "wySignin"},

                        {label: "部门名称", prop: "sectionName"},

                        {label: "大厅名称", prop: "hallName"},

                      {label: "取号时间", prop: "taketime", formatter: this.formatterDate},

                      {label: "叫号时间", prop: "calltime", formatter: this.formatterDate},

                      {label: "结束时间", prop: "endtime", formatter: this.formatterDate},

                      {label: "等待时间", prop: "waitTime",formatter: this.formatterDateSeconds},

                      {label: "办理时间", prop: "handleTime",formatter: this.formatterDateSeconds},

                        {label: "扩展编号", prop: "extNum"},

                        {
                            label: "操作",
                            width: 80,
                            formatter: row => {
                                return (
                                    <table-buttons noAdd noEdit noDel row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
                            );
                            }
                        }
                    ]
                }
            };
        }
    };
</script>
