<!--我的模型 -->
<template>
  <div style="position: relative">
    <div class="topBox">
       <div class="title">模型仓库</div>
        <div class="instructions">集中管理平台训练、压缩及预置的生成式大模型，支持对模型进行评估、压缩及部署。</div>
    </div>
    <div class="tableBox" :style="{ height: tableHeight }">

            <el-form
        ref="myDataSetPage"
        :model="myDataSetPage"
        label-width="75px"
        :size="defaultFormItemSize"
        label-position="right"
        @submit.native.prevent
      >
        <filter-box :item-width="350" @search="search()" @reset="onReset">
          <el-form-item label-width="0px">
              <el-button class="add" type="primary" icon="el-icon-plus" :size="defaultFormItemSize">创建模型</el-button>
          </el-form-item>
              <el-form-item label-width="0px">
            <el-button
              class="add"
              type="info"
              icon="el-icon-plus"
              :size="defaultFormItemSize"
              >删除</el-button
            >
          </el-form-item>
          <el-form-item
            label="模型名称"
            prop="formFilter.modelName"
            label-width="120px"
          >
            <el-input
              class="filter-item"
              v-model="myDataSetPage.formFilter.modelName"
              :clearable="true"
              placeholder="模型名称"
            />
          </el-form-item>
        </filter-box>
      </el-form>
      <vxe-table
        border
        show-header-overflow
        show-overflow
        :row-config="{ isHover: true }"
        :data="tableData"
        min-height="96"
      >
        <vxe-column field="modelName" title="模型名称"></vxe-column>
        <vxe-column field="modelId" title="模型ID"></vxe-column>
        <vxe-column field="modelType" title="模型类型"></vxe-column>
        <vxe-column field="serviceLabel" title="业务标签"></vxe-column>
        <vxe-column field="latestVersionSource" title="最新版本来源"></vxe-column>
        <vxe-column field="versionsNumber" 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 {
      myDataSetPage: {
        formFilter: {
          modelName: ''
        }
      },
      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>
