From 10ecfd0b60442d209d1ab4b749580ffb638d1992 Mon Sep 17 00:00:00 2001
From: lixuliang <lixuliang_hd@126.com>
Date: 星期三, 08 五月 2024 14:44:04 +0800
Subject: [PATCH] 数字人更新

---
 src/components/index.vue |  138 +++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 129 insertions(+), 9 deletions(-)

diff --git a/src/components/index.vue b/src/components/index.vue
index 641ca3b..1b016b9 100644
--- a/src/components/index.vue
+++ b/src/components/index.vue
@@ -1,5 +1,20 @@
 <template>
   <div class="mapViewer">
+    <div class="cacheImage">
+      <img
+        style="display: none"
+        src="@assets/img/new/rightCircle-y.png"
+        alt=""
+      />
+      <img
+        style="display: none"
+        src="@assets/img/new/leftCircle-y.png"
+        alt=""
+      />
+      <img style="display: none" src="@assets/img/new/treeClose-y.png" alt="" />
+      <img style="display: none" src="@assets/img/new/h1.png" alt="" />
+    </div>
+
     <div class="tooltip" :class="{ tooltiphide: !tooltipShow }">
       <span>
         {{ tooltipInfo }}
@@ -11,19 +26,45 @@
           <img class="searchBtn" src="@/assets/img/right/closeinput1.png" />
         </el-button>
       </div>
-      <History />
     </div>
+    <left-menu></left-menu>
+
     <viewer1
       class="mapViewer"
+      :key="switchKey"
       v-if="viewer1Show"
       :style="viewer1Style"
       @mousemove.native="viewer1MouseMove"
     />
     <viewer
       class="mapViewer"
+      ref="mapViewer"
       :style="viewerStyle"
       @mousemove.native="viewerMouseMove"
     />
+    <div v-if="isShowDigitalPerson" class="digital_Box">
+      <div
+        class="textBtn"
+        @click="showTextArea"
+        :class="{ active: isShowTextArea }"
+      >
+        <img class="legendImg" src="@/assets/img/new/鏂囨湰杈撳叆.png" />
+      </div>
+      <iframe
+        id="digital_page"
+        allow="microphone;"
+        :src="digitalHuman"
+        :height="digitalSize.height"
+        :width="digitalSize.width"
+        frameborder="no"
+        border="0"
+        marginwidth="0"
+        marginheight="0"
+        scrolling="no"
+        allowtransparency="yes"
+      ></iframe>
+    </div>
+
     <div
       class="controlPanel"
       :style="{
@@ -45,12 +86,11 @@
         :show-tooltip="false"
         @input="changeAlpha"
       ></el-slider> -->
-
-      <lefttop ref="lefttop" />
       <right ref="Right" />
       <leftpanel ref="Left" />
       <menupanel />
-      <bottommenu />
+      <bottommenu ref="bottommenu" />
+      <signalling v-if="signallingShow"></signalling>
       <setting v-if="showSetting" />
       <qycharts v-if="$store.state.qyEchartsShow" />
     </div>
@@ -61,7 +101,6 @@
 import viewer from "@/components/map/viewer";
 import viewer1 from "@/components/map/viewer1";
 // import left from "@/components/left/left";
-import lefttop from "@/components/left/lefttop";
 import leftpanel from "@/components/left/index";
 import right from "@/components/right/right";
 // import bottom from "@/components/bottom/bottom";
@@ -69,10 +108,12 @@
 import qycharts from "@/components/bottom/qycharts";
 import menupanel from "@/components/menu/index";
 import setting from "@/components/menu/tools/setting";
-
+import signalling from "@/components/menu/signalling";
 import bottommenu from "@/components/menu/bottom-menu";
 import { mapState, mapMutations } from "vuex";
