<template>
  <div class="companyForm">
    <div class="userSelect-input" @click="openDialog">
      <el-button type="text" icon="el-icon-circle-plus-outline" size="small"
        >点击新增企业</el-button
      >
    </div>
    <el-dialog
      title="新增企业"
      :close-on-click-modal="false"
      :visible.sync="visible"
      lock-scroll
      append-to-body
      width="50%"
      top="15vh"
      :modal-append-to-body="false"
    >
      <el-form :model="companyForm" size="small" label-width="100px">
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="企业名称">
              <el-input
                v-model="companyForm.name"
                placeholder="请输入企业名称"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="负责人姓名">
              <el-input
                v-model="companyForm.name"
                placeholder="请输入负责人姓名"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="负责人电话">
              <el-input
                v-model="companyForm.name"
                placeholder="请输入负责人电话"
              ></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="24">
            <el-form-item label="办公地址">
              <el-input
                v-model="companyForm.name"
                placeholder="请输入办公地址"
              ></el-input>
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="close">取消</el-button>
        <el-button type="primary" @click="confirm">确认</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
import { getCompanyInfoList } from "@/api/baseData/company";
export default {
  name: "companyForm",
  props: {},
  data() {
    return {
      visible: false,
      loading: false,
      companyForm: {
        name: "",
      },
      value: "",
      companyOptions: [],
      options: [{ value: 1, label: "选项1" }],
      dialogFormVisible: false,
    };
  },
  watch: {},
  mounted() {},
  created() {},
  methods: {
    // 请求公司列表
    getAllCompanyList() {
      getCompanyInfoList().then((res) => {
        console.log(res, "全部公司信息");
      });
    },
    close() {
      this.visible = false;
    },
    openDialog() {
      this.visible = true;
    },
    async confirm() {},
  },
};
</script>
<style lang="scss" scoped></style>
@/api/baseData/company