西海岸问题修复

This commit is contained in:
wuhongjian 2022-12-28 16:23:59 +08:00
parent a692d9fcd9
commit ae7983720b
2 changed files with 71 additions and 33 deletions

View File

@ -148,6 +148,7 @@
const btnClick = (index) => {
itemIndex.value = index
if (index === 2) {
//
if (chooseId.value !== '') {
let placeTypeCode = []
placeTypeCode.push(chooseId.value)
@ -156,6 +157,7 @@
mybus.emit('clearLeftSelect')
}
} else {
//
if (selectId.value !== '') {
mybus.emit('getCameraByParentId', {
id: selectId.value,
@ -165,6 +167,8 @@
mybus.emit('clearLeftSelect')
}
}
//
mybus.emit('resetMapSearch', index)
}
//
const tabClick = (id) => {

View File

@ -163,10 +163,12 @@
camreaTree: [],
camreaTreeIsShow: true,
camreaTreeSingle: [],
placeTypeCode: [], //
checkStatus: '2',
labelSearch: '',
timer: null,
openVideo: false,
labelMode: false, //
channelCode: [],
circleModeFlag: false,
areaModeFlag: false,
@ -176,15 +178,15 @@
whoShow1: whoShow,
mapSearchParam: {
//
parentId: '',
checkStatus: '1',
pageNum: '1',
pageSize: '20000',
regionId: '',
// checkStatus: '1',
// pageNum: '1',
// pageSize: '20000',
gpsX: '',
gpsY: '',
radius: '',
borderPolygonList: [],
type: 0, //012
type: 1, //012
},
pointAllData:[],
restaurants:[],
@ -221,13 +223,14 @@
mybus.on('getCameraByParentId', (val) => {
debugger
console.log('倒腾位置1')
console.info('根据部门进行查询')
//
if (val.reset) {
this.hiMapFun.mapFlyTo({lat:'36.017043',lng: '119.922772'}, 9)
}
this.mapSearchParam.parentId = val.id
this.mapSearchParam.type = "1"
this.mapSearchParam.pageSize = 10000
this.mapSearchParam.regionId = val.id
// this.mapSearchParam.type = "1"
// this.mapSearchParam.pageSize = 10000
this.getCameraByParentId('','department')
})
//
@ -246,17 +249,28 @@
})
//
mybus.off('cameraDataOnMap')
mybus.off('cameraDataOnMap')
mybus.on('cameraDataOnMap', (data) => {
this.addResourceTomap('videoMap', data)
})
//
mybus.off('CameraConditionPlaceType')
mybus.on('CameraConditionPlaceType', (data) => {
this.queryCameraConditionPlace(data)
console.info('根据标签进行查询')
this.placeTypeCode = data
this.queryCameraConditionPlace()
})
//
mybus.off('resetMapSearch')
mybus.on('resetMapSearch', (index) => {
if (index == 2) {
this.labelMode = true
this.queryCameraConditionPlace()
} else {
this.labelMode = false
this.getCameraByParentId('map')
}
})
//
mybus.off('clearLeftSelect')
mybus.on('clearLeftSelect', () => {
@ -271,11 +285,17 @@
}
},
//
queryCameraConditionPlace(data) {
queryCameraConditionPlace(param) {
debugger
let params = {
placeTypeCode: data,
placeTypeCode: this.placeTypeCode,...param
}
if (params.regionId) {
params.regionId = '70be8c5b664f4bcf869d82f2e8335051'
}
this.spinning = true;
CameraConditionPlaceType(params).then((res) => {
this.spinning = false;
const byteArray = this.unzip(res.data.data)
this.addResourceTomap('videoMap', byteArray)
})
@ -371,7 +391,12 @@
type: this.mapSearchParam.type,
}
// mybus.emit('getListByMap', params);
this.getCameraByParentId('map');
if (this.labelMode) {
debugger
this.queryCameraConditionPlace(params)
} else {
this.getCameraByParentId('map');
}
console.log("areaSelectResource -> latlngs", latlngs)
}
})
@ -400,11 +425,17 @@
circlePloygonLayer
)
console.log('查询图层为何发生了改变', e.layer)
this.mapSearchParam.gpsX = e.layer._latlng.lng
this.mapSearchParam.gpsY = e.layer._latlng.lat
this.mapSearchParam.regionId = this.mapSearchParam.regionId ||
'70be8c5b664f4bcf869d82f2e8335051',
this.mapSearchParam.longitude = e.layer._latlng.lng
this.mapSearchParam.latitude = e.layer._latlng.lat
this.mapSearchParam.radius = radius
this.mapSearchParam.type = 1
this.getCameraByParentId('map')
if (this.labelMode) {
this.queryCameraConditionPlace(this.mapSearchParam)
} else {
this.getCameraByParentId('map');
}
}
}
})
@ -420,11 +451,11 @@
// this.hiMapFun.mapFlyTo({lat:'36.017043',lng: '119.922772'}, 9)
let params = {
regionId:
this.mapSearchParam.parentId ||
this.mapSearchParam.regionId ||
'70be8c5b664f4bcf869d82f2e8335051',
name: this.mapSearchParam.cameraName || '',
longitude: this.mapSearchParam.gpsX || '',
latitude: this.mapSearchParam.gpsY || '',
longitude: this.mapSearchParam.gpsX || this.mapSearchParam.longitude || '',
latitude: this.mapSearchParam.gpsY || this.mapSearchParam.latitude || '',
radius: this.mapSearchParam.radius || '',
type: this.mapSearchParam.type,
borderPolygonList: this.mapSearchParam.borderPolygonList || [],
@ -454,7 +485,7 @@
this.spinning = false;
const byteArray = this.unzip(res.data.data)
if(type=='map'){
let params = this.mapSearchParam;
let params = JSON.parse(JSON.stringify(this.mapSearchParam));
// const byteArray = this.unzip(res.data.data)
params.dataSource = byteArray||0;
params.total = res.data.count||0;
@ -508,21 +539,19 @@
}
},
resetCircle(){
debugger
//
this.hiMapFun.removeLayerByLayerName('circlePloygonLayer')
//
this.mapSearchParam.gpsX = ''
this.mapSearchParam.gpsY = ''
this.mapSearchParam.longitude = ''
this.mapSearchParam.latitude = ''
this.mapSearchParam.radius = ''
this.mapSearchParam.type = 0;
const params = {
gpsX: this.mapSearchParam.gpsX,
gpsY: this.mapSearchParam.gpsY,
radius: this.mapSearchParam.radius,
type: this.mapSearchParam.type
}
this.getCameraByParentId('map')
// mybus.emit('getListByMap', params);
if (this.labelMode) {
this.queryCameraConditionPlace(this.mapSearchParam)
} else {
this.getCameraByParentId('map');
}
},
resetArea(){
//
@ -534,7 +563,12 @@
borderPolygonList: this.mapSearchParam.borderPolygonList,
type: this.mapSearchParam.type
}
this.getCameraByParentId('map')
if (this.labelMode) {
this.queryCameraConditionPlace(params)
} else {
this.getCameraByParentId('map');
}
// this.getCameraByParentId('map')
// mybus.emit('getListByMap', params);
},
//