<template>
  <div class="enterprise-edit">
    <basic-info ref="baseInfo" :base-info="baseInfo" :disabled="true" />
    <PersonInfo ref="legalPersonInfoRef" :person-type="'legal'" :details-info="legalPersonInfo" :disabled="true" />
    <PersonInfo ref="controlPersonInfoRef" :person-type="'control'" :details-info="controlPersonInfo" :disabled="true" />
    <AuthBook ref="authBookRef" :details-info="authBookInfo" :disabled="true" />
    <div class="submit-btn">
      <el-button @click="() => { $router.push({ name: 'MyStoreEnterprise', query: { activeName: 'enterprise' } }) }">关闭</el-button>
      <el-button type="primary" @click="submitClick('temp')">暂存</el-button>
      <el-button type="primary" @click="submitClick('submit')">提交</el-button>
    </div>
  </div>
</template>

<script>
// import { queryParent } from '@/utils';


export default {
  name: 'MyBusinessProjectEdit',
  components: {
    BasicInfo: () => import('./components/BasicInfo'),
    PersonInfo: () => import('./components/PersonInfo.vue'),
    AuthBook: () => import('./components/AuthBook')
  },
  data() {
    return {
      baseInfo: {},
      legalPersonInfo: {},
      controlPersonInfo: {},
      authBookInfo: [
        {
          contractType: 0,
          contractName: '测试合同名称',
          shortAuthUrl: 'http://www.baidu.com'
        },
        {
          contractType: 1,
          contractName: '测试合同名称1',
          shortAuthUrl: 'http://www.baidu.com'
        },
        {
          contractType: 2,
          contractName: '测试合同名称2',
          shortAuthUrl: 'http://www.baidu.com'
        }
      ]
    }
  },
  created() {
    // this.getDetails()
  },
  methods: {
    getDetails() {
      // const { id } = this.$route.query
    },
    async submitClick(type) {
    }
  }
}
</script>

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