|
@@ -2,13 +2,13 @@
|
|
|
<div class="map-index">
|
|
<div class="map-index">
|
|
|
<!-- 苏州河 -->
|
|
<!-- 苏州河 -->
|
|
|
<div ref="scrollContainer" v-if="route.params.id=='28'" style="border: 2px solid #409EFF;background-color: rgba(127, 161, 215, 0.5);border-radius: 50px 50px 50px 50px;
|
|
<div ref="scrollContainer" v-if="route.params.id=='28'" style="border: 2px solid #409EFF;background-color: rgba(127, 161, 215, 0.5);border-radius: 50px 50px 50px 50px;
|
|
|
- align-items: center;display: flex;position: absolute;z-index: 9999;bottom: 1%;left: 1%;width:50vw;height: 10vh;overflow-x:auto;overflow-y: hidden;">
|
|
|
|
|
|
|
+ align-items: center;display: flex;position: absolute;z-index: 100;bottom: 1%;left: 1%;width:50vw;height: 10vh;overflow-x:auto;overflow-y: hidden;">
|
|
|
<svg-icon icon-class="start1" v-if="!isStart" @click="reStart" style="margin-left: 10%;width: 30px;height:30px;cursor: pointer;"/>
|
|
<svg-icon icon-class="start1" v-if="!isStart" @click="reStart" style="margin-left: 10%;width: 30px;height:30px;cursor: pointer;"/>
|
|
|
<svg-icon icon-class="pause1" v-if="isStart" @click="pause" style="margin-left: 10%;width: 30px;height:30px;cursor: pointer;"/>
|
|
<svg-icon icon-class="pause1" v-if="isStart" @click="pause" style="margin-left: 10%;width: 30px;height:30px;cursor: pointer;"/>
|
|
|
<el-slider @change="pauseIn" :format-tooltip="formatTooltip" v-model="activities1" :max="dateLength" :marks="marks" style="width: 80%;margin-left: 1%;"/>
|
|
<el-slider @change="pauseIn" :format-tooltip="formatTooltip" v-model="activities1" :max="dateLength" :marks="marks" style="width: 80%;margin-left: 1%;"/>
|
|
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="route.params.id=='28'" style="background-color: white;position: absolute;z-index: 9999;top: 1%;left: 1%;width: 20vw;height: 45vh;overflow:auto;">
|
|
|
|
|
|
|
+ <div v-if="route.params.id=='28'" style="background-color: white;position: absolute;z-index: 100;top: 1%;left: 1%;width: 20vw;height: 45vh;overflow:auto;">
|
|
|
<div class="biz-data-card-header">方案列表</div>
|
|
<div class="biz-data-card-header">方案列表</div>
|
|
|
<el-table
|
|
<el-table
|
|
|
:data="tableDataFangan"
|
|
:data="tableDataFangan"
|
|
@@ -31,7 +31,7 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="route.params.id=='28'" style="background-color: white;position: absolute;z-index: 9999;top: 1%;right: 1%;width: 30vw;height: 85vh;overflow:auto;">
|
|
|
|
|
|
|
+ <div v-if="route.params.id=='28'" style="background-color: white;position: absolute;z-index: 100;top: 1%;right: 1%;width: 30vw;height: 85vh;overflow:auto;">
|
|
|
<div class="biz-data-card-header">水位信息</div>
|
|
<div class="biz-data-card-header">水位信息</div>
|
|
|
<el-table
|
|
<el-table
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
@@ -53,6 +53,7 @@
|
|
|
<el-table-column prop="time" label="时间" width="210"/>
|
|
<el-table-column prop="time" label="时间" width="210"/>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div id="tooltip" ref="tooltipRef" class="tooltip"></div>
|
|
|
<!-- 温带风暴潮 -->
|
|
<!-- 温带风暴潮 -->
|
|
|
<div ref="scrollContainer" v-if="route.params.id=='20'" style="border: 2px solid #409EFF;background-color: rgba(127, 161, 215, 0.5);border-radius: 50px 50px 50px 50px;
|
|
<div ref="scrollContainer" v-if="route.params.id=='20'" style="border: 2px solid #409EFF;background-color: rgba(127, 161, 215, 0.5);border-radius: 50px 50px 50px 50px;
|
|
|
align-items: center;display: flex;position: absolute;z-index: 100;bottom: 1%;left: 1%;width:50vw;height: 10vh;overflow-x:auto;overflow-y: hidden;">
|
|
align-items: center;display: flex;position: absolute;z-index: 100;bottom: 1%;left: 1%;width:50vw;height: 10vh;overflow-x:auto;overflow-y: hidden;">
|
|
@@ -107,6 +108,30 @@
|
|
|
<el-table-column prop="gfsWnddir" label="风向" width=""/>
|
|
<el-table-column prop="gfsWnddir" label="风向" width=""/>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 上海风暴潮 -->
|
|
|
|
|
+ <div v-if="route.params.id=='30'" style="background-color: white;position: absolute;z-index: 100;top: 1%;left: 1%;width: 20vw;height: 45vh;overflow:auto;">
|
|
|
|
|
+ <div class="biz-data-card-header">方案列表</div>
|
|
|
|
|
+ <el-table
|
|
|
|
|
+ :data="tableDataShanghaifeng"
|
|
|
|
|
+ style="width: 98%;margin-left: 1%;margin-top: 1%;height: 40vh;"
|
|
|
|
|
+ :cell-style="{ padding:'5px' }"
|
|
|
|
|
+ :header-cell-style="{height: heightAll*0.01+'px',}"
|
|
|
|
|
+ :row-style="{ fontSize: '16px',textAlign:'center'}"
|
|
|
|
|
+ border >
|
|
|
|
|
+ <el-table-column type="index" label="序号" width="80">
|
|
|
|
|
+ <template #default="{ $index }">
|
|
|
|
|
+ <div style="text-align: center;">
|
|
|
|
|
+ {{ $index + 1 }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ <el-table-column prop="planName" label="名称">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <span style="cursor: pointer;color:#409EFF" @click="getZ(scope.row)">{{ scope.row.planName }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
|
|
+ </el-table>
|
|
|
|
|
+ </div>
|
|
|
<el-dialog @close="clearFromLev" :title="titleFengbao" v-model="dialogVisibleFengbao" width="50%" destroy-on-close>
|
|
<el-dialog @close="clearFromLev" :title="titleFengbao" v-model="dialogVisibleFengbao" width="50%" destroy-on-close>
|
|
|
<div>
|
|
<div>
|
|
|
<div style="font-size: 20px;margin-left: 2%;">水位</div>
|
|
<div style="font-size: 20px;margin-left: 2%;">水位</div>
|
|
@@ -124,13 +149,40 @@
|
|
|
<div style="font-size: 20px;margin-left: 2%;margin-top:1%">风向</div>
|
|
<div style="font-size: 20px;margin-left: 2%;margin-top:1%">风向</div>
|
|
|
<div id="fengxiang" style="width: 100%;height:18vh;margin-top: 1%;"></div>
|
|
<div id="fengxiang" style="width: 100%;height:18vh;margin-top: 1%;"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <template #footer>
|
|
|
|
|
- <span class="dialog-footer">
|
|
|
|
|
- <el-button type="primary" @click="dialogVisibleFengbao = false" size="mini">
|
|
|
|
|
- 确定
|
|
|
|
|
- </el-button>
|
|
|
|
|
- </span>
|
|
|
|
|
- </template> -->
|
|
|
|
|
|
|
+ </el-dialog>
|
|
|
|
|
+ <el-dialog @close="clearFromLev" title="" v-model="dialogVisibleSuzhou" width="30%" destroy-on-close>
|
|
|
|
|
+ <el-descriptions
|
|
|
|
|
+ class="margin-top"
|
|
|
|
|
+ :title="titleSuzhou"
|
|
|
|
|
+ :column="1"
|
|
|
|
|
+ :size="size"
|
|
|
|
|
+ border
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template #label>
|
|
|
|
|
+ <div class="cell-item">
|
|
|
|
|
+ 站码
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ {{suzhou.stationId}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template #label>
|
|
|
|
|
+ <div class="cell-item">
|
|
|
|
|
+ 水位
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ {{suzhou.waterLevel}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ <el-descriptions-item>
|
|
|
|
|
+ <template #label>
|
|
|
|
|
+ <div class="cell-item">
|
|
|
|
|
+ 时间
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ {{suzhou.tm}}
|
|
|
|
|
+ </el-descriptions-item>
|
|
|
|
|
+ </el-descriptions>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<div id="mapChart"></div>
|
|
<div id="mapChart"></div>
|
|
|
</div>
|
|
</div>
|
|
@@ -138,6 +190,7 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import 'ol/css';
|
|
import 'ol/css';
|
|
|
import {defaults as defaultControls} from 'ol/control';
|
|
import {defaults as defaultControls} from 'ol/control';
|
|
|
|
|
+import {getForecastlist} from "@/api/standardization/bizDataShowConfig.js";
|
|
|
import Map from 'ol/Map';
|
|
import Map from 'ol/Map';
|
|
|
import View from 'ol/View';
|
|
import View from 'ol/View';
|
|
|
import TileLayer from "ol/layer/Tile";
|
|
import TileLayer from "ol/layer/Tile";
|
|
@@ -176,7 +229,9 @@ const tableDataFangan = ref([])
|
|
|
const scrollContainer = ref(null);
|
|
const scrollContainer = ref(null);
|
|
|
const scrollAmount =0;
|
|
const scrollAmount =0;
|
|
|
const widthAll = ref(window.innerWidth)
|
|
const widthAll = ref(window.innerWidth)
|
|
|
|
|
+const dialogVisibleSuzhou = ref(false)
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
|
|
+const suzhou = ref({})
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
config: Object,
|
|
config: Object,
|
|
|
});
|
|
});
|
|
@@ -190,12 +245,65 @@ const dateLength = ref(0)
|
|
|
const marks = ref({
|
|
const marks = ref({
|
|
|
})
|
|
})
|
|
|
const isStart = ref(true)
|
|
const isStart = ref(true)
|
|
|
|
|
+const tooltipRef = ref(null);
|
|
|
|
|
+let currentFeature = null
|
|
|
|
|
+let overlay = null
|
|
|
|
|
+const tableDataShanghaifeng = ref([])
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
|
- await initMap();
|
|
|
|
|
|
|
+ initMap();
|
|
|
// 初始化完成后执行配置渲染
|
|
// 初始化完成后执行配置渲染
|
|
|
- if(route.params.id==='25'){
|
|
|
|
|
|
|
+ if(route.params.id==='30'){
|
|
|
|
|
+ getForecastlist({appId: route.params.id}).then(res=>{
|
|
|
|
|
+ tableDataShanghaifeng.value = res.rows
|
|
|
|
|
+ })
|
|
|
polygonLayer.value = createPolygonLayer(jsonDatak5)
|
|
polygonLayer.value = createPolygonLayer(jsonDatak5)
|
|
|
mapChart.value.addLayer(polygonLayer.value);
|
|
mapChart.value.addLayer(polygonLayer.value);
|
|
|
|
|
+ overlay = new Overlay({
|
|
|
|
|
+ element: tooltipRef.value,
|
|
|
|
|
+ positioning: 'bottom-center',
|
|
|
|
|
+ offset: [0, -10],
|
|
|
|
|
+ stopEvent: false,
|
|
|
|
|
+ });
|
|
|
|
|
+ mapChart.value.addOverlay(overlay);
|
|
|
|
|
+ mapChart.value.getView().setZoom(18)
|
|
|
|
|
+ mapChart.value.getView().setCenter([121.41335460526926,31.205820744558153]);
|
|
|
|
|
+ mapChart.value.on('pointermove', (e) => {
|
|
|
|
|
+ if (e.dragging) {
|
|
|
|
|
+ return; // 如果正在拖拽地图,则不处理[2,7](@ref)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ const pixel = mapChart.value.getEventPixel(e.originalEvent);
|
|
|
|
|
+ const feature = mapChart.value.forEachFeatureAtPixel(pixel, (feature) => feature);
|
|
|
|
|
+
|
|
|
|
|
+ if (feature) {
|
|
|
|
|
+ // 鼠标在要素上[7](@ref)
|
|
|
|
|
+ if (feature !== currentFeature) {
|
|
|
|
|
+ currentFeature = feature;
|
|
|
|
|
+ console.log(feature.values_)
|
|
|
|
|
+ // 获取要素属性信息
|
|
|
|
|
+ const featureCode = feature.values_.element_no;
|
|
|
|
|
+ const featureDep = feature.values_.DEPTH2D
|
|
|
|
|
+
|
|
|
|
|
+ // 更新工具提示内容[2](@ref)
|
|
|
|
|
+ tooltipRef.value.innerHTML = `
|
|
|
|
|
+ <div class="tooltip-header">编号:${featureCode}</div>
|
|
|
|
|
+ <div class="tooltip-content">水深: ${featureDep}</div>
|
|
|
|
|
+ `;
|
|
|
|
|
+
|
|
|
|
|
+ // 设置工具提示位置并显示[7](@ref)
|
|
|
|
|
+ overlay.setPosition(e.coordinate);
|
|
|
|
|
+ tooltipRef.value.style.display = 'block';
|
|
|
|
|
+
|
|
|
|
|
+ // 更改鼠标指针样式为手型[3,5](@ref)
|
|
|
|
|
+ mapChart.value.getTargetElement().style.cursor = 'pointer';
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 鼠标不在要素上
|
|
|
|
|
+ tooltipRef.value.style.display = 'none';
|
|
|
|
|
+ currentFeature = null;
|
|
|
|
|
+ mapChart.value.getTargetElement().style.cursor = ''; // 恢复默认指针[3](@ref)
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
if(route.params.id==='28'){
|
|
if(route.params.id==='28'){
|
|
|
tableDataFangan.value = fangan.data.records
|
|
tableDataFangan.value = fangan.data.records
|
|
@@ -241,11 +349,39 @@ onMounted(async () => {
|
|
|
},
|
|
},
|
|
|
label: parTime[3].timestamp.slice(5),
|
|
label: parTime[3].timestamp.slice(5),
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log(activities)
|
|
|
suzhouJson.data.inputParam = JSON.parse(suzhouJson.data.inputParam)
|
|
suzhouJson.data.inputParam = JSON.parse(suzhouJson.data.inputParam)
|
|
|
console.log(suzhouJson.data)
|
|
console.log(suzhouJson.data)
|
|
|
timerId = setInterval(changeMap, 1000)
|
|
timerId = setInterval(changeMap, 1000)
|
|
|
|
|
+ console.log(suzhouPoint)
|
|
|
pointLayer.value = createPointlayer(suzhouPoint)
|
|
pointLayer.value = createPointlayer(suzhouPoint)
|
|
|
mapChart.value.addLayer(pointLayer.value);
|
|
mapChart.value.addLayer(pointLayer.value);
|
|
|
|
|
+ mapChart.value.on('click', (event) => {
|
|
|
|
|
+ const feature = mapChart.value.forEachFeatureAtPixel(
|
|
|
|
|
+ event.pixel,
|
|
|
|
|
+ (feature) => feature
|
|
|
|
|
+ );
|
|
|
|
|
+
|
|
|
|
|
+ if (feature) {
|
|
|
|
|
+ pause()
|
|
|
|
|
+ const properties = feature.getProperties();
|
|
|
|
|
+ dialogVisibleSuzhou.value = true
|
|
|
|
|
+ titleSuzhou.value = properties.name
|
|
|
|
|
+ console.log('要素属性:', properties);
|
|
|
|
|
+ suzhou.value = properties
|
|
|
|
|
+ suzhou.value.tm = activities.value[count.value-1].timestamp
|
|
|
|
|
+ const title = feature.get('title');
|
|
|
|
|
+ const id = feature.get('id');
|
|
|
|
|
+ console.log('标题:', title, 'ID:', id);
|
|
|
|
|
+
|
|
|
|
|
+ // 获取几何信息
|
|
|
|
|
+ const geometry = feature.getGeometry();
|
|
|
|
|
+ const coordinates = geometry.getCoordinates();
|
|
|
|
|
+ console.log('几何坐标:', coordinates);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log('未点击到任何要素');
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
if(route.params.id==='20'){
|
|
if(route.params.id==='20'){
|
|
|
tableDataFangan.value = fangan.data.records
|
|
tableDataFangan.value = fangan.data.records
|
|
@@ -256,6 +392,7 @@ onMounted(async () => {
|
|
|
await loadLayers(props.config.layers);
|
|
await loadLayers(props.config.layers);
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+const titleSuzhou = ref('')
|
|
|
const count = ref(0)
|
|
const count = ref(0)
|
|
|
const tableData = ref()
|
|
const tableData = ref()
|
|
|
function getZ(row){
|
|
function getZ(row){
|
|
@@ -524,10 +661,6 @@ function changeMap(){
|
|
|
if(count.value >= keys1.length){
|
|
if(count.value >= keys1.length){
|
|
|
console.log(count.value,keys1.length)
|
|
console.log(count.value,keys1.length)
|
|
|
count.value = 0
|
|
count.value = 0
|
|
|
- scrollContainer.value.scrollTo({
|
|
|
|
|
- left: 0, // 滚动到顶部
|
|
|
|
|
- behavior: 'smooth' // 启用平滑滚动效果
|
|
|
|
|
- });
|
|
|
|
|
}
|
|
}
|
|
|
activities1.value = count.value
|
|
activities1.value = count.value
|
|
|
mapChart.value.removeLayer(pointLayer.value)
|
|
mapChart.value.removeLayer(pointLayer.value)
|
|
@@ -572,15 +705,6 @@ function createPolygonLayer(jsonData){
|
|
|
})
|
|
})
|
|
|
});
|
|
});
|
|
|
// 创建多边形要素样式[6,7](@ref)
|
|
// 创建多边形要素样式[6,7](@ref)
|
|
|
- const polygonStyle = new Style({
|
|
|
|
|
- fill: new Fill({
|
|
|
|
|
- color: 'rgba(0, 102, 255, 0.3)' // 半透明蓝色填充
|
|
|
|
|
- }),
|
|
|
|
|
- stroke: new Stroke({
|
|
|
|
|
- color: '#0066ff', // 蓝色边框
|
|
|
|
|
- width: 2 // 边框宽度
|
|
|
|
|
- })
|
|
|
|
|
- });
|
|
|
|
|
const styleFunction = function(feature) {
|
|
const styleFunction = function(feature) {
|
|
|
const properties = feature.getProperties();
|
|
const properties = feature.getProperties();
|
|
|
if (properties.DEPTH2D >= 1) {
|
|
if (properties.DEPTH2D >= 1) {
|
|
@@ -721,6 +845,7 @@ function createPointlayer(dataJson){
|
|
|
area: station.QUYU,
|
|
area: station.QUYU,
|
|
|
river: station.HELIU,
|
|
river: station.HELIU,
|
|
|
type: station.TYPE,
|
|
type: station.TYPE,
|
|
|
|
|
+ // tm:,
|
|
|
stationId: station.STATIONID
|
|
stationId: station.STATIONID
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -1274,4 +1399,30 @@ watch(() => props.config, async (config) => {
|
|
|
.active :deep(.el-timeline-item__tail) {
|
|
.active :deep(.el-timeline-item__tail) {
|
|
|
border-color: #409EFF;
|
|
border-color: #409EFF;
|
|
|
}
|
|
}
|
|
|
|
|
+.tooltip {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ background: #409EFF;
|
|
|
|
|
+ color: white;
|
|
|
|
|
+ padding: 8px 12px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ width: 100px;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ display: none; /* 初始隐藏 */
|
|
|
|
|
+ box-shadow: 0 2px 4px #409EFF;
|
|
|
|
|
+ max-width: 200px;
|
|
|
|
|
+ z-index: 1000;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.tooltip-header {
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ margin-bottom: 4px;
|
|
|
|
|
+ border-bottom: 1px solid rgba(255,255,255,0.3);
|
|
|
|
|
+ padding-bottom: 2px;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.tooltip-content {
|
|
|
|
|
+ font-size: 11px;
|
|
|
|
|
+ opacity: 0.9;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|