diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue index 4b7aa4a..58327c8 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue @@ -53,9 +53,9 @@ /> --> -
- + -
+ :YAxis3="chartInfo2.YAxis3" + :yAxisarr="chartInfo2.yAxisarr" + > + + @@ -77,7 +77,7 @@ import { siteHistoryMonitorDataAnalysis } from '@/api/FloodControlAndDrainage'; import { getRELAList, getEchart } from '@/api/MonitorAssetsOnMap'; -import MonitoringAnalysisChart from './MonitoringAnalysisChart.vue'; +import shuikujianceEcharts from '@/views/pictureOnMap/page/components/DialogTabs/component/shuikujianceEcharts.vue'; import moment from 'moment'; @@ -173,20 +173,23 @@ }; const chartInfo2 = ref({ refresh: 1, - // DataName: "", - XAxis: [], - typeName: '5分钟降雨量(mm)', - typeName2: '黄海水位(m)', - YAxis: [], - YAxis2: [], + DataName: '', + XAxis: ['1:00', '3:00', '5:00', '7:00', '9:00', '11:00', '13:00', '15:00', '17:00'], + typeName: '降雨量', + YAxis: [0, 1, 6, 3, 4], loading: false, - marklineJYL: [], - marklineSS: [], + yAxisarr: [ + + ], + marklinearr: [ + + ], }); -let isEchart = ref(false); -let loadingEchart = ref(false); + let loadingEchart=ref(false) + const showecharts = ref(false); function getDataEchart() { - loadingEchart.value = true; + showecharts.value = false; + loadingEchart.value=true let params = { stType: props.Getproperties.stType, stCode: Search_form.stCode, @@ -194,122 +197,24 @@ end: Search_form.Timers[1], }; console.log('params', params); - getEchart(params).then( - res => { - isEchart.value = true; + getEchart(params).then(res => { + showecharts.value = true; + loadingEchart.value=false - let res1 = { - code: 200, - msg: '操作成功', - data: { - datas: [ - { - dataKey: 'z', - dataName: '黄海水位', - unit: '(m)', - datas: ['0', '0', '1', '0', '2', '0.5', '0', '0', '0', '0.2'], - cordonLineList: [ - { - id: '1856620587907244131', - cordonId: '1856647503229968394', - lineName: '正常蓄水位', - lineValue: '1.3', - lineType: '2', - lineColor: 'rgba(0, 255, 68, 1)', - systemDefault: '0', - code: 'normal_water_level', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - { - id: '1856620587932409132', - cordonId: '1856647503229968394', - lineName: '设计洪水位', - lineValue: '1.8', - lineType: '1', - lineColor: 'rgba(221, 255, 0, 1)', - systemDefault: '0', - code: 'design_flood_level', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - { - id: '1856620587936604135', - cordonId: '1856647503229968394', - lineName: '校核洪水位', - lineValue: '1.98', - lineType: '1', - lineColor: 'rgba(255, 191, 0, 1)', - systemDefault: '0', - code: 'verify_flood_level', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - { - id: '1856620587936604134', - cordonId: '1856647503229968394', - lineName: '坝顶高程', - lineValue: '2.8', - lineType: '1', - lineColor: 'rgba(255, 81, 0, 1)', - systemDefault: '0', - code: 'dam_hight', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - ], - }, - { - dataKey: 'pn05', - dataName: '降雨量', - unit: 'mm', - datas: ['10', '5', '11', '2', '2', '20', '15', '0', '0', '0.2'], - cordonLineList: [], - }, - ], - times: [ - '1732291200000', - '1732291200000', - '1732291800000', - '1732292100000', - '1732292400000', - '1732292700000', - '1732293000000', - '1732293300000', - '1732293600000', - '1732293900000', - ], - }, - }; - console.log('监测分析统计res', res); - loadingEchart.value = false; + console.log(res.data); + chartInfo2.value.XAxis = res.data.times; + chartInfo2.value.yAxisarr = res.data.datas; - if (res && res.code == 200) { - let data = res.data; - let pn05Arr = data.datas.find(item => item.dataKey == 'pn05') || []; //降雨 - let zArr = data.datas.find(item => item.dataKey == 'z') || []; //水深 - if (pn05Arr) { - chartInfo2.value.YAxis = pn05Arr.datas; - chartInfo2.value.marklineJYL = pn05Arr.cordonLineList; - } - if (zArr) { - chartInfo2.value.YAxis2 = zArr.datas; - chartInfo2.value.marklineSS = zArr.cordonLineList; - } + res.data.datas.map(item => { + chartInfo2.value.marklinearr.push(...item.cordonLineList); + }); - chartInfo2.value.XAxis = data.times; - // console.log('chartInfo2123',chartInfo2.value); - chartInfo2.value.refresh = Math.random(); - } - }, - error => { - loadingEchart.value = false; - } - ); + console.log('chartInfo2.value.marklinearr', chartInfo2.value.marklinearr); + + chartInfo2.value.refresh = Math.random(); + },(error)=>{ + loadingEchart.value=false + }); } onMounted(() => { console.log('props.Getproperties.id', props.Getproperties); diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue index 4b7aa4a..58327c8 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/guanlianjianceHeHu.vue @@ -53,9 +53,9 @@ /> --> -
- + -
+ :YAxis3="chartInfo2.YAxis3" + :yAxisarr="chartInfo2.yAxisarr" + > + + @@ -77,7 +77,7 @@ import { siteHistoryMonitorDataAnalysis } from '@/api/FloodControlAndDrainage'; import { getRELAList, getEchart } from '@/api/MonitorAssetsOnMap'; -import MonitoringAnalysisChart from './MonitoringAnalysisChart.vue'; +import shuikujianceEcharts from '@/views/pictureOnMap/page/components/DialogTabs/component/shuikujianceEcharts.vue'; import moment from 'moment'; @@ -173,20 +173,23 @@ }; const chartInfo2 = ref({ refresh: 1, - // DataName: "", - XAxis: [], - typeName: '5分钟降雨量(mm)', - typeName2: '黄海水位(m)', - YAxis: [], - YAxis2: [], + DataName: '', + XAxis: ['1:00', '3:00', '5:00', '7:00', '9:00', '11:00', '13:00', '15:00', '17:00'], + typeName: '降雨量', + YAxis: [0, 1, 6, 3, 4], loading: false, - marklineJYL: [], - marklineSS: [], + yAxisarr: [ + + ], + marklinearr: [ + + ], }); -let isEchart = ref(false); -let loadingEchart = ref(false); + let loadingEchart=ref(false) + const showecharts = ref(false); function getDataEchart() { - loadingEchart.value = true; + showecharts.value = false; + loadingEchart.value=true let params = { stType: props.Getproperties.stType, stCode: Search_form.stCode, @@ -194,122 +197,24 @@ end: Search_form.Timers[1], }; console.log('params', params); - getEchart(params).then( - res => { - isEchart.value = true; + getEchart(params).then(res => { + showecharts.value = true; + loadingEchart.value=false - let res1 = { - code: 200, - msg: '操作成功', - data: { - datas: [ - { - dataKey: 'z', - dataName: '黄海水位', - unit: '(m)', - datas: ['0', '0', '1', '0', '2', '0.5', '0', '0', '0', '0.2'], - cordonLineList: [ - { - id: '1856620587907244131', - cordonId: '1856647503229968394', - lineName: '正常蓄水位', - lineValue: '1.3', - lineType: '2', - lineColor: 'rgba(0, 255, 68, 1)', - systemDefault: '0', - code: 'normal_water_level', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - { - id: '1856620587932409132', - cordonId: '1856647503229968394', - lineName: '设计洪水位', - lineValue: '1.8', - lineType: '1', - lineColor: 'rgba(221, 255, 0, 1)', - systemDefault: '0', - code: 'design_flood_level', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - { - id: '1856620587936604135', - cordonId: '1856647503229968394', - lineName: '校核洪水位', - lineValue: '1.98', - lineType: '1', - lineColor: 'rgba(255, 191, 0, 1)', - systemDefault: '0', - code: 'verify_flood_level', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - { - id: '1856620587936604134', - cordonId: '1856647503229968394', - lineName: '坝顶高程', - lineValue: '2.8', - lineType: '1', - lineColor: 'rgba(255, 81, 0, 1)', - systemDefault: '0', - code: 'dam_hight', - stConfig: 'z', - calcType: '2', - relateRainSiteSt: '4201110002', - }, - ], - }, - { - dataKey: 'pn05', - dataName: '降雨量', - unit: 'mm', - datas: ['10', '5', '11', '2', '2', '20', '15', '0', '0', '0.2'], - cordonLineList: [], - }, - ], - times: [ - '1732291200000', - '1732291200000', - '1732291800000', - '1732292100000', - '1732292400000', - '1732292700000', - '1732293000000', - '1732293300000', - '1732293600000', - '1732293900000', - ], - }, - }; - console.log('监测分析统计res', res); - loadingEchart.value = false; + console.log(res.data); + chartInfo2.value.XAxis = res.data.times; + chartInfo2.value.yAxisarr = res.data.datas; - if (res && res.code == 200) { - let data = res.data; - let pn05Arr = data.datas.find(item => item.dataKey == 'pn05') || []; //降雨 - let zArr = data.datas.find(item => item.dataKey == 'z') || []; //水深 - if (pn05Arr) { - chartInfo2.value.YAxis = pn05Arr.datas; - chartInfo2.value.marklineJYL = pn05Arr.cordonLineList; - } - if (zArr) { - chartInfo2.value.YAxis2 = zArr.datas; - chartInfo2.value.marklineSS = zArr.cordonLineList; - } + res.data.datas.map(item => { + chartInfo2.value.marklinearr.push(...item.cordonLineList); + }); - chartInfo2.value.XAxis = data.times; - // console.log('chartInfo2123',chartInfo2.value); - chartInfo2.value.refresh = Math.random(); - } - }, - error => { - loadingEchart.value = false; - } - ); + console.log('chartInfo2.value.marklinearr', chartInfo2.value.marklinearr); + + chartInfo2.value.refresh = Math.random(); + },(error)=>{ + loadingEchart.value=false + }); } onMounted(() => { console.log('props.Getproperties.id', props.Getproperties); diff --git a/src/views/pictureOnMap/page/components/DialogTabs/component/jiancefenxiBZ.vue b/src/views/pictureOnMap/page/components/DialogTabs/component/jiancefenxiBZ.vue index b7b35a2..2dc702a 100644 --- a/src/views/pictureOnMap/page/components/DialogTabs/component/jiancefenxiBZ.vue +++ b/src/views/pictureOnMap/page/components/DialogTabs/component/jiancefenxiBZ.vue @@ -2,32 +2,7 @@
- +
所属雨水分区:
@@ -78,7 +53,6 @@