<template>
  <div class="inter_result">
    <!-- :header-cell-style="cellstyle" -->
    <el-table
      :data="data.filter((item) => item.name !== 'id')"
      height="500"
      :class="fileList ? '' : 'infotabel'"
      style="width: 100%"
    >
      <el-table-column
        show-overflow-tooltip="true"
        prop="name"
        label="属性名称"
      >
      </el-table-column>
      <el-table-column show-overflow-tooltip="true" prop="value" label="属性值">
      </el-table-column>
    </el-table>
    <div v-if="fileList">
      相关材料
      <el-table :data="fileList" height="200" style="width: 100%">
        <el-table-column label="序号" width="70px">
          <template slot-scope="scope">{{ scope.$index + 1 }}</template>
        </el-table-column>
        <el-table-column
          show-overflow-tooltip="true"
          prop="fileName"
          label="文件名称"
        >
        </el-table-column>
        <el-table-column label="操作" width="70px">
          <template slot-scope="scope">
            <span class="usable" @click="download(scope.row)"> 查看 </span>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    data: {
      type: Array,
    },
    fileList: {
      type: Array,
    },
  },
  methods: {
    download(obj) {
      window.open(obj.fileUrl);
    },
  },
};
</script>

<style lang="scss">
.inter_result {
  // height: 580px;
  height: 695px;
}
.datatable {
}
.infotabel {
  height: 100% !important;
}
</style>