北京经济技术开发区经开区虚拟城市项目-【前端】-Web
lixuliang
2024-05-08 10ecfd0b60442d209d1ab4b749580ffb638d1992
数字人更新
已修改12个文件
298 ■■■■■ 文件已修改
src/assets/js/rpc.js 42 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/index.vue 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/map/viewer.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/map/viewer1.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/bottom-menu.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/menu/leftMenu.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/right/right-bottom.vue 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/searchQY.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/conf.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/config.json 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/layers.json 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/layers2.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
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;
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;
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(
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) {
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 }} 数据正在补充中
      <!-- <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;
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) {
src/utils/searchQY.js
@@ -5,6 +5,7 @@
// 企业接口8086
const request = axios.create({
    // baseURL: 'https://skyzt.bda.gov.cn/BEApi/', // api的base_url
    baseURL: 'http://10.10.4.116:8086/', // api的base_url
    timeout: 35000, // 请求超时时间
    headers: {
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",
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"
}
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
                                }
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
                        }