{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\RealTimeRainModel.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\gisTabComponents\\module\\RealTimeRainModel.vue","mtime":1684458238637},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport * as echarts from 'echarts';\nimport gisMap from '@/api/frontScreen/gisMap.js';\nexport default {\n name: 'RealTimeRainModel',\n props: {\n currentPoint: {\n type: Object,\n default: function _default() {\n return {};\n }\n },\n times: {\n type: Array,\n default: function _default() {\n return {};\n }\n },\n frameTime: {\n type: String,\n default: function _default() {\n return {};\n }\n }\n },\n data: function data() {\n return {\n params: {\n stcd: null,\n tmOrderAsc: true\n },\n timeList: [],\n rainChart: null,\n //雨情\n rainList: [],\n waterHistoryLists: []\n };\n },\n inject: ['mapData'],\n created: function created() {\n var mapData = this.mapData();\n this.districtData = this.originData;\n this.T = mapData.T;\n this.map = mapData.map;\n },\n watch: {\n currentPoint: {\n handler: function handler(newVal) {\n this.getFindResList();\n }\n }\n },\n mounted: function mounted() {\n this.$nextTick(function () {// this.initCharts()\n });\n },\n updated: function updated() {// this.rainChart.resize()\n },\n beforeDestroy: function beforeDestroy() {},\n methods: {\n getFindResList: function getFindResList() {\n var _this = this;\n\n if (this.times.length > 0) {\n this.params.startTime = this.times[0];\n this.params.endTime = this.times[1];\n } else {\n this.params.startTime = \"\";\n this.params.endTime = \"\";\n }\n\n this.params.stcd = this.currentPoint.stcd;\n this.params.tm = this.currentPoint.tm;\n gisMap.pptnLatestList(this.params, function (res) {\n if (res.state) {\n _this.waterHistoryLists = res.value;\n\n _this.$nextTick(function () {\n _this.initRainChart();\n });\n }\n });\n },\n initCharts: function initCharts() {\n this.initRainChart();\n },\n initRainChart: function initRainChart() {\n var _this2 = this;\n\n var rainList = [];\n var timeList = [];\n var alertList = []; //警戒\n\n var dangerList = []; //危险\n\n this.waterHistoryLists.forEach(function (e) {\n var alter = {},\n danger = {};\n e.thresholdData.forEach(function (item) {\n if (item.gradeCode == 1) {\n //警戒\n alter = item;\n } else if (item.gradeCode == 2) {\n //危险\n danger = item;\n }\n });\n timeList.push(e.tm);\n\n switch (_this2.frameTime) {\n case 'drp':\n rainList.push(e.drp);\n break;\n\n case 'pn10':\n rainList.push(e.pn10);\n break;\n\n case 'pn30':\n rainList.push(e.pn30);\n break;\n\n case 'p1':\n rainList.push(e.p1);\n dangerList.push(danger.yjz);\n alertList.push(alter.yjz);\n break;\n\n case 'p3':\n rainList.push(e.p3);\n dangerList.push(danger.shhjz);\n alertList.push(alter.shhjz);\n break;\n\n case 'p6':\n rainList.push(e.p6);\n dangerList.push(danger.lhjz);\n alertList.push(alter.lhjz);\n break;\n\n case 'p12':\n rainList.push(e.p12);\n dangerList.push(danger.sejz);\n alertList.push(alter.sejz);\n break;\n\n case 'p24':\n rainList.push(e.p24);\n dangerList.push(danger.esjz);\n alertList.push(alter.esjz);\n break;\n\n case 'dyp':\n rainList.push(e.dyp);\n break;\n }\n });\n console.log(alertList);\n console.log(dangerList);\n var rainChartDom = document.getElementById('rainChart');\n this.rainChart = echarts.init(rainChartDom);\n var option = {\n tooltip: {\n appendToBody: true,\n trigger: 'axis',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n axisPointer: {\n type: 'cross',\n label: {\n backgroundColor: '#6a7985'\n }\n }\n },\n legend: {\n bottom: 0,\n right: 0,\n data: ['雨量(mm)', '危险阈值', '警戒阈值'],\n textStyle: {\n color: '#adb9ba',\n fontSize: 10\n }\n },\n grid: {\n top: '4%',\n left: '4%',\n right: '4%',\n bottom: '16%',\n containLabel: true\n },\n xAxis: [{\n type: 'category',\n boundaryGap: false,\n data: timeList\n }],\n yAxis: [{\n type: 'value',\n scale: true\n }],\n series: [{\n name: '雨量(mm)',\n type: 'line',\n // smooth: true,\n // areaStyle: {},\n // emphasis: {\n // focus: 'series',\n // },\n data: rainList,\n itemStyle: {\n color: '#6767ff'\n }\n }, {\n name: '危险阈值',\n type: 'line',\n data: dangerList,\n itemStyle: {\n color: 'red'\n }\n }, {\n name: '警戒阈值',\n type: 'line',\n data: alertList,\n itemStyle: {\n color: 'yellow'\n }\n }]\n };\n option && this.rainChart.setOption(option);\n }\n }\n};",null]}