Compare commits
2 Commits
e1905140f4
...
3b4a6278cb
Author | SHA1 | Date |
---|---|---|
a0049873 | 3b4a6278cb | |
a0049873 | 1d02b59509 |
|
@ -35,14 +35,26 @@
|
||||||
<el-option label="兴趣点" value="1" />
|
<el-option label="兴趣点" value="1" />
|
||||||
<el-option label="点位" value="2" />
|
<el-option label="点位" value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input
|
<el-autocomplete
|
||||||
v-if="addressType==1"
|
v-if="addressType==1"
|
||||||
|
v-model="address"
|
||||||
|
:fetch-suggestions="querySearch"
|
||||||
|
clearable
|
||||||
|
class="input-with-select"
|
||||||
|
placeholder="请输入关键词"
|
||||||
|
@select="
|
||||||
|
(addressItem) => {
|
||||||
|
selectedAddress(addressItem, i)
|
||||||
|
}
|
||||||
|
"
|
||||||
|
/>
|
||||||
|
<!-- <el-input
|
||||||
v-model="address"
|
v-model="address"
|
||||||
placeholder="请输入关键词"
|
placeholder="请输入关键词"
|
||||||
class="input-with-select"
|
class="input-with-select"
|
||||||
@keyup.enter="handleEnter"
|
@keyup.enter="handleEnter"
|
||||||
>
|
>
|
||||||
</el-input>
|
</el-input> -->
|
||||||
<el-autocomplete
|
<el-autocomplete
|
||||||
v-else-if="addressType==2"
|
v-else-if="addressType==2"
|
||||||
v-model="address"
|
v-model="address"
|
||||||
|
@ -108,7 +120,7 @@ import { ElMessage } from 'element-plus'
|
||||||
selectByLabelName,
|
selectByLabelName,
|
||||||
selectByChannelName,
|
selectByChannelName,
|
||||||
} from '@/api/videoSurveillance'
|
} from '@/api/videoSurveillance'
|
||||||
import { getCameraByCondition,getListForPOIm,CameraConditionPlaceType } from '@/api/file'
|
import { getCameraByCondition,getListForPOI,CameraConditionPlaceType } from '@/api/file'
|
||||||
import mybus from '@/myplugins/mybus'
|
import mybus from '@/myplugins/mybus'
|
||||||
import * as turf from '@turf/turf';
|
import * as turf from '@turf/turf';
|
||||||
|
|
||||||
|
@ -149,6 +161,7 @@ import { ElMessage } from 'element-plus'
|
||||||
type: 0, //0是无,1画圆,2不规则
|
type: 0, //0是无,1画圆,2不规则
|
||||||
},
|
},
|
||||||
pointAllData:[],
|
pointAllData:[],
|
||||||
|
restaurants:[],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
@ -211,7 +224,7 @@ import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: { // 查询
|
methods: {
|
||||||
//查询标签视频
|
//查询标签视频
|
||||||
queryCameraConditionPlace(data) {
|
queryCameraConditionPlace(data) {
|
||||||
let params = {
|
let params = {
|
||||||
|
@ -223,7 +236,44 @@ import { ElMessage } from 'element-plus'
|
||||||
this.addResourceTomap('videoMap', res.data.data)
|
this.addResourceTomap('videoMap', res.data.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleEnter(){
|
// 查询
|
||||||
|
querySearch (queryString, cb) {
|
||||||
|
console.log('querySearch',queryString, cb,this.restaurants)
|
||||||
|
if(queryString){
|
||||||
|
getListForPOI({keywords:queryString}).then(res => {
|
||||||
|
if(res.data.data.rows[0]){
|
||||||
|
res.data.data.rows.map( val =>{
|
||||||
|
let arr = val.location.split(',')
|
||||||
|
val.location = {y:arr[1],x:arr[0]}
|
||||||
|
val.value = val.name
|
||||||
|
})
|
||||||
|
const results =res.data.data.rows
|
||||||
|
cb(results)
|
||||||
|
}else{
|
||||||
|
ElMessage({
|
||||||
|
showClose: true,
|
||||||
|
message: '未查询到兴趣点!',
|
||||||
|
type: 'warning',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
cb([])
|
||||||
|
}
|
||||||
|
// const results = queryString
|
||||||
|
// ? this.restaurants.filter(createFilter(queryString))
|
||||||
|
// : this.restaurants
|
||||||
|
// call callback function to return suggestions
|
||||||
|
},
|
||||||
|
createFilter (queryString) {
|
||||||
|
return (restaurant) => {
|
||||||
|
return (
|
||||||
|
restaurant.toLowerCase().indexOf(queryString.toLowerCase()) === 0
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 查询
|
||||||
|
handleEnter(queryString, cb){
|
||||||
console.log('查询',this.address,this.addressType)
|
console.log('查询',this.address,this.addressType)
|
||||||
if(this.address){
|
if(this.address){
|
||||||
getListForPOI({keywords:this.address}).then(res => {
|
getListForPOI({keywords:this.address}).then(res => {
|
||||||
|
@ -461,6 +511,7 @@ import { ElMessage } from 'element-plus'
|
||||||
},
|
},
|
||||||
//查询地址建议匹配
|
//查询地址建议匹配
|
||||||
async searchAddressByKeyWord(queryString, cb, indexX) {
|
async searchAddressByKeyWord(queryString, cb, indexX) {
|
||||||
|
console.log('queryString, cb, indexX',queryString, cb, indexX)
|
||||||
this.disasterPointIndex = indexX
|
this.disasterPointIndex = indexX
|
||||||
/* const res = await bdPlaceSearch({ searchKey: queryString });
|
/* const res = await bdPlaceSearch({ searchKey: queryString });
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
|
@ -573,6 +624,7 @@ import { ElMessage } from 'element-plus'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSelect(item) {
|
handleSelect(item) {
|
||||||
|
console.log('1111',item)
|
||||||
this.hiMapFun.clearAllLayers()
|
this.hiMapFun.clearAllLayers()
|
||||||
//定时器方法
|
//定时器方法
|
||||||
let arr = item.detail.location.split(',')
|
let arr = item.detail.location.split(',')
|
||||||
|
|
Loading…
Reference in New Issue