<template>
    <div>
        <el-card class="box-card" shadow="always" :body-style="{ height: bodyHeight }" style="overflow-y: auto;">
            <div slot="header" class="clearfix">
                <span>{{ title }}</span>
                <el-button style="float: right; padding: 3px 0" type="text" @click="showList">返回列表</el-button>
            </div>
            111
        </el-card>
    </div>
</template>

<script>
export default {
  name: 'DeptForm',
  props: {
    id: {
      type: String,
      default: undefined
    }
  },
  data () {
    return {
      bodyHeight: document.body.offsetHeight - 130 + 'px',
      title: '部门'
    }
  },
  created () {
    if (this.id) {
      this.title = '修改部门'
    } else {
      this.title = '新增部门'
    }
  },
  methods: {
    showList () {
      this.$emit('showList')
    }
  }
}
</script>

<style lang="scss" scoped>

</style>
