{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\gisTabComponents\\module\\RealTimeWaterModel.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\gisTabComponents\\module\\RealTimeWaterModel.vue","mtime":1684458238652},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport * as echarts from 'echarts'\r\nimport gisMap from '@/api/frontScreen/gisMap.js'\r\nexport default {\r\n name: 'RealTimeRainModel',\r\n props: {\r\n currentPoint: {\r\n type: Object,\r\n default: () => {\r\n return {}\r\n }\r\n }\r\n },\r\n data () {\r\n return {\r\n timeList: [],\r\n jzList: [],\r\n bzList: [],\r\n fhList: [],\r\n zgList: [],\r\n zzList: [],\r\n dsfllvList: [],\r\n chfllvList: [],\r\n nrstlvList: [],\r\n qList: [],\r\n sttp: null,\r\n params: {\r\n stcd: null\r\n },\r\n waterChart: null, //雨情\r\n option2: {},\r\n option3: {}\r\n }\r\n },\r\n inject: ['mapData'],\r\n created () {\r\n let mapData = this.mapData()\r\n this.districtData = this.originData\r\n this.T = mapData.T\r\n this.map = mapData.map\r\n },\r\n\r\n mounted () {\r\n },\r\n watch: {\r\n currentPoint: {\r\n handler () {\r\n this.$nextTick(() => {\r\n this.getFindResList()\r\n })\r\n // this.initwaterChart()\r\n }\r\n }\r\n },\r\n updated () {\r\n\r\n },\r\n beforeDestroy () { },\r\n methods: {\r\n getFindResList () {\r\n this.params.stcd = this.currentPoint.stcd\r\n this.sttp = this.currentPoint.sttp\r\n if (this.sttp == 'ZZ'||this.sttp == 'ZQ') {\r\n gisMap.waterRegimehd(this.params, res => {\r\n if (res.state) {\r\n this.timeList = []\r\n this.jzList = []\r\n this.bzList = []\r\n this.fhList = []\r\n this.zgList = []\r\n this.zzList = []\r\n res.value.forEach(e => {\r\n this.timeList.push(e.tm)\r\n this.jzList.push(e.jz)\r\n this.bzList.push(e.bz)\r\n this.fhList.push(e.fh)\r\n this.zgList.push(e.zg)\r\n this.zzList.push(e.zz)\r\n })\r\n this.$nextTick(() => {\r\n this.initwaterChart()\r\n });\r\n\r\n }\r\n })\r\n }\r\n if (this.sttp == 'SS') {\r\n gisMap.waterRegimehd(this.params, res => {\r\n if (res.state) {\r\n this.timeList = []\r\n this.zzList = []\r\n this.qList = []\r\n res.value.forEach(e => {\r\n this.timeList.push(e.tm)\r\n this.zzList.push(e.zz)\r\n this.qList.push(e.q)\r\n })\r\n this.$nextTick(() => {\r\n this.initwaterChart()\r\n });\r\n\r\n }\r\n })\r\n }\r\n if (this.sttp == \"RR\") {\r\n this.params.rscd = this.currentPoint.rscd\r\n gisMap.waterRegimesk(this.params, res => {\r\n if (res.state) {\r\n this.timeList = []\r\n this.zzList = []\r\n this.nrstlvList = []\r\n this.dsfllvList = []\r\n this.chfllvList = []\r\n res.value.forEach(e => {\r\n this.timeList.push(e.tm)\r\n this.zzList.push(e.zz)\r\n this.nrstlvList.push(e.nrstlv)\r\n this.dsfllvList.push(e.dsfllv)\r\n this.chfllvList.push(e.chfllv)\r\n })\r\n this.$nextTick(() => {\r\n this.initwaterChart()\r\n });\r\n }\r\n })\r\n }\r\n\r\n },\r\n initwaterChart () {\r\n if (this.waterChart) {\r\n this.waterChart.dispose();\r\n }\r\n const waterChartDom = document.getElementById('waterChart')\r\n this.waterChart = echarts.init(waterChartDom)\r\n this.option2 = {\r\n tooltip: {\r\n trigger: 'axis',\r\n backgroundColor: 'rgba(0,0,0,0.7)',\r\n textStyle: {\r\n color: '#dddee0'\r\n },\r\n axisPointer: {\r\n type: 'cross',\r\n label: {\r\n backgroundColor: '#6a7985'\r\n }\r\n }\r\n },\r\n legend: {\r\n bottom: 0,\r\n right: 0,\r\n data: ['警戒线', '保证线', '防洪线', '最高洪水线', '实时水位线', '流量'],\r\n textStyle: {\r\n color: '#adb9ba',\r\n fontSize: 10\r\n }\r\n },\r\n grid: {\r\n top: '15%',\r\n left: '6%',\r\n right: '4%',\r\n bottom: '15%',\r\n containLabel: true\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.timeList\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n name: '单位:m',\r\n type: 'value',\r\n\t\t\t scale:true\r\n }\r\n ],\r\n series: [\r\n {\r\n name: '警戒线',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.jzList\r\n },\r\n {\r\n name: '保证线',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.bzList\r\n },\r\n {\r\n name: '防洪线',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.fhList\r\n },\r\n {\r\n name: '最高洪水线',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.zgList\r\n },\r\n {\r\n name: this.sttp == 'SS' ? '流量' : '实时水位线',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.zzList,\r\n itemStyle: {\r\n color: '#0091ff'\r\n }\r\n }\r\n ]\r\n }\r\n this.option4 = {\r\n tooltip: {\r\n trigger: 'axis',\r\n backgroundColor: 'rgba(0,0,0,0.7)',\r\n textStyle: {\r\n color: '#dddee0'\r\n },\r\n axisPointer: {\r\n type: 'cross',\r\n label: {\r\n backgroundColor: '#6a7985'\r\n }\r\n }\r\n },\r\n legend: {\r\n bottom: 0,\r\n right: 0,\r\n data: ['警戒水位', '设计洪水位', '校核洪水位', '当前水位'],\r\n textStyle: {\r\n color: '#adb9ba',\r\n fontSize: 10\r\n }\r\n },\r\n grid: {\r\n top: '15%',\r\n left: '6%',\r\n right: '4%',\r\n bottom: '15%',\r\n containLabel: true\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.timeList\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n name: '单位:m',\r\n type: 'value',\r\n\t\t\t scale:true\r\n }\r\n ],\r\n series: [\r\n {\r\n name: '警戒水位',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.nrstlvList,\r\n itemStyle: {\r\n normal: {\r\n color: 'yellow',\r\n lineStyle: {\r\n color: 'yellow'\r\n }\r\n }\r\n },\r\n },\r\n {\r\n name: '设计洪水位',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.dsfllvList,\r\n itemStyle: {\r\n normal: {\r\n color: '#ff6347',\r\n lineStyle: {\r\n color: '#ff6347'\r\n }\r\n }\r\n },\r\n },\r\n {\r\n name: '校核洪水位',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.chfllvList,\r\n itemStyle: {\r\n normal: {\r\n color: '#b22222',\r\n lineStyle: {\r\n color: '#b22222'\r\n }\r\n }\r\n },\r\n },\r\n {\r\n name: '当前水位',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.zzList,\r\n itemStyle: {\r\n color: '#0091ff'\r\n }\r\n }\r\n ]\r\n }\r\n this.option3 = {\r\n tooltip: {\r\n trigger: 'axis',\r\n backgroundColor: 'rgba(0,0,0,0.7)',\r\n textStyle: {\r\n color: '#dddee0'\r\n },\r\n axisPointer: {\r\n type: 'cross',\r\n label: {\r\n backgroundColor: '#6a7985'\r\n }\r\n }\r\n },\r\n legend: {\r\n bottom: 0,\r\n right: 0,\r\n data: ['汛限水位', '实时水位线'],\r\n textStyle: {\r\n color: '#adb9ba',\r\n fontSize: 10\r\n }\r\n },\r\n grid: {\r\n top: '15%',\r\n left: '2%',\r\n right: '4%',\r\n bottom: '16%',\r\n containLabel: true\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: ['', '']\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n name: '单位:m',\r\n type: 'value',\r\n\t\t\t scale:true\r\n }\r\n ],\r\n series: [\r\n {\r\n name: '汛限水位',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: [96, 96],\r\n itemStyle: {\r\n color: '#fb5430'\r\n }\r\n },\r\n {\r\n name: '实时水位线',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: [20, 20],\r\n itemStyle: {\r\n color: '#0091ff'\r\n }\r\n }\r\n ]\r\n }\r\n this.option5 = {\r\n tooltip: {\r\n trigger: 'axis',\r\n backgroundColor: 'rgba(0,0,0,0.7)',\r\n textStyle: {\r\n color: '#dddee0'\r\n },\r\n axisPointer: {\r\n type: 'cross',\r\n label: {\r\n backgroundColor: '#6a7985'\r\n }\r\n }\r\n },\r\n legend: {\r\n bottom: 0,\r\n right: 0,\r\n data: ['保证水位', '警戒水位', '当前水位'],\r\n textStyle: {\r\n color: '#adb9ba',\r\n fontSize: 10\r\n }\r\n },\r\n grid: {\r\n top: '15%',\r\n left: '6%',\r\n right: '4%',\r\n bottom: '15%',\r\n containLabel: true\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.timeList\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n name: '单位:m',\r\n type: 'value',\r\n\t\t\t scale:true\r\n }\r\n ],\r\n series: [\r\n {\r\n name: '保证水位',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.bzList,\r\n itemStyle: {\r\n normal: {\r\n color: 'yellow',\r\n lineStyle: {\r\n color: 'yellow'\r\n }\r\n }\r\n },\r\n },\r\n {\r\n name: '警戒水位',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.jzList,\r\n itemStyle: {\r\n normal: {\r\n color: '#b22222',\r\n lineStyle: {\r\n color: '#b22222'\r\n }\r\n }\r\n },\r\n },\r\n\r\n {\r\n name: '当前水位',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.zzList,\r\n itemStyle: {\r\n color: '#0091ff'\r\n }\r\n }\r\n ]\r\n }\r\n this.option6 = {\r\n tooltip: {\r\n trigger: 'axis',\r\n backgroundColor: 'rgba(0,0,0,0.7)',\r\n textStyle: {\r\n color: '#dddee0'\r\n },\r\n axisPointer: {\r\n type: 'cross',\r\n label: {\r\n backgroundColor: '#6a7985'\r\n }\r\n }\r\n },\r\n legend: {\r\n bottom: 0,\r\n right: 0,\r\n data: ['流量', '当前水位'],\r\n textStyle: {\r\n color: '#adb9ba',\r\n fontSize: 10\r\n }\r\n },\r\n grid: {\r\n top: '15%',\r\n // left: '4%',\r\n right: '4%',\r\n bottom: '15%',\r\n containLabel: true\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.timeList\r\n }\r\n ],\r\n yAxis: [\r\n {\r\n name: '单位:m',\r\n type: 'value',\r\n\t\t\t scale:true\r\n }\r\n ],\r\n series: [\r\n {\r\n name: '流量',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.qList,\r\n itemStyle: {\r\n color: 'green'\r\n }\r\n },\r\n {\r\n name: '当前水位',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series'\r\n },\r\n data: this.zzList,\r\n itemStyle: {\r\n color: '#0091ff'\r\n }\r\n }\r\n ]\r\n }\r\n let option\r\n console.log(this.currentPoint.sttp);\r\n if (this.currentPoint.sttp == 2) {\r\n option = this.option3\r\n } else if (this.currentPoint.sttp == 'RR') {\r\n option = this.option4\r\n } else if (this.currentPoint.sttp == 'ZZ'||this.currentPoint.sttp == 'ZQ') {\r\n option = this.option5\r\n } else if (this.currentPoint.sttp == 'SS') {\r\n option = this.option6\r\n } else {\r\n option = this.option2\r\n }\r\n option && this.waterChart.setOption(option)\r\n }\r\n }\r\n}\r\n",null]}