西海岸 基础设施开发

This commit is contained in:
a0049873 2022-11-18 18:33:04 +08:00
parent 97ddab81b8
commit 778122d249
3 changed files with 79 additions and 20 deletions

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35 * @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.wuhongjian * @LastEditors: Light
* @LastEditTime: 2022-10-26 17:57:52 * @LastEditTime: 2022-11-18 17:52:05
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -97,6 +97,14 @@ export function getHls(params) {
config2 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) // 西-- (10.134.135.92:9537)
let _cameraUrl = let _cameraUrl =

View File

@ -1959,6 +1959,7 @@
infrastructurePageXha, infrastructurePageXha,
detailsPageInfrastructureTree, detailsPageInfrastructureTree,
detailsPageInfrastructureTreeXha, detailsPageInfrastructureTreeXha,
infrastructureApplication,
}, },
beforeUnmount() { beforeUnmount() {
mybus.off('getCameraByParentId') mybus.off('getCameraByParentId')

View File

@ -8,23 +8,7 @@
</div> </div>
<div class="searchPoint"> <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 <!-- <el-autocomplete
class="inline-input" class="inline-input"
prefix-icon="Search" prefix-icon="Search"
@ -46,6 +30,37 @@
</template> </template>
<template v-slot:append>搜索</template> <template v-slot:append>搜索</template>
</el-autocomplete> --> </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> </div>
<svg <svg
t="1656319660834" t="1656319660834"
@ -77,6 +92,7 @@
</template> </template>
<script> <script>
import { ElMessage } from 'element-plus'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { HieimpMap } from '@/supermap/map-init' import { HieimpMap } from '@/supermap/map-init'
import TiledMap from './components/tiledMap' import TiledMap from './components/tiledMap'
@ -92,7 +108,7 @@
selectByLabelName, selectByLabelName,
selectByChannelName, selectByChannelName,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
import { getCameraByCondition } from '@/api/file' import { getCameraByCondition,getListForPOI } 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';
@ -118,6 +134,7 @@
areaModeFlag: false, areaModeFlag: false,
addressMatchUrl: '', addressMatchUrl: '',
address: '', address: '',
addressType:'1',
whoShow1: whoShow, whoShow1: whoShow,
mapSearchParam: { mapSearchParam: {
// //
@ -181,6 +198,31 @@
}) })
}, },
methods: { 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) { selectedAddress(item, index) {
// //
console.log('跳转', item) console.log('跳转', item)
@ -666,6 +708,14 @@
z-index: 988; z-index: 988;
cursor: pointer; cursor: pointer;
} }
.input-with-select{
width: 2.4rem;
svg{
position: relative;
bottom: 0;
right: 0;
}
}
.icon-poylon { .icon-poylon {
width: 0.46rem; width: 0.46rem;
bottom: 0.6rem; bottom: 0.6rem;