西海岸问题修复

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

View File

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