{"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\\RealTimeEngineerModel.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\gisTabComponents\\module\\RealTimeEngineerModel.vue","mtime":1684458238637},{"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: 'RealTimeEngineerModel',\r\n props: {\r\n currentPoint: {\r\n type: Object,\r\n default: () => {\r\n return {}\r\n },\r\n },\r\n stationType: {\r\n type: String,\r\n default: '',\r\n },\r\n },\r\n data () {\r\n return {\r\n chart: null, //\r\n seepageOption: null, //渗流监测\r\n shiftOption: null, //位移监测\r\n pressureOption1: null, //渗流压力监测\r\n pressureOption2: null, //渗压管压力监测\r\n dammvLists: [], //位移测报数据\r\n xrds: [], //x向值\r\n yrds: [], //y向值\r\n zrds: [], //垂直向值\t\r\n damspgLists: [], //渗流测报数据\r\n spqns: [], //流量\r\n damspprLists: [], //渗压测报数据\r\n spprwls: [], //渗流压力水位(m)\r\n damspprListes: [], //渗压管监测数据\r\n dpztbwls: [], //测压管危险水位\r\n jpztbwls: [], //测压管警戒水位\r\n pztbwls: [], //测压管水位\r\n times1: [],\r\n times2: [],\r\n times3: [],\r\n times4: [],\r\n params: {\r\n appTypeList: [],\r\n endTime: \"\",\r\n id: \"\",\r\n mpcd: \"\",\r\n periodTime: \"\",\r\n rscd: \"\",\r\n startTime: \"\",\r\n stcd: \"\",\r\n stlc: \"\",\r\n stnm: \"\",\r\n sttp: \"\",\r\n sttpList: [],\r\n usfl: \"\",\r\n warnGrade: \"\"\r\n },\r\n\r\n }\r\n },\r\n inject: ['mapData'],\r\n created () {\r\n let mapData = this.mapData()\r\n this.T = mapData.T\r\n this.map = mapData.map\r\n this.params.stcd = this.currentPoint.stcd\r\n },\r\n mounted () {\r\n // this.$nextTick(() => {\r\n // this.initOption()\r\n // this.initChart()\r\n // })\r\n\tthis.$root.$on('resize', () => {\r\n\t this.resize(500)\r\n\t})\r\n },\r\n updated () {\r\n // let option\r\n // if (this.stationType == 1) {\r\n // \toption = this.shiftOption\r\n // } else if (this.stationType == 2) {\r\n // \toption = this.seepageOption\r\n // } else if (this.stationType == 3) {\r\n // \toption = this.pressureOption1\r\n // } else if (this.stationType == 4) {\r\n // \toption = this.pressureOption2\r\n // }\r\n // if (this.chart) this.chart.clear()\r\n // option && this.chart.setOption(option)\r\n // if (this.chart) this.chart.resize()\r\n },\r\n watch: {\r\n stationType: {\r\n handler: function (newVal) {\r\n console.log(this.stationType);\r\n // let option\r\n // if (newVal == 1) {\r\n // \toption = this.shiftOption\r\n // } else if (newVal == 2) {\r\n // \toption = this.seepageOption\r\n // } else if (newVal == 3) {\r\n // \toption = this.pressureOption1\r\n // } else if (newVal == 4) {\r\n // \toption = this.pressureOption2\r\n // }\r\n // if (this.chart) this.chart.clear()\r\n // option && this.chart.setOption(option)\r\n // if (this.chart) this.chart.resize()\r\n },\r\n },\r\n currentPoint: {\r\n handler (newVal) {\r\n let option\r\n if (this.stationType == 1) {\r\n this.getDammvData()\r\n // option = this.shiftOption\r\n // this.initChart()\r\n } else if (this.stationType == 2) {\r\n this.getDamspgData()\r\n option = this.seepageOption\r\n // this.initChart()\r\n } else if (this.stationType == 3) {\r\n this.getDamspprData()\r\n option = this.pressureOption1\r\n // this.initChart()\r\n } else if (this.stationType == 4) {\r\n this.getDamspprList()\r\n }\r\n },\r\n }\r\n },\r\n beforeDestroy () {\r\n console.log('xiaohui')\r\n },\r\n methods: {\r\n\t resize (delay) {\r\n\t // 动态计算表格的高度,自适应当前容器\r\n\t setTimeout(() => {\r\n\t this.chart.resize()\r\n\t }, delay || 0)\r\n\t },\r\n getDamspprList () {\r\n this.pztbwls = []\r\n this.jpztbwls = []\r\n this.dpztbwls = []\r\n this.times4 = []\r\n let param = {\r\n startTime: \"\",\r\n endTime: \"\",\r\n mpcd: this.currentPoint.mpcd,\r\n rscd: this.currentPoint.rscd,\r\n mptp: \"4\",\r\n tmOrderAsc: true\r\n }\r\n gisMap.getDamspprList(param, res => {\r\n if (res.state) {\r\n this.damspprListes = res.value\r\n this.damspprListes.forEach(e => {\r\n this.pztbwls.push(e.pztbwl)\r\n this.jpztbwls.push(e.jpztbwl)\r\n this.dpztbwls.push(e.dpztbwl)\r\n this.times4.push(e.mstm)\r\n })\r\n this.$nextTick(() => {\r\n this.initOption()\r\n })\r\n }\r\n console.log(this.times4);\r\n })\r\n },\r\n getDammvData () {\r\n\t\tthis.params.rscd=this.currentPoint.rscd\r\n\t\tthis.params.stcd=this.currentPoint.stcd\r\n\t\tthis.xrds=[]\r\n\t\tthis.yrds=[]\r\n\t\tthis.zrds=[]\r\n\t\tthis.times1=[]\r\n\t\tthis.params.tmOrderAsc=true\r\n gisMap.dammvData(this.params, res => {\r\n if (res.state) {\r\n this.dammvLists = res.value\r\n this.dammvLists.forEach(e => {\r\n this.xrds.push(e.dx)\r\n this.yrds.push(e.dy)\r\n this.zrds.push(e.dz)\r\n this.times1.push(e.tm)\r\n })\r\n\t\t this.$nextTick(() => {\r\n\t\t this.initOption()\r\n\t\t })\r\n }\r\n })\r\n },\r\n getDamspgData () {\r\n\t\tthis.spqns=[]\r\n\t\tthis.times2=[]\r\n gisMap.damspgData(this.params, res => {\r\n if (res.state) {\r\n this.damspgLists = res.value\r\n this.damspgLists.forEach(e => {\r\n this.spqns.push(e.spqn)\r\n this.times2.push(e.tm.split(\" \")[1])\r\n })\r\n }\r\n })\r\n },\r\n getDamspprData () {\r\n\t\tthis.spprwls=[]\r\n\t\tthis.times3\t=[]\r\n gisMap.damspprData(this.params, res => {\r\n if (res.state) {\r\n this.damspprLists = res.value\r\n this.damspprLists.forEach(e => {\r\n this.spprwls.push(e.spprwl)\r\n this.times3.push(e.tm.split(\" \")[1])\r\n })\r\n }\r\n })\r\n },\r\n //渗流监测\r\n initChart () {\r\n const dom = document.getElementById('chart')\r\n this.chart = echarts.init(dom)\r\n let option = this.seepageOption\r\n\t console.log(option);\r\n this.chart.setOption(option)\r\n },\r\n initOption () {\r\n const dom = document.getElementById('chart')\r\n this.chart = echarts.init(dom)\r\n //位移\r\n this.shiftOption = {\r\n title: {\r\n text: '今日位移',\r\n left: 'center',\r\n top: 'top',\r\n textStyle: {\r\n color: '#ddd',\r\n fontSize: '14',\r\n fontWeight: 700,\r\n },\r\n },\r\n tooltip: {\r\n appendToBody: true,\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: ['x方向位移(mm)', 'y方向位移(mm)', 'z方向位移(mm)'],\r\n textStyle: {\r\n color: '#adb9ba',\r\n fontSize: 10,\r\n },\r\n },\r\n grid: {\r\n top: '20%',\r\n left: '4%',\r\n right: '4%',\r\n bottom: '16%',\r\n containLabel: true,\r\n },\r\n xAxis: [{\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.times1,\r\n },],\r\n yAxis: [{\r\n type: 'value',\r\n\t\t scale:true\r\n },],\r\n series: [{\r\n name: 'x方向位移(mm)',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n data: this.xrds,\r\n itemStyle: {\r\n color: '#ff9a00',\r\n },\r\n },\r\n {\r\n name: 'y方向位移(mm)',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n data: this.yrds,\r\n itemStyle: {\r\n color: '#6767ff',\r\n },\r\n },\r\n {\r\n name: 'z方向位移(mm)',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n data: this.zrds,\r\n itemStyle: {\r\n color: '#91cc75',\r\n },\r\n },\r\n ],\r\n }\r\n\r\n //渗流\r\n this.seepageOption = {\r\n title: {\r\n text: '今日渗流',\r\n left: 'center',\r\n top: 'top',\r\n textStyle: {\r\n color: '#ddd',\r\n fontSize: '14',\r\n fontWeight: 700,\r\n },\r\n },\r\n tooltip: {\r\n appendToBody: true,\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: ['瞬时流量(m³/s)'],\r\n textStyle: {\r\n color: '#adb9ba',\r\n fontSize: 10,\r\n },\r\n },\r\n grid: {\r\n top: '20%',\r\n left: '4%',\r\n right: '4%',\r\n bottom: '12%',\r\n containLabel: true,\r\n },\r\n xAxis: [{\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.times2,\r\n },],\r\n yAxis: [{\r\n name: '瞬时流量(m³/s)',\r\n type: 'value',\r\n\t\t scale:true\r\n },],\r\n series: [{\r\n name: '瞬时流量(m³/s)',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n data: this.spqns,\r\n itemStyle: {\r\n color: '#0091ff',\r\n },\r\n },\r\n\r\n ],\r\n }\r\n\r\n // 渗流压力\r\n this.pressureOption1 = {\r\n title: {\r\n text: '今日渗流压力',\r\n left: 'center',\r\n top: 'top',\r\n textStyle: {\r\n color: '#ddd',\r\n fontSize: '14',\r\n fontWeight: 700,\r\n },\r\n },\r\n tooltip: {\r\n appendToBody: true,\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: '20%',\r\n left: '4%',\r\n right: '4%',\r\n bottom: '16%',\r\n containLabel: true,\r\n },\r\n xAxis: [{\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.times3,\r\n },],\r\n yAxis: [{\r\n name: '渗流压力',\r\n type: 'value',\r\n\t\t scale:true\r\n },\r\n {\r\n name: '温度(℃)',\r\n nameLocation: 'start',\r\n alignTicks: true,\r\n type: 'value',\r\n inverse: true,\r\n },\r\n ],\r\n series: [{\r\n name: '渗流压力',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n areaStyle: {},\r\n data: this.spprwls,\r\n itemStyle: {\r\n color: '#6767ff',\r\n },\r\n },\r\n // {\r\n // \tname: '温度(℃)',\r\n // \ttype: 'line',\r\n // \tsmooth: true,\r\n // \tyAxisIndex: 1,\r\n // \temphasis: {\r\n // \t\tfocus: 'series',\r\n // \t},\r\n // \tdata: [23, 23.2, 23.8, 23.4, 22.28, 24.2, 23.6, 23.4],\r\n // \titemStyle: {\r\n // \t\tcolor: '#ff9a00',\r\n // \t},\r\n // },\r\n ],\r\n }\r\n\r\n // 渗压管压力\r\n this.pressureOption2 = {\r\n title: {\r\n text: '渗压管压力',\r\n left: 'center',\r\n top: 'top',\r\n textStyle: {\r\n color: '#ddd',\r\n fontSize: '14',\r\n fontWeight: 700,\r\n },\r\n },\r\n tooltip: {\r\n appendToBody: true,\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: '20%',\r\n left: '4%',\r\n right: '4%',\r\n bottom: '16%',\r\n containLabel: true,\r\n },\r\n xAxis: [{\r\n type: 'category',\r\n boundaryGap: false,\r\n data: this.times4,\r\n },],\r\n yAxis: [{\r\n type: 'value',\r\n\t\t scale:true\r\n },],\r\n series: [{\r\n name: '测压管警戒水位',\r\n type: 'line',\r\n smooth: true,\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n data: this.jpztbwls,\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.dpztbwls,\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 emphasis: {\r\n focus: 'series',\r\n },\r\n data: this.pztbwls,\r\n itemStyle: {\r\n color: '#6767ff',\r\n },\r\n },\r\n ],\r\n }\r\n let option;\r\n if (this.stationType == 1) {\r\n option = this.shiftOption\r\n } else if (this.stationType == 2) {\r\n option = this.seepageOption\r\n } else if (this.stationType == 3) {\r\n option = this.pressureOption1\r\n } else if (this.stationType == 4) {\r\n option = this.pressureOption2\r\n }\r\n option && this.chart.setOption(option)\r\n },\r\n },\r\n}\r\n",null]}