<template>
  <Navbar :title="title" :is-go-back="false" />
  <a-space>
    <a-button type="primary" @click="generate()">确定</a-button>
    <a-button danger @click="back()">撤销</a-button>
  </a-space>
  <DocGenerator ref="docGenerator" :info-window-no="infoWindowNo" @show-title="title = $event" />
</template>

<script>
import Navbar from '../../packages/navbar/src/Navbar.vue';
import DocGenerator from '../../packages/info/src/DocGenerator.vue';
export default {
  components: {
    Navbar,
    DocGenerator,
  },
  data() {
    return {
      title: '生单界面',
      infoWindowNo: '301921',
    };
  },
  methods: {
    generate() {
      const selectedDatas = this.$refs.docGenerator.getSelectedData();
      console.log(selectedDatas, 'selectedDatas');
    },
    back() {
      // window.close();
      console.log('关闭');
    },
  },
};
</script>