<template>
  <div>
    <div class="menu-title">
      武器装备维修保障知识抽取
    </div>
    <!--<div class="menu-content">-->
    <!--<div style="height: 40px">-->
    <!--<el-upload-->
    <!--ref="upload"-->
    <!--class="upload-btn"-->
    <!--:auto-upload="false"-->
    <!--action="#"-->
    <!--:on-change="handleFileChange"-->
    <!--:limit="2"-->
    <!--:show-file-list="false">-->
    <!--<el-button type="primary">导入测试文件</el-button>-->
    <!--</el-upload>-->
    <!--<el-button type="primary" style="margin-left: 20px">开始测试</el-button>-->
    <!--<el-button style="float: right">三元组F1</el-button>-->
    <!--<el-button style="float: right">实体F1</el-button>-->
    <!--</div>-->
    <!--<div style="margin-top: 30px;height: calc(100% - 80px)">-->
    <!--<el-table :data="questionData" style="width: 100%;">-->
    <!--<el-table-column prop="question" label="句子"></el-table-column>-->
    <!--<el-table-column prop="answer" label="实体"></el-table-column>-->
    <!--<el-table-column prop="index" label="三元组"></el-table-column>-->
    <!--</el-table>-->
    <!--</div>-->
    <!--</div>-->
    <div class="menu-content">
      <div style="height: 40px">
        <el-input
            placeholder="请输入内容"
            v-model="keyword" style="width: 50%">
          <i slot="prefix" class="el-input__icon el-icon-search"></i>
        </el-input>
        <el-button type="primary" style="float: right">故障原因推荐Top5准确率</el-button>
      </div>
      <div style="margin-top: 30px;height: calc(100% - 80px)">
        <el-table :data="questionData" style="width: 100%;">
          <el-table-column prop="question" label="故障原因"></el-table-column>
        </el-table>
      </div>
    </div>
  </div>
</template>

<script>
import request from '@/utils/request';

var _this;
export default {
  name: "graphExhibition",
  data() {
    return {
      keyword: "",
      fileName: "",
      questionData: [{question: "问题1", answer: "答案1", index: 1},
        {question: "问题1", answer: "答案1", index: 1},
        {question: "问题1", answer: "答案1", index: 1},
        {question: "问题1", answer: "答案1", index: 1}
      ],
    }
  },
  mounted() {
    _this = this;

  },
  methods: {
    handleFileChange(item) {
      this.$refs.upload.clearFiles();
      let formData = new FormData();
      formData.append("file", item.raw);
      _this.fileName = item.raw.name;
      // request({
      //     url: '/sys-file/create',
      //     method: 'put',
      //     data: formData
      // }).then(res => {
      //     _this.$message.success("上传成功");
      //     _this.queryData();
      // });
    },
  }
}
</script>

<style scoped lang="scss">
.upload-btn {
  display: inline-block;
  margin-left: 20px;
}

.text-box {
  border: 1px solid #dcdddf;
  width: calc(100% - 40px);
  height: 550px;
  overflow-y: auto;
  margin-top: 40px;
  padding: 20px;
  line-height: 25px;
  font-size: 14px;
  color: #333333;
  border-radius: 3px;
}

.text-title {
  width: calc(100% - 40px);
  padding: 20px;
  text-align: center;
}

.left-box {
  width: 50%;
  float: left;

  .text-box-item {
    width: calc(90% - 1px);
    padding-right: 10%;
    border-right: 1px solid #c1c2c4;
  }
}

.right-box {
  width: 50%;
  float: right;

  .text-box-item {
    width: 90%;
    padding-left: 10%;
  }
}
</style>