<template>
  <div id="columnDetail">
    <el-row>
      <el-col :span="24">
        <el-col :span="24" class="top">
          <el-col :span="12" class="topTitle">
            添加栏目
          </el-col>
          <el-col :span="12" class="topBtn">
            <el-button type="primary" size="mini" @click="returnBtn()">返回</el-button>
          </el-col>
        </el-col>
        <el-col :span="24" class="messgae">
          <el-form ref="form" :model="form" label-width="80px">
            <el-form-item label="栏目名称">
              <el-input v-model="form.name"></el-input>
            </el-form-item>
            <el-form-item label="所在位置">
              <el-select v-model="form.site" placeholder="请选择所在位置">
                <el-option label="视频会议中心" value="zhidao"></el-option>
                <el-option label="专题研讨" value="zhuanhua"></el-option>
              </el-select>
            </el-form-item>
            <el-form-item>
              <el-button type="primary" @click="onSubmit()">提交</el-button>
            </el-form-item>
          </el-form>
        </el-col>
      </el-col>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'columnDetail',
  props: {
    form: null,
  },
  components: {},
  data: () => ({}),
  created() {},
  computed: {},
  methods: {
    onSubmit() {
      this.$emit('submitDate', { data: this.form, id: this.form.id });
    },
    returnBtn() {
      this.$router.push({ path: '/serve/index' });
    },
  },
};
</script>

<style lang="less" scoped>
.top {
  padding: 15px 0;
}
.top .topTitle {
  text-align: left;
}
.top .topBtn {
  text-align: right;
  padding: 0 5px;
}
</style>
