From 3afa54cb5f7176fa52f6246127e19cc623d14767 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期四, 12 十月 2023 17:59:22 +0800 Subject: [PATCH] Merge branch 'master' of http://183.162.245.49:82/GitServer/PM_YiZhuang_ZhengFuWuFuZhongXin_2haoPing_Web --- src/assets/js/rpc.js | 45 ++++++++++++++++++++++++++++++++++++--------- 1 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/assets/js/rpc.js b/src/assets/js/rpc.js index 6a1dcaf..5708571 100644 --- a/src/assets/js/rpc.js +++ b/src/assets/js/rpc.js @@ -6,7 +6,8 @@ liushisijiayuanqudizhibianmafuwu, findAddressCandidates, getDiKuanFanWei, - ent_selectByName + ent_selectByName, + shengwuSearch } from "../../api/api"; import vueEvents from "@/utils/vueEvent.js"; let PoiLayerConstructor = Vue.extend(coord); @@ -25,9 +26,23 @@ pointerFly: null, //瀹氱偣婕父 isShow: false, objArr: [], + pointrange:null, + //鍏抽敭瀛楁煡璇� getFuzzyQuery(res) { - store.queryLayer.val = res.message; + 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; var flag = true; @@ -70,9 +85,19 @@ this.dataQuery = []; this.objArr = []; + this.pointrange = 2000; for (var i = 0; i < length; i++) { var world = keyWorld[i].word; - console.log("world", world); + if(world.indexOf('濂旈┌')>-1){ + world ='濂旈┌'; + this.pointrange = 12000 + } else if(world.indexOf('浜笢')>-1){ + world ='浜笢' + }else if(world.indexOf('灏忕背')>-1){ + world ='灏忕背' + }else if(world.indexOf('鍗氬ぇ澶у帵')>-1){ + world ='鍗氬ぇ澶у帵' + } this.setFuzzyQueryData(world, i, length - 1); } } @@ -81,7 +106,8 @@ Promise.all([ ent_selectByName(res), //浼佷笟 liushisijiayuanqudizhibianmafuwu(res), //鍥尯 - findAddressCandidates(res) //鍦板潡 + findAddressCandidates(res) ,//鍦板潡, + ]).then(result => { var that = this; store.queryLayer.data = []; @@ -133,6 +159,7 @@ }; that.objArr.push(itemObj); }); + if (index == length) { if (that.objArr.length <= 0) { @@ -190,7 +217,7 @@ coord.push(parseFloat(geom[i])) } this.setDrawPolyExtent(coord) - } else if (res.type == "鍦板潡") { + } else if (res.type == "鍦板潡" || res.type == "浼佷笟") { getDiKuanFanWei(res.lon, res.lat).then(response => { let center = { lon: 0, lat: 0 }; let polygon = that.read(response.geometry); @@ -468,7 +495,7 @@ data.showLine = false; data.mode = 1; data.pitch = -10; - data.height = 75; + data.height = 500; data.speed = 25; that.LineRoaming = sgworld.Creator.createDynamicObject( @@ -561,9 +588,9 @@ }); window.Viewer.flyTo(this.position, { offset: { - heading: Cesium.Math.toRadians(0.0), - pitch: Cesium.Math.toRadians(-30), - range: 1500 + heading: Cesium.Math.toRadians(-200), + pitch: Cesium.Math.toRadians(-45), + range: this.pointrange }, duration: 3 }); -- Gitblit v1.9.3