/*
 * @Author: Anmin
 * @Email:changanmin1@crc.com.hk
 * @Date: 2019-04-04 10:12:48
 * @Last Modified by: Anmin
 * @Last Modified time: 2019-04-08 13:39:30
 * @menuDesc:  选择报账申请 功能菜单的业务组件 ---可修改，可新增 可删除
 * @JIRA:  http://10.0.63.12:8088/browse/EMSHQ-124
 */
<template>
  <MenuManage
    ref="treeData"
    @handleSelect="handleSelect"
  ></MenuManage>
</template>

<script>
import MenuManage from '../menuManage/MenuManage.vue';
export default {
  components: {
    MenuManage
  },
  props: {},
  created() {
    this.$emit('SetTitle', '选择关联菜单');
    this.$emit('SetPageActions', [
      {
        text: '确定',
        icon: 'md-checkmark',
        action: 'save',
        handle: () => {
          this.save();
        }
      },
      {
        text: '关闭',
        action: 'close',
        icon: 'md-close',
        handle: () => this.$emit('Close')
      }
    ]);
  },
  methods: {
    handleSelect(data) {
      console.log(data);
    },
    save() {
      const data = this.$refs.treeData.getNodeData();
      this.$emit('Close', data);
    }
  }
};
</script>
<style>
</style>
