{"remainingRequest":"D:\\jenkins\\workspace\\bbsl-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\DigitalStructure.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\DigitalStructure.vue","mtime":1684458238481},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\n// import videoPlayer from './components/videoPlayer.vue'\r\nimport videoPlayPlugin from './components/videoPlayPlugin.vue'\r\nimport VueSeamlessScroll from 'vue-seamless-scroll'\r\nimport * as echarts from 'echarts'\r\nimport stationsModel from './components/stationsModel.vue'\r\nimport historyModel from './components/historyModel.vue'\r\nimport SafeModel from './components/SafeModel.vue'\r\nimport DSModel from './components/DSModel.vue'\r\nimport PDFModel from './components/PDFModel.vue'\r\nimport digitalReservoir from '@/api/frontScreen/digitalReservoir.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nexport default {\r\n name: 'digitalReservoir',\r\n components: {\r\n videoPlayPlugin,\r\n VueSeamlessScroll,\r\n stationsModel,\r\n historyModel,\r\n SafeModel,\r\n PDFModel,\r\n DSModel,\r\n },\r\n computed: {\r\n optionSingleHeightTime() {\r\n return {\r\n singleHeight: 29,\r\n waitTime: 2500,\r\n }\r\n },\r\n },\r\n data() {\r\n return {\r\n showWord: false,\r\n word: '',\r\n title_style: {\r\n color: '',\r\n },\r\n firstShow: false,\r\n options: {\r\n layout: '1x1',\r\n showToolbar: 1,\r\n simpleTips: true,\r\n mountedInit: true,\r\n },\r\n list: null, //上级传参\r\n message: '', // 要发送的消息\r\n title: '',\r\n capacity: 86.49,\r\n storage: 71.28,\r\n params: {\r\n rscd: '',\r\n time: '',\r\n waterId: '',\r\n year: 0,\r\n },\r\n //水库概况\r\n monitoringList1: [], //测站下拉列表\r\n monitoringList2: [], //测站下拉列表\r\n monitoringList3: [], //测站下拉列表\r\n generalSituation: '',\r\n dammvLists: [], //位移曲线数据\r\n damspprLists: [], //渗压曲线数据\r\n damspgLists: [], //渗流曲线数据\r\n rsvrLatestLists: [], //水情监测\r\n pptnLatestLists: [], //雨情监测\r\n rsvrAndPptnValues: {}, //当日水位雨情情况\r\n // 安全责任人\r\n responsible1: [],\r\n // 防汛责任人\r\n responsible2: [],\r\n safeMaintain: [\r\n {\r\n name: '安全鉴定',\r\n num: 3,\r\n key: 1,\r\n },\r\n {\r\n name: '除险加固',\r\n num: 65,\r\n key: 2,\r\n },\r\n {\r\n name: '保养维护',\r\n num: 65,\r\n key: 3,\r\n },\r\n ],\r\n siteOption: [\r\n // {\r\n // \tname: '视频监测点A',\r\n // \tcode: '1234567891',\r\n // },\r\n // {\r\n // \tname: '视频监测点B',\r\n // \tcode: '1234567892',\r\n // },\r\n // {\r\n // \tname: '视频监测点C',\r\n // \tcode: '1234567893',\r\n // },\r\n // {\r\n // \tname: '视频监测点D',\r\n // \tcode: '1234567894',\r\n // },\r\n // {\r\n // \tname: '视频监测点E',\r\n // \tcode: '1234567895',\r\n // },\r\n ],\r\n rainAlarm: [\r\n {\r\n name: '水位报警',\r\n count: 0,\r\n list: [],\r\n },\r\n {\r\n name: '雨量报警',\r\n count: 0,\r\n list: [],\r\n },\r\n {\r\n name: '工情报警',\r\n count: 0,\r\n list: [],\r\n },\r\n ],\r\n stationData: [\r\n {\r\n sttp: '雨量站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-yuliang',\r\n },\r\n {\r\n sttp: '水库水位站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shuiwen',\r\n },\r\n {\r\n sttp: '生态流量站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shenliu',\r\n },\r\n {\r\n sttp: '渗压点',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shenya',\r\n },\r\n {\r\n sttp: '位移点',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-weiyi',\r\n },\r\n {\r\n sttp: '视频站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shipin',\r\n },\r\n ],\r\n inspectionHeader: [\r\n {\r\n key: 'order',\r\n width: '14px',\r\n name: '',\r\n },\r\n {\r\n key: 'structure',\r\n width: '23%',\r\n name: '巡检部位',\r\n },\r\n {\r\n key: 'isNormal',\r\n width: '15%',\r\n name: '是否正常',\r\n },\r\n {\r\n key: 'createTime',\r\n width: 'calc(33% - 14px)',\r\n name: '时间',\r\n },\r\n {\r\n key: 'conclusion',\r\n width: '20%',\r\n name: '处理结论',\r\n },\r\n // {\r\n // key: 'isNormal',\r\n // width: '10%',\r\n // name: '状态',\r\n // },\r\n ],\r\n inspectionData: [],\r\n rainChart: null, //雨情监测\r\n waterChart: null, //水情监测\r\n seepageChart: null, //渗流监测\r\n pressureChart: null, //渗压监测\r\n shiftChart: null, //位移监测\r\n stationKey1: '',\r\n options1: [],\r\n stationKey2: '',\r\n stationKey3: '',\r\n options3: [],\r\n reservoirList: [], //水库下拉列表\r\n currentSite: '',\r\n }\r\n },\r\n created() {\r\n if (window.localStorage.getItem('rscd')) {\r\n this.params.rscd = window.localStorage.getItem('rscd')\r\n this.title = window.localStorage.getItem('title')\r\n } else {\r\n this.params.rscd = this.$route.query.rscd\r\n this.title = this.$route.query.rsnm\r\n }\r\n // if (window.performance.navigation.type === 1) {\r\n // console.log('页面被刷新')\r\n // } else {\r\n // console.log('页面首次被加载')\r\n // this.params.rscd = this.$route.query.rscd\r\n // }\r\n this.getFindAll()\r\n this.getRsvrAndPptnValue() //当日水位雨情情况\r\n this.getResDetail() //水库详情\r\n this.getWarnInfo() //根据水库编码获取预警信息\r\n this.getStationSituation() //测站概况\r\n this.getPersonList() //责任人列表\r\n this.getLatestIns() //最新巡检\r\n this.getRsvrLatestList() //水情监测\r\n this.getPptnLatestList() //雨情监测\r\n this.getMonitoring() //测站下拉列表\r\n this.getVideoList()\r\n },\r\n mounted() {\r\n window.addEventListener('popstate', this.removeCache, false)\r\n this.initCharts()\r\n this.$root.$on('resize', () => {\r\n this.resize(500)\r\n })\r\n // this.title = this.list.rsnm\r\n },\r\n methods: {\r\n /**\r\n * 详情点击事件\r\n * */\r\n // 位移\r\n searchDisplacement() {\r\n console.log(this.params.rscd, '位移')\r\n let sqID = this.params.rscd\r\n window.sessionStorage.setItem('StationId', sqID)\r\n let routeData = this.$router.resolve({\r\n path: '/bizPlat/monitor/gqMonitor/wyQuery',\r\n })\r\n window.open(routeData.href, '_blank')\r\n },\r\n // 水情\r\n searchRsvrLatest() {\r\n console.log('水情')\r\n let sqID = this.params.rscd\r\n window.sessionStorage.setItem('StationId', sqID)\r\n let routeData = this.$router.resolve({\r\n path: '/bizPlat/monitor/sqMonitor/resWaterLatest',\r\n })\r\n window.open(routeData.href, '_blank')\r\n },\r\n // 雨情\r\n searchRain() {\r\n console.log('雨情')\r\n let rainStcd = ''\r\n this.pptnLatestLists.forEach((res) => {\r\n rainStcd = res.stcd\r\n })\r\n console.log(rainStcd)\r\n window.sessionStorage.setItem('StationId', rainStcd)\r\n let routeData = this.$router.resolve({\r\n path: '/bizPlat/monitor/resMonitor/ylStQuery',\r\n })\r\n window.open(routeData.href, '_blank')\r\n },\r\n // 测压管\r\n searchManometry() {\r\n console.log('测压管')\r\n let sqID = this.params.rscd\r\n window.sessionStorage.setItem('rscdId', sqID)\r\n let routeData = this.$router.resolve({\r\n path: '/bizPlat/monitor/gqMonitor/sygQuery',\r\n })\r\n window.open(routeData.href, '_blank')\r\n },\r\n // 安全、除险、维护弹窗\r\n openList(value, id) {\r\n this.$nextTick(() => {\r\n let sqID = id\r\n window.sessionStorage.setItem('rscdId', sqID)\r\n this.$refs.SafeModel.open(value, id)\r\n })\r\n },\r\n // 设置水位数据颜色\r\n setCorlor() {\r\n if (this.rsvrAndPptnValues.rz < this.generalSituation.w) {\r\n this.title_style.color = 'rgb(6, 194, 6) !important'\r\n }\r\n if (this.rsvrAndPptnValues.rz >= this.generalSituation.w) {\r\n this.title_style.color = 'yellow !important'\r\n }\r\n if (this.rsvrAndPptnValues.rz >= this.generalSituation.dsfllv) {\r\n this.title_style.color = 'orange !important'\r\n }\r\n if (this.rsvrAndPptnValues.rz >= this.generalSituation.chfllv) {\r\n this.title_style.color = 'red !important'\r\n }\r\n },\r\n handleCommand(command) {\r\n this.word = ''\r\n this.showWord = false\r\n this.title = command.rsnm\r\n this.params.rscd = command.rscd\r\n window.localStorage.setItem('rscd', command.rscd)\r\n window.localStorage.setItem('title', command.rsnm)\r\n this.getResDetail() //水库详情\r\n this.getWarnInfo() //根据水库编码获取预警信息\r\n this.getStationSituation() //测站概况\r\n this.getPersonList() //责任人列表\r\n this.getLatestIns() //最新巡检\r\n this.getRsvrLatestList() //水情监测\r\n this.getPptnLatestList() //雨情监测\r\n this.getMonitoring() //测站下拉列表\r\n this.getRsvrAndPptnValue() //当日水位雨情情况\r\n this.getVideoList()\r\n this.setCorlor()\r\n },\r\n //打开报警弹框\r\n handlePopup(title, type, data, logo) {\r\n this.$nextTick(() => {\r\n this.$refs.DSModel.open(title, type, data, logo)\r\n })\r\n },\r\n //获取水库下拉列表\r\n getFindAll() {\r\n digitalReservoir.findAll({}, (res) => {\r\n if (res.state) {\r\n this.reservoirList = res.value\r\n }\r\n })\r\n },\r\n cutWindowSelect(size) {\r\n this.$nextTick(() => {\r\n let widthV = this.$refs.videoIframe.$el.clientWidth\r\n let heightV = this.$refs.videoIframe.$el.clientHeight\r\n let iLeft,\r\n iTop = 0,\r\n iWidth,\r\n iHeight\r\n iLeft = widthV - size.width\r\n iWidth = size.width + 2\r\n iHeight = size.height >= heightV ? heightV : size.height + 1\r\n this.$refs.videoIframe.cutWindow(\r\n iLeft,\r\n iTop,\r\n iWidth,\r\n iHeight + 12\r\n )\r\n })\r\n },\r\n visibleChange(flag) {\r\n this.$nextTick(() => {\r\n if (flag) {\r\n setTimeout(() => {\r\n let size =\r\n this.$refs.select.$el.children[1].getBoundingClientRect()\r\n this.cutWindowSelect(size)\r\n }, 500)\r\n } else {\r\n this.$refs.videoIframe.repairWindow()\r\n }\r\n })\r\n },\r\n // 根据监控点获取视频流地址\r\n getSiteVideoURL(cameraIndexCode) {\r\n let query = {\r\n cameraIndexCode, // 监控点编码\r\n }\r\n this.$http\r\n .post('${portal}/biz/catalog/base/previewURLs', query)\r\n .then((res) => {\r\n if (res.data.state && res.data.value) {\r\n let data = res.data.value\r\n this.$nextTick(() => {\r\n this.$refs.videoIframe.useVideoURL(data)\r\n })\r\n } else {\r\n this.$message.warning('获取监控点资源失败!')\r\n }\r\n })\r\n },\r\n ready() {\r\n this.$refs.videoIframe.play(this.currentSite)\r\n },\r\n //关联监控点列表\r\n getVideoList() {\r\n this.siteOption = this.$options.data().siteOption\r\n this.currentSite = this.$options.data().currentSite\r\n let param = {\r\n insStatus: 0,\r\n rscd: this.params.rscd,\r\n time: '',\r\n waterId: '',\r\n year: 0,\r\n }\r\n digitalReservoir.videoList(param, (res) => {\r\n if (res.state) {\r\n this.siteOption = res.value\r\n if (this.siteOption.length) {\r\n this.currentSite = this.siteOption[0].code\r\n if (this.currentSite) {\r\n this.$refs.videoIframe.play(this.currentSite)\r\n // this.getSiteVideoURL(this.currentSite)\r\n }\r\n } else {\r\n this.$refs.videoIframe.play(' ')\r\n }\r\n }\r\n })\r\n },\r\n // 切换监控点\r\n changeSite(val) {\r\n this.currentSite = val\r\n this.$refs.videoIframe.play(this.currentSite)\r\n },\r\n //水库详情\r\n getResDetail() {\r\n let param = {\r\n appTypeList: [],\r\n endTime: '',\r\n id: '',\r\n mpcd: '',\r\n periodTime: '',\r\n rscd: this.params.rscd,\r\n startTime: '',\r\n stcd: '',\r\n stlc: '',\r\n stnm: '',\r\n sttp: '',\r\n sttpList: [],\r\n usfl: '',\r\n }\r\n this.generalSituation = this.$options.data().generalSituation\r\n this.rsvrAndPptnValues = this.$options.data().rsvrAndPptnValues\r\n digitalReservoir.resDetail(this.params, (res) => {\r\n if (res.state) {\r\n this.generalSituation = res.value\r\n // 数据对比使用\r\n digitalReservoir.rsvrAndPptnValue(param, (res) => {\r\n if (res.state) {\r\n this.rsvrAndPptnValues = res.value\r\n if (this.rsvrAndPptnValues.rstpc == -1) {\r\n this.rsvrAndPptnValues.rstpc = 0\r\n }\r\n if (\r\n this.rsvrAndPptnValues.rstpc > 0 &&\r\n this.rsvrAndPptnValues.isMatched == 'f'\r\n ) {\r\n this.word = '约'\r\n this.showWord = true\r\n }\r\n this.setCorlor()\r\n }\r\n })\r\n }\r\n })\r\n },\r\n //根据水库编码获取预警信息\r\n getWarnInfo() {\r\n this.rainAlarm = this.$options.data().rainAlarm\r\n digitalReservoir.getWarnInfo(this.params.rscd, (res) => {\r\n if (res.state) {\r\n res.value.forEach((e, ex) => {\r\n this.rainAlarm[ex].count = e.count\r\n this.rainAlarm[ex].list = e.list\r\n })\r\n } else {\r\n }\r\n })\r\n },\r\n //当日水位雨情情况\r\n getRsvrAndPptnValue() {\r\n this.rsvrAndPptnValues = this.$options.data().rsvrAndPptnValues\r\n let param = {\r\n appTypeList: [],\r\n endTime: '',\r\n id: '',\r\n mpcd: '',\r\n periodTime: '',\r\n rscd: this.params.rscd,\r\n startTime: '',\r\n stcd: '',\r\n stlc: '',\r\n stnm: '',\r\n sttp: '',\r\n sttpList: [],\r\n usfl: '',\r\n }\r\n digitalReservoir.rsvrAndPptnValue(param, (res) => {\r\n if (res.state) {\r\n this.rsvrAndPptnValues = res.value\r\n }\r\n })\r\n },\r\n //测站概况\r\n getStationSituation() {\r\n this.stationData = [\r\n {\r\n sttp: '雨量站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-yuliang',\r\n },\r\n {\r\n sttp: '水库水位站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shuiwen',\r\n },\r\n {\r\n sttp: '生态流量站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shenliu',\r\n },\r\n {\r\n sttp: '渗压点',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shenya',\r\n },\r\n {\r\n sttp: '位移点',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-weiyi',\r\n },\r\n {\r\n sttp: '视频站',\r\n count: 0,\r\n normalCount: 0,\r\n faultCount: 0,\r\n icon: 'bbsl-shipin',\r\n },\r\n ]\r\n digitalReservoir.stationSituation(this.params, (res) => {\r\n if (res.state) {\r\n console.log(res)\r\n res.value.forEach((e) => {\r\n this.stationData.forEach((s) => {\r\n if (e.sttp == s.sttp) {\r\n s.count = e.count\r\n s.normalCount = e.normalCount\r\n s.faultCount = e.faultCount\r\n }\r\n })\r\n })\r\n }\r\n })\r\n },\r\n //责任人列表\r\n getPersonList() {\r\n this.responsible1 = this.$options.data().responsible1\r\n this.responsible2 = this.$options.data().responsible2\r\n digitalReservoir.personList(this.params.rscd, (res) => {\r\n if (res.state && res.value) {\r\n for (let i in res.value) {\r\n if (i <= 3) {\r\n this.responsible2.push(res.value[i][0])\r\n } else if (i > 3) {\r\n this.responsible1.push(res.value[i][0])\r\n }\r\n }\r\n }\r\n })\r\n },\r\n //最新巡检\r\n getLatestIns() {\r\n this.inspectionData = []\r\n let id = this.params.rscd\r\n digitalReservoir.latestIns(id, (res) => {\r\n if (res.state) {\r\n this.inspectionData = res.value\r\n this.inspectionData.forEach((e) => {\r\n if (!e.createTime) {\r\n e.createTime = ''\r\n } else {\r\n e.createTime = e.createTime\r\n .replace('-', '/')\r\n .split('/')[1]\r\n .slice(0, 11)\r\n .replace('-', '/')\r\n }\r\n })\r\n }\r\n })\r\n },\r\n //水情监测\r\n getRsvrLatestList() {\r\n this.rsvrLatestLists = []\r\n let param = {\r\n // rscd: this.params.rscd\r\n appTypeList: [],\r\n endTime: '',\r\n id: '',\r\n mpcd: '',\r\n periodTime: '',\r\n rscd: this.params.rscd,\r\n startTime: '',\r\n stcd: '',\r\n stlc: '',\r\n stnm: '',\r\n sttp: '',\r\n sttpList: [],\r\n usfl: '',\r\n }\r\n digitalReservoir.rsvrLatestList(param, (res) => {\r\n if (res.state) {\r\n this.rsvrLatestLists = res.value\r\n this.$nextTick(() => {\r\n this.initWaterChart()\r\n })\r\n }\r\n })\r\n },\r\n //雨情监测\r\n getPptnLatestList() {\r\n this.pptnLatestLists = []\r\n let param = {\r\n // rscd: this.params.rscd\r\n appTypeList: [],\r\n endTime: '',\r\n id: '',\r\n mpcd: '',\r\n periodTime: '',\r\n rscd: this.params.rscd,\r\n startTime: '',\r\n stcd: '',\r\n stlc: '',\r\n stnm: '',\r\n sttp: '',\r\n sttpList: [],\r\n usfl: '',\r\n tmOrderAsc: true,\r\n }\r\n digitalReservoir.pptnLatestList(param, (res) => {\r\n if (res.state) {\r\n this.pptnLatestLists = res.value\r\n this.$nextTick(() => {\r\n this.initRainChart()\r\n })\r\n }\r\n })\r\n },\r\n //获取监测站下拉\r\n getMonitoring() {\r\n this.dropDownList(1)\r\n this.dropDownList(2)\r\n this.dropDownList(3)\r\n },\r\n dropDownList(val) {\r\n // console.log(val);\r\n this.monitoringList1 = this.$options.data().monitoringList1\r\n this.monitoringList2 = this.$options.data().monitoringList2\r\n this.monitoringList3 = this.$options.data().monitoringList3\r\n this.stationKey1 = this.$options.data().stationKey1\r\n this.stationKey2 = this.$options.data().stationKey2\r\n this.stationKey3 = this.$options.data().stationKey3\r\n let param = {\r\n id: '',\r\n mpcd: '',\r\n mpnm: '',\r\n rscd: this.params.rscd,\r\n stlc: '',\r\n sttp: val,\r\n wkcn: '',\r\n }\r\n digitalReservoir.monitoring(param, (res) => {\r\n // console.log(res);\r\n if (res.state) {\r\n // this.monitoringList = res.value\r\n if (val == 1) {\r\n this.monitoringList1 = res.value\r\n if (this.monitoringList1.length > 0) {\r\n this.stationKey1 = this.monitoringList1[0].mpcd\r\n }\r\n this.getDammvList() //位移曲线\r\n } else if (val == 2) {\r\n this.monitoringList3 = res.value\r\n if (this.monitoringList3.length > 0) {\r\n this.stationKey3 = this.monitoringList3[0].mpcd\r\n }\r\n this.getDamspgList() //渗流曲线\r\n } else if (val == 3) {\r\n this.monitoringList2 = res.value\r\n if (this.monitoringList2.length > 0) {\r\n this.stationKey2 = this.monitoringList2[0].mpcd\r\n }\r\n this.getDamspprList() //渗压曲线\r\n }\r\n }\r\n })\r\n },\r\n //位移曲线图\r\n getDammvList() {\r\n this.dammvLists = []\r\n let param = {\r\n appTypeList: [],\r\n endTime: '',\r\n id: '',\r\n mpcd: '',\r\n periodTime: '',\r\n rscd: this.params.rscd,\r\n startTime: '',\r\n stcd: this.stationKey1,\r\n stlc: '',\r\n stnm: '',\r\n sttp: '',\r\n sttpList: [],\r\n usfl: '',\r\n tmOrderAsc: true,\r\n }\r\n digitalReservoir.dammvList(param, (res) => {\r\n if (res.state) {\r\n this.dammvLists = res.value\r\n this.$nextTick(() => {\r\n this.initShiftChart()\r\n })\r\n }\r\n })\r\n },\r\n //渗压监测\r\n getDamspprList() {\r\n let param = {\r\n startTime: '',\r\n endTime: '',\r\n mptp: '4',\r\n rscd: this.params.rscd,\r\n mpcd: this.stationKey2,\r\n tmOrderAsc: true,\r\n }\r\n digitalReservoir.getDamspprList(param, (res) => {\r\n if (res.state) {\r\n this.damspprLists = res.value\r\n // console.log(res.value);\r\n this.$nextTick(() => {\r\n this.initPressureChart()\r\n })\r\n }\r\n })\r\n },\r\n //渗流曲线图\r\n getDamspgList() {\r\n let param = {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1,\r\n showTotal: true,\r\n },\r\n params: {\r\n rscd: this.params.rscd,\r\n },\r\n }\r\n digitalReservoir.lvtpcQuery(param, (res) => {\r\n if (res.state) {\r\n this.damspgLists = res.value.rows\r\n this.$nextTick(() => {\r\n this.initSeepageChart()\r\n })\r\n }\r\n })\r\n },\r\n openHistory() {\r\n //this.title, 1 // title 和 水库id\r\n this.$refs.historyModel.open(this.title, this.params.rscd)\r\n this.$refs.PDFModel.close()\r\n this.$refs.stationsModel.close()\r\n this.cutwindow('historyModel')\r\n },\r\n calculationWindow(size) {\r\n let iLeft, iTop, iWidth, iHeight\r\n iLeft = size.left - size.leftV\r\n iTop = size.top - size.topV\r\n iWidth = size.leftV + size.widthV - size.left\r\n iHeight = size.topV + size.heightV - size.top\r\n return [iLeft, iTop, iWidth + 1, iHeight + 1]\r\n },\r\n cutwindow(openWindow) {\r\n this.$nextTick(() => {\r\n let top = this.$refs[openWindow].$el.getBoundingClientRect().top\r\n let left =\r\n this.$refs[openWindow].$el.getBoundingClientRect().left\r\n let topV =\r\n this.$refs.videoIframe.$el.getBoundingClientRect().top\r\n let leftV =\r\n this.$refs.videoIframe.$el.getBoundingClientRect().left\r\n let widthV = this.$refs.videoIframe.$el.clientWidth\r\n let heightV = this.$refs.videoIframe.$el.clientHeight\r\n let windowSize = {top, left, topV, leftV, widthV, heightV}\r\n let cutSize = this.calculationWindow(windowSize)\r\n this.$refs.videoIframe.cutWindow(...cutSize)\r\n })\r\n },\r\n openPDF(val, path) {\r\n //this.title, 1 // title 和 水库id\r\n this.$refs.PDFModel.open(val, this.title, this.params.rscd, path)\r\n this.$refs.historyModel.close()\r\n this.$refs.stationsModel.close()\r\n this.cutwindow('PDFModel')\r\n },\r\n handleStation(title, type, data) {\r\n let czlbList = dictUtils.getDictItemsFromCache('tj-czlb')\r\n czlbList.forEach((e) => {\r\n if (e.name == title) {\r\n data.sttp = e.value\r\n }\r\n })\r\n this.$refs.stationsModel.open(title, type, data, this.params.rscd)\r\n this.$refs.historyModel.close()\r\n this.$refs.PDFModel.close()\r\n this.cutwindow('stationsModel')\r\n },\r\n closeModel() {\r\n this.$nextTick(() => {\r\n this.$refs.videoIframe.repairWindow()\r\n })\r\n },\r\n removeCache() {\r\n window.localStorage.removeItem('rscd')\r\n window.localStorage.removeItem('title')\r\n },\r\n goBack() {\r\n window.localStorage.removeItem('rscd')\r\n window.localStorage.removeItem('title')\r\n this.$router.push('/frontPlat/digitalReservoir/')\r\n },\r\n resize(delay) {\r\n // 动态计算表格的高度,自适应当前容器\r\n setTimeout(() => {\r\n this.rainChart.resize()\r\n this.waterChart.resize()\r\n this.seepageChart.resize()\r\n this.pressureChart.resize()\r\n this.shiftChart.resize()\r\n }, delay || 0)\r\n },\r\n initCharts() {\r\n this.$nextTick(() => {\r\n // this.initRainChart()\r\n // this.initWaterChart()\r\n // this.initSeepageChart()\r\n // this.initPressureChart()\r\n })\r\n },\r\n //下拉框选择\r\n // chengeMonitoring(){\r\n // \tconsole.log(this.stationKey1);\r\n // \tthis.getDammvList()\r\n // },\r\n initRainChart() {\r\n // pptnLatestLists\r\n let times = []\r\n let drpList = []\r\n this.pptnLatestLists.forEach((e) => {\r\n times.push(e.tm.split(' ')[1])\r\n drpList.push(e.drp)\r\n })\r\n const rainChartDom = document.getElementById('rainChart')\r\n this.rainChart = echarts.init(rainChartDom)\r\n let option = {\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 top: '2%',\r\n left: '4%',\r\n data: ['小时雨量(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: '6%',\r\n containLabel: true,\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: times,\r\n },\r\n ],\r\n yAxis: [\r\n {\r\n type: 'value',\r\n scale: true,\r\n },\r\n ],\r\n series: [\r\n {\r\n name: '小时雨量(mm)',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n data: drpList,\r\n itemStyle: {\r\n color: '#6767ff',\r\n },\r\n },\r\n ],\r\n }\r\n option && this.rainChart.setOption(option)\r\n },\r\n initWaterChart() {\r\n // rsvrLatestLists\r\n let times = []\r\n let rzList = []\r\n let wList = []\r\n this.rsvrLatestLists.forEach((e) => {\r\n times.push(e.tm.split(' ')[1])\r\n rzList.push(e.rz)\r\n wList.push(e.w)\r\n })\r\n // let yMin = (Math.min(...rzList) + 1.5).toFixed(2)\r\n // let yMax = (Math.max(...rzList) - 1.5).toFixed(2)\r\n const waterChartDom = document.getElementById('waterChart')\r\n this.waterChart = echarts.init(waterChartDom)\r\n let option = {\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 formatter(params) {\r\n // params的个数等于折线的条数(对多条折线数据进行加单位,就需要遍历)\r\n var moment = require('moment') //打开时默认时间为一天前至获取当前年月日时分秒\r\n var _today = moment()\r\n let endTime = moment().format('YYYY-MM-DD') //当前年月日\r\n var relVal = endTime + ' ' + params[0].name\r\n\r\n for (var i = 0, l = params.length; i < l; i++) {\r\n // circle变量是在数据前画一个对应颜色的圆形\r\n let circle = `o`\r\n relVal +=\r\n '
' +\r\n circle +\r\n params[i].seriesName +\r\n ' : ' +\r\n params[i].value\r\n }\r\n return relVal\r\n },\r\n },\r\n legend: {\r\n top: '2%',\r\n left: '4%',\r\n data: ['当前水位(m)'],\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: '6%',\r\n containLabel: true,\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: times,\r\n },\r\n ],\r\n yAxis: [\r\n {\r\n type: 'value',\r\n max: Math.ceil(Math.max(...rzList)),\r\n min: Math.floor(Math.min(...rzList)),\r\n interval: 0.5, //每次增加几个\r\n },\r\n ],\r\n series: [\r\n {\r\n name: '当前水位(m)',\r\n type: 'line',\r\n smooth: true,\r\n areaStyle: {},\r\n emphasis: {\r\n focus: 'series',\r\n },\r\n data: rzList,\r\n itemStyle: {\r\n color: '#6767ff',\r\n },\r\n },\r\n ],\r\n }\r\n option && this.waterChart.setOption(option)\r\n },\r\n initSeepageChart() {\r\n let times = []\r\n let rslvs = []\r\n let rstpcs = []\r\n\r\n // console.log(this.damspgLists);\r\n this.damspgLists.forEach((e) => {\r\n // times.push(e.createTime.split(' ')[1])\r\n rslvs.push(e.rslv)\r\n rstpcs.push(e.rstpc)\r\n })\r\n const seepageChartDom = document.getElementById('seepageChart')\r\n this.seepageChart = echarts.init(seepageChartDom)\r\n let option = {\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 // top: '2%',\r\n // left: '4%',\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: '10%',\r\n bottom: '6%',\r\n containLabel: true,\r\n },\r\n xAxis: [\r\n {\r\n name: '库容',\r\n type: 'category',\r\n boundaryGap: false,\r\n data: rstpcs,\r\n },\r\n ],\r\n yAxis: [\r\n {\r\n name: '水位',\r\n type: 'value',\r\n 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: rslvs,\r\n itemStyle: {\r\n color: '#0091ff',\r\n },\r\n },\r\n ],\r\n }\r\n option && this.seepageChart.setOption(option)\r\n },\r\n initPressureChart() {\r\n // damspprLists\r\n let times = []\r\n let pztbwls = []\r\n let jpztbwls = []\r\n let dpztbwls = []\r\n let maxNum = []\r\n let minNum = []\r\n this.damspprLists.forEach((e) => {\r\n console.log(e)\r\n if (e.pztbwl) {\r\n pztbwls.push(e.pztbwl)\r\n }\r\n if (e.jpztbwl) {\r\n jpztbwls.push(e.jpztbwl)\r\n }\r\n if (e.dpztbwl) {\r\n dpztbwls.push(e.dpztbwl)\r\n }\r\n times.push(e.mstm.slice(5))\r\n })\r\n if (pztbwls.length > 0) {\r\n maxNum.push(Math.max(...pztbwls))\r\n minNum.push(Math.min(...pztbwls))\r\n }\r\n if (jpztbwls.length > 0) {\r\n maxNum.push(Math.max(...jpztbwls))\r\n minNum.push(Math.min(...jpztbwls))\r\n }\r\n if (dpztbwls.length > 0) {\r\n maxNum.push(Math.max(...dpztbwls))\r\n minNum.push(Math.min(...dpztbwls))\r\n }\r\n const pressureChartDom = document.getElementById('pressureChart')\r\n this.pressureChart = echarts.init(pressureChartDom)\r\n let option = {\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 top: '2%',\r\n left: '4%',\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: '6%',\r\n containLabel: true,\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: times,\r\n },\r\n ],\r\n yAxis: [\r\n {\r\n type: 'value',\r\n // max: Math.ceil(Math.max(...maxNum) * 1.0001),\r\n // min: Math.floor(Math.min(...maxNum) * 0.999),\r\n max: Math.ceil(Math.max(...maxNum)),\r\n min: Math.floor(Math.min(...maxNum)),\r\n // splitNumber: 6,// 想要分隔的段数\r\n interval: 0.1, //每次增加几个\r\n axisLabel: {\r\n showMaxLabel: true,\r\n showMinLabel: true,\r\n },\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: 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: jpztbwls,\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: pztbwls,\r\n itemStyle: {\r\n color: '#6767ff',\r\n },\r\n },\r\n ],\r\n }\r\n option && this.pressureChart.setOption(option)\r\n },\r\n initShiftChart() {\r\n let times = []\r\n let xrdsList = []\r\n let yrdsList = []\r\n let zrdsList = []\r\n this.dammvLists.forEach((e) => {\r\n times.push(e.tm.split(' ')[1])\r\n xrdsList.push(e.dx)\r\n yrdsList.push(e.dy)\r\n zrdsList.push(e.dz)\r\n })\r\n const shiftChartDom = document.getElementById('shiftChart')\r\n this.shiftChart = echarts.init(shiftChartDom)\r\n let option = {\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 top: '6%',\r\n left: '4%',\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: '24%',\r\n left: '4%',\r\n right: '4%',\r\n bottom: '6%',\r\n containLabel: true,\r\n },\r\n xAxis: [\r\n {\r\n type: 'category',\r\n boundaryGap: false,\r\n data: times,\r\n },\r\n ],\r\n yAxis: [\r\n {\r\n type: 'value',\r\n },\r\n ],\r\n series: [\r\n {\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: xrdsList,\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: yrdsList,\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: zrdsList,\r\n itemStyle: {\r\n color: '#91cc75',\r\n },\r\n },\r\n ],\r\n }\r\n option && this.shiftChart.setOption(option)\r\n },\r\n },\r\n}\r\n",null]}