<template>
  <div id="popupContainer">
    <a-modal :title="currentObjectName" @cancel="closeDialog" width="50%" :open="dialogFormVisible">
      <a-tabs v-model="currentViewId" type="card">
        <a-tab-pane v-for="option in options" :tab="option.label" :key="option.value">
          <component
            :is="option.value"
            :currentObjectRgstrId="currentObjectRgstrId"
            :currentObjectName="currentObjectName"
            :currentResCode="currentResCode"
            :currentObjectId="currentObjectId"
            :isJiangXi="isJiangXi">
          </component>
        </a-tab-pane>
      </a-tabs>
    </a-modal>
  </div>
</template>

<script>
import gongchengshiti from './gongchengshiti.vue';
import jichuxinxi from './jichuxinxi.vue';
import problemList from './problemList.vue';
import yunxingguanli from './yunxingguanli.vue';
import zerenren from './zerenrenFive.vue';
import zhongdianhuanjie from './zhongdianhuanjie.vue';
export default {
  components: {
    jichuxinxi, // 基础信息
    zerenren, // 责任人
    zhongdianhuanjie, // 重点环节
    gongchengshiti, // 工程实体
    yunxingguanli, // 运行管理情况
    problemList, // 问题清单
  },
  props: [
    'currentDuchaTpe',
    'currentObjectRgstrId',
    'currentResCode',
    'currentObjectId',
    'currentObjectName',
    'isJiangXi',
  ],
  data() {
    return {
      currentViewId: '基础信息',
      dialogFormVisible: true,
      options: [],
      options_ducha: [
        {
          value: 'jichuxinxi',
          label: '基础信息',
        },
        {
          value: 'zerenren',
          label: '责任人落实情况',
        },
        {
          value: 'zhongdianhuanjie',
          label: '重点环节落实情况',
        },
        {
          value: 'gongchengshiti',
          label: '水库工程实体',
        },
        {
          value: 'yunxingguanli',
          label: '运行管理情况',
        },
        {
          value: 'problemList',
          label: '问题清单',
        },
      ],
      options_base: [
        {
          value: 'jichuxinxi',
          label: '基础信息',
        },
      ],
    };
  },
  mounted() {
    this.options = this.options_ducha;
  },
  methods: {
    closeDialog() {
      this.$emit('cancelHandler');
    },
    showDialog() {
      this.dialogFormVisible = true;
    },
  },
};
</script>

<style lang='less' scoped>

</style>
