import filter from '@/utils/filter.js'
let vm = null

const sendThis = (_this) => {
  vm = _this
}
class data extends filter {
  constructor() {
    super()
  }
  columns() {
    return [
      {
        label: '序号',
        type: 'index',
        width: '50'
      },
      {
        label: "查询来源",
        render: (h, scope) => {
          switch (scope.row.cxly) {
            case '1':
              return <div>办事大厅</div>
            case '2':
              return <div>自助查询机</div>
            case '3':
              return <div>政务一体化平台</div>
            case '4':
              return <div>互联网</div>
            case '5':
              return <div>微信公众号</div>
          }
        }
      },
      {
        label: "查询类型",
        render: (h, scope) => {
          switch (scope.row.cxlx) {
            case '1':
              return <div>家庭房产</div>
            case '2':
              return <div>房屋明细</div>
          }
        }
      },
      {
        label: "查询编号",
        prop: "cxbh"
      },
      {
        prop: "cxsj",
        label: "查询时间",
      },
      {
        prop: "cxr",
        label: "受理人员",
      },
      {
        prop: "sqrxm",
        label: "申请人",
      },
      {
        prop: "ycqrgxmc",
        label: "与产权人的关系",
      },
      {
        prop: "qlrxm",
        label: "权利人",
      },
      {
        prop: "cxyt",
        label: "查询用途",
      },
      {
        label: "操作",
        width: 80,
        render: (h, scope) => {
          return <el-button type="text" icon='el-icon-view' onClick={() => { vm.handleViewClick(scope) }}>查看</el-button>
        }
      }
    ]
  }
}
let datas = new data()
export {
  datas,
  sendThis
}