<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: "PjEvaluateList",
        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: "pjTimeStart",
                        type: "date",
                        label: "评价开始时间"
                      },
                      {
                        name: "pjTimeEnd",
                        type: "date",
                        label: "评价结束时间"
                      },
                    ],
                    columns: [
                        {type: "index",label: "序号",width: 50},

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

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

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

                        {label: "性别", prop: "peopleSex"},

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

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

                        {label: "评价标签", prop: "contentTag"},

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

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

                        {label: "评价来源 ", prop: "pjSource"},

                        {label: "手输意见", prop: "opinion"},

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

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

                        {label: "窗口评价", prop: "pjxt"},

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

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

                        {label: "评价状态", prop: "evaluatestatus"},

                        {label: "评价指向 ", prop: "pjType"},

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

                       {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>
