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 | 258 +++++++++++++++++++++++++++++--------------------- 1 files changed, 149 insertions(+), 109 deletions(-) diff --git a/src/components/menu/bottom-menu.vue b/src/components/menu/bottom-menu.vue index 2634a4a..ce52abf 100644 --- a/src/components/menu/bottom-menu.vue +++ b/src/components/menu/bottom-menu.vue @@ -24,40 +24,32 @@ <span> 鍘嗗彶褰卞儚 </span> </div> </div> - <div class="bottomwrapper csbj"> - <el-dropdown trigger="click" @command="handleCommand"> - <div class="imgbox"> - <img src="@assets/img/new/chengshibujian.png" alt="" /> - </div> - <div class="textbox"> - <span> 缁煎悎鎵╁睍 </span> - </div> - <el-dropdown-menu - slot="dropdown" - :append-to-body="false" - class="popper-dropdown" - > - <el-dropdown-item command="stdsjHandle" - >瑙嗗浘澶ф暟鎹钩鍙�</el-dropdown-item - > - <el-dropdown-item command="bzdSystem" - >鏍囧噯鍦扮洃绠″钩鍙�</el-dropdown-item - > - <el-dropdown-item v-if="isShowSPJK" command="spjkHandle" - >瑙嗛闆嗘垚涓庡彲瑙嗗寲</el-dropdown-item - > - <el-dropdown-item v-else command="closeSpjk" - >鍏抽棴瑙嗛鐐逛綅鍒嗗竷</el-dropdown-item - > - <el-dropdown-item v-if="isShowSjxl" command="sjxlHandle" - >鎵嬫満淇′护鐑姏鍒嗗竷</el-dropdown-item - > - <el-dropdown-item v-else command="closeSjxl" - >鍏抽棴淇′护鐑姏鍒嗗竷</el-dropdown-item - > - </el-dropdown-menu> - </el-dropdown> + <div + class="bottomwrapper csbj" + @click="spjkHandle" + :class="{ 'top-btn-active': !isShowSPJK }" + > + <div class="imgbox"> + <img src="@assets/img/new/spjk.png" alt="" /> + </div> + <div class="textbox"> + <span>瑙嗛鐩戞帶</span> + </div> </div> + + <div + class="bottomwrapper spjk" + @click="shoujixinling" + :class="{ 'top-btn-active': !isShowSjxl }" + > + <div class="imgbox"> + <img src="@assets/img/new/sjxl.png" alt="" /> + </div> + <div class="textbox"> + <span> 鎵嬫満淇′护 </span> + </div> + </div> + <div class="bottomwrapper jxmx"> <el-dropdown trigger="click" @command="handleCommand"> <div class="imgbox"> @@ -149,12 +141,30 @@ </el-form-item> </el-form> </div> + <!-- 鏁扮粍浜烘枃瀛楄緭鍏ュ脊妗� --> + <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> <style scoped> .specialTool { - width: 440px; + width: 550px; position: absolute; bottom: 65px; color: #fff; @@ -165,9 +175,33 @@ display: flex; justify-content: space-between; } +.SZRtextAreaBox { + background: rgba(5, 39, 126, 0.7); + padding: 10px; + width: 375px; + position: absolute; + /* display: flex; */ + /* justify-content: space-around; */ + bottom: 165px; + color: #fff; + left: 50%; + transform: translateX(-50%); + z-index: 99999; +} +.SZRtextAreaBox .el-form-item { + margin: 0; +} +.SZRtextAreaBox .el-input { + /* width: 300px; */ +} +.specialTool .bottomwrapper:nth-of-type(3) { + /* background: red; */ + position: relative; + top: -30px; +} .specialTool .bottomwrapper:nth-of-type(2), -.specialTool .bottomwrapper:nth-of-type(3) { +.specialTool .bottomwrapper:nth-of-type(4) { /* background: red; */ position: relative; top: -18px; @@ -187,6 +221,7 @@ background-size: 100% 100%; position: relative; } + .imgbox:hover { background-image: url("~@/assets/img/new/h1.png"); } @@ -337,7 +372,8 @@ let video4; let heatMapItem; import { mapState, mapMutations } from "vuex"; -import { queryBySquare } from "@/utils/request"; +import { queryBySquare } from "@/api/api"; + import Bus from "../tools/Bus"; import { roman } from "../../assets/json/index.js"; import URLInCode from "@/assets/js/urlInCode"; @@ -353,6 +389,7 @@ isShowSPRH: true, csbjShow: false, jxmxShow: false, + input: "", romanOption: [ { name: "鏍稿績鍖�" }, { name: "鏅缁垮湴" }, @@ -480,6 +517,12 @@ }, computed: { ...mapState(["viewer1Show", "isLand", "yqfk", "qyEchartsShow"]), + isShowTextArea() { + if (this.$store.state.isShowTextArea) { + this.input = ""; + } + return this.$store.state.isShowTextArea; + }, }, methods: { ...mapMutations(["setViewer1Show", "setIsLand", "setqyEchartsShow"]), @@ -495,8 +538,16 @@ break; } }, + sendCommand(event) { + // if (event == "click") { + mapMsg.testMsg(this.input); + // } else { + // // 闃绘榛樿琛屼负锛堝鏋滈渶瑕佺殑璇濓級 + // mapMsg.testMsg(this.input); + // event.preventDefault(); + // } + }, handleCommand(command) { - this.setViewer1Show(false); switch (command) { case "spjkHandle": this.spjkHandle(); @@ -528,6 +579,7 @@ } }, historyHandle() { + this.switchMenu(1); if (this.isLand) { this.$parent.changeMode("褰卞儚搴曞浘"); if (!this.viewer1Show) { @@ -555,6 +607,7 @@ } }, tdglHandle() { + this.switchMenu(1); if (!this.isLand) { if (!this.viewer1Show) { let p = sgworld.Navigate.getCameraInfo(); @@ -612,52 +665,32 @@ "http://10.9.2.29:8080/#/login?token=1ed14c5157acb8088efe65bc93a032c3" ); }, + switchMenu(id) { + if (id != 1) { + this.setViewer1Show(false); + } + if (id != 3) { + this.closeSjxl(); + } + if (id != 4) { + this.closeSpjk(); + } + }, bzdSystem() { window.open("http://192.162.24.2:8076/login"); }, shoujixinling() { - const loading = this.$loading({ - lock: true, - text: "鎵嬫満淇′护鏁版嵁鍔犺浇涓紝璇风◢鍚�", - spinner: "el-icon-loading", - background: "rgba(0, 0, 0, 0.7)", - }); - setTimeout(() => { - loading.close(); - }, 2000); - this.isShowSjxl = false; - let heatMapUrl = URLInCode.heatMapUrl; - sgworld.Core.getJSON(heatMapUrl, (data) => { - let res = []; - data.features.forEach((item) => { - let obj = { - x: item.properties["center_x"], - y: item.properties["center_y"], - value: item.properties["sd_total"], - radius: 50, - }; - res.push(obj); - }); - // //鍒涘缓鐑姏鍥� - heatMapItem = sgworld.Creator.addHeatMap("鐑姏鍥�", { - type: "Heatmap", // 鐑姏鍥剧被鍨嬨�怘eatmap/HeatmapGL銆戯紙鍙�夛級 - sourceData: res, - radius: 7, - gradient: { - ".3": "blue", - ".5": "green", - ".7": "yellow", - ".95": "red", - }, - tooltip: true, // tooltip鏄剧ず鏁板�� - }); - }); + this.switchMenu(3); + if (this.isShowSjxl) { + this.isShowSjxl = false; + this.$parent.signallingShow = true; + } else { + this.closeSjxl(); + } }, closeSjxl() { - if (heatMapItem) { - this.isShowSjxl = true; - heatMapItem.deleteObject(); - } + this.isShowSjxl = true; + this.$parent.signallingShow = false; }, // historyHandle() { // this.$store.commit("showHistory", true); @@ -703,42 +736,49 @@ }); }, spjkHandle() { - const loading = this.$loading({ - lock: true, - text: "瑙嗛鐐逛綅鏁版嵁鍔犺浇涓紝璇风◢鍚�", - spinner: "el-icon-loading", - background: "rgba(0, 0, 0, 0.7)", - }); - setTimeout(() => { - loading.close(); - }, 2000); - this.isShowSPJK = false; - if (window.sxtkGeojson) { - window.sxtkGeojson.deleteObject(); - window.sxtkGeojson = null; - window.sxthandler.destroy(); - //鍏抽棴寮圭獥 - Bus.$emit("closeRightPop", true); - layuiLayer.close(SmartEarthPopupData.layerProp); - return; + this.switchMenu(4); + if (this.isShowSPJK) { + const loading = this.$loading({ + lock: true, + text: "瑙嗛鐐逛綅鏁版嵁鍔犺浇涓紝璇风◢鍚�", + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }); + setTimeout(() => { + loading.close(); + }, 1500); + this.isShowSPJK = false; + if (window.sxtkGeojson) { + window.sxtkGeojson.deleteObject(); + window.sxtkGeojson = null; + window.sxthandler.destroy(); + //鍏抽棴寮圭獥 + Bus.$emit("closeRightPop", true); + layuiLayer.close(SmartEarthPopupData.layerProp); + return; + } else { + Bus.$emit("showSPJK"); + // this.spjkLoad(); + } } else { - Bus.$emit("showSPJK"); - // this.spjkLoad(); + this.closeSpjk(); } }, closeSpjk() { - this.isShowSPJK = true; - if (window.sxtkGeojson) { - window.sxtkGeojson.deleteObject(); - window.sxtkGeojson = null; - window.sxthandler.destroy(); - //鍏抽棴寮圭獥 - Bus.$emit("closeRightPop", true); - layuiLayer.close(SmartEarthPopupData.layerProp); - return; - } else { - Bus.$emit("closeSPJK"); - // this.spjkLoad(); + if (!this.isShowSPJK) { + this.isShowSPJK = true; + if (window.sxtkGeojson) { + window.sxtkGeojson.deleteObject(); + window.sxtkGeojson = null; + window.sxthandler.destroy(); + //鍏抽棴寮圭獥 + Bus.$emit("closeRightPop", true); + layuiLayer.close(SmartEarthPopupData.layerProp); + return; + } else { + Bus.$emit("closeSPJK"); + // this.spjkLoad(); + } } }, // 鍒嗗眰鍒嗘埛 -- Gitblit v1.9.3