<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 : '-15px'}" 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" prop="name1" :resizable="false">
          </el-table-column>
          <el-table-column label="使用公司" :resizable="false" width="250">
            <template slot-scope="scope">
              {{scope.row.name2||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="使用项目" width="250" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.name3||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="项目考评" min-width="120" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.name4||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="公司考评分" min-width="120" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.name5||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="汇总分" min-width="120" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.name6||"--"}}
            </template>
          </el-table-column>
        </el-table>
      </div>
      <div class="pagination clearfix" v-show="total>pageSize">
        <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:[
          {name1:'2018',name2:'华北公司',name3:'北京航华科贸项目',name4:'19',name5:'-',name6:'19.4'},
          {name1:'2017',name2:'中建一局集团第三建筑有限公司',name3:'朝阳区崔各庄乡大望京村2号地626地块1号楼工程',name4:'81',name5:'-',name6:'82'},
          {name1:'2017',name2:'总承包公司',name3:'晋中万达广场项目',name4:'82',name5:'-',name6:'80'},
          {name1:'2017',name2:'总承包公司',name3:'晋中万达广场项目',name4:'80',name5:'-',name6:'96'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'运河国际生态城一期百合座',name4:'96',name5:'-',name6:'100'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'北京新机场安置房郑西.鑫苑名家(二期)项目施工总承包工程',name4:'100',name5:'-',name6:'82'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'胶州鼎峰中央公园c26#楼项目德州鲁班御景国际二期工程及地下车库一标段',name4:'82',name5:'-',name6:'95'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'济南转山项目B-2地块',name4:'95',name5:'-',name6:'91'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'济南未来城A5地块房地产开发项目(西地块一期)',name4:'91',name5:'-',name6:'88'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'盐城万达广场项目部',name4:'84',name5:'-',name6:'84'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'济南雪山项目A04地块工程总承包',name4:'84',name5:'-',name6:'84'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'合肥整机智能制造生产线',name4:'84',name5:'-',name6:'95'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'清华附中凯文国际学校工程武汉新城四新项目C地块一期总包工程',name4:'95',name5:'-',name6:'83'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'合肥京东方医院项目',name4:'86',name5:'-',name6:'95'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'长春吾悦广场住宅区土建安装工程(一标段)',name4:'98',name5:'-',name6:'86'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'中国机械设备工程股份有限公司总部综合楼工程',name4:'83',name5:'-',name6:'98'},
          {name1:'2017',name2:'中建一局集团第五建筑有限公司',name3:'郑州航空港经济综合实验区(郑州新郑综合保税区)河东第六棚户区第五标段2#地块',name4:'92',name5:'-',name6:'83'},
        ],
        isSkeleton:false,
        total:2,
        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>
