<template>
  <el-card class="box-card" style="margin-left: 0px">
    <div slot="header" class="clearfix">
      <span>办结业务</span>
      <el-button style="float: right; padding: 3px 0;color: #202020;" type="text" @click="more">更多</el-button>
    </div>
  <el-table class="body" :data="doneList" :header-cell-style="{background:'#eee',width:'100%'}">
        <el-table-column type="index" label="序号" width="50" align="center"></el-table-column>
        <el-table-column prop="fwtitle" label="标题"  align="left">
          <template slot-scope="scope">
            <el-button type="text" @click="detern(scope.row)" style="color: black">{{scope.row.fwtitle}}</el-button>
          </template>
        </el-table-column>
        <el-table-column prop="createTime" label="完成时间" width="180" align="center"></el-table-column>
 </el-table>
 </el-card>
</template>

<script>
  import { havedInfo } from "@/api/activiti/form/fw";
 export default {
      data() {
        return {
          doneList: [],
          raddarParams: {
            pageNum: 1,
            pageSize: 5,
            orderByColumn: "createTime",
            isAsc:"desc",//排序方式
          },
        }
      },
   created() {
     this.getList();
   },
   methods:{
     getList() {
       this.loading = true;
       havedInfo(this.raddarParams).then(response => {
         console.log(response.rows)
         this.doneList = response.rows;
         this.loading = false;
       });
     },
     more(){
       this.$router.replace('/havedone')
     },
     detern(row){
       const actkey = row.taskid || this.ids
       const form = row || this.form
       this.$router.push({path:'/actwork/havedone/havedetails',query: {bd:form,id:actkey }})
     },
   }
    }
</script>
<style lang="less" scoped>
  .clearfix{
    color:#1890ff;
  }
  .el-card__header{
    background: #f5f5f5;
  }
  .body{
    height: 319px;
  }
  .el-card__body {
    padding: 15px 20px 20px 20px;
    height: 354px;
  }

</style>
