{"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\\monitor\\sqMonitor\\resWaterHistory.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\sqMonitor\\resWaterHistory.vue","mtime":1688458391974},{"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/es6.function.name\";\nimport \"core-js/modules/es6.regexp.to-string\";\nimport \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"core-js/modules/es6.regexp.replace\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport resWaterHistory from '@/api/monitor/resMonitor/resWaterHistory.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport req from '@/request.js';\nimport * as echarts from 'echarts';\nexport default {\n name: 'resWaterHistory',\n components: {// FormDialog,\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n title: '',\n loading: false,\n statuss: [{\n name: '在线',\n value: '1'\n }, {\n name: '不在线',\n value: '0'\n }],\n multipleSelection: [],\n // 复选框\n rsnms: [],\n //水库下拉,\n stnms: [],\n //测站下拉\n setKesLabel: {\n value: 'code',\n label: 'name',\n children: 'children'\n },\n scopeTime: '',\n queryParam: {\n pageBean: {\n pageSize: 20,\n page: 1\n },\n params: {\n rscd: null,\n stcd: null,\n usfl: null,\n startTime: null,\n endTime: null,\n rwptn: null\n }\n },\n rwptns: [],\n //水势\n tableData: [],\n pId: '',\n total: 0,\n showFormDias: false,\n dates: [],\n dangerdz: [],\n dangerjz: [],\n dangerzs: [],\n //水位\n dangerQ: [],\n //流量\n echartLiat: [],\n times: [],\n //选择时间\n czyyfl: [],\n query: {\n stcd: null,\n stnm: null,\n startTime: null,\n endTime: null,\n rscd: null\n },\n timeList: [],\n zzList: [],\n nrstlvList: [],\n dsfllvList: [],\n rstpcList: [],\n chfllvList: [],\n loadingChartData: false\n };\n },\n created: function created() {\n this.czyyfl = dictUtils.getDictItemsFromCache('czyyfl');\n this.getCurrentMonthLast();\n this.getSysDict();\n },\n methods: {\n //导出excl\n updateExcl: function updateExcl() {\n var _this = this;\n\n var loading = this.$loading({\n lock: true,\n text: '导出中...',\n spinner: 'el-icon-loading',\n background: 'rgba(0, 0, 0, 0.7)'\n });\n var param = {\n groupRelation: 'AND',\n groupTree: {},\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n params: {\n startTime: this.queryParam.params.startTime,\n endTime: this.queryParam.params.endTime,\n stnm: this.queryParam.params.stnm,\n rscd: this.queryParam.params.rscd,\n stcd: this.queryParam.params.stcd,\n usfl: this.queryParam.params.usfl,\n appType: this.queryParam.params.appType,\n wptn: this.queryParam.params.wptn\n },\n querys: [{\n group: 'main',\n operation: 'EQUAL',\n parentGroup: '',\n property: '',\n relation: 'AND',\n value: {}\n }],\n sorter: [{\n direction: 'ASC',\n property: ''\n }]\n };\n resWaterHistory.rsvrHistoryExport(param, function (res) {\n loading.close();\n\n if (res.state == false) {\n _this.$message.error(res.message);\n } else {\n _this.$message.success('导出成功');\n }\n });\n },\n getCurrentMonthLast: function getCurrentMonthLast() {\n var moment = require('moment'); //打开时默认时间为一天前至获取当前年月日时分秒\n\n\n var endTime = moment().format('YYYY-MM-DD'); //当前年月日\n\n var startTime = moment().subtract(1, 'days').format('YYYY-MM-DD');\n this.scopeTime = [startTime, endTime];\n var time = moment().format('LTS'); //当前时分秒\n\n this.queryParam.params.startTime = this.scopeTime[0] + ' ' + '00:00:00';\n this.queryParam.params.endTime = this.scopeTime[1] + ' ' + time;\n },\n openMore: function openMore() {\n this.showMore = !this.showMore;\n },\n openDate: function openDate(val) {\n var _this2 = this;\n\n this.echartLiat = [];\n this.loadingChartData = true;\n this.title = val.stnm;\n this.query.startTime = null; //每次打开弹窗时清空上次手动选择的时间\n\n this.query.endTime = null; //每次打开弹窗时清空上次手动选择的时间\n\n this.times = []; //每次打开弹窗时清空上次手动选择的时间\n\n this.query.stcd = val.stcd; //点击打开曲线图时赋值\n\n this.query.stnm = val.stnm; //点击打开曲线图时赋值\n\n this.query.rscd = val.rscd; //点击打开曲线图时赋值\n\n var moment = require('moment'); //打开时默认时间为一天前至获取当前年月日时分秒\n\n\n var _today = moment();\n\n this.showFormDias = true;\n var endTime = moment().format('L'); //当前年月日\n\n var time = moment().format('LTS'); //当前时分秒\n\n endTime = endTime.replace(/\\//g, '-');\n endTime = endTime + ' ' + time;\n\n var startTime = _today.subtract(1, 'days').format('YYYY-MM-DD');\n /*前一天的时间*/\n\n\n startTime = startTime + ' ' + time;\n this.query.startTime = startTime;\n this.query.endTime = endTime;\n this.times = [startTime, endTime];\n var data = {\n query: {\n stnm: val.stnm,\n stcd: val.stcd,\n startTime: startTime,\n endTime: endTime,\n sttp: val.sttp,\n rscd: val.rscd\n }\n };\n this.timeList = [];\n this.zzList = [];\n this.nrstlvList = [];\n this.dsfllvList = [];\n this.chfllvList = [];\n this.rstpcList = [];\n resWaterHistory.getRESChartsList(data.query, function (res) {\n _this2.echartLiat = res.value;\n\n if (res.value.length) {\n _this2.echartLiat.forEach(function (e) {\n _this2.timeList.push(e.tm);\n\n _this2.zzList.push(e.zz);\n\n _this2.nrstlvList.push(e.nrstlv);\n\n _this2.dsfllvList.push(e.dsfllv);\n\n _this2.chfllvList.push(e.chfllv);\n\n _this2.rstpcList.push(e.rstpc);\n }); // this.dates = this.echartLiat.map(item => {\n // return item.tm\n // })\n // this.dangerdz = this.echartLiat.map(item => {\n // return item.dz\n // })\n // this.dangerjz = this.echartLiat.map(item => {\n // return item.jz\n // })\n // this.dangerzs = this.echartLiat.map(item => {\n // return item.zz\n // })\n // this.dangerQ = this.echartLiat.map(item => {\n // return item.q\n // })\n\n\n _this2.$nextTick(function () {\n _this2.getCharts();\n\n _this2.getCharts1();\n });\n } else {\n _this2.timeList = [];\n _this2.zzList = [];\n _this2.nrstlvList = [];\n _this2.dsfllvList = [];\n _this2.chfllvList = [];\n _this2.rstpcList = [];\n\n _this2.$nextTick(function () {\n _this2.getCharts();\n\n _this2.getCharts1();\n });\n }\n\n _this2.loadingChartData = false;\n });\n },\n changeChart: function changeChart(val) {\n var _this3 = this;\n\n this.echartLiat = [];\n this.loadingChartData = true;\n\n if (val) {\n this.query.startTime = val[0];\n this.query.endTime = val[1];\n this.timeList = [];\n this.zzList = [];\n this.nrstlvList = [];\n this.dsfllvList = [];\n this.chfllvList = [];\n this.rstpcList = [];\n resWaterHistory.getRESChartsList(this.query, function (res) {\n if (res.value.length) {\n _this3.echartLiat = res.value;\n\n _this3.echartLiat.forEach(function (e) {\n _this3.timeList.push(e.tm);\n\n _this3.zzList.push(e.zz);\n\n _this3.nrstlvList.push(e.nrstlv);\n\n _this3.dsfllvList.push(e.dsfllv);\n\n _this3.chfllvList.push(e.chfllv);\n\n _this3.rstpcList.push(e.rstpc);\n }); // this.dates = this.echartLiat.map(item => {\n // return item.tm\n // })\n // this.dangerdz = this.echartLiat.map(item => {\n // return item.dz\n // })\n // this.dangerjz = this.echartLiat.map(item => {\n // return item.jz\n // })\n // this.dangerzs = this.echartLiat.map(item => {\n // return item.zz\n // })\n // this.dangerQ = this.echartLiat.map(item => {\n // return item.q\n // })\n\n }\n\n _this3.$nextTick(function () {\n console.log(_this3.dangerzs, 666);\n\n _this3.getCharts();\n\n _this3.getCharts1();\n });\n\n _this3.loadingChartData = false;\n });\n } else {\n this.$message.warning('请选择查询时间范围!');\n this.query.startTime = '';\n this.query.endTime = '';\n this.times = [];\n this.timeList = [];\n this.zzList = [];\n this.nrstlvList = [];\n this.dsfllvList = [];\n this.rstpcList = [];\n this.chfllvList = [];\n this.$nextTick(function () {\n _this3.getCharts();\n\n _this3.getCharts1();\n });\n return;\n resWaterHistory.getRESChartsList(this.query, function (res) {\n if (res.value.length) {\n _this3.echartLiat = res.value;\n\n _this3.echartLiat.forEach(function (e) {\n _this3.timeList.push(e.tm);\n\n _this3.zzList.push(e.zz);\n\n _this3.nrstlvList.push(e.nrstlv);\n\n _this3.dsfllvList.push(e.dsfllv);\n\n _this3.chfllvList.push(e.chfllv);\n\n _this3.rstpcList.push(e.rstpc);\n }); // this.dates = this.echartLiat.map(item => {\n // return item.tm\n // })\n // this.dangerdz = this.echartLiat.map(item => {\n // return item.dz\n // })\n // this.dangerjz = this.echartLiat.map(item => {\n // return item.jz\n // })\n // this.dangerzs = this.echartLiat.map(item => {\n // return item.zz\n // })\n // this.dangerQ = this.echartLiat.map(item => {\n // return item.q\n // })\n\n\n _this3.$nextTick(function () {\n console.log(_this3.dangerzs, 777);\n\n _this3.getCharts();\n\n _this3.getCharts1();\n });\n }\n });\n }\n },\n getCharts1: function getCharts1() {\n var echartList = this.echartLiat;\n var chartDom = document.getElementById('echartsBox1');\n var myChart = echarts.init(chartDom);\n var option = {\n title: {\n text: ''\n },\n tooltip: {\n trigger: 'axis',\n formatter: function formatter(params) {\n // params 是一个包含详细信息的对象\n // 可以根据 params 中的数据自定义 tooltip 的展示\n var html = '';\n\n for (var i = 0; i < params.length; i++) {\n var color = params[i].color;\n var name = params[i].seriesName;\n var value = params[i].data ? params[i].data : '-';\n var dataIndex = params[i].dataIndex;\n var marker = '';\n var label = '' + name + '';\n var valueLabel = '';\n var yue = name == '库容' ? '约' : '';\n\n if (echartList[dataIndex].isMatched == 'f') {\n valueLabel = '' + yue + value + '';\n } else {\n valueLabel = '' + value + '';\n }\n\n html += marker + label + valueLabel + '
';\n }\n\n return html;\n }\n },\n legend: {\n // data: ['当前水位', '库容'],\n data: ['库容']\n },\n grid: {\n left: '8%',\n right: '4%',\n bottom: '6%',\n containLabel: true\n },\n // toolbox: {\n // feature: {\n // saveAsImage: {},\n // },\n // },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: this.timeList\n },\n yAxis: {\n type: 'value',\n scale: true\n },\n series: [// {\n // \tname: '当前水位',\n // \ttype: 'line',\n // \temphasis: {\n // \t\tfocus: 'series',\n // \t},\n // \tdata: this.zzList,\n // \titemStyle: {\n // \t\tcolor: '#0091ff',\n // \t},\n // },\n {\n name: '库容',\n type: 'line',\n emphasis: {\n focus: 'series'\n },\n data: this.rstpcList,\n itemStyle: {\n normal: {\n color: 'green',\n lineStyle: {\n color: 'green'\n }\n }\n }\n }]\n };\n option && myChart.setOption(option);\n },\n getCharts: function getCharts() {\n var chartDom = document.getElementById('echartsBox');\n var myChart = echarts.init(chartDom);\n var option = {\n title: {\n text: ''\n },\n tooltip: {\n trigger: 'axis'\n },\n legend: {\n data: ['警戒水位', '设计洪水位', '校核洪水位', '当前水位']\n },\n grid: {\n left: '8%',\n right: '4%',\n bottom: '6%',\n containLabel: true\n },\n // toolbox: {\n // feature: {\n // saveAsImage: {},\n // },\n // },\n xAxis: {\n type: 'category',\n boundaryGap: false,\n data: this.timeList\n },\n yAxis: {\n type: 'value',\n scale: true\n },\n series: [{\n name: '警戒水位',\n type: 'line',\n emphasis: {\n focus: 'series'\n },\n data: this.nrstlvList,\n itemStyle: {\n normal: {\n color: 'yellow',\n lineStyle: {\n color: 'yellow'\n }\n }\n }\n }, {\n name: '设计洪水位',\n type: 'line',\n emphasis: {\n focus: 'series'\n },\n data: this.dsfllvList,\n itemStyle: {\n normal: {\n color: '#ff6347',\n lineStyle: {\n color: '#ff6347'\n }\n }\n }\n }, {\n name: '校核洪水位',\n type: 'line',\n emphasis: {\n focus: 'series'\n },\n data: this.chfllvList,\n itemStyle: {\n normal: {\n color: '#b22222',\n lineStyle: {\n color: '#b22222'\n }\n }\n }\n }, {\n name: '当前水位',\n type: 'line',\n emphasis: {\n focus: 'series'\n },\n data: this.zzList,\n itemStyle: {\n color: '#0091ff'\n }\n }]\n };\n option && myChart.setOption(option);\n },\n handleClose: function handleClose() {\n this.echartLiat = [];\n this.showFormDias = false;\n },\n floatSub: function floatSub(arg1, arg2) {\n var r1, r2, m, n;\n\n try {\n r1 = arg1.toString().split('.')[1].length;\n } catch (e) {\n r1 = 0;\n }\n\n try {\n r2 = arg2.toString().split('.')[1].length;\n } catch (e) {\n r2 = 0;\n }\n\n m = Math.pow(10, Math.max(r1, r2));\n console.log(m); //动态控制精度长度\n\n n = r1 >= r2 ? r1 : r2;\n return ((arg1 * m - arg2 * m) / m).toFixed(n);\n },\n getDateList: function getDateList() {\n var _this4 = this;\n\n this.loading = true;\n this.tableData = [];\n resWaterHistory.ListGet(this.queryParam, function (res) {\n _this4.total = res.value.total;\n _this4.tableData = JSON.parse(JSON.stringify(res.value.rows));\n\n _this4.tableData.forEach(function (e) {\n if (e.rz > e.nrstlv) {\n e.transfinite = _this4.floatSub(e.rz, e.nrstlv);\n } else {\n e.transfinite = '--';\n }\n\n _this4.rwptns.forEach(function (w) {\n if (e.rwptn == w.value) {\n e.rwptn = w.name;\n }\n });\n\n _this4.czyyfl.forEach(function (c) {\n if (e.appType == c.value) {\n e.appTypeName = c.name;\n }\n });\n });\n\n _this4.$set(_this4.tableData);\n\n _this4.loading = false;\n });\n },\n handleSizeChange: function handleSizeChange(val) {\n this.queryParam.pageBean.pageSize = val;\n this.getDateList();\n },\n handleCurrentChange: function handleCurrentChange(val) {\n this.queryParam.pageBean.page = val;\n this.getDateList();\n },\n handleSelectionChange: function handleSelectionChange(val) {\n this.multipleSelection = val.map(function (item) {\n return item.id;\n });\n },\n // // 指定一个key标识这一行的数据\n // getRowKey(row) {\n // return row.id\n // },\n //获取字典数据\n getSysDict: function getSysDict() {\n var _this5 = this;\n\n var portal = window.context.portal;\n return new Promise(function (resolve, reject) {\n req.post(portal + '/sys/sysDictionary/v1/queryAllDictItems').then(function (response) {\n resolve(response.data);\n _this5.rwptns = response.data.ss; //水势\n\n resWaterHistory.getRsnm({}, function (res) {\n _this5.rsnms = res.value;\n });\n resWaterHistory.getStnms({}, function (res) {\n _this5.stnms = res.value;\n });\n\n _this5.getDateList();\n }, function (error) {\n reject(error);\n });\n });\n },\n changeDate: function changeDate(val) {\n if (val) {\n var moment = require('moment'); //打开时默认时间为一天前至获取当前年月日时分秒\n\n\n var time = moment().format('LTS'); //当前时分秒\n\n this.queryParam.params.startTime = val[0] + ' ' + '00:00:00';\n this.queryParam.params.endTime = val[1] + ' ' + time;\n } else {\n this.queryParam.params.startTime = '';\n this.queryParam.params.endTime = '';\n }\n },\n // // 点击查询\n onClickSearch: function onClickSearch() {\n this.queryParam.pageBean.page = 1;\n this.getDateList();\n },\n // 重置\n resetQuery: function resetQuery() {\n this.queryParam.params = {};\n this.scopeTime = '';\n this.onClickSearch();\n }\n }\n};",null]}