<template>
  <div>
    <el-table v-loading="$parent.$parent.$parent.loading" :data="$parent.$parent.$parent.taskList">
      <!--<el-table-column label="创建人" align="center" prop="id" />-->
      <el-table-column label="任务标题" align="center" prop="title" />
      <el-table-column label="执行日期" align="center" prop="pushTime" width="180">
        <template slot-scope="scope">
          <span v-if="scope.row.pushTime">{{ parseTime(scope.row.pushTime, '{y}-{m}-{d}') }}</span>
          <span v-else>-</span>
        </template>
      </el-table-column>
      <el-table-column label="完成率" align="center" prop="finishRate"/>
      <el-table-column label="创建人" align="center" prop="nickName" />
      <el-table-column label="创建时间" align="center" prop="createTime" />
      <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-document"
            @click="$parent.$parent.$parent.handleDetail(scope.row)"
          >进度</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="$parent.$parent.$parent.handleDelete(scope.row)"
            v-hasPermi="['pipetask:task:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="$parent.$parent.$parent.total>0"
      :total="$parent.$parent.$parent.total"
      :page.sync="$parent.$parent.$parent.queryParams.pageNum"
      :limit.sync="$parent.$parent.$parent.queryParams.pageSize"
      @pagination="$parent.$parent.$parent.getList"
    />
  </div>

</template>

<script>
  export default {
    name: "height-task-table",
    created(){
      console.log("-----------------------------")
      this.$parent.$parent.$parent.queryParams.pageNum = 1;
      //this.$parent.$parent.$parent.queryParams.pipeTaskType = 0;
      this.$parent.$parent.$parent.getList();
    }
  }
</script>

<style scoped>

</style>
