<template>
  <div class="app-container">
    <el-form v-model="queryParams" :inline="true">
      <el-form-item label="主系统">
        <el-select>
          <el-option label="item.label" value="item.value"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="算法">
        <el-select>
          <el-option label="item.label" value="item.value"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="原算法编号">
        <el-input placeholder="请输入原算法编号"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button
          type="primary"
          icon="el-icon-search"
          @click="handleQuery"
          size="mini"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" @click="resetQuery" size="mini"
          >重置</el-button
        >
      </el-form-item>
    </el-form>
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          type="primary"
          icon="el-icon-plus"
          plain
          size="mini"
          @click="add"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button type="success" icon="el-icon-edit" plain size="mini"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" icon="el-icon-delete" plain size="mini"
          >删除</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" icon="el-icon-download" plain size="mini"
          >导出</el-button
        >
      </el-col>
    </el-row>
    <el-table :data="tableData" style="width: 100%; margin-bottom: 20px">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column prop="id" label="台账ID" align="center" />
      <el-table-column prop="id" label="主系统编号" align="center" />
      <el-table-column prop="name" label="主系统名称" align="center" />
      <el-table-column prop="id" label="厂家编号" align="center" />
      <el-table-column prop="id" label="厂家名称" align="center" />
      <el-table-column prop="id" label="算法" align="center" />
      <el-table-column prop="id" label="算法编号" align="center" />
      <el-table-column prop="id" label="原算法编号" align="center" />
      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <el-button
            type="text"
            size="small"
            @click="handleEdit(scope.$index, scope.row)"
            >修改</el-button
          >
          <el-button
            type="text"
            size="small"
            @click="handleDelete(scope.$index, scope.row)"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
    />
    <el-dialog
      :title="title"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose"
    >
      <el-form ref="dialogForm" :model="dialogForm" label-width="100px">
        <el-form-item label="主系统">
          <el-select>
            <el-option label="item.label" value="item.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="算法">
          <el-select>
            <el-option label="item.label" value="item.value"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="原算法编号">
          <el-input placeholder="请输入原算法编号"></el-input>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogVisible = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>

<script>
export default {
  data() {
    return {
      queryParams: {},
      tableData: [
        {
          id: 1,
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          id: 2,
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          id: 3,
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          id: 4,
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
      total: 10,
      dialogVisible: false,
      dialogForm: {},
      title: "添加基础数据-设备对应",
    };
  },
  computed: {},
  created() {},
  mounted() {},
  methods: {
    add() {
        this.dialogVisible = true;
    },
  },
};
</script>

<style lang="scss" scoped></style>
