<template>
  <div>
    <el-form ref="agentForm" :model="agentObj" label-width="120px">
      <el-form-item label="代理商Agent">
        <el-select v-model="agentObj.agent" placeholder="请选择代理商">
        </el-select>
      </el-form-item>
    </el-form>
    <el-row class="operate-button">
      <el-button type="primary" @click="onSubmit">保存</el-button>
      <el-button type="success" @click="onSubmit">提交</el-button>
      <el-button @click="cancel">关闭</el-button>
    </el-row>
  </div>
</template>

<script>
/**
 * agent
 */
export default {
  name: "agent",
  data() {
    return {
      // agent对象
      agentObj: {},
    };
  },
  methods: {
    /** 提交 */
    onSubmit() {
      this.$refs["agentForm"].validate((valid) => {
        if (valid) {
          alert("submit!");
        }
      });
    },
    /** 取消 */
    cancel() {
      this.$emit("closeDialog");
    },
  },
};
</script>

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