<!-- 数据回流 -->
<template>
  <div style="position: relative">
    <div class="topBox">
       <div class="title">数据回流</div>
        <div class="instructions">支持将线上预测服务的结果保存回数据集，经人工筛选、调整以及处理后，用于下一次的模型优化训练。</div>
    </div>
    <div class="tableBox" :style="{ height: tableHeight }">
      <el-button class="add" type="primary" icon="el-icon-plus" :size="defaultFormItemSize">创建回流配置</el-button>
      <vxe-table
        border
        show-header-overflow
        show-overflow
        :row-config="{ isHover: true }"
        :data="tableData"
        min-height="96"
      >
        <vxe-column field="serviceName" title="服务名称"></vxe-column>

        <vxe-column field="serviceType" title="服务类型"></vxe-column>
        <vxe-column field="evaluationQuantity" title="评价数量"></vxe-column>
        <vxe-column field="creator" title="创建人"></vxe-column>
        <vxe-column field="creationTime" title="创建时间"></vxe-column>

        <vxe-column field="operation" title="操作">
          <!-- <template slot-scope="scope">
              <el-button
                type="text"
                :size="defaultFormItemSize"
                @click="dataImport(scope.row)"
                >导入</el-button
              >
              <el-button
                type="text"
                :size="defaultFormItemSize"
                @click="del(scope.row)"
                >删除</el-button
              >
            </template> -->
        </vxe-column>
      </vxe-table>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex';
export default {
  data () {
    return {
      tableData: [
        {
          id: 10001,
          name: 'Test1',
          role: 'Develop',
          sex: 'Man',
          age: 28,
          address: 'test abc'
        }
      ]
    };
  },

  components: {},

  computed: {
    ...mapGetters(['getMainContextHeight']),
    tableHeight () {
      return this.getMainContextHeight - 95 + 'px';
    }
  },

  mounted () {
    
  },

  methods: {
    resize (e) {
      setTimeout(() => {
        this.collapseHeight = e.height
      }, 300);
    }
  }
};
</script>
<style lang="scss" scoped>
@import "@/assets/style/element-variables.scss";
.topBox{
  background-color: white;
  width: 100%;
  height: 95px;
  margin-bottom: 16px;
        .title {
    color: $--color-text-primary;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
        padding: 20px 20px 10px 20px;
  }
}
.instructions {

  padding: 0px 20px 20px 20px;

  .describe {
    color: $--color-text-secondary;
    margin-bottom: 16px;
  }
  .itemTitle {
    color: $--color-text-primary;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
  }
  .head-index {
    font-size: 24px;
    color: #e8e9eb;
    line-height: 32px;
  }
  .itemDescribe {
    width: 170px;
    color: $--color-text-secondary;
  }
  .img {
    height: 72px;
    width: 140px;
  }
}
.tableBox {
  background-color: white;
  width: 100%;
  padding: 20px;
  .add {
    margin-bottom: 20px;
  }
}

</style>
