西海岸 基础设施开发
This commit is contained in:
parent
97ddab81b8
commit
778122d249
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-20 17:16:35
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-10-26 17:57:52
|
||||
* @LastEditors: Light
|
||||
* @LastEditTime: 2022-11-18 17:52:05
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
@ -97,6 +97,14 @@ export function getHls(params) {
|
|||
config2
|
||||
)
|
||||
}
|
||||
// 西海岸 POI搜索
|
||||
export function getListForPOI(params) {
|
||||
return axios.get(
|
||||
'http://10.134.135.3:21009/service/lbs/coder/geocoding2?appKey=675d95594136456bb7b1434dda31953f&city=青岛&keywords=' +
|
||||
params.keywords,
|
||||
config2
|
||||
)
|
||||
}
|
||||
|
||||
// 西海岸--获取摄像头列表的后台地址 (测试环境地址:10.134.135.92:9537)
|
||||
let _cameraUrl =
|
||||
|
|
|
@ -1959,6 +1959,7 @@
|
|||
infrastructurePageXha,
|
||||
detailsPageInfrastructureTree,
|
||||
detailsPageInfrastructureTreeXha,
|
||||
infrastructureApplication,
|
||||
},
|
||||
beforeUnmount() {
|
||||
mybus.off('getCameraByParentId')
|
||||
|
|
|
@ -8,23 +8,7 @@
|
|||
</div>
|
||||
|
||||
<div class="searchPoint">
|
||||
<el-autocomplete
|
||||
v-model="address"
|
||||
placeholder="请输入地址"
|
||||
:fetch-suggestions="
|
||||
(queryString, cb) => {
|
||||
searchAddressByKeyWord(queryString, cb, i)
|
||||
}
|
||||
"
|
||||
:trigger-on-focus="false"
|
||||
:popper-append-to-body="false"
|
||||
class="address-auto-complete-input"
|
||||
@select="
|
||||
(addressItem) => {
|
||||
selectedAddress(addressItem, i)
|
||||
}
|
||||
"
|
||||
/>
|
||||
<!-- 第一版 -->
|
||||
<!-- <el-autocomplete
|
||||
class="inline-input"
|
||||
prefix-icon="Search"
|
||||
|
@ -46,6 +30,37 @@
|
|||
</template>
|
||||
<template v-slot:append>搜索</template>
|
||||
</el-autocomplete> -->
|
||||
<!-- 第二版 -->
|
||||
<el-select class="input-with-select" v-model="addressType" style="width: 115px" @change="address=''">
|
||||
<el-option label="兴趣点" value="1" />
|
||||
<el-option label="点位" value="2" />
|
||||
</el-select>
|
||||
<el-input
|
||||
v-if="addressType==1"
|
||||
v-model="address"
|
||||
placeholder="请输入关键词"
|
||||
class="input-with-select"
|
||||
@keyup.enter="handleEnter"
|
||||
>
|
||||
</el-input>
|
||||
<el-autocomplete
|
||||
v-else-if="addressType==2"
|
||||
v-model="address"
|
||||
placeholder="请输入地址"
|
||||
:fetch-suggestions="
|
||||
(queryString, cb) => {
|
||||
searchAddressByKeyWord(queryString, cb, i)
|
||||
}
|
||||
"
|
||||
:trigger-on-focus="false"
|
||||
:popper-append-to-body="false"
|
||||
class="address-auto-complete-input"
|
||||
@select="
|
||||
(addressItem) => {
|
||||
selectedAddress(addressItem, i)
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<svg
|
||||
t="1656319660834"
|
||||
|
@ -77,6 +92,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { message } from 'ant-design-vue'
|
||||
import { HieimpMap } from '@/supermap/map-init'
|
||||
import TiledMap from './components/tiledMap'
|
||||
|
@ -92,7 +108,7 @@
|
|||
selectByLabelName,
|
||||
selectByChannelName,
|
||||
} from '@/api/videoSurveillance'
|
||||
import { getCameraByCondition } from '@/api/file'
|
||||
import { getCameraByCondition,getListForPOI } from '@/api/file'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import * as turf from '@turf/turf';
|
||||
|
||||
|
@ -118,6 +134,7 @@
|
|||
areaModeFlag: false,
|
||||
addressMatchUrl: '',
|
||||
address: '',
|
||||
addressType:'1',
|
||||
whoShow1: whoShow,
|
||||
mapSearchParam: {
|
||||
// 地图搜索初始化数据
|
||||
|
@ -181,6 +198,31 @@
|
|||
})
|
||||
},
|
||||
methods: {
|
||||
// 查询
|
||||
handleEnter(){
|
||||
console.log('查询',this.address,this.addressType)
|
||||
if(this.address){
|
||||
getListForPOI({keywords:this.address}).then(res => {
|
||||
console.log('POI=========>',res.data.data)
|
||||
if(res.data.data.rows[0]){
|
||||
let arr = res.data.data.rows[0].location.split(',')
|
||||
this.selectedAddress({location:{y:arr[1],x:arr[0]}})
|
||||
}else{
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: '未查询到兴趣点!',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
})
|
||||
}else{
|
||||
ElMessage({
|
||||
showClose: true,
|
||||
message: '请输入兴趣点!',
|
||||
type: 'warning',
|
||||
})
|
||||
}
|
||||
},
|
||||
selectedAddress(item, index) {
|
||||
// 跳转到相应经纬度
|
||||
console.log('跳转', item)
|
||||
|
@ -666,6 +708,14 @@
|
|||
z-index: 988;
|
||||
cursor: pointer;
|
||||
}
|
||||
.input-with-select{
|
||||
width: 2.4rem;
|
||||
svg{
|
||||
position: relative;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
.icon-poylon {
|
||||
width: 0.46rem;
|
||||
bottom: 0.6rem;
|
||||
|
|
Loading…
Reference in New Issue