<template>
  <div class="grid-content bg-purple" style="height: 100%;">
    <a-card class="box-card" style="height: 100%">
      <a-tabs v-model="activeContent" type="card" style="height:100%;width: 100%;">
        <a-tab-pane key="first" tab="督查人员">
          <duChaRenYuanListCounty ref="renYuanList" :dczId="currentSelectTreeNodeId" @showEditDialog="showEditDialog"/>
        </a-tab-pane>
        <a-tab-pane key="second" tab="督查对象">
          <duChaDuiXiangList
            ref="duiXiangList"
            :dczId="currentSelectTreeNodeId"
            :activeContent="activeContent"
            @showEditDialog_dx="showEditDialog_dx"
          ></duChaDuiXiangList>
        </a-tab-pane>
      </a-tabs>
    </a-card>
    <!-- 添加督查人员、督查对象、督查区域 -->
    <editDczInfo ref="editDczInfoRef" :psn="currentSelectTreeNodePsn" :dczId="currentSelectTreeNodeId" :jiGouId="orgId" @addSuccess="RenYuanaAddSuccessHandler" />
    <editDcdxInfoCounty ref="editDcdxInfoRef" :dczId="currentSelectTreeNodeId" @addSuccess="DuiXiangAddSuccessHandler" />
  </div>
</template>

<script>
import duChaRenYuanListCounty from '../../duChaGuanLi/duChaRenYuanListCounty.vue';
import editDcdxInfoCounty from '../editDcdxInfo_county.vue';
import editDczInfo from '../editDczInfoCounty.vue';
import duChaDuiXiangList from './duChaDuiXiangListCounty.vue';
export default {
  props: ['currentSelectTreeNodeId', 'currentSelectTreeNodePsn'],
  data() {
    return {
      activeContent: 'first',
    };
  },
  computed: {
    orgId() {
      return localStorage.getItem('guid') ? localStorage.getItem('guid') : '';
    },
  },
  components: {
    duChaRenYuanListCounty,
    editDczInfo,
    editDcdxInfoCounty,
    duChaDuiXiangList,
  },
  created() {},
  methods: {
    showEditDialog() {
      this.$refs['editDczInfoRef'].showDialog();
    },
    RenYuanaAddSuccessHandler: function () {
      this.$refs['renYuanList'].getDcryResult();
    },
    showEditDialog_dx() {
      this.$refs['editDcdxInfoRef'].showDialog();
    },
    DuiXiangAddSuccessHandler: function () {
      this.$refs['duiXiangList'].getDcdxList1();
    },
  },
};
</script>

<style lang='less' scoped>

</style>
