From 5ab15852cea6332f55f7a0f0366b66e24119d30d Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 29 Mar 2023 00:07:36 +0800
Subject: [PATCH] Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
---
src/components/mapSearchBox/index.vue | 31 +++++++++++++++++++++----------
1 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/src/components/mapSearchBox/index.vue b/src/components/mapSearchBox/index.vue
index eea6823..2480e9e 100644
--- a/src/components/mapSearchBox/index.vue
+++ b/src/components/mapSearchBox/index.vue
@@ -5,7 +5,7 @@
<div class="clear" v-show="isShowClearBtn" @click="clearSearchValue" title="清空">
<img src="/img/icon/clear.png" alt />
</div>
- <button @click="searchExtensivelyClick" class="el-icon-search"></button>
+ <!-- <button @click="searchExtensivelyClick" class="el-icon-search"></button> -->
</div>
<div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box">
<div>
@@ -28,16 +28,14 @@
isShowClearBtn: false,
searchExtensivelyValBoxShow: false,
searchExtensivelyArray: [],
+ isClickValBox: false,
}
},
watch: {
searchExtensivelyValue: {
handler (newText, oldText) {
- this.$EventBus.$emit('mapClearLayer', {
- layerName: 'searchLayer',
- type: 'VectorLayer'
- })
+
if (newText == '') {
this.searchExtensivelyValBoxShow = false
@@ -45,6 +43,16 @@
this.searchExtensivelyArray = []
} else {
this.searchExtensivelyValBoxShow = true
+
+ if (this.isClickValBox) {
+ this.searchExtensivelyValBoxShow = false
+ this.isClickValBox = false
+ } else {
+ this.$EventBus.$emit('mapClearLayer', {
+ layerName: 'searchLayer',
+ type: 'VectorLayer'
+ })
+ }
this.isShowClearBtn = true
this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue)
}
@@ -79,7 +87,7 @@
lng: `${this.searchExtensivelyArray[0].location.lng}`,
lat: `${this.searchExtensivelyArray[0].location.lat}`,
alt: 1,
- text: this.searchExtensivelyArray[0].name
+ text: this.searchExtensivelyArray[0].name,
},
})
}
@@ -109,11 +117,13 @@
searchExtensivelyVlaClick (item) {
this.searchExtensivelyValBoxShow = false
+ this.isClickValBox = true
+
this.searchExtensivelyValue = item.name
this.$EventBus.$emit('toPosition', {
siteJd: `${item.location.lng}`,
siteWd: `${item.location.lat}`,
- siteGd: 200,
+ siteGd: 1000,
})
this.$EventBus.$emit('mapClearLayer', {
layerName: 'searchLayer',
@@ -126,7 +136,8 @@
lng: `${item.location.lng}`,
lat: `${item.location.lat}`,
alt: 1,
- text: item.name
+ text: item.name,
+ fontColor: global.DC.Color.ORANGE,
}
})
this.$EventBus.$emit('layerPointAdd', {
@@ -163,14 +174,14 @@
input {
flex: 1;
- width: 400px;
+ width: 440px;
height: 100%;
font-size: 18px;
text-indent: 1em;
color: #ffffff;
background-color: rgba(24, 79, 202, 0.75);
border: 1px solid rgb(0, 92, 169);
- border-radius: 20px 0 0 20px;
+ border-radius: 20px;
vertical-align: top;
}
--
Gitblit v1.9.3