<template>
  <div>
    <div class="search">
      <el-popover placement="top-start" width="300" trigger="hover" content="设计师和专家能对元器件数据进行标注，并把标注结果进行管理">
        <i slot="reference" class="el-icon-question" />
      </el-popover>
      <el-input v-model="search" placeholder="请输入内容" class="input-with-select" style="width: 400px">
        <el-button slot="append" icon="el-icon-search" />
      </el-input>
    </div>
    <el-table :data="listData" stripe style="width: 100%">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column prop="id" label="id" width="180" />
      <el-table-column prop="标注名称" label="标注名称" width="180" />
      <el-table-column prop="标注结果" label="标注结果" />
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            @click="handleUpdate(scope.row)"
          >编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import data from '@/data/customData/dataManagement.json'
export default {
  name: 'DataAnnotationsManage',
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 显示搜索条件
      showSearch: true,
      // 搜索内容
      search: '',
      listData: data.DataAnnotations
    }
  },
  methods: {
    /** 编辑按钮操作 */
    handleUpdate(row) {
      // const id = row.id || this.ids
      // this.editDialog = true
      // this.xmlContent = row.content
    },
    /** 搜索按钮操作 */
    handleQuery() {
      // this.queryParams.pageNum = 1
      // this.getList()
    },
    /** 重置按钮操作 */
    resetQuery() {
      // this.resetForm('queryForm')
      // this.handleQuery()
    }
  }
}
</script>

<style scoped>
.search{
  width: 100%;
  height: 60px;
  position: relative;
}
.input-with-select{
  position: absolute;
  top: 20px;
  right: 20px;
}
.el-icon-question{
  margin: 20px;
  font-size: 24px;
  color: #5cb6ff;
}
</style>
