<!-- 物料申请单——列表 -->
<template>
  <el-card class="request-list">
    <!-- v-loading="loading" @selection-change="handleSelectionChange" -->
    <el-table :data="taskList" @cell-dblclick="handledbClick" class="request-table">
      <el-table-column type="index" label="序号" width="55" align="center" />
      <el-table-column label="主键1" align="center" prop="id" />
      <el-table-column label="编码" align="center" prop="code" />
      <el-table-column label="名称" align="center" prop="name" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
            v-hasPermi="['system:task:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
            v-hasPermi="['system:task:remove']">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <!-- v-show="total > 0" -->
    <pagination :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
      @pagination="getList" />
  </el-card>
</template>

<script>
export default {
  name: 'request-list',
  data() {
    return {
      // 物料基本信息数据
      taskList: [
        {
          id: 1,
          code: '001',
          name: '名称'
        }
      ],
      // 总条数
      total: 0,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        code: null,
        name: null
      },
    }
  },
  methods: {
    // 双击行
    handledbClick() {
      this.$emit("actionBar", "requestDetails")
    },
    handleSelectionChange() { },

    getList() {

    },
  }
}
</script>