<template>
  <el-card shadow="never" class="aui-card--fill">
    <el-form
      style="display: flex; align-items: center; justify-content: right;"
      :inline="true"
      :model="dataForm"
      @keyup.enter.native="getDataList()"
    >
      <el-form-item>
        <el-select
          size="small"
          v-model="dataForm.type"
          placeholder="请选择类型"
          style="width:150px"
          clearable
        >
          <el-option
            v-for="(item, index) in typeArr"
            :key="index"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button size="small" @click="getDataList()">
          <svg class="icon-svg"><use xlink:href="#icon-sousuo"></use></svg>
          查询
        </el-button>
      </el-form-item>
    </el-form>
    <el-table
      :data="dataList"
      :stripe="true"
      :header-cell-style="{
        background: '#eef1f6',
        color: '#606266',
        height: '56px'
      }"
      v-loading="dataListLoading"
      style="width: 100%;"
    >
      <el-table-column
        type="index"
        header-align="center"
        align="center"
        label="序号"
        width="50"
      >
      </el-table-column>
      <el-table-column prop="name" align="center" label="名称"> </el-table-column>
      <el-table-column prop="code" align="center" label="编码"> </el-table-column>
      <el-table-column prop="type" align="center" label="类型">
        <template slot-scope="scope">
          <span>{{
            scope.row.type === '2' ? "计数" : "计量"
          }}</span>
        </template>
        </el-table-column>
    </el-table>
    <el-pagination
      @size-change="sizeChangeHandle"
      @current-change="currentChangeHandle"
      :current-page="pageIndex"
      :page-sizes="[10, 20, 50, 100]"
      :page-size="pageSize"
      :total="totalPage"
      layout="total, sizes, prev, pager, next, jumper"
    >
    </el-pagination>
  </el-card>
</template>

<script>
import basicPage from '@/mixins/basic-page'
export default {
  mixins: [basicPage],
  data() {
    return {
      urlOptions: {
        getDataListURL: '/qualityPlanning/controlGraph/page',
        deleteURL: '/qualityPlanning/controlGraph',
        exportUrl: '/qualityPlanning/controlGraph/export'
      },
      typeArr: [
        {
          label: "计量",
          value: "1",
        },
        {
          label: "计数",
          value: "2",
        }
      ],
    };
  },
  components: {
  },
  methods: {
  },
};
</script>
