<template>
  <div class="detail-container">
    <div class="map-container" v-if="!props.hiddenInfoMap">
      <MapboxMap
        :caseno="props.showInfoData.case_no"
        :countyname="props.showInfoData.countyname"
        :imageList="imageList"
        :geomsList="geomsList"
        :mapConfig="mapConfig"
        @handlerDrawComplete="handlerDrawComplete"
        @mapOnLoad="onMapboxLoad"
        ref="MapboxComponent"
      />
    </div>
    <div class="info-container" id="info-container">
      <a-tabs v-model:activeKey="activeKey">
        <a-tab-pane key="1" tab="项目信息">
          <a-descriptions
            :column="2"
            bordered
            :contentStyle="{
              'text-align': 'center',
              'min-width': '250px',
              'word-break': 'break-all',}"
          >
            <a-descriptions-item label="项目编号">
              {{ allInfoData.xiangmu_no }}
            </a-descriptions-item>
            <a-descriptions-item label="项目名称">
              {{ allInfoData.xiangmu_name }}
            </a-descriptions-item>
            <a-descriptions-item label="乡镇">
              {{ allInfoData.streetname }}
            </a-descriptions-item>
            <a-descriptions-item label="村庄">
              {{ allInfoData.communityname }}
            </a-descriptions-item>
            <a-descriptions-item label="权利人">
              {{ allInfoData.quanliren }}
            </a-descriptions-item>
            <a-descriptions-item label="联系方式">
              {{ allInfoData.lianxifangshi }}
            </a-descriptions-item>
            <a-descriptions-item label="行政区划">
              {{ allInfoData.xingzhengquhua }}
            </a-descriptions-item>
            <a-descriptions-item label="备案编号">
              {{ allInfoData.beian_no }}
            </a-descriptions-item>
            <a-descriptions-item label="备案日期">
              {{ allInfoData.beianriqi? dayjs(allInfoData.beianriqi).format('YYYY-MM-DD') : ''}}
            </a-descriptions-item>
            <a-descriptions-item label="项目开始时间">
              {{ allInfoData.start_time? dayjs(allInfoData.start_time).format('YYYY-MM-DD') : '' }}
            </a-descriptions-item>
            <a-descriptions-item label="项目结束时间">
              {{ allInfoData.end_time? dayjs(allInfoData.end_time).format('YYYY-MM-DD') : ''}}
            </a-descriptions-item>
            <a-descriptions-item label="设施农业用途">
              {{ allInfoData.xiangmu_yt }}
            </a-descriptions-item>
            <a-descriptions-item label="建筑结构">
              {{ allInfoData.jianzhujiegou }}
            </a-descriptions-item>
            <a-descriptions-item label="设施农业申请用地面积(公顷)">
              {{ allInfoData.shenqing_area }}
            </a-descriptions-item>
            <a-descriptions-item label="生产设施用地(公顷)">
              {{ allInfoData.shengchan_area }}
            </a-descriptions-item>
            <a-descriptions-item label="辅助设施用地(公顷)">
              {{ allInfoData.fuzhu_area }}
            </a-descriptions-item>
            <a-descriptions-item label="下发时间">
              {{ allInfoData.xiafatime }}
            </a-descriptions-item>
          </a-descriptions>
        </a-tab-pane>
        <a-tab-pane key="8" tab="日常监管">
          <a-descriptions
            :column="2"
            bordered
            :contentStyle="{
              'text-align': 'center',
              'min-width': '250px',
              'word-break': 'break-all',}"
          >
            <a-descriptions-item label="是否存在问题">
              {{ allInfoData.iswenti_rc }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rc == '是'" label="问题类型">
              {{ allInfoData.wentileixing_rc }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rc == '是'" label="其他情况说明">
              {{ allInfoData.qtqksm_rc }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rc == '是'" label="整改方式">
              {{ allInfoData.zgfs_rc }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rc == '是'" label="整改期限">
              {{ allInfoData.zgqx_rc? dayjs(allInfoData.zgqx_rc).format('YYYY-MM-DD') : ''}}
            </a-descriptions-item>
            <a-descriptions-item label="现场外景照片">
              <div class="image-div">
                <a-image-preview-group
                  :preview="{
                    getContainer: getContainer,
                  }"
                >
                  <template v-for="(imageItem, imageIndex) in wjzp_rcList" :key="imageIndex">
                    <a-image
                      v-if="imageItem"
                      width="100px"
                      height="100px"
                      :src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem}`"
                      :preview="{
                        getContainer,
                      }"
                    ></a-image>
                  </template>
                </a-image-preview-group>
              </div>
            </a-descriptions-item>
            <a-descriptions-item label="现场内景照片">
              <div class="image-div">
                <a-image-preview-group
                  :preview="{
                    getContainer: getContainer,
                  }"
                >
                  <template v-for="(imageItem, imageIndex) in njzp_rcList" :key="imageIndex">
                    <a-image
                      v-if="imageItem"
                      width="100px"
                      height="100px"
                      :src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem}`"
                      :preview="{
                        getContainer,
                      }"
                    ></a-image>
                  </template>
                </a-image-preview-group>
              </div>
            </a-descriptions-item>
            <a-descriptions-item label="附件">
              <a-image-preview-group :preview="{ getContainer }">
                <template v-for="(item, itemIndex) in fujian_rcList" :key="itemIndex">
                  <a-image
                    v-if="showImage(item)"
                    style="width: 100px; height: 100px"
                    :src="`${VITE_GLOB_INFO_IMAGE_URL}/${item}`"
                    :preview="{ getContainer }"
                  ></a-image>
                  <div v-else>
                    <Icon
                      v-if="item"
                      :style="`font-size: 30px; cursor: pointer;`"
                      icon="ion:document-attach-outline"
                      @click="hanlderPreViewFile(item)"
                    />
                    {{ handlerDealFileName(item) }}
                  </div>
                </template>
              </a-image-preview-group>
            </a-descriptions-item>
            <a-descriptions-item label="核查人员">
              {{ allInfoData.hechauser_rc }}
            </a-descriptions-item>
            <a-descriptions-item label="核查时间">
              {{ allInfoData.hechatime_rc }}
            </a-descriptions-item>
            <a-descriptions-item label="历史信息">
              <a-button @click="showHistoryList">查看历史信息</a-button>
            </a-descriptions-item>
          </a-descriptions>
        </a-tab-pane>
        <a-tab-pane key="9" tab="项目整改">
          <a-descriptions
            :column="2"
            bordered
            :contentStyle="{
              'text-align': 'center',
              'min-width': '250px',
              'word-break': 'break-all',}"
          >
            <a-descriptions-item label="整改方式">
              {{ allInfoData.zgfs_rczg }}
            </a-descriptions-item>
            <a-descriptions-item label="现场外景照片">
              <div class="image-div">
                <a-image-preview-group
                  :preview="{
                    getContainer: getContainer,
                  }"
                >
                  <template v-for="(imageItem, imageIndex) in wjzp_rczgList" :key="imageIndex">
                    <a-image
                      v-if="imageItem"
                      width="100px"
                      height="100px"
                      :src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem}`"
                      :preview="{
                        getContainer,
                      }"
                    ></a-image>
                  </template>
                </a-image-preview-group>
              </div>
            </a-descriptions-item>
            <a-descriptions-item label="现场内景照片">
              <div class="image-div">
                <a-image-preview-group
                  :preview="{
                    getContainer: getContainer,
                  }"
                >
                  <template v-for="(imageItem, imageIndex) in njzp_rczgList" :key="imageIndex">
                    <a-image
                      v-if="imageItem"
                      width="100px"
                      height="100px"
                      :src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem}`"
                      :preview="{
                        getContainer,
                      }"
                    ></a-image>
                  </template>
                </a-image-preview-group>
              </div>
            </a-descriptions-item>
            <a-descriptions-item label="附件">
              <a-image-preview-group :preview="{ getContainer }">
                <template v-for="(item, itemIndex) in fujian_rczgList" :key="itemIndex">
                  <a-image
                    v-if="showImage(item)"
                    style="width: 100px; height: 100px"
                    :src="`${VITE_GLOB_INFO_IMAGE_URL}/${item}`"
                    :preview="{ getContainer }"
                  ></a-image>
                  <div v-else>
                    <Icon
                      v-if="item"
                      :style="`font-size: 30px; cursor: pointer;`"
                      icon="ion:document-attach-outline"
                      @click="hanlderPreViewFile(item)"
                    />
                    {{ handlerDealFileName(item) }}
                  </div>
                </template>
              </a-image-preview-group>
            </a-descriptions-item>
            <a-descriptions-item label="办理人员">
              {{ allInfoData.hechauser_rczg }}
            </a-descriptions-item>
            <a-descriptions-item label="办理时间">
              {{ allInfoData.hechatime_rczg }}
            </a-descriptions-item>
          </a-descriptions>
        </a-tab-pane>
        <a-tab-pane key="10" tab="现场复核">
          <a-descriptions
            :column="2"
            bordered
            :contentStyle="{
              'text-align': 'center',
              'min-width': '250px',
              'word-break': 'break-all',}"
          >
            <a-descriptions-item label="是否整改完成">
              {{ allInfoData.iswenti_rcfh }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rcfh == '否'" label="问题类型">
              {{ allInfoData.wentileixing_rcfh }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rcfh == '否'" label="其他情况说明">
              {{ allInfoData.qtqksm_rcfh }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rcfh == '否'" label="整改方式">
              {{ allInfoData.zgfs_rcfh }}
            </a-descriptions-item>
            <a-descriptions-item v-if="allInfoData.iswenti_rcfh == '否'" label="整改期限">
              {{ allInfoData.zgqx_rcfh? dayjs(allInfoData.zgqx_rcfh).format('YYYY-MM-DD') : ''}}
            </a-descriptions-item>
            <a-descriptions-item label="现场外景照片">
              <div class="image-div">
                <a-image-preview-group
                  :preview="{
                    getContainer: getContainer,
                  }"
                >
                  <template v-for="(imageItem, imageIndex) in wjzp_rcfhList" :key="imageIndex">
                    <a-image
                      v-if="imageItem"
                      width="100px"
                      height="100px"
                      :src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem}`"
                      :preview="{
                        getContainer,
                      }"
                    ></a-image>
                  </template>
                </a-image-preview-group>
              </div>
            </a-descriptions-item>
            <a-descriptions-item label="现场内景照片">
              <div class="image-div">
                <a-image-preview-group
                  :preview="{
                    getContainer: getContainer,
                  }"
                >
                  <template v-for="(imageItem, imageIndex) in njzp_rcfhList" :key="imageIndex">
                    <a-image
                      v-if="imageItem"
                      width="100px"
                      height="100px"
                      :src="`${VITE_GLOB_INFO_IMAGE_URL}/${imageItem}`"
                      :preview="{
                        getContainer,
                      }"
                    ></a-image>
                  </template>
                </a-image-preview-group>
              </div>
            </a-descriptions-item>
            <a-descriptions-item label="附件">
              <a-image-preview-group :preview="{ getContainer }">
                <template v-for="(item, itemIndex) in fujian_rcfhList" :key="itemIndex">
                  <a-image
                    v-if="showImage(item)"
                    style="width: 100px; height: 100px"
                    :src="`${VITE_GLOB_INFO_IMAGE_URL}/${item}`"
                    :preview="{ getContainer }"
                  ></a-image>
                  <div v-else>
                    <Icon
                      v-if="item"
                      :style="`font-size: 30px; cursor: pointer;`"
                      icon="ion:document-attach-outline"
                      @click="hanlderPreViewFile(item)"
                    />
                    {{ handlerDealFileName(item) }}
                  </div>
                </template>
              </a-image-preview-group>
            </a-descriptions-item>
            <a-descriptions-item label="复核人员">
              {{ allInfoData.hechauser_rcfh }}
            </a-descriptions-item>
            <a-descriptions-item label="复核时间">
              {{ allInfoData.hechatime_rcfh }}
            </a-descriptions-item>
          </a-descriptions>
        </a-tab-pane>
      </a-tabs>
    </div>
    <a-modal width="80%" v-model:open="visible" title="历史信息" :footer="null" :destroyOnClose="true">
      <ProjectHistory :id="historyId"/>
    </a-modal>
      <!-- File Preview && Download Start -->
      <a-modal
        v-model:open="previewFileModalVisible"
        style="width: 100vw"
        title="文件预览"
        wrap-class-name="full-modal"
      >
        <FilePreview v-if="previewFileModalVisible" :fileUrl="previewFileUrl"></FilePreview>
        <template #footer>
          <a-button key="cancel" @click="handleCancelPreviewFile">取消</a-button>
          <a-button key="confirm" type="primary" @click="handlerDownloadFle">下载</a-button>
        </template>
      </a-modal>
    <!--File Preview && Download End -->
  </div>
</template>

<script setup lang="ts">
  import { defineProps, ref, computed, onBeforeMount, watch } from 'vue';
  import MapboxMap from '@/components/MapboxMaps/MapComponent.vue';
  import { getConfig } from '@/api/sys/layerManagement';
  import { getGeom } from '@/api/sys/layerManagement';
  import { getLoadCaseImgList } from '@/api/tiankongdi';
  import { useMessage } from '@/hooks/web/useMessage';
  import Icon from '@/components/Icon/Icon.vue';
  import { getAppEnvConfig } from '@/utils/env';
  import ProjectHistory from '@/components/EarlyWarning/InfoModal/ProjectHistoty/index.vue'
  import { ProjectSupervise } from '@/api/earlywarning/index'
  import dayjs from 'dayjs';
  const { createMessage } = useMessage();
  const { VITE_GLOB_INFO_IMAGE_URL } = getAppEnvConfig();
  const MapboxComponent = ref();
  const mapConfig = ref({});
  const props = defineProps(['showInfoData','hiddenInfoMap']);
  const activeKey = ref('1');
  const geomsList = ref();
  const imageList = ref([]);
  const visible = ref(false)
  const historyId = ref('')
  const allInfoData = ref<any>({})
  console.log('props',props.showInfoData)
  watch(
    () => props.showInfoData,
    () => {
      getConfig({ code: 'mapsetting' }).then((res) => {
        mapConfig.value = JSON.parse(res.codeValue);
      });
      changeTask();
    },
  );
  async function getCaseImgList() {
    imageList.value = await getLoadCaseImgList({ caseid: props.showInfoData.id,category:'违法用地' });
    MapboxComponent.value.handlerLoadPictureAzimuth(imageList.value);
  }

  function handlerDealFileName(path) {
    const regex = /([^/\\]+)(?=\.[^/\\]*$|$)/;
    const matchStr = path.match(regex);
    if (matchStr?.length) {
      return matchStr[0];
    }
  }

  function handlerPreviewImage(index, url) {
    const regex = /([^/\\]+)(?=\.[^/\\]*$|$)/;
    const match = url.match(regex);
    if (match) {
      MapboxComponent.value.handlerCurrentImageChange(match[1]);
    }
  }

  const isInitImageLisener = ref<Boolean>(false);
  // 监听预览图片地址变化进行箭头切换
  function handlerImageChange(e): void {
    isInitImageLisener.value = false;
    if (e && !isInitImageLisener.value) {
      setTimeout(function () {
        const targetNode = document.getElementsByClassName('ant-image-preview-img');
        targetNode?.forEach((node,index)=>{
          let imageObserver = new MutationObserver((mutationsList)=>{
            for(const mutation of mutationsList){
              if (node.getAttribute(mutation.attributeName).match('http')){
                handlerPreviewImage(0, node.getAttribute(mutation.attributeName));
              }
            }
          })
          const config = { attributes: true };
          imageObserver.observe(node, config);
          isInitImageLisener.value = true;
        })
      }, 250);
    }
  }

  onBeforeMount(() => {
    let params = {
      ProjectId: props.showInfoData.id,
      IsLishi: 0,
      page:1,
      limit:1,
    }
    let rcData = {}
    ProjectSupervise(params).then(res => {
      if(res.total > 0){
        rcData = res.items[0]
      }
    }).finally(() =>{
      allInfoData.value = {...props.showInfoData, ...rcData}
    })
  });

  const wjzp_kgList = computed(() => {
    return allInfoData.value.wjzp_kg ? allInfoData.value.wjzp_kg.split(',') : [];
  });
  const njzp_kgList = computed(() => {
    return allInfoData.value.njzp_kg ? allInfoData.value.njzp_kg.split(',') : [];
  });
  const fujian_kgList = computed(() => {
    return allInfoData.value.fujian_kg ? allInfoData.value.fujian_kg.split(',') : [];
  });
  const wjzp_kgzgList = computed(() => {
    return allInfoData.value.wjzp_kgzg ? allInfoData.value.wjzp_kgzg.split(',') : [];
  });
  const njzp_kgzgList = computed(() => {
    return allInfoData.value.njzp_kgzg ? allInfoData.value.njzp_kgzg.split(',') : [];
  });
  const fujian_kgzgList = computed(() => {
    return allInfoData.value.fujian_kgzg ? allInfoData.value.fujian_kgzg.split(',') : [];
  });
  const wjzp_jzList = computed(() => {
    return allInfoData.value.wjzp_jz ? allInfoData.value.wjzp_jz.split(',') : [];
  });
  const njzp_jzList = computed(() => {
    return allInfoData.value.njzp_jz ? allInfoData.value.njzp_jz.split(',') : [];
  });
  const fujian_jzList = computed(() => {
    return allInfoData.value.fujian_jz ? allInfoData.value.fujian_jz.split(',') : [];
  });
  const wjzp_jzzgList = computed(() => {
    return allInfoData.value.wjzp_jzzg ? allInfoData.value.wjzp_jzzg.split(',') : [];
  });
  const njzp_jzzgList = computed(() => {
    return allInfoData.value.njzp_jzzg ? allInfoData.value.njzp_jzzg.split(',') : [];
  });
  const fujian_jzzgList = computed(() => {
    return allInfoData.value.fujian_jzzg ? allInfoData.value.fujian_jzzg.split(',') : [];
  });
  const wjzp_wgList = computed(() => {
    return allInfoData.value.wjzp_wg ? allInfoData.value.wjzp_wg.split(',') : [];
  });
  const njzp_wgList = computed(() => {
    return allInfoData.value.njzp_wg ? allInfoData.value.njzp_wg.split(',') : [];
  });
  const fujian_wgList = computed(() => {
    return allInfoData.value.fujian_wg ? allInfoData.value.fujian_wg.split(',') : [];
  });
  const wjzp_wgzgList = computed(() => {
    return allInfoData.value.wjzp_wgzg ? allInfoData.value.wjzp_wgzg.split(',') : [];
  });
  const njzp_wgzgList = computed(() => {
    return allInfoData.value.njzp_wgzg ? allInfoData.value.njzp_wgzg.split(',') : [];
  });
  const fujian_wgzgList = computed(() => {
    return allInfoData.value.fujian_wgzg ? allInfoData.value.fujian_wgzg.split(',') : [];
  });
  const wjzp_rcList = computed(() => {
    return allInfoData.value.wjzp_rc ? allInfoData.value.wjzp_rc.split(',') : [];
  });
  const njzp_rcList = computed(() => {
    return allInfoData.value.njzp_rc ? allInfoData.value.njzp_rc.split(',') : [];
  });
  const fujian_rcList = computed(() => {
    return allInfoData.value.fujian_rc ? allInfoData.value.fujian_rc.split(',') : [];
  });
  const wjzp_rczgList = computed(() => {
    return allInfoData.value.wjzp_rczg ? allInfoData.value.wjzp_rczg.split(',') : [];
  });
  const njzp_rczgList = computed(() => {
    return allInfoData.value.njzp_rczg ? allInfoData.value.njzp_rczg.split(',') : [];
  });
  const fujian_rczgList = computed(() => {
    return allInfoData.value.fujian_rczg ? allInfoData.value.fujian_rczg.split(',') : [];
  });
  const wjzp_rcfhList = computed(() => {
    return allInfoData.value.wjzp_rcfh ? allInfoData.value.wjzp_rcfh.split(',') : [];
  });
  const njzp_rcfhList = computed(() => {
    return allInfoData.value.njzp_rcfh ? allInfoData.value.njzp_rcfh.split(',') : [];
  });
  const fujian_rcfhList = computed(() => {
    return allInfoData.value.fujian_rcfh ? allInfoData.value.fujian_rcfh.split(',') : [];
  });
  function onMapboxLoad() {
    changeTask();
  }
  async function changeTask() {
    let getGeomPrams = {
      TableName: 'drone_shp_data ',
      FieldName: 'gid',
      FieldValue: props.showInfoData.geomid?.split(','),
      page: 1,
      limit: 999,
      key: null,
    };
    if (props.showInfoData.geomid) {
      getGeom(getGeomPrams).then((res) => {
        let geoms = [];
        if (res) {
          if (res.items?.length > 0) {
            res.items.forEach((item, index) => {
              let geom = {
                key: item.gid,
                mapgeom: item.geometry,
              };
              geoms.push(geom);
              geomsList.value = geoms;
            });
          }
          // MapboxComponent.value.handlerDraw(status,mapgemoList.value, false);
          MapboxComponent.value.handlerDraw('Details', geoms, false);
        } else {
          geomsList.value = null;
          createMessage.error('当前数据没有图斑！');
        }
      });
    } else {
      createMessage.error('当前数据没有图斑！');
    }
  }

  import FilePreview from '@/components/Upload/src/components/FilePreview.vue';

  const previewFileModalVisible = ref(false);
  const previewFileUrl = ref("");

  const hanlderPreViewFile = (url)=>{
    previewFileUrl.value = `${VITE_GLOB_INFO_IMAGE_URL}/${url}`;
    previewFileModalVisible.value = true;
  }

  const handlerDownloadFle = ()=>{
    window.open(previewFileUrl.value, 'mozillaTab');
  }

  const handleCancelPreviewFile = ()=>{
    previewFileModalVisible.value = false;
  }
  
  const getContainer = () => {
    return document.getElementById('info-container');
  };
  const dataProcessing = (value) => {
    if (!value) {
      return '0';
    }
    if (value.indexOf('.') == -1) {
      return value;
    } else {
      if (value.split('.')[1].length <= 2) {
        return value;
      }
      let resultString = value.replace('㎡', '');
      return Number(resultString).toFixed(2);
    }
  };
  const showImage = (url) => {
    if (url.indexOf('.png') !== -1 || url.indexOf('.jpg') !== -1 || url.indexOf('.jpeg') !== -1) {
      return true;
    } else {
      return false;
    }
  };
  const showHistoryList = () => {
    historyId.value = props.showInfoData.id
    visible.value = true
  }
</script>

<style lang="scss" scoped>
  .image-div {
    min-width: 340px;
    max-height: 220px;
    overflow: auto;
  }
  .detail-container {
    width: 100%;
    height: calc(100vh - 120px);
    display: flex;
    padding: 0px 20px;
  }
  .detail-container::after {
    content: '';
    display: block;
    clear: both;
    height: 0;
    visibility: none;
  }
  .map-container {
    float: left;
    width: 45vw;
    height: calc(100vh - 100px);
    margin-right: 20px;
  }
  :deep(.ant-image) {
    margin-right: 10px;
    margin-bottom: 10px;
  }
  :deep(.ant-image-preview-switch-left) {
    position: absolute;
  }
  :deep(.ant-image-preview-switch-right) {
    position: absolute;
  }
  .info-container {
    // float: left;
    position: relative;
    flex: 1;
    :deep(.ant-image-preview-wrap) {
      position: absolute;
    }
    :deep(.ant-image-preview-mask) {
      position: absolute;
    }
    :deep(.ant-image-preview-operations-wrapper) {
      height: 100%;
      position: absolute;
      .ant-image-preview-operations {
        position: absolute;
        top: 0;
        width: 100%;
        .ant-image-preview-operations-operation {
          // flex:1;
        }
      }
      .ant-image-preview-operations-operation:nth-last-child(1) {
        display: none;
      }
      .ant-image-preview-operations-operation:nth-last-child(2) {
        display: none;
      }
    }
  }
  ::v-deep .ant-tabs .ant-tabs-content-holder {
    overflow: auto;
    height: 80vh;
    overflow: auto;
    padding-right: 10px;
  }
</style>
