<template>
  <div class="mainCss">
    <div class="pageRight_none">
      <a-tabs v-model="activeName" type="card" ref="topContainer" @tabClick="handleClick">
        <a-tab-pane key="page_sjdc_1" tab="督查对象基础信息维护" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_sjdc_2" tab="监督检查标准维护" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_sjdc_3" tab="市级综合督查计划" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_sjdc_4" tab="数据关联" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_sjdc_5" tab="市级综合督查填报" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_sjdc_6" tab="市级综合督查问题处置" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_sjdc_7" tab="市级综合督查整改反馈" v-if="!isProvince"></a-tab-pane>
        <a-tab-pane key="page_sjdc_8" tab="市级综合督查工作成果" v-if="isProvince"></a-tab-pane>
      </a-tabs>
      <div class="content">
        <component :is="activeName"/>
      </div>
    </div>
  </div>
</template>

<script>
import page_sjdc_3 from '@/views/duChaJiHua/countyzhdcjh.vue';
import page_sjdc_5 from '@/views/duChaTianBao/duChaTianBaoIndex_sxzhdctb.vue';
import page_sjdc_6 from '@/views/duChaWenTi/dcwt_ywgfzrwtcz_1.vue';
import page_sjdc_7 from '@/views/duChaWenTi/zgwzWenTi_all_1.vue';
import page_sjdc_8 from '@/views/gongzuochengguo/reportIndex_synthesis.vue';
import page_sjdc_4 from '@/views/slzj/page_sjdc_4.vue';
import page_sjdc_2 from '@/views/systemManage/pblmList_zhjdjc.vue';
import page_sjdc_1 from '@/views/xiTongGuanLi/dcdxjcxx_1.vue';

export default {
  components: {
    page_sjdc_1,
    page_sjdc_2,
    page_sjdc_3,
    page_sjdc_4,
    page_sjdc_5,
    page_sjdc_6,
    page_sjdc_7,
    page_sjdc_8,
  },
  data() {
    return {
      activeName: 'page_sjdc_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_sjdc_8';
    } else {
      this.activeName = 'page_sjdc_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:100%;
  box-shadow: 0 1px 6px 0 rgb(32 33 36 / 28%);
}
.content {
  width: 100%;
}

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

.mainCss {
  width: 100%;
  height: 100%;
  display: flex;
}
.pageLeft_none {
  display: none;
}

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

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

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