diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue index 5cca966..1b69617 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue @@ -32,6 +32,7 @@ import { rainCalendar } from "@/api/FloodControlAndDrainage"; import moment from "moment"; +import { forEach } from "jszip"; const props = defineProps({ // 数据id @@ -64,6 +65,8 @@ TLK: "", WTRQ: "", TQ: "", + JKSZ: 0, + PFBZ: 0, }); const init = () => { //先获取Dom上的实例 @@ -233,6 +236,10 @@ color: "#FFC155", // 数据点颜色 width: 4, }, + markLine: { + data: [], + symbol: ["none", "none"], // 这里设置标记线两端的标记为'none',即不显示箭头 + }, }, { name: AllData.yAxis3_Name, @@ -252,6 +259,39 @@ }, ], }; + if (AllData.JKSZ > 0) { + option.series[1].markLine.data.push({ + yAxis: AllData.JKSZ, // 这是水平线的 Y 轴值 + lineStyle: { + type: "dashed", + color: "#FFC155", // 线的颜色 + }, + label: { + show: true, + formatter: "进口水质:" + AllData.JKSZ, + color: "#FFC155", + fontSize: 12, + position: "middle", + }, + }); + } + if (AllData.PFBZ > 0) { + option.series[1].markLine.data.push({ + yAxis: AllData.PFBZ, // 这是水平线的 Y 轴值 + lineStyle: { + type: "dashed", + color: "#99FF55", // 线的颜色 + cap: "round", + }, + label: { + show: true, + formatter: "排放标准:" + AllData.PFBZ, + color: "#99FF55", + fontSize: 12, + position: "middle", + }, + }); + } option && chartDom.setOption(option, true); AllData.chart = chartDom; } @@ -284,6 +324,14 @@ break; case "cond": AllData.yAxis2 = element.datas; + element.cordonLineList.forEach((element) => { + if (element.lineName == "进口COD水质") { + AllData.JKSZ = Number(element.lineValue); + } + if (element.lineName == "排放标准") { + AllData.PFBZ = Number(element.lineValue); + } + }); break; case "pn05": AllData.yAxis = element.datas; diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue index 5cca966..1b69617 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/szycfxJCFX.vue @@ -32,6 +32,7 @@ import { rainCalendar } from "@/api/FloodControlAndDrainage"; import moment from "moment"; +import { forEach } from "jszip"; const props = defineProps({ // 数据id @@ -64,6 +65,8 @@ TLK: "", WTRQ: "", TQ: "", + JKSZ: 0, + PFBZ: 0, }); const init = () => { //先获取Dom上的实例 @@ -233,6 +236,10 @@ color: "#FFC155", // 数据点颜色 width: 4, }, + markLine: { + data: [], + symbol: ["none", "none"], // 这里设置标记线两端的标记为'none',即不显示箭头 + }, }, { name: AllData.yAxis3_Name, @@ -252,6 +259,39 @@ }, ], }; + if (AllData.JKSZ > 0) { + option.series[1].markLine.data.push({ + yAxis: AllData.JKSZ, // 这是水平线的 Y 轴值 + lineStyle: { + type: "dashed", + color: "#FFC155", // 线的颜色 + }, + label: { + show: true, + formatter: "进口水质:" + AllData.JKSZ, + color: "#FFC155", + fontSize: 12, + position: "middle", + }, + }); + } + if (AllData.PFBZ > 0) { + option.series[1].markLine.data.push({ + yAxis: AllData.PFBZ, // 这是水平线的 Y 轴值 + lineStyle: { + type: "dashed", + color: "#99FF55", // 线的颜色 + cap: "round", + }, + label: { + show: true, + formatter: "排放标准:" + AllData.PFBZ, + color: "#99FF55", + fontSize: 12, + position: "middle", + }, + }); + } option && chartDom.setOption(option, true); AllData.chart = chartDom; } @@ -284,6 +324,14 @@ break; case "cond": AllData.yAxis2 = element.datas; + element.cordonLineList.forEach((element) => { + if (element.lineName == "进口COD水质") { + AllData.JKSZ = Number(element.lineValue); + } + if (element.lineName == "排放标准") { + AllData.PFBZ = Number(element.lineValue); + } + }); break; case "pn05": AllData.yAxis = element.datas; diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/ylfxJCFX.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/ylfxJCFX.vue index c670786..9adc854 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/ylfxJCFX.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/ylfxJCFX.vue @@ -75,6 +75,8 @@ yAxis3: [], yAxis3_Name: "水深", xAxis: [], + MGSW: 0, + GSW: 0, }); const init = () => { //先获取Dom上的实例 @@ -222,9 +224,48 @@ itemStyle: { color: "#99FF55", // 数据点颜色 }, + // yAxisIndex: 1, + markLine: { + data: [], + symbol: ["none", "none"], // 这里设置标记线两端的标记为'none',即不显示箭头 + }, }, ], }; + if (AllData.MGSW > 0) { + option.series[1].markLine.data.push({ + yAxis: AllData.MGSW, // 这是水平线的 Y 轴值 + lineStyle: { + type: "dashed", + color: "red", // 线的颜色 + }, + label: { + show: true, + // formatter: "满管水位" + props.data.yAxis6_YJ, + formatter: "满管水位:" + AllData.MGSW, + color: "red", + fontSize: 12, + position: "middle", + }, + }); + } + if (AllData.GSW > 0) { + option.series[1].markLine.data.push({ + yAxis: AllData.GSW, // 这是水平线的 Y 轴值 + lineStyle: { + type: "dashed", + color: "yellow", // 线的颜色 + cap: "round", + }, + label: { + show: true, + formatter: "高水位:" + AllData.GSW, + color: "yellow", + fontSize: 12, + position: "middle", + }, + }); + } option && chartDom.setOption(option, true); AllData.chart = chartDom; } @@ -250,6 +291,14 @@ switch (element.dataKey) { case "z": AllData.yAxis3 = element.datas; + element.cordonLineList.forEach((element) => { + if (element.lineName == "满管水位") { + AllData.MGSW = Number(element.lineValue); + } + if (element.lineName == "高水位") { + AllData.GSW = Number(element.lineValue); + } + }); break; case "pn05":