<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" :fixed="tableColumnFixed" :resizable="false">
            <template slot-scope="scope">
              <span>{{(pageNum - 1) *pageSize + scope.$index + 1}}</span>
            </template>
          </el-table-column>
          <el-table-column label="使用项目" width="320" :fixed="tableColumnFixed"  :resizable="false">
          </el-table-column>
          <el-table-column label="使用单位" :min-width="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="公司名称" :min-width="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="处置时间" :min-width="180" :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="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="处置后状态" :min-width="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="处置前等级" :min-width="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="处置后等级" :min-width="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="预警原因" :min-width="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </template>
          </el-table-column>
          <el-table-column label="不合格原因" :min-width="200" :resizable="false">
            <template slot-scope="scope">
              {{scope.row.legalPerson||"--"}}
            </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: 'disposal',
    components:{skeleton},
    data(){
      return{
        encodeStr,
        tableData:[
          {name:'测试',legalPerson:'AAAA'}
        ],
        isSkeleton:false,
        total:100,
        pageSize:50,
        pageNum:1,
        // table列是否悬浮
        tableColumnFixed: true,
      }
    },
    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>
