<template>
  <div class="app-container">
    <el-form v-model="queryParams" :inline="true">
      <el-form-item label="场站名称" label-width="80px">
        <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%">
      <el-table-column type="selection" width="55" />
      <el-table-column prop="date" label="场站id" align="center" />
      <el-table-column prop="name" label="场站编号" align="center" />
      <el-table-column prop="address" label="场站名称" align="center" />
      <el-table-column prop="address" label="场站类型" align="center" />
      <el-table-column prop="address" label="场站描述" align="center" />
      <el-table-column prop="address" label="边缘节点标识ID" align="center" />
      <el-table-column prop="address" label="产站电压等级" align="center" />
      <el-table-column prop="address" label="省份" align="center" />
      <el-table-column prop="address" label="地市" align="center" />
      <el-table-column prop="address" label="操作" align="center">
        <template slot-scope="scope">
          <el-button type="text" size="small">修改</el-button>
          <el-button type="text" size="small">删除</el-button>
        </template>
      </el-table-column>
    </el-table>

    <el-dialog
      :title="title"
      :visible.sync="dialogVisible"
      width="30%"
      :before-close="handleClose"
    >
      <el-form label-width="110px" v-model="dialogForm">
        <el-form-item label="场站类型">
          <el-select v-model="queryParams.region" placeholder="场站类型">
            <el-option label="区域一" value="shanghai"></el-option>
            <el-option label="区域二" value="beijing"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="场站编号">
          <el-input placeholder="请输入场站编号"></el-input>
        </el-form-item>
        <el-form-item label="场站名称">
          <el-input placeholder="请输入场站名称"></el-input>
        </el-form-item>
        <el-form-item label="场站描述">
          <el-input placeholder="请输入场站描述"></el-input>
        </el-form-item>
        <el-form-item label="边缘节点标识ID">
          <el-input placeholder="请输入边缘节点标识ID"></el-input>
        </el-form-item>
        <el-form-item label="产站电压等级">
          <el-input placeholder="请输入产站电压等级"></el-input>
        </el-form-item>
        <el-form-item label="省份">
          <el-input placeholder="请输入省份"></el-input>
        </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: [
        {
          date: "2016-05-02",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1518 弄",
        },
        {
          date: "2016-05-04",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1517 弄",
        },
        {
          date: "2016-05-01",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1519 弄",
        },
        {
          date: "2016-05-03",
          name: "王小虎",
          address: "上海市普陀区金沙江路 1516 弄",
        },
      ],
      dialogVisible: false,
      title: "添加场站信息",
      dialogForm: {},
    };
  },
  methods: {
    add() {
      this.dialogVisible = true;
    },
    handleClose() {
      this.dialogVisible = false;
    },
  },
};
</script>

<style scoped></style>
