ZhangXianQiang
2024-03-05 6c757d5dab619fd759854778978270f0eecaec93
src/views/daoAnOffice/index.vue
@@ -1,10 +1,9 @@
<script setup lang="ts">
<script setup>
import ItemWrap from "@/components/item-wrap";
// import MenuHeader from "@/components/menu-header.vue";
import LeftTop from "./left-top.vue";
import LeftCenter from "./left-center.vue";
import LeftBottom from "./left-bottom.vue";
import CenterMap from "./center-map.vue";
import CenterBottom from "./center-bottom.vue";
import RightTop from "./right-top.vue";
import RightTop1 from "./right-top2.vue";
@@ -18,7 +17,14 @@
import Danger from './right/danger/index.vue';
import Publicize from './right/publicize/index.vue';
import Chartgd from "@/views/index/chartgd.vue";
import {ref} from "vue";
// 居中map
import CenterMap from "./center-map.vue";
// 控制地图显示
import { mapState } from '@/stores/map.js';
import { ref } from "vue";
const config = {
  header: ['<span style="color:#42C3E8;font-size: 16px">排名</span>', '<span style="color:#42C3E8;font-size: 16px">行政区划</span>', '<span style="color:#42C3E8;font-size: 16px">数值</span>'],
@@ -77,15 +83,17 @@
  title: '外协溯源被查获数',
  length: 9,
}]
const dtFig=ref(0)
const handlechan=()=>{
const mapChange = () => {
  mapState.value = !mapState.value;
}
</script>
<template>
  <div class="index-box">
<!--    <chartgd @changeDt="handlechan"  v-if="dtFig ==0" class="gddt"></chartgd>-->
    <!--    <chartgd @changeDt="handlechan"  v-if="dtFig ==0" class="gddt"></chartgd>-->
    <div class="contetn_left">
      <ItemWrap class="contetn_left-top contetn_lr-item" title="近3年交通事故指数">
        <LeftTop />
@@ -105,8 +113,9 @@
      </div>
    </div>
    <div class="contetn_center">
      <CenterMap class="contetn_center_top" title="设备分布图" />
    <div class="contetn_center" v-if="mapState">
      <!-- echart地图 -->
      <CenterMap class="contetn_center_top" />
    </div>
@@ -122,6 +131,14 @@
        <div class="right_wrapper_content">
          <Publicize />
        </div>
      </div>
    </div>
    <!-- 切换地图按钮 -->
    <div class="map-change-button" @click="mapChange">
      <div class="button-title">地图切换</div>
      <div class="button-img">
        <img src="@/assets/img/dtqh.png" alt="">
      </div>
    </div>
@@ -250,17 +267,33 @@
</template>
<style scoped lang="scss">
.gddt{
.map-change-button {
  width: 94px;
  position: absolute;
  bottom: 100px;
  left: 2416px;
  font-size: 16px;
  color: #FFFFFF;
  z-index: 99;
  text-align: center;
  cursor: pointer;
  font-family: 'PingFang SC';
}
.gddt {
  position: absolute;
  z-index: 0;
  width: 3840px;
  height: 1080px;
}
.index-box {
  width: 100%;
  display: flex;
  min-height: calc(100% - 64px);
  justify-content: space-between;
  margin-top: -40px;
  padding: 0 22px;
}
//左边 右边 结构一样
@@ -281,6 +314,7 @@
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  position: relative;
  .contetn_center-bottom {
    height: 315px;
@@ -292,11 +326,12 @@
}
.contetn_lr-item_right {
 width: 48%;
  width: 48%;
}
.contetn_lr-item_left {
  width: 50%;
  margin-right: 26px;
}
.contetn_lr-item_contetn {