<template>
  <div>

    <div class="search-wrap">
      <el-row :gutter="20">
        <el-form ref="form" :model="form" label-width="60px" label-position="left">
          <el-col :xs="8" :sm="6" :md="7" :lg="7" :xl="1">
            <el-form-item label="我的账户">
              <el-input v-model="form.email" maxlength="20" readonly />
            </el-form-item>
          </el-col>
        </el-form>
      </el-row>
    </div>

    <el-card shadow="always" class="card-second-top">
      <div slot="header" class="clearfix" style="line-height: 32px;">
        <span>我的车牌</span>
        <el-button type="primary" size="small"  style="float: right" @click="dialogFormVisible = true">绑定车牌</el-button>
      </div>
      <el-form label-width="60px" style="margin-bottom: 55px;" label-position="left">
        <el-col :xs="8" :sm="6" :md="7" :lg="7" :xl="1">
        <el-form-item label="">
          <el-select v-model="value" >
            <el-option
              v-for="item in region"
              :key="item.value"
              :label="item.label"
              :value="item.value"
              >
            </el-option>
          </el-select>
        </el-form-item>
        </el-col>
        <el-col :xs="8" :sm="6" :md="3" :lg="3" :xl="1">
          <el-button type="primary" @click="onSubmit">解绑</el-button>
        </el-col>
      </el-form>
    </el-card>

    <el-dialog title="绑定车牌" :visible.sync="dialogFormVisible">
      <el-form :model="problemform" label-width="60px" label-position="left">
        <el-col :xs="8" :sm="6" :md="7" :lg="7" :xl="1">
          <el-form-item label="车牌">
            <el-input v-model="problemform.carnum" maxlength="20"  />
          </el-form-item>
        </el-col>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="dialogFormVisible = false">绑定</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        form: {
          email: '13133415312',
        },
        value:'京A32323',
        region: [
          {
            value: '京A32323',
            label: '京A32323',
          },{
            value: '京A93323',
            label: '京A93323',
          },
        ],
        dialogFormVisible:false,
        problemform:{
          carnum:'',
        }
      }
    },
    methods: {
      onSubmit() {
        this.$message({
          message: '解绑成功!',
          type: 'success'
        });
      },
      problemonSubmit() {
        this.$message('提交成功!')
      },
      onCancel() {
        this.$message({
          message: 'cancel!',
          type: 'warning'
        })
      },
    }
  }
</script>

<style lang="scss">
  .search-wrap{
    background-color: #FFF;
    padding: 15px;
  }
  .card-second-top{
    margin-top: 15px;
  }
  .el-card__header{
    padding: 10px 20px;
  }
  .el-radio{
    margin-right: 80px;
  }
  .el-radio.is-bordered+.el-radio.is-bordered{
    margin-left: 0px;
    margin-top: 15px;
  }
</style>

