图层添加应急空间(应急池等)
echarts统计图容器更改
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2024-10-31 10:47:29 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-10-31 18:16:33 |
| | | * @LastEditTime: 2024-11-04 14:27:54 |
| | | * @FilePath: \bigScreen\src\views\layout\components\scomponents\layersControl.vue |
| | | * @Description: |
| | | * |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { getPage } from '@/api/indParkInfo' |
| | | import { getList } from "@/api/space/space" |
| | | const { VITE_APP_BASE } = import.meta.env |
| | | import { getViewer } from 'utils/getViewer' |
| | | const globalViewer = getViewer() |
| | |
| | | const data = [ |
| | | { |
| | | id: 1, |
| | | label: '三维模型', |
| | | label: '化工园区', |
| | | type: 'layer', |
| | | subType: '3Dtile', |
| | | url: VITE_APP_BASE + 'mx/tileset.json', |
| | | layerName: 'hgyq' |
| | | }, |
| | | |
| | | { |
| | | id: 2, |
| | | label: '企业分布', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getPage, |
| | | params: { |
| | | size: 1000 |
| | | }, |
| | | layerName: 'qyfb' |
| | | }, |
| | | |
| | | { |
| | | id: 3, |
| | | label: '应急空间', |
| | | children: [ |
| | | { |
| | | id: 4, |
| | | label: '倾斜摄影', |
| | | children: [ |
| | | { |
| | | id: 9, |
| | | label: '化工园区', |
| | | type: 'layer', |
| | | subType: '3Dtile', |
| | | url: VITE_APP_BASE + 'mx/tileset.json' |
| | | }, |
| | | ], |
| | | id: 3 - 1, |
| | | label: '应急池', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 1, |
| | | size: 1000 |
| | | }, |
| | | layerName: 'yjc' |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 3 - 2, |
| | | label: '阀门', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 2, |
| | | size: 1000 |
| | | }, |
| | | layerName: 'fm' |
| | | }, |
| | | |
| | | { |
| | | id: 3 - 3, |
| | | label: '公共管网', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 3, |
| | | size: 1000 |
| | | }, |
| | | layerName: 'gggw' |
| | | }, |
| | | |
| | | { |
| | | id: 3 - 4, |
| | | label: '污水提升泵站', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 4, |
| | | size: 1000 |
| | | }, |
| | | layerName: 'wstsbz' |
| | | }, |
| | | |
| | | { |
| | | id: 3 - 5, |
| | | label: '水库', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 5, |
| | | size: 1000 |
| | | }, |
| | | layerName: 'sk' |
| | | }, |
| | | |
| | | { |
| | | id: 3 - 6, |
| | | label: '应急泵', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 6, |
| | | size: 1000 |
| | | }, |
| | | layerName: 'yjb' |
| | | }, |
| | | |
| | | { |
| | | id: 3 - 7, |
| | | label: '消防沙', |
| | | type: 'layer', |
| | | subType: 'labelPoint', |
| | | method: getList, |
| | | params: { |
| | | type: 7, |
| | | size: 1000 |
| | | }, |
| | | layerName: 'xfs' |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | |
| | | const defaultProps = { |
| | |
| | | let tileLayers = new DC.TilesetLayer('tileLayers') |
| | | globalViewer.addLayer(tileLayers) |
| | | |
| | | |
| | | |
| | | const handleCheckChange = (data, options) => { |
| | | collectedNodes.value = [] |
| | | collectNodesWithFlag(data) |
| | |
| | | ) |
| | | tileLayers.addOverlay(addTileLayers[item.layerName]) |
| | | globalViewer.flyTo(addTileLayers[item.layerName]) |
| | | } else if (item.subType == 'labelPoint') { |
| | | addTileLayers[item.layerName] = new DC.HtmlLayer('labelLayer') |
| | | globalViewer.addLayer(addTileLayers[item.layerName]) |
| | | |
| | | item.method(item.params).then(res => { |
| | | let data = res.data.data.records |
| | | |
| | | data.filter(i => i.lng && i.lng != '' && i.lat && i.lat != '').forEach(i => { |
| | | let divIcon = new DC.DivIcon( |
| | | new DC.Position(i.lng, i.lat, 0), |
| | | `<div class="public-map-popup"> |
| | | <div class="marsBlueGradientPnl"> |
| | | <div>${i.name}</div> |
| | | </div> |
| | | </div>` |
| | | ) |
| | | |
| | | addTileLayers[item.layerName].addOverlay(divIcon) |
| | | }) |
| | | }) |
| | | } |
| | | } else { |
| | | if (item.subType == '3Dtile') { |
| | | tileLayers.removeOverlay(addTileLayers[item.layerName]) |
| | | |
| | | delete addTileLayers[item.layerName] |
| | | } else if (item.subType == 'labelPoint') { |
| | | globalViewer.removeLayer(addTileLayers[item.layerName]) |
| | | } |
| | | |
| | | delete addTileLayers[item.layerName] |
| | | } |
| | | }) |
| | | } |
| | |
| | | * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. |
| | | --> |
| | | <script setup> |
| | | // import publicContent from './publicContent.vue' |
| | | |
| | | import publicContent from './publicContent.vue' |
| | | |
| | | import { inject, reactive } from 'vue' |
| | | |
| | | let $echarts = inject('echarts') |
| | | |
| | | console.log("111111111111111111", $echarts) |
| | | const curEcharts = ref(null) |
| | | |
| | | onMounted(() => { |
| | | let myEcharts = $echarts.init(document.getElementById('fire-content-echarts')) |
| | | nextTick(() => { |
| | | let myEcharts = $echarts.init(curEcharts.value) |
| | | myEcharts.setOption({ |
| | | xAxis: { |
| | | data: ['A', 'B', 'C', 'D', 'E'] |
| | | }, |
| | | yAxis: {}, |
| | | series: [ |
| | | { |
| | | type: 'bar', |
| | | data: [10, 22, 28, 43, 49], |
| | | barWidth: '60%' |
| | | } |
| | | ] |
| | | xAxis: { |
| | | data: ['A', 'B', 'C', 'D', 'E'] |
| | | }, |
| | | yAxis: {}, |
| | | series: [ |
| | | { |
| | | type: 'bar', |
| | | data: [10, 22, 28, 43, 49], |
| | | barWidth: '60%' |
| | | } |
| | | ] |
| | | }) |
| | | }) |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | | <!-- <public-content> |
| | | <template #content> --> |
| | | <div class="fireContent-box"> |
| | | <public-content> |
| | | <template #content> |
| | | <div class="fireContent-box"> |
| | | |
| | | <div> |
| | | <div class="fire-content-echarts" id="fire-content-echarts"> |
| | | <div class="fire-content-echarts" ref="curEcharts"> |
| | | |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | <!-- </template> |
| | | </public-content> --> |
| | | </div> |
| | | </template> |
| | | </public-content> |
| | | </template> |
| | | |
| | | <style lang="scss" scoped> |
| | | .fireContent-box { |
| | | color: #fff; |
| | | color: #fff; |
| | | } |
| | | |
| | | .fire-content-echarts { |
| | | height: 4.5rem |
| | | height: 4.5rem |
| | | } |
| | | </style> |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-03-13 14:54:26 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2024-11-01 10:08:41 |
| | | * @LastEditTime: 2024-11-04 13:58:17 |
| | | * @FilePath: \bigScreen\src\views\survey\components\box\unitContent.vue |
| | | * @Description: |
| | | * |
| | |
| | | |
| | | let $echarts = inject('echarts') |
| | | const curEcharts = ref(null) |
| | | |
| | | console.log($echarts) |
| | | |
| | | onMounted(() => { |
| | | nextTick(() => { |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="container page-container"> |
| | | <left-container></left-container> |
| | | <div class="container page-container"> |
| | | <left-container></left-container> |
| | | |
| | | <right-container></right-container> |
| | | </div> |
| | | <right-container></right-container> |
| | | </div> |
| | | </template> |
| | | |
| | | <style lang="scss" scoped> |
| | | .container { |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | position: absolute; |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | </style> |