From 3076ab83c2a4b8ced2d2061bce34e383a1d6fa3f Mon Sep 17 00:00:00 2001 From: wuhongjian Date: Mon, 21 Nov 2022 19:11:44 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/public/static/config/mapConfig.js | 246 ++++++++++++------------ 1 file changed, 128 insertions(+), 118 deletions(-) diff --git a/front/public/static/config/mapConfig.js b/front/public/static/config/mapConfig.js index d9bd74c6..5a2b7fff 100644 --- a/front/public/static/config/mapConfig.js +++ b/front/public/static/config/mapConfig.js @@ -2,127 +2,137 @@ * @Author: hisense.wuhongjian * @Date: 2020-07-07 16:03:23 * @LastEditors: hisense.wuhongjian - * @LastEditTime: 2022-08-25 11:16:44 + * @LastEditTime: 2022-11-21 17:06:10 * @Description: 地图静态参数配置 */ var _mapConfig = {} -; -(function() { - var L = window.L || {} - // // 定义底图初始化化参数 - // 请在此处更改你的配置********************************************** - // eslint-disable-next-line no-undef - var CONFIGKEY = CONFIGITEM.version === 'xihaian' ? 'xihaian' : 'qingdao' - // var CONFIGKEY = 'dev'; - // 请在上面更改你的配置*********************************************** - var BASECONFIGITEM = { - xihaian: { - base: 'xihaian', - CURRENT_MAP_OPTIONS: { - // crs: CRS_4490, - center: [35.96, 120.19], - maxZoom: 13, - minZoom: 0, - zoom: 5, - }, +;(function () { + var L = window.L || {} + // // 定义底图初始化化参数 + // 请在此处更改你的配置********************************************** + // eslint-disable-next-line no-undef + var CONFIGKEY = CONFIGITEM.version === 'xihaian' ? 'xihaian' : 'qingdao' + // var CONFIGKEY = 'dev'; + // 请在上面更改你的配置*********************************************** + var BASECONFIGITEM = { + xihaian: { + base: 'xihaian', + CURRENT_MAP_OPTIONS: { + // crs: CRS_4490, + center: [35.96, 120.19], + maxZoom: 18, + minZoom: 0, + zoom: 5, + }, + }, + qingdao: { + DATABASE_TYPE: 'Highgo', + POI_TYPE: 'Supermap', // POI接口类型 'Supermap'、'Amap'、'Survey_Institute' + ISERVER_URL: '15.2.21.238:8090', + WORKPLACE_NAME: 'HIMAP-HIGHGO', + MAP_NAME: 'QDMAP', + DATASOURCE_NAME: 'HISENSE_map', + ATMOSPHERE_URL: 'http://15.2.21.151:9015/service-main', + CURRENT_MAP_OPTIONS: { + // crs: CRS_4490, + center: [36.17, 120.13], + maxZoom: 18, + minZoom: 0, + zoom: 10, + }, + BDMAP_CONFIG: { + location: 'qingdao', + _initpos: { + point: [120.392795, 36.072854], + zoom: 2, }, - qingdao: { - DATABASE_TYPE: 'Highgo', - POI_TYPE: 'Supermap', // POI接口类型 'Supermap'、'Amap'、'Survey_Institute' - ISERVER_URL: '15.2.21.238:8090', - WORKPLACE_NAME: 'HIMAP-HIGHGO', - MAP_NAME: 'QDMAP', - DATASOURCE_NAME: 'HISENSE_map', - ATMOSPHERE_URL: 'http://15.2.21.151:9015/service-main', - CURRENT_MAP_OPTIONS: { - // crs: CRS_4490, - center: [36.17, 120.13], - maxZoom: 18, - minZoom: 0, - zoom: 10, - }, - BDMAP_CONFIG: { - location: 'qingdao', - _initpos: { - point: [120.392795, 36.072854], - zoom: 2, - }, - _keyframes: [ - [121.6011191295479, 36.73422934263509], - [119.83371870221472, 36.082854], - [120.25937000453506, 36.34563716789656], - ], - }, - MAP_VENDOR: 'Supermap', // 地图厂商 Supermap bdmap 3dbdmap - TITLE_LAYER: { - mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', - type: 'tiled', - name: '矢量', - icon: 'vector_map.png', - }, - TITLE_LAYER_REMOTE: { - mapUrl: 'http://q3d.qd.gov.cn:8195/portalproxy/vw6bffpy/TileServer/arcgis/rest/services/normal_2021_4490Arcgis/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', - type: 'tiled', - name: '矢量', - icon: 'vector_map.png', - }, - // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '矢量', icon: 'vector_map.png' }, - // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-QingdaoRemoteImageMap/rest/maps/QingdaoRemoteImageMap', type: 'remote', name: '影像', icon: 'satellite_map.png' }, - TITLE_LAYER_DARK: { - mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-shandong/rest/maps/shandong', - type: 'dark', - name: '其他', - icon: 'other_map.png', - }, - }, - } - var MAPCONFIGMIXTRE = { - CURRENT_SERVER_NAME: CONFIGKEY, - BUFFER_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/spatialAnalysis-' + - BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + - '/restjsr/spatialanalyst', - QUERY_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/map-HIMAP_HIGHGO/rest/maps/' + - BASECONFIGITEM[CONFIGKEY].MAP_NAME, - // QUERY_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/data-HIMAP_HIGHGO/rest/data/datasources/HISENSE_himap', - DYNAMIC_ROAD_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/spatialAnalysis-' + - BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + - '/restjsr/spatialanalyst', - DYNMIC_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/map-' + - BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + - '/rest/maps/' + - BASECONFIGITEM[CONFIGKEY].MAP_NAME, - // 数据库型 - // NETWORK_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/transportationAnalyst-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/rest/networkanalyst/BuildNetwork_2@' + BASECONFIGITEM[CONFIGKEY].DATASOURCE_NAME, - // 程工系统测试环境,因为是文件型,和数据库性有区别,发布时请注意 - NETWORK_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/transportationAnalyst-road/rest/networkanalyst/BuildNetwork_2@road', - PLOTTING_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/plot-JY/rest/plot/', - POI_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address', - EDITORDATA_URL: 'http://' + - BASECONFIGITEM[CONFIGKEY].ISERVER_URL + - '/iserver/services/data-' + - BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + - '/rest/data', - ADDRESS_MATCH_URL: `http://${BASECONFIGITEM[CONFIGKEY].ISERVER_URL}/iserver/services/addressmatch-Address/restjsr/v1/address`, - TITLE_LAYER_ARRAY: BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_ARRAY || [ - BASECONFIGITEM[CONFIGKEY].TITLE_LAYER, - BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_REMOTE, - BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_DARK, + _keyframes: [ + [121.6011191295479, 36.73422934263509], + [119.83371870221472, 36.082854], + [120.25937000453506, 36.34563716789656], ], - } - _mapConfig.config = Object.assign(BASECONFIGITEM[CONFIGKEY], MAPCONFIGMIXTRE) -})() \ No newline at end of file + }, + MAP_VENDOR: 'Supermap', // 地图厂商 Supermap bdmap 3dbdmap + TITLE_LAYER: { + mapUrl: + 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', + type: 'tiled', + name: '矢量', + icon: 'vector_map.png', + }, + TITLE_LAYER_REMOTE: { + mapUrl: + 'http://q3d.qd.gov.cn:8195/portalproxy/vw6bffpy/TileServer/arcgis/rest/services/normal_2021_4490Arcgis/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', + type: 'tiled', + name: '矢量', + icon: 'vector_map.png', + }, + // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '矢量', icon: 'vector_map.png' }, + // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-QingdaoRemoteImageMap/rest/maps/QingdaoRemoteImageMap', type: 'remote', name: '影像', icon: 'satellite_map.png' }, + TITLE_LAYER_DARK: { + mapUrl: + 'http://15.2.21.238:8090/iserver/services/map-ugcv5-shandong/rest/maps/shandong', + type: 'dark', + name: '其他', + icon: 'other_map.png', + }, + }, + } + var MAPCONFIGMIXTRE = { + CURRENT_SERVER_NAME: CONFIGKEY, + BUFFER_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/spatialAnalysis-' + + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + + '/restjsr/spatialanalyst', + QUERY_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/map-HIMAP_HIGHGO/rest/maps/' + + BASECONFIGITEM[CONFIGKEY].MAP_NAME, + // QUERY_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/data-HIMAP_HIGHGO/rest/data/datasources/HISENSE_himap', + DYNAMIC_ROAD_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/spatialAnalysis-' + + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + + '/restjsr/spatialanalyst', + DYNMIC_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/map-' + + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + + '/rest/maps/' + + BASECONFIGITEM[CONFIGKEY].MAP_NAME, + // 数据库型 + // NETWORK_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/transportationAnalyst-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/rest/networkanalyst/BuildNetwork_2@' + BASECONFIGITEM[CONFIGKEY].DATASOURCE_NAME, + // 程工系统测试环境,因为是文件型,和数据库性有区别,发布时请注意 + NETWORK_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/transportationAnalyst-road/rest/networkanalyst/BuildNetwork_2@road', + PLOTTING_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/plot-JY/rest/plot/', + POI_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address', + EDITORDATA_URL: + 'http://' + + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + + '/iserver/services/data-' + + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + + '/rest/data', + ADDRESS_MATCH_URL: `http://${BASECONFIGITEM[CONFIGKEY].ISERVER_URL}/iserver/services/addressmatch-Address/restjsr/v1/address`, + TITLE_LAYER_ARRAY: BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_ARRAY || [ + BASECONFIGITEM[CONFIGKEY].TITLE_LAYER, + BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_REMOTE, + BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_DARK, + ], + } + _mapConfig.config = Object.assign(BASECONFIGITEM[CONFIGKEY], MAPCONFIGMIXTRE) +})() From d70ca5878179ae5721ab4d4ee31717a4cdaa8678 Mon Sep 17 00:00:00 2001 From: gongjiale <942894820@qq.com> Date: Mon, 21 Nov 2022 19:16:13 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bus=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../home/detailsPageInfrastructureTreeXha.vue | 51 +++++++++++++------ .../views/home/videoSurveillance/index.vue | 1 - 2 files changed, 35 insertions(+), 17 deletions(-) diff --git a/front/src/views/home/detailsPageInfrastructureTreeXha.vue b/front/src/views/home/detailsPageInfrastructureTreeXha.vue index 9387dcb6..4ceed28f 100644 --- a/front/src/views/home/detailsPageInfrastructureTreeXha.vue +++ b/front/src/views/home/detailsPageInfrastructureTreeXha.vue @@ -152,10 +152,16 @@ export default defineComponent({ } //选择标签内容 const tabClick = (id) => { - chooseId.value = id + if(chooseId.value === id){ + chooseId.value = '' + mybus.emit('clearLeftSelect') + }else{ + chooseId.value = id let placeTypeCode =[] placeTypeCode.push(id) mybus.emit('CameraConditionPlaceType', placeTypeCode) + } + } // 初始化 const init = async () => { @@ -196,14 +202,15 @@ export default defineComponent({ chooseId.value='' }) const onSelect = async (item, val, child) => { - let res = {} - if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) { - res = await getCameraAllOrgan({ parentId: val.id }) - } else { + + // if(selectId.value===val.id){ + // selectId.value='' + //   mybus.emit('clearLeftSelect') + // }else{ + let res = {}  mybus.emit('getCameraByParentId', val.id) - // 西海岸 + res = await getCameraInfoByAreaId({ areaId: val.id }) - } treeData.value.map((treeDataItem, index) => { if (item.id == treeDataItem.id) { treeData.value[index].children.map((childItem, childIndex) => { @@ -215,11 +222,20 @@ export default defineComponent({ } }) if (child) { + if(selectId.value===child.id){ + selectId.value='' +   mybus.emit('clearLeftSelect') + }else{ selectId.value = child.id } + + } + // } + } watch(selectId, (newVal) => { + if (newVal == '') { mybus.emit('getCameraByParentId', '') mybus.emit('getListByParentId', '') @@ -244,14 +260,15 @@ export default defineComponent({ }) } const showDown = (item, val) => { + selectId.value = val.id - console.log('item---showDown--------->', item) - console.log('val----showDown-------->', val) + if (item.children) { val.show = !val.show // 取消选中 if (!val.show) { selectId.value = '' + mybus.emit('clearLeftSelect') } } } @@ -284,10 +301,11 @@ export default defineComponent({