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/menu/bottom-menu.vue   |   47 ++++++---
 static/config.json                    |   12 +-
 src/components/right/right-bottom.vue |   24 ----
 src/assets/js/rpc.js                  |   42 ++++----
 src/components/map/viewer1.vue        |   12 +-
 src/components/map/viewer.vue         |   43 --------
 static/conf.js                        |    1 
 static/layers.json                    |    6 
 static/layers2.json                   |    4 
 src/components/index.vue              |   81 ++++++++++++++++
 src/components/menu/leftMenu.vue      |   25 +++-
 src/utils/searchQY.js                 |    1 
 12 files changed, 173 insertions(+), 125 deletions(-)

diff --git a/src/assets/js/rpc.js b/src/assets/js/rpc.js
index 7b1e509..5f5b271 100644
--- a/src/assets/js/rpc.js
+++ b/src/assets/js/rpc.js
@@ -30,28 +30,28 @@
 
     //鍏抽敭瀛楁煡璇�
     getFuzzyQuery(res) {
-        // if (res.message.indexOf('濂旈┌') > -1) {
-        //     store.queryLayer.val = '濂旈┌鍏徃'
+        if (res.message.indexOf('濂旈┌') > -1) {
+            store.queryLayer.val = '濂旈┌鍏徃'
+        }
+        // else if (res.message.indexOf('浜笢') > -1) {
+        //     store.queryLayer.val = '浜笢'
+        // } 
+        // else if (res.message.indexOf('灏忕背') > -1) {
+        //     store.queryLayer.val = '灏忕背'
         // }
-        // // else if (res.message.indexOf('浜笢') > -1) {
-        // //     store.queryLayer.val = '浜笢'
-        // // } 
-        // // else if (res.message.indexOf('灏忕背') > -1) {
-        // //     store.queryLayer.val = '灏忕背'
-        // // }
-        // else if (res.message.indexOf('鍗氬ぇ') > -1) {
-        //     store.queryLayer.val = '鍗氬ぇ澶у帵'
-        // } else if (res.message.indexOf('淇℃伅鎶�鏈�') > -1) {
-        //     store.queryLayer.val = '淇℃伅鎶�鏈�'
-        // } else if (res.message.indexOf('鐢熺墿鍖昏嵂') > -1) {
-        //     store.queryLayer.val = '鐢熺墿鍖昏嵂'
-        // } else if (res.message.indexOf('鏈哄櫒浜�') > -1) {
-        //     store.queryLayer.val = '鏈哄櫒浜�'
-        // } else if (res.message.indexOf('姹借溅') > -1) {
-        //     store.queryLayer.val = '姹借溅'
-        // } else {
-        //     store.queryLayer.val = res.message;
-        // }
+        else if (res.message.indexOf('鍗氬ぇ') > -1) {
+            store.queryLayer.val = '鍗氬ぇ澶у帵'
+        } else if (res.message.indexOf('淇℃伅鎶�鏈�') > -1) {
+            store.queryLayer.val = '淇℃伅鎶�鏈�'
+        } else if (res.message.indexOf('鐢熺墿鍖昏嵂') > -1) {
+            store.queryLayer.val = '鐢熺墿鍖昏嵂'
+        } else if (res.message.indexOf('鏈哄櫒浜�') > -1) {
+            store.queryLayer.val = '鏈哄櫒浜�'
+        } else if (res.message.indexOf('姹借溅') > -1) {
+            store.queryLayer.val = '姹借溅'
+        } else {
+            store.queryLayer.val = res.message;
+        }
 
         this.setClearAllMsg();
         if (!res.baidu_keys) return;
diff --git a/src/components/index.vue b/src/components/index.vue
index f5c720b..1b016b9 100644
--- a/src/components/index.vue
+++ b/src/components/index.vue
@@ -42,6 +42,29 @@
       :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="{
@@ -90,6 +113,7 @@
 import { mapState, mapMutations } from "vuex";
 import vueEvents from "@/utils/vueEvent.js";
 import leftMenu from "@/components/menu/leftMenu.vue";
+import mapMsg from "@/assets/js/mapMsg";
 
 export default {
   name: "index",
@@ -122,11 +146,15 @@
       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) + "%";
@@ -142,6 +170,16 @@
     },
     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: {
@@ -159,6 +197,10 @@
   },
   methods: {
     ...mapMutations(["setLayerTreeTwoScreen"]),
+    showTextArea() {
+      this.$store.commit("showTextArea", !this.$store.state.isShowTextArea);
+    },
+
     setMessgae(show, msg) {
       this.tooltipShow = show;
       this.tooltipInfo = msg ? msg : "";
@@ -304,6 +346,43 @@
   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;
diff --git a/src/components/map/viewer.vue b/src/components/map/viewer.vue
index bd20cd5..7118128 100644
--- a/src/components/map/viewer.vue
+++ b/src/components/map/viewer.vue
@@ -1,33 +1,7 @@
 <template>
   <div>
     <div id="sdkContainer"></div>
-    <!-- <iframe
-      id="digital_page"
-      v-if="isShowDigitalPerson"
-      src="https://iframetester.com/"
-      height="450"
-      width="600"
-      frameborder="no"
-      border="0"
-      marginwidth="0"
-      marginheight="0"
-      scrolling="no"
-      allowtransparency="yes"
-    ></iframe> -->
-    <iframe
-      v-if="isShowDigitalPerson"
-      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 class="listBox" v-show="viewer1Show && !isLand">
       <ul id="viewer_lsyx">
@@ -121,8 +95,6 @@
       scale: "1",
       offset: "0%",
       radio: 3,
-      digitalHuman: null,
-      digitalSize: {},
       arr: [
         2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
         2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,
@@ -131,9 +103,7 @@
   },
   computed: {
     ...mapState(["viewer1Show", "isLand", "layerTreeTwoScreen", "cesiumInit"]),
-    isShowDigitalPerson() {
-      return this.$store.state.isShowDigitalPerson;
-    },
+   
   },
   watch: {
     viewer1Show(newvalue, oldvalue) {
@@ -154,8 +124,6 @@
     },
   },
   mounted() {
-    this.digitalHuman = window.digitalHumanURL;
-    this.digitalSize = window.digitalSize;
     let pathName = window.location.pathname.split("/");
     let StaticFileBaseUrl;
     if (pathName.length != 2) {
@@ -644,12 +612,7 @@
   border-radius: 10px;
   /* box-shadow: 0px 0px 5px 3px #fff; */
 }
-#digital_page {
-  position: absolute;
-  left: 0;
-  bottom: 120px;
-  z-index: 10;
-}
+
 /* #switchImagerLayer:before {
   content: "";
   position: absolute;
diff --git a/src/components/map/viewer1.vue b/src/components/map/viewer1.vue
index 9686e7f..2621191 100644
--- a/src/components/map/viewer1.vue
+++ b/src/components/map/viewer1.vue
@@ -553,12 +553,12 @@
             }
             axios
               .get(
-                "http://10.10.4.116:8089/cs/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" +
+                `http://10.10.4.116:8089/cs/geowinmap_xncs/ds?lng=${p.lon}&lat=${p.lat}`
                 // "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" +
-                  p.lon +
-                  "&lat=" +
-                  p.lat +
-                  "&geom=true&requesttype=json"
+                // p.lon +
+                // "&lat=" +
+                // p.lat +
+                // "&geom=true&requesttype=json"
               )
               .then((response) => {
                 let center = { lon: 0, lat: 0 };
@@ -603,7 +603,7 @@
                   axios
                     .get(
                       "http://10.10.4.116:8089/cs/poisearch/guihuacon/getInfo?ydbm=" +
-                      // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" +
+                        // "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" +
                         response.data.NO
                     )
                     .then(
diff --git a/src/components/menu/bottom-menu.vue b/src/components/menu/bottom-menu.vue
index f86c871..ce52abf 100644
--- a/src/components/menu/bottom-menu.vue
+++ b/src/components/menu/bottom-menu.vue
@@ -141,13 +141,23 @@
         </el-form-item>
       </el-form>
     </div>
-    <div class="textAreaBox" v-if="isShowTextArea">
-      <el-input
-        v-model="input"
-        placeholder="璇疯緭鍏ュ唴瀹�"
-        clearable
-        @keyup.enter.native="sendCommand($event)"
-      ></el-input>
+    <!-- 鏁扮粍浜烘枃瀛楄緭鍏ュ脊妗� -->
+    <div class="SZRtextAreaBox" v-if="isShowTextArea">
+      <el-row :gutter="10">
+        <el-col :span="19">
+          <el-input
+            v-model="input"
+            placeholder="璇疯緭鍏ュ唴瀹�"
+            clearable
+            @keyup.enter.native="sendCommand($event)"
+          ></el-input>
+        </el-col>
+        <el-col :span="4">
+          <el-button type="primary" @click="sendCommand('click')"
+            >鎼滅储</el-button
+          >
+        </el-col>
+      </el-row>
     </div>
   </div>
 </template>
@@ -165,22 +175,24 @@
   display: flex;
   justify-content: space-between;
 }
-.textAreaBox {
+.SZRtextAreaBox {
   background: rgba(5, 39, 126, 0.7);
   padding: 10px;
-  /* width: 375px; */
+  width: 375px;
   position: absolute;
+  /* display: flex; */
+  /* justify-content: space-around; */
   bottom: 165px;
   color: #fff;
   left: 50%;
   transform: translateX(-50%);
   z-index: 99999;
 }
-.textAreaBox .el-form-item {
+.SZRtextAreaBox .el-form-item {
   margin: 0;
 }
-.textAreaBox .el-input {
-  width: 300px;
+.SZRtextAreaBox .el-input {
+  /* width: 300px; */
 }
 .specialTool .bottomwrapper:nth-of-type(3) {
   /* background: red; */
@@ -527,10 +539,13 @@
       }
     },
     sendCommand(event) {
-      mapMsg.testMsg(event.target.value);
-
-      // 闃绘榛樿琛屼负锛堝鏋滈渶瑕佺殑璇濓級
-      event.preventDefault();
+      // if (event == "click") {
+      mapMsg.testMsg(this.input);
+      // } else {
+      // // 闃绘榛樿琛屼负锛堝鏋滈渶瑕佺殑璇濓級
+      // mapMsg.testMsg(this.input);
+      // event.preventDefault();
+      // }
     },
     handleCommand(command) {
       switch (command) {
diff --git a/src/components/menu/leftMenu.vue b/src/components/menu/leftMenu.vue
index 006dbdd..fa717a9 100644
--- a/src/components/menu/leftMenu.vue
+++ b/src/components/menu/leftMenu.vue
@@ -1,13 +1,14 @@
 <template>
   <div class="menuBox">
-    <div v-if="list.length == 0 && val == null"></div>
-    <div class="boxCntent" v-else-if="list.length == 0">
-      {{ val }} 鏁版嵁姝e湪琛ュ厖涓�
-      <!-- <div class="close" @click.stop="closelist"></div> -->
+    <div class="" v-if="list.length == 0 && val == null"></div>
+    <div class="boxContent" v-else-if="list.length == 0">
+      <div class="close" @click.stop="closelist"></div>
+      {{ val }} 
+      鏆傛湭鎼滅储鍒扮浉鍏虫暟鎹�
     </div>
-    <ul class="boxCntent" v-if="list.length != 0">
-      <!-- <div class="close" @click.stop="closelist"></div> -->
-      <div>
+    <ul class="boxContent" v-if="list.length != 0">
+      <div class="close" @click.stop="closelist"></div>
+      <div class="listContent">
         <li v-for="(item, index) in list" :key="index">
           <div>
             {{ item.name }}
@@ -76,14 +77,20 @@
   background-size: 100% 100%;
   background-image: url("../poplayer/img/close.png");
   cursor: pointer;
+  margin-top: 5px;
+  margin-right: 5px;
 }
-.menuBox .boxCntent {
-  margin: 1%;
+.menuBox .boxContent {
+  width: 100%;
   display: flex;
   flex-direction: column;
   align-items: flex-end;
 }
+.listContent {
+  width: 100%;
+}
 .menuBox li {
+  /* width: 100%; */
   padding: 10px;
   border: 1px solid gray;
   margin-top: 2px;
diff --git a/src/components/right/right-bottom.vue b/src/components/right/right-bottom.vue
index 7572c34..79dee25 100644
--- a/src/components/right/right-bottom.vue
+++ b/src/components/right/right-bottom.vue
@@ -22,23 +22,6 @@
         <el-tooltip
           class="item"
           effect="dark"
-          content="鏂囨湰鎿嶄綔"
-          placement="left"
-          popper-class="item_tooltip"
-        >
-          <div
-            class="legend-bg"
-            @click="showTextArea"
-            :class="{ active: isShowTA }"
-          >
-            <img class="legendImg" src="@/assets/img/new/鏂囨湰杈撳叆.png" />
-          </div>
-        </el-tooltip>
-      </div>
-      <div class="mapTool">
-        <el-tooltip
-          class="item"
-          effect="dark"
           content="浜﹀簞鏂板尯鑼冨洿"
           placement="left"
           popper-class="item_tooltip"
@@ -398,10 +381,9 @@
     showDigitalPerson() {
       this.isShowDP = !this.isShowDP;
       this.$store.commit("showDigitalPerson", this.isShowDP);
-    },
-    showTextArea() {
-      this.isShowTA = !this.isShowTA;
-      this.$store.commit("showTextArea", this.isShowTA);
+      if (!this.isShowDP) {
+        this.$store.commit("showTextArea", false);
+      }
     },
     maskingOut() {
       if (!window.maskinglayer) {
diff --git a/src/utils/searchQY.js b/src/utils/searchQY.js
index 83d36ec..303c06c 100644
--- a/src/utils/searchQY.js
+++ b/src/utils/searchQY.js
@@ -5,6 +5,7 @@
 
 // 浼佷笟鎺ュ彛8086
 const request = axios.create({
+    // baseURL: 'https://skyzt.bda.gov.cn/BEApi/', // api鐨刡ase_url
     baseURL: 'http://10.10.4.116:8086/', // api鐨刡ase_url
     timeout: 35000, // 璇锋眰瓒呮椂鏃堕棿
     headers: {
diff --git a/static/conf.js b/static/conf.js
index e2153df..be0a05d 100644
--- a/static/conf.js
+++ b/static/conf.js
@@ -1,4 +1,5 @@
 window.GIS_IP = 'http://10.10.4.116:8070'
+// window.digitalHumanURL = "https://example.org"
 window.digitalHumanURL = "https://szr.bda.gov.cn/human/#/yizhuang/b1401669626c4b1faf7a9940be866b2a?model=yingshang"
 window.digitalSize = {
   width: "600",
diff --git a/static/config.json b/static/config.json
index de1e9d4..7615f48 100644
--- a/static/config.json
+++ b/static/config.json
@@ -1,10 +1,10 @@
 锘縶
-  "username": "admin",
-  "password": "admin",
+  "username": "",
+  "password": "",
   "min_view_height": 40,
-  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6IjEyMyJ9.K8V0sPO_Y1CUunw4vGe6S899lDpsPixZ0b70KhP6O5M",
-  "traffic": "http://www.map.zj.cn:8899/geoserver/zjplatform/wms",
-  "poi_search": "http://223.4.72.70:3866/Smartearth/sw/search/",
-  "space_query": "http://localhost:8099/query/list",
+  "token": "",
+  "traffic": "",
+  "poi_search": "",
+  "space_query": "",
   "sxtGeojsonUrl":"./static/geojson/sxt.geojson"
 }
\ No newline at end of file
diff --git a/static/layers.json b/static/layers.json
index d272fa2..cbb070b 100644
--- a/static/layers.json
+++ b/static/layers.json
@@ -4576,10 +4576,10 @@
                                     "rename": false
                                 },
                                 {
-                                    "id": "鍖椾含22000褰卞儚",
+                                    "id": "鍖椾含2000褰卞儚",
                                     "name": "鍖椾含2000褰卞儚",
                                     "sourceType": "BJ2000",
-                                    "urls": "http://172.26.64.84/service/map/img?year=&type=Sate&z={z}&x={x}&y={y}&ak=945feed57ba34d23a999be2ae4d9259a",
+                                    "urls": "http://10.10.4.116:8085/yzAdapter/map/img?year=&type=Sate&z={z}&x={x}&y={y}",
                                     "checked": false,
                                     "rename": false
                                 },
@@ -4587,7 +4587,7 @@
                                     "id": "鍖椾含2000鐭㈤噺",
                                     "name": "鍖椾含2000鐭㈤噺",
                                     "sourceType": "BJ2000",
-                                    "urls": "http://10.10.4.116:8080/service/map/img?year=&type=Shiliang&z={z}&x={x}&y={y}&ak=945feed57ba34d23a999be2ae4d9259a",
+                                    "urls": "http://10.10.4.116:8085/yzAdapter/map/img?year=&type=Shiliang&z={z}&x={x}&y={y}",
                                     "checked": false,
                                     "rename": false
                                 }
diff --git a/static/layers2.json b/static/layers2.json
index cf99fd0..43fd0d0 100644
--- a/static/layers2.json
+++ b/static/layers2.json
@@ -60,7 +60,7 @@
                             "id": "鍖椾含2000褰卞儚",
                             "name": "鍖椾含2000褰卞儚",
                             "sourceType": "BJ2000",
-                            "urls": "http://172.26.64.84/service/map/img?year=&type=Sate&z={z}&x={x}&y={y}&ak=945feed57ba34d23a999be2ae4d9259a",
+                            "urls": "http://10.10.4.116:8085/yzAdapter/map/img?year=&type=Sate&z={z}&x={x}&y={y}",
                             "checked": false,
                             "rename": false
                         },
@@ -68,7 +68,7 @@
                             "id": "鍖椾含2000鐭㈤噺",
                             "name": "鍖椾含2000鐭㈤噺",
                             "sourceType": "BJ2000",
-                            "urls": "http://172.26.64.84/service/map/img?year=&type=Shiliang&z={z}&x={x}&y={y}&ak=945feed57ba34d23a999be2ae4d9259a",
+                            "urls": "http://10.10.4.116:8085/yzAdapter/map/img?year=&type=Shiliang&z={z}&x={x}&y={y}",
                             "checked": false,
                             "rename": false
                         }

--
Gitblit v1.9.3