<template>
  <div id="addUser">
    <el-row>
      <el-col :span="24" class="style">
        <el-col :span="24" class="top">
          <NavBar v-show="navShow" :title="title" :isleftarrow="isleftarrow"> </NavBar>
        </el-col>
        <el-col :span="24" class="main">
          <el-form :model="form">
            <el-form-item label="用户名" :label-width="formLabelWidth">
              <el-input v-model="form.name" autocomplete="off" placeholder="请输入用户名"></el-input>
            </el-form-item>
            <el-form-item label="手机号" :label-width="formLabelWidth">
              <el-input v-model="form.phone" autocomplete="off" maxlength="11" placeholder="请输入手机号" :disabled="disabled"></el-input>
            </el-form-item>
            <el-form-item label="密码" :label-width="formLabelWidth">
              <el-input v-model="form.passwd" autocomplete="off" placeholder="请输入密码" show-password :disabled="disabled"></el-input>
            </el-form-item>
            <el-form-item label="单位名称" :label-width="formLabelWidth">
              <el-input v-model="form.company" autocomplete="off" placeholder="请输入单位名称"></el-input>
            </el-form-item>
            <el-form-item label="email" :label-width="formLabelWidth">
              <el-input v-model="form.email" autocomplete="off" placeholder="请输入email"></el-input>
            </el-form-item>
            <el-form-item label="简介" :label-width="formLabelWidth">
              <el-input v-model="form.content" type="textarea" autocomplete="off" placeholder="请输入简介"></el-input>
            </el-form-item>
            <el-col :span="24" style="text-align:center">
              <el-button @click="closeBtn">取 消</el-button>
              <el-button type="primary" @click="onSubmit">确 定</el-button>
            </el-col>
          </el-form>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
import { mapState, createNamespacedHelpers } from 'vuex';
import NavBar from '@/layout/common/topInfo.vue';
export default {
  name: 'addUser',
  props: {},
  components: { NavBar },
  data: function() {
    return {
      // 头部标题
      title: '',
      // meta为true
      isleftarrow: '',
      // 返回
      navShow: true,
      form: {},
      formLabelWidth: '70px',
    };
  },
  created() {},
  methods: {
    // 提交添加
    onSubmit() {},
    // 取消添加
    closeBtn() {
      this.form = {};
      this.$router.push({ path: '/dockCenter/vipInfo/index' });
    },
  },
  computed: { ...mapState(['user']) },
  mounted() {
    this.title = this.$route.meta.title;
    this.isleftarrow = this.$route.meta.isleftarrow;
  },
};
</script>

<style lang="less" scoped>
.style {
  width: 100%;
  min-height: 667px;
  position: relative;
  background-color: #f9fafc;
}
.top {
  height: 46px;
  overflow: hidden;
  position: relative;
  z-index: 999;
}

.main {
  min-height: 570px;
  min-height: 570px;
  padding: 10px 5px;
}
</style>
