diff --git a/src/views/sponeScreen/gisMF/cesiumPopup.vue b/src/views/sponeScreen/gisMF/cesiumPopup.vue index cd7e9d1..97878ec 100644 --- a/src/views/sponeScreen/gisMF/cesiumPopup.vue +++ b/src/views/sponeScreen/gisMF/cesiumPopup.vue @@ -188,12 +188,15 @@ if (res && res.code == 200) { let datas = res.data; console.log(datas, 'datas'); - // if (datas.propertyMonitorXList.length == 0) return; // echarts赋值 chartOption.floodOneMapFXYP.xAxis[0].data = datas.riverX; //x轴 chartOption.floodOneMapFXYP.series[1].data = datas.riverY; //河床高度 - chartOption.floodOneMapFXYP.series[1].markLine.data[0].yAxis = datas.sfZ; //设防水位 - chartOption.floodOneMapFXYP.series[1].markLine.data[0].label.formatter = '设防水位 ' + datas.sfZ + 'm'; + //设防水位 datas.sfZ 目前取河床低的一侧0.1米处 + let sfsw = ( + (datas.riverY[0] < datas.riverY[datas.riverY.length - 1] ? datas.riverY[0] : datas.riverY[datas.riverY.length - 1]) - 0.1 + ).toFixed(1); + chartOption.floodOneMapFXYP.series[1].markLine.data[0].yAxis = sfsw; + chartOption.floodOneMapFXYP.series[1].markLine.data[0].label.formatter = '设防水位 ' + sfsw + 'm'; let arrs2 = []; datas.riverX.map(item => { arrs2.push(Number(datas.z) + Number(datas.gcZ));