<template>
  <div>
    <div class="query mg-b-8">
      <div class="query-items">
        <div class="query-item">
          <div class="lable">知识库：</div>
          <div class="search-input">
            <el-select
              v-model="knowledge"
              clearable
              placeholder="请选择"
              popper-class="select"
            >
              <el-option
                v-for="item in knowledgeList"
                :key="item.value"
                :value="item.value"
                :label="item.label"
              />
            </el-select>
          </div>
        </div>
      </div>
    </div>
    <el-row :type="'flex'" class="content">
      <el-col :span="24">
        <el-table
          height="89vh"
          ref="multipleTable"
          empty-text="暂无数据"
          :data="tableData"
          :header-cell-style="{
            height: '40px',
            background: 'rgba(83, 98, 104, 0.2)',
            color: '#b2bdc0',
            'border-bottom': '0px solid red',
          }"
          :cell-style="{
            height: '40px',
            'border-bottom': 'solid 0px #242424',
          }"
          stripe
          style="width: 100%; margin-bottom: 10px"
        >
          <el-table-column
            prop="indexs"
            label="序号"
            width="60"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="faulttype"
            label="故障分类"
            width="150"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="symptom"
            label="故障现象"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="cause"
            label="故障原因"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="maintenance"
            label="维修过程"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="model"
            label="风机型号"
             width="150"
            align="center"
          ></el-table-column>
          <el-table-column
            prop="manufacturer"
            label="风机厂家"
            width="200"
            align="center"
          ></el-table-column>
        </el-table>
      </el-col>
    </el-row>
  </div>
</template>
<script>
export default {
  data() {
    return {
      tableData: [],
      knowledge: '故障维修记录库',
      knowledgeList: [
        {
          label: "故障维修记录库",
          value: "0",
        },
      ],
    };
  },
  components: {},
  created() {
    this.getData();
  },
  methods: {
    getData() {
      let that = this;
      this.API.requestData({
        method: "GET",
        subUrl: "http://192.168.1.18:9002/know/fault/fix/all",
        success(res) {
          if (res) {
              console.log(res);
            res.data.forEach((item, index) => {
              item.indexs = index +1;
            });
            that.tableData = res.data;
          }
        },
      });
    },
  },
};
</script>