-import History from "@/components/map/history.vue";
+import vueEvents from "@/utils/vueEvent.js";
+import leftMenu from "@/components/menu/leftMenu.vue";
+import mapMsg from "@/assets/js/mapMsg";
 
 export default {
   name: "index",
@@ -82,13 +123,14 @@
     leftpanel,
     right,
     // bottom,
-    lefttop,
     yqfk,
     menupanel,
     bottommenu,
     setting,
     qycharts,
     History,
+    signalling,
+    leftMenu,
   },
   data() {
     return {
@@ -102,22 +144,42 @@
       offset: "0%",
       tooltipInfo: "璇风◢鍚庛�傘�傘��",
       tooltipShow: false,
+      signallingShow: false,
+      switchKey: 0,
+      isShowTA: false,
+      digitalHuman: null,
+      digitalSize: {},
       // viewer1Show: false,
     };
   },
   mounted() {
+    this.digitalHuman = window.digitalHumanURL;
+    this.digitalSize = window.digitalSize;
     let size = this.detectZoom();
     this.scale = (100 / size).toFixed(2);
     this.offset = "-" + ((size - 100) / 2).toFixed(2) + "%";
     this.size = size + "%";
+    vueEvents.$on("queryLayer", (res) => {
+      this.queryShow = res;
+    });
   },
   computed: {
-    ...mapState(["viewer1Show", "yqfk"]),
+    ...mapState(["viewer1Show", "isLand", "yqfk"]),
     showSetting() {
       return this.$store.state.showSetting;
     },
     isShowHistory() {
       return this.$store.state.isShowHistory;
+      F;
+    },
+    isShowDigitalPerson() {
+      return this.$store.state.isShowDigitalPerson;
+    },
+    isShowTextArea() {
+      if (this.$store.state.isShowTextArea) {
+        this.input = "";
+      }
+      return this.$store.state.isShowTextArea;
     },
   },
   watch: {
@@ -135,12 +197,20 @@
   },
   methods: {
     ...mapMutations(["setLayerTreeTwoScreen"]),
+    showTextArea() {
+      this.$store.commit("showTextArea", !this.$store.state.isShowTextArea);
+    },
+
     setMessgae(show, msg) {
       this.tooltipShow = show;
       this.tooltipInfo = msg ? msg : "";
     },
+
     changePwd() {
       console.log(111);
+    },
+    changeMode(mode) {
+      this.$refs.mapViewer.changeMode(mode);
     },
     detectZoom() {
       var ratio = 0,
@@ -240,17 +310,25 @@
       this.$store.commit("showHistory", false);
     },
   },
+  beforeDestroy() {
+    this.$refs.bottommenu.switchMenu(0);
+  },
 };
 </script>
 <style scoped>
+.cacheImage {
+  display: none !important;
+}
 .mapViewer {
   height: 100%;
 }
+
 .userinfo {
   position: absolute;
   z-index: 20;
   top: 10px;
 }
+
 #headlog {
   width: 965px;
   height: 70px;
@@ -259,6 +337,7 @@
   top: 0;
   transform: translate(-50%, 0);
 }
+
 #bottomBar {
   width: 1357px;
   height: 52px;
@@ -267,6 +346,44 @@
   bottom: 0;
   transform: translate(-50%, 0);
 }
+.digital_Box {
+  position: absolute;
+  left: 0;
+  bottom: 120px;
+  z-index: 10;
+}
+.textBtn {
+  background-image: url("~@/assets/img/new/leftCircle.png");
+  background-size: 100%;
+  background-color: transparent;
+  width: 35px;
+  height: 35px;
+  position: absolute;
+  left: 20px;
+  cursor: pointer;
+}
+.textBtn:hover {
+  background-image: url("~@/assets/img/new/leftCircle-y.png");
+}
+.active {
+  background-image: url("~@/assets/img/new/leftCircle-y.png");
+}
+.textBtn img {
+  /* margin-top: 14px;
+  margin-left: 14px; */
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  width: 20px;
+}
+#digital_page {
+  /* position: absolute;
+  left: 0;
+  bottom: 120px;
+  z-index: 10; */
+}
+
 .trigger {
   pointer-events: all;
 }
@@ -308,6 +425,7 @@
   border-radius: 10px;
   padding: 10px 30px;
 }
+
 .hisbox {
   position: absolute;
   z-index: 10000002;
@@ -315,11 +433,13 @@
   height: 100%;
   background-color: #fff;
 }
+
 .btnbox {
   position: absolute;
   z-index: 100000003;
   right: 30px;
 }
+
 .btnbox .el-button {
   padding: 0 !important;
   font-size: 24px;

--
Gitblit v1.9.3