<template>
  <!-- 商品化专利table -->
  <div class="commodityTable">
    <el-table :data="tableData" style="width: 100%" header-row-class-name="custom-table-header">
      <el-table-column width="80" align="center">
        <template slot-scope="scope">
          <div>
            <el-checkbox-group v-model="checkList" style="display:inline-block">
              <el-checkbox :label="scope.row.patentNo" @change="getFunInfo(scope.row.patentNo)">
                <span>{{ (scope.$index + 1) + ((queryParams.current - 1) * queryParams.size) }}</span>
              </el-checkbox>
            </el-checkbox-group>
          </div>
        </template>
      </el-table-column>
      <el-table-column v-for="item in column" :key="item.key" :prop="item.key" :label="item.name" align="center">
        <template slot-scope="scope">
          <div>
            {{ scope.row[item.key] }}
          </div>
        </template>
      </el-table-column>

    </el-table>
  </div>
</template>

<script>
export default {
  props: {
    tableData: {//数据
      type: Array,
      default: () => {
        return [{ name: '123', eventNumber: '手机', projectNumber: '专利数据库一', projectNumber1: [{ name: '事件一' }] },]
      }
    },
    queryParams: {//分页信息
      type: Object,
      default: () => {
        return {
          size: 10,
          current: 1,
        }
      }
    },
    column: {//显示栏位管理数组
      type: Array,
      default: () => {
        return [
          {
            "key": "name",
            "name": "名称",
            "type": "list",
            "order": 0,
            "hidden": true
          },
          {
            "key": "eventNumber",
            "name": "标的专利/产品",
            "type": "list",
            "order": 0,
            "hidden": true
          },
          {
            "key": "projectNumber",
            "name": "相关专利数据库",
            "type": "list",
            "order": 0,
            "hidden": true
          },
          {
            "key": "projectNumber1",
            "name": "事件",
            "type": "list",
            "order": 0,
            "hidden": true
          },
          {
            "key": "projectNumber2",
            "name": "负责人",
            "type": "list",
            "order": 0,
            "hidden": true
          },
          {
            "key": "projectNumber3",
            "name": "状态",
            "type": "list",
            "order": 0,
            "hidden": true
          },
          {
            "key": "projectNumber4",
            "name": "创建人",
            "type": "list",
            "order": 0,
            "hidden": true
          },
          {
            "key": "time",
            "name": "创建时间",
            "type": "list",
            "order": 0,
            "hidden": true
          },
        ]
      }
    }
  },
  data() {
    return {

    }
  },
  mounted() {

  },
  methods: {
    // 勾选监听事件
    getFunInfo(patentNo){},
  },
}
</script>

<style lang="scss" scoped></style>