{"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\\components\\resWaterChildren.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\sqMonitor\\components\\resWaterChildren.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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 swStQuery from '@/api/monitor/resMonitor/swStQuery.js';\nimport resDerivedData from \"./model/resDerivedData.vue\";\nimport { TableMixin } from '@/mixins/tableMixin';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport * as echarts from 'echarts';\nimport req from '@/request.js';\nexport default {\n name: 'resWaterChilfren',\n components: {\n // FormDialog,\n resDerivedData: resDerivedData\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n yjdjs: [],\n loading: false,\n basAdNames: [],\n //行政区\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 queryParam: {\n pageBean: {\n pageSize: 20,\n page: 1\n },\n params: {\n appType: null,\n rscd: null,\n stcd: null,\n addvcd: null,\n usfl: null,\n rwptn: null\n }\n },\n title: '',\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 loadingChartData: false,\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 StationId: ''\n };\n },\n created: function created() {\n this.StationId = window.sessionStorage.getItem('StationId');\n this.czyyfl = dictUtils.getDictItemsFromCache('czyyfl');\n\n if (this.StationId != '' && this.StationId != null && this.StationId != undefined) {\n this.queryParam.params.stcd = this.StationId;\n this.queryParam.pageBean.page = 1;\n this.getDateList();\n this.getSysDict();\n window.sessionStorage.removeItem('StationId');\n } else {\n this.getSysDict();\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n //自动刷新获取数据(1000*60*10=>毫秒*秒*分钟,此时表示为10分钟)\n this.refreshData = setInterval(function () {\n _this.getDateList();\n }, 1000 * 60 * 10);\n },\n //生命周期若已设置定时器,需清空定时器beforeDestroy()\n beforeDestroy: function beforeDestroy() {\n this.refreshData = null;\n },\n methods: {\n // 导出表格弹窗显示\n updateExcl: function updateExcl() {\n this.$refs.Time.openShare();\n },\n openMore: function openMore() {\n this.showMore = !this.showMore;\n },\n onhouChange: function onhouChange(val) {\n if (val) {\n this.queryParam.params.addvcd = val[val.length - 1];\n } else {\n this.queryParam.params.addvcd = null;\n }\n },\n openDate: function openDate(val) {\n var _this2 = this;\n\n this.echartLiat = [];\n this.loadingChartData = true;\n console.log(val);\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 swStQuery.getRESChartsList(data.query, function (res) {\n _this2.timeList = [];\n _this2.zzList = [];\n _this2.nrstlvList = [];\n _this2.dsfllvList = [];\n _this2.chfllvList = [];\n _this2.rstpcList = [];\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 console.log(val);\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 swStQuery.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 });\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.loadingChartData = false;\n this.$message.warning('请选择查询时间范围!');\n this.query.startTime = '';\n this.query.endTime = '';\n this.timeList = [];\n this.zzList = [];\n this.nrstlvList = [];\n this.dsfllvList = [];\n this.chfllvList = [];\n this.rstpcList = [];\n this.$nextTick(function () {\n _this3.getCharts();\n\n _this3.getCharts1();\n });\n return;\n swStQuery.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.rstpcList.push(e.rstpc);\n\n _this3.chfllvList.push(e.chfllv);\n });\n }\n\n _this3.loadingChartData = false;\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 // name: '当前水位',\n // type: 'line',\n // emphasis: {\n // focus: 'series',\n // },\n // data: this.zzList,\n // itemStyle: {\n // color: '#0091ff',\n // },\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 swStQuery.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.yjdjs.forEach(function (c) {\n if (e.warnGrade == c.value) {\n e.level = c.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 rowStyle: function rowStyle(_ref) {\n var row = _ref.row,\n rowIndex = _ref.rowIndex;\n\n if (row.warnGrade == '2') {\n return 'orange_class';\n } else if (row.warnGrade == '1') {\n return 'error_class';\n } else if (row.warnGrade == 3) {\n return 'success_class';\n }\n\n return '';\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.yjdjs = response.data.yjdj;\n _this5.rwptns = response.data.ss; //水势\n\n swStQuery.getbasAdName({}, function (res) {\n _this5.basAdNames = res.value;\n });\n swStQuery.getRsnm({}, function (res) {\n _this5.rsnms = res.value;\n });\n swStQuery.getStnms({}, function (res) {\n _this5.stnms = res.value;\n });\n\n _this5.getDateList();\n }, function (error) {\n reject(error);\n });\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.onClickSearch();\n }\n }\n};",null]}