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

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

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