Newer
Older
Nanping_sponge_HHDP / src / views / Sponge_screen / HaiMianScreen / index.vue
@liyingjing liyingjing on 25 Oct 2023 5 KB 海绵大屏
<template>
  <div id="index">
    <div id="screenHeader">
      <!-- 标题 -->
      <div class="TitleFont">海绵项目管理系统</div>
      <!-- 菜单 -->
      <div class="MenuBox">
        <div
          v-for="item in AllData.MenuData"
          :key="item.key"
          class="MenuList"
          :class="{ MenuActive: AllData.ActiveKey == item.key }"
          @click="MenuClick(item)"
        >
          {{ item.name }}
        </div>
      </div>
      <!-- 右侧信息 -->
    </div>
    <div id="screenBody">
      <!-- 地图 -->
      <Map></Map>
      <!-- 智慧海绵 -->
      <ZHHM v-if="AllData.ActiveKey == 0"></ZHHM>
      <!-- 工程评价 -->
      <GCPJ v-if="AllData.ActiveKey == 1" :key="isKEy"></GCPJ>
      <!-- 监测评价 -->
      <JCPJ v-if="AllData.ActiveKey == 2"></JCPJ>
      <!-- 绩效考核 -->
      <JXKH v-if="AllData.ActiveKey == 3"></JXKH>
      <!-- 图例 -->
      <TuLi v-show="AllData.ActiveKey == 2"></TuLi>
      <!-- 综合弹窗 -->
      <el-dialog
        class="pmpSitNewDialog"
        v-model="AllData.GG_dialogVisible"
        :title="AllData.pmpSitNewDialogTitle"
        width="1400px"
        :append-to-body="true"
        :destroy-on-close="true"
        :close-on-press-escape="false"
      >
        <DialogTabs
          :dataID="AllData.getSiteId"
          :SiteNo="AllData.SiteNo"
          :comIDs="AllData.comIDs"
          :customComponents="AllData.customData"
          :RefName="AllData.RefName"
        ></DialogTabs>
      </el-dialog>
    </div>
  </div>
</template>

<script setup>
import { ref, reactive, toRefs, onMounted, markRaw } from "vue";
import bus from "@/bus";
// 引入地图
import Map from "./../Map";
// 引入专题图组件
import ZHHM from "./../components/zhiHuiHaiMian";
import GCPJ from "./../components/gongChengPingJia";
import JCPJ from "./../components/jianCePingJia";
import JXKH from "./../components/jiXIaoKaoHe";
// 引用图例
import TuLi from "./../TuLi/index.vue";
// 引入弹窗
import DialogTabs from "./../DialogTabs/dialogTabs";
const isKEy = ref(0);
const AllData = reactive({
  // 顶部专题切换
  MenuData: [
    // {
    //   name: "智慧海绵",
    //   key: 0,
    // },
    {
      name: "工程评价",
      key: 1,
    },
    {
      name: "监测评价",
      key: 2,
    },
    {
      name: "绩效考核",
      key: 3,
    },
  ],
  ActiveKey: 1,
  // 公共弹窗数据项
  GG_dialogVisible: false,
  getSiteId: "",
  SiteNo: "",
  comIDs: ["zhfx", "sjycfx", "zdywpd", "gzjlxsbfx", "spjk"],
  customData: [],
  RefName: "",
  pmpSitNewDialogTitle: "公共弹窗标题",
});
const MenuClick = (item) => {
  console.log(item, "item");
  AllData.ActiveKey = item.key;
  // isKEy.value++;
  window.newfiberMap.removeByIds();
  bus.off("mapClick")
};
onMounted(() => {
  // mitt事件监听
  bus.on("OpenDialog_GongGong", (val) => {
    AllData.GG_dialogVisible = true;
    console.log(`--`, val);
    AllData.getSiteId = val.id;
    AllData.SiteNo = val.stCode;
    AllData.pmpSitNewDialogTitle = val.stName;
  });
});
</script>

<style scoped lang="scss">
#index {
  width: 100%;
  height: 100%;
  background: #010e22;

  #screenHeader {
    width: 100%;
    height: 80px;
    background: url("@/assets/images/Sponge_screen/HeaderBG.png") 100% 100%;
    position: relative;

    .TitleFont {
      position: absolute;
      left: 0;
      top: 0;
      font-size: 36px;
      font-family: "PangMenZhengDao";
      font-weight: 400;
      font-style: italic;
      color: #eaeaff;
      height: 80px;
      line-height: 80px;
      width: 400px;
      text-align: center;
    }
    .MenuBox {
      position: absolute;
      left: 500px;
      top: 0;
      height: 80px;
      font-size: 18px;
      font-family: Source Han Sans CN;
      font-weight: 500;
      color: #a4bfd9;
      width: 800px;
      padding: 20px 0;

      .MenuList {
        float: left;
        margin-left: 50px;
        width: 120px;
        height: 42px;
        line-height: 40px;
        text-align: center;
        cursor: pointer;
      }
      .MenuActive {
        width: 120px;
        height: 42px;
        line-height: 40px;
        font-size: 18px;
        font-family: Source Han Sans CN;
        font-weight: 500;
        color: #ffffff;
        box-sizing: border-box;
        background: #051734;
        border: 1px solid #2593ff;
        border-radius: 20px;
        position: relative;

        &:after {
          content: "";
          position: absolute;
          width: 40px;
          height: 2px;
          background: #ffc901;
          border-radius: 1px;
          bottom: 4px;
          left: 50%;
          margin-left: -20px;
        }
      }
    }
  }

  #screenBody {
    width: 100%;
    height: calc(100% - 80px);
    position: relative;
  }
}
</style>
<!-- 公共弹窗样式为全局 -->
<style lang="scss">
.pmpSitNewDialog {
  height: 830px;

  .el-dialog__header {
    height: 46px;
    border-bottom: none;
    padding: 10px 0px;
    width: 100%;
    background: linear-gradient(0deg, #021f56 0%, #042d7b 100%);
    position: relative;

    .el-dialog__title {
      font-size: 18px;
      font-family: Source Han Sans CN;
      font-weight: 500;
      color: #ffffff;
      margin-left: 20px;
      &:after {
        content: "";
        width: 7px;
        height: 46px;
        background: linear-gradient(90deg, #00b4ff 0%, #004ccb 100%);
        position: absolute;
        left: 0;
        top: 0;
      }
    }

    .el-dialog__headerbtn {
      width: 46px;
      height: 46px;
      top: 2px;
      .el-dialog__close {
        color: #1096db;
        font-size: 20px;
      }
    }

    &::after {
      display: none;
    }
  }

  .el-dialog__body {
    background: #021534;
    padding: 0px 24px 24px 10px;
    height: calc(100% - 46px);
    width: 100%;
  }
}
</style>