<template>
  <div class="mainCss">
    <div class="pageRight_none">
      <a-tabs v-model="activeName" type="card" ref="topContainer" @tabClick="handleClick">
        <a-tab-pane key="page_dctb_1" tab="数据划分" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_dctb_2" tab="水利资金监督检查标准线上维护" v-if="isProvince"></a-tab-pane>
        <a-tab-pane key="page_dctb_3" tab="基础信息填报" v-if="false"></a-tab-pane>
        <a-tab-pane key="page_dctb_4" tab="督查发现问题填报" v-if="false"></a-tab-pane>
      </a-tabs>
      <div class="content">
        <component :is="activeName"/>
      </div>
    </div>
  </div>
</template>

<script>
import page_dctb_2 from '@//views/systemManage/pblmList_slzj.vue';
import page_dctb_1 from '@/views/duChaTianBao/duChaTianBaoIndex_slzjdc_1.vue';
import page_dctb_3 from '@/views/duChaTianBao/duChaTianBaoIndex_slzjdc_1.vue';
import page_dctb_4 from '@/views/duChaTianBao/duChaTianBaoIndex_slzjdc_1.vue';
export default {
  components: { page_dctb_1, page_dctb_2, page_dctb_3, page_dctb_4 },
  data() {
    return {
      activeName: 'page_dctb_1',
    };
  },
  computed: {
    userId() {
      return localStorage.getItem('persId')
        ? localStorage.getItem('persId')
        : '';
    },
    isProvince() {
      const currentAdcode = localStorage.getItem('currentAdCode');
      if (currentAdcode.endsWith('0000000000')) {
        return true;
      } else {
        return false;
      }
    },
  },
  created() {},
  mounted() {
    if (this.isProvince) {
      this.activeName = 'page_dctb_2';
    } else {
      this.activeName = 'page_dctb_1';
    }
  },
  methods: {
    handleClick(name) {
      this.activeName = name;
    },
  },
};
</script>

<style lang='less' scoped>
:deep(.ant-table-pagination) {
  float: left;
}

:deep(.ant-layout-sider),
:deep(.ant-layout-content) {
  background: #fff;
}

:deep(.ant-table-thead>tr>th),
:deep(.ant-table-tbody>tr>td) {
  padding: 0;
  height: 60px;
  line-height: 60px;
}

:deep(.ant-table-scroll) {
  position: relative;
  z-index: 1;
}

:deep(.ant-table-fixed-left),
:deep(.ant-table-fixed-right) {
  z-index: 2;
}
.pageRight_none {
  width: calc(100% - 20px);
  margin-left: 10px;
  box-shadow: 0 1px 6px 0 rgb(32 33 36 / 28%);
}
.content {
  width: 100%;
}

:deep(.success-delete) {
  background: #ffa3a8 !important;
}

.mainCss {
  width: 100%;
  height: calc(100% - 20px);
  display: flex;
}
.pageLeft_none {
  display: none;
}

.pageRight {
  width: calc(100% - 330px);
  margin-left: 10px;
  box-shadow: 0 1px 6px 0 rgb(32 33 36 / 28%);
}

.pageRight_none {
  width: calc(100% - 20px);
  margin-left: 10px;
  box-shadow: 0 1px 6px 0 rgb(32 33 36 / 28%);
}

.custom_dialog .scroll300 {
  max-height: 60vh !important;
}
</style>
