<template>
  <!--供应商考评-->
  <div class="supplier">
    <div class="search-supplier">
      <div class="title_wrap i">
        <div class="enterprise_title">
          供应商考评
        </div>
      </div>
    </div>
    <div class="table-supplier i">
      <div class="table-item-jf table-item-jf1 empty-table" v-if="!tableData.length && !isSkeleton">
        <img class="item-jf-img" src="@/assets/images/kong.png" alt="">
        <div class="item-jf-titel">暂无相关数据</div>
        <div class="item-jf-text">抱歉，暂无数据，试试更换搜索条件吧</div>
      </div>
      <skeleton v-if="isSkeleton"></skeleton>

      <div class="table-item-jf table-item" v-if="!isSkeleton&&tableData.length>0">
        <el-table :data="tableData" :header-cell-style="{ background:'#f0f3fa',color: 'rgba(35,35,35,0.8)'}"
                  v-sticky-header.always="{offsetTop : '-16px',offsetBottom : '10px'}" class="table-item1 fixed-table" border highlight-current-row
                  :header-row-class-name="setHeaderRow" :cell-class-name="setCellClass" :row-class-name="setRowClass" :header-cell-class-name="setCellClass"
                  ref="theOwnerListTable">

          <el-table-column type="index" label="序号" width="60" :resizable="false">
            <template slot-scope="scope">
              <span>{{(pageNum - 1) *pageSize + scope.$index + 1}}</span>
            </template>
          </el-table-column>
          <el-table-column label="年度" width="120" :resizable="false">
          </el-table-column>
          <el-table-column label="使用公司" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="使用项目" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="项目考评" min-width="120" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="公司考评分" min-width="120" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="汇总分" min-width="120" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="pagination clearfix" v-show="total>0">
        <el-pagination background :page-size="pageSize" :current-page.sync="pageNum" @current-change="handleCurrentChange" layout="prev, pager, next"
                       :total="total">
        </el-pagination>
      </div>
    </div>
  </div>

</template>

<script>
  import { encodeStr } from "@/assets/js/common.js";
  import "@/assets/styles/public.scss";
  import "@/assets/styles/supplierlist.scss";
  import skeleton from '@/views/project/projectList/component/skeleton';
  export default {
    name: 'assessment',
    components:{skeleton},
    data(){
      return{
        encodeStr,
        tableData:[
          {name:'测试',legalPerson:'AAAA'}
        ],
        isSkeleton:false,
        total:100,
        pageSize:50,
        pageNum:1,
      }
    },
    methods: {
      handleCurrentChange() {

      },
      setHeaderRow() {
        return "owner-table-list-header";
      },
      setCellClass({ row, column, rowIndex, columnIndex }) {
        if (columnIndex == 1) {
          return "enterprise-name-column";
        }
      },
      setRowClass({ row, rowIndex }) {
        return "enterprise-name-row";
      },
    }
  }
</script>

<style scoped>

</style>
