{"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\\otherMonitor\\sdzQuery.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\otherMonitor\\sdzQuery.vue","mtime":1684458239309},{"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.replace\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 sdzDerivedData from \"./components/sdzDerivedData.vue\";\nimport sdzQuery from '@/api/monitor/otherMonitor/sdzQuery.js';\nimport req from '@/request.js';\nimport * as echarts from 'echarts';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport { TableMixin } from '@/mixins/tableMixin';\nexport default {\n name: 'sdzQuery',\n components: {\n // FormDialog,\n // hysRelation\n sdzDerivedData: sdzDerivedData\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n title: '',\n loading: false,\n queryParam: {\n pageBean: {\n pageSize: 20,\n page: 1\n },\n params: {\n sstp: null,\n stcd: null,\n //水电站名称\n addvcd: null //水电站类型(参考字典)\n\n }\n },\n showFormDias: false,\n total: 0,\n tableData: [],\n times: [],\n echartLiat: [],\n hysts: [],\n //水电站名称\n engScals: [],\n //工程规模\n hystTypes: [],\n //水电站类型\n basAdNames: [],\n //行政区\n setKesLabel: {\n value: 'code',\n label: 'name',\n children: 'children'\n },\n timeValue: [],\n sstpList: [],\n query: {\n stcd: null,\n stnm: null,\n startTime: null,\n endTime: null\n },\n timeList: [],\n zzList: [],\n qList: [],\n jzList: [],\n dzList: [],\n showMore: false,\n StationId: '',\n loadingChartData: false\n };\n },\n created: function created() {\n var _this = this;\n\n this.StationId = window.sessionStorage.getItem('StationId');\n this.sstpList = dictUtils.getDictItemsFromCache('czlb-stzlx');\n this.getNames();\n\n if (this.StationId != '' && this.StationId != null && this.StationId != undefined) {\n this.queryParam.params.stnm = this.StationId;\n this.queryParam.pageBean.page = 1;\n window.sessionStorage.removeItem('StationId');\n } else {\n this.getSysDict();\n }\n\n this.getDateList();\n sdzQuery.getbasAdName({}, function (res) {\n _this.basAdNames = res.value;\n }); // this.query.startTime = null //每次打开弹窗时清空上次手动选择的时间\n // this.query.endTime = null //每次打开弹窗时清空上次手动选择的时间\n // this.times = [] //每次打开弹窗时清空上次手动选择的时间\n // var moment = require('moment') //打开时默认时间为一天前至获取当前年月日时分秒\n // var _today = moment()\n // let endTime = moment().format('L') //当前年月日\n // let time = moment().format('LTS') //当前时分秒\n // endTime = endTime.replace(/\\//g, '-')\n // endTime = endTime + ' ' + time\n // let startTime = _today\n // .subtract(1, 'days')\n // .format('YYYY-MM-DD') /*前一天的时间*/\n // \t\t\tconsole.log(startTime);\n // startTime = startTime + ' ' + time\n // this.query.startTime = startTime\n // this.query.endTime = endTime\n // this.times=[startTime,endTime]\n // console.log(this.times);\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 changeChart: function changeChart(val) {\n var _this2 = 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.qList = [];\n this.jzList = [];\n this.dzList = [];\n sdzQuery.getChartsList(this.query, function (res) {\n if (res.value.length) {\n _this2.echartLiat = res.value;\n\n _this2.echartLiat.forEach(function (e) {\n _this2.timeList.push(e.tm);\n\n _this2.zzList.push(e.zz);\n\n _this2.qList.push(e.q);\n\n _this2.jzList.push(e.jz);\n\n _this2.dzList.push(e.dz);\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 _this2.$nextTick(function () {\n _this2.getCharts();\n });\n\n _this2.loadingChartData = false;\n });\n } else {\n this.$message.warning('请选择查询时间范围!');\n this.$nextTick(function () {\n _this2.getCharts();\n });\n this.loadingChartData = false;\n this.query.startTime = '';\n this.query.endTime = '';\n this.times = [];\n this.timeList = [];\n this.zzList = [];\n this.qList = [];\n this.jzList = [];\n this.dzList = [];\n return;\n sdzQuery.getChartsList(this.query, function (res) {\n if (res.value.length) {\n _this2.echartLiat = res.value;\n\n _this2.echartLiat.forEach(function (e) {\n _this2.timeList.push(e.tm);\n\n _this2.zzList.push(e.zz);\n\n _this2.qList.push(e.q);\n\n _this2.jzList.push(e.jz);\n\n _this2.dzList.push(e.dz);\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 }\n\n _this2.loadingChartData = false;\n });\n }\n },\n handleClose: function handleClose() {\n this.echartLiat = [];\n this.showFormDias = false;\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 relationUpdate: function relationUpdate(val) {\n var _this3 = 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 // this.times = [] //每次打开弹窗时清空上次手动选择的时间\n\n this.query.stcd = val.stcd; //点击打开曲线图时赋值\n\n this.query.stnm = val.stnm; //点击打开曲线图时赋值\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 }\n };\n this.timeList = [];\n this.zzList = [];\n this.qList = [];\n this.jzList = [];\n this.dzList = [];\n sdzQuery.getChartsList(data.query, function (res) {\n _this3.echartLiat = res.value;\n console.log(res.value);\n\n if (res.value.length) {\n _this3.echartLiat.forEach(function (e) {\n _this3.timeList.push(e.tm);\n\n _this3.zzList.push(e.zz);\n\n _this3.qList.push(e.q);\n\n _this3.jzList.push(e.jz);\n\n _this3.dzList.push(e.dz);\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 _this3.getCharts();\n });\n } else {\n _this3.timeList = [];\n _this3.zzList = [];\n _this3.qList = [];\n _this3.jzList = [];\n _this3.dzList = [];\n\n _this3.$nextTick(function () {\n _this3.getCharts();\n });\n }\n\n _this3.loadingChartData = false;\n }); //打开关联\n },\n getNames: function getNames() {\n var _this4 = this;\n\n sdzQuery.getTshy({}, function (res) {\n _this4.hysts = res.value;\n });\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: ['流量(m³/s)', '当前水位(m)', '警戒流量阈值(m³/s)', '危险流量阈值(m³/s)']\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: '流量(m³/s)',\n type: 'line',\n smooth: true,\n emphasis: {\n focus: 'series'\n },\n data: this.qList,\n itemStyle: {\n color: 'green'\n }\n }, {\n name: '当前水位(m)',\n type: 'line',\n smooth: true,\n emphasis: {\n focus: 'series'\n },\n data: this.zzList,\n itemStyle: {\n color: '#0091ff'\n }\n }, {\n name: '警戒流量阈值(m³/s)',\n type: 'line',\n smooth: true,\n emphasis: {\n focus: 'series'\n },\n data: this.jzList,\n itemStyle: {\n color: 'yellow'\n }\n }, {\n name: '危险流量阈值(m³/s)',\n type: 'line',\n smooth: true,\n emphasis: {\n focus: 'series'\n },\n data: this.dzList,\n itemStyle: {\n color: 'red'\n }\n }]\n };\n option && myChart.setOption(option);\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.hystTypes = response.data.sdzlx; //水电站类型\n\n _this5.engScals = response.data.gcgm; //工程规模\n\n _this5.getDateList();\n }, function (error) {\n reject(error);\n });\n });\n },\n getDateList: function getDateList() {\n var _this6 = this;\n\n this.loading = true;\n this.tableData = [];\n sdzQuery.ListGet(this.queryParam, function (res) {\n _this6.total = res.value.total;\n\n for (var i = 0; i < _this6.hystTypes.length; i++) {\n for (var j = 0; j < res.value.rows.length; j++) {\n if (_this6.hystTypes[i].value === res.value.rows[j].hystType) {\n res.value.rows[j].hystTypeName = _this6.hystTypes[i].name;\n } else {}\n }\n }\n\n for (var _i = 0; _i < _this6.engScals.length; _i++) {\n for (var _j = 0; _j < res.value.rows.length; _j++) {\n if (_this6.engScals[_i].value === res.value.rows[_j].engScal) {\n res.value.rows[_j].engScalName = _this6.engScals[_i].name;\n } else {}\n }\n }\n\n _this6.tableData = res.value.rows;\n _this6.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 // // 点击查询\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.getDateList();\n }\n }\n};",null]}