Newer
Older
dcms_front / src / views / otherComment / sourceStatis / sourceStatisList.vue
<template>
  <div class="table-container">
    <el-table ref="table" :data="list" class="table" size="small" border>
      <el-table-column :index="indexMethod" align="center" label="序号" type="index" width="80"/>
      <el-table-column align="center" label="问题来源" prop="caseSource"/>
      <el-table-column align="center" label="上报数" prop="caseNum"/>
      <el-table-column align="center" label="事件数" prop="eventNum"/>
      <el-table-column align="center" label="部件数" prop="componentNum"/>
    </el-table>
  </div>
</template>

<script>
export default {
  name: 'SourceStatis',
  props: {
    list: {
      type: Array,
      default() {
        return []
      }
    }
  },
  methods: {
    indexMethod(index) {
      if (index === this.list.length - 1) {
        return '总计'
      } else {
        return index + 1
      }
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .table{
    margin-bottom: 20px;
  }
  /*.pagination-container{*/
  /*padding-bottom: 50px;*/
  /*}*/
  .table-title{
    /*background-color:rgba(243, 243, 243, 1);*/
    background-color:#fff;
    .title-header{
      font-size: 15px;
      i{
        margin-left: 10px;
        margin-right: 5px;
      }
      i:focus{
        outline: none;
      }
    }
  }
  .edit_btns{
    padding-top:7px;
    padding-right:5px;
    text-align: right;
  }
  .popper-div{
    line-height: 1.5;
    .popper-btns{
      margin-top:10px;
    }
  }
  .table-container {
    border: 0 !important;
  }
</style>