{"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\\resMonitor\\ylStQuery.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\resMonitor\\ylStQuery.vue","mtime":1684458239402},{"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.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 ylStQuery from '@/api/monitor/resMonitor/ylStQuery.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport TimeSelection from \"./components/TimeSelection.vue\";\nimport * as echarts from 'echarts';\nimport { TableMixin } from '@/mixins/tableMixin';\nimport req from '@/request.js';\nexport default {\n name: 'displacement',\n components: {\n TimeSelection: TimeSelection\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n warnSds: [{\n value: 'pn10',\n warnSdMsg: '10分钟时段降水量'\n }, {\n value: 'pn30',\n warnSdMsg: '30分钟时段降水量'\n }, {\n value: 'p1',\n warnSdMsg: '1小时时段降水量'\n }, {\n value: 'p3',\n warnSdMsg: '3小时时段降水量'\n }, {\n value: 'p6',\n warnSdMsg: '6小时时段降水量'\n }, {\n value: 'p12',\n warnSdMsg: '12小时时段降水量'\n }, {\n value: 'pd',\n warnSdMsg: '24小时时段降水量'\n }],\n total: 0,\n showFormDias: false,\n tableData: [],\n loading: false,\n basAdNames: [],\n //行政区\n yjdjs: [],\n title: '',\n statuss: [{\n name: '在线',\n value: '1'\n }, {\n name: '不在线',\n value: '0'\n }],\n czyyfl: [],\n times: [],\n timeValue: 'drp',\n multipleSelection: [],\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: '',\n warnGrade: null,\n stcd: null,\n addvcd: null,\n usfl: null,\n timeFrame: 'yjz'\n }\n },\n query: {\n stcd: '60749857',\n stnm: null,\n startTime: null,\n endTime: null\n },\n timeFrameList: [{\n name: '1小时',\n value: 'yjz'\n }, {\n name: '3小时',\n value: 'shhjz'\n }, {\n name: '6小时',\n value: 'lhjz'\n }, {\n name: '12小时',\n value: 'sejz'\n }, {\n name: '24小时',\n value: 'esjz'\n }],\n options: [{\n label: 'drp',\n name: '默认'\n }, {\n label: 'pn10',\n name: '10分'\n }, {\n label: 'pn30',\n name: '30分'\n }, {\n label: 'p1',\n name: '1小时'\n }, {\n label: 'p3',\n name: '3小时'\n }, {\n label: 'p6',\n name: '6小时'\n }, {\n label: 'p12',\n name: '12小时'\n }, {\n label: 'pd',\n name: '24小时'\n }, {\n label: 'dyp',\n name: '日降雨量'\n }],\n echartLiat: [],\n loadingChartData: false,\n StationId: '',\n refreshData: null\n };\n },\n created: function created() {\n this.StationId = window.sessionStorage.getItem('StationId');\n this.czyyfl = dictUtils.getDictItemsFromCache('czyyfl');\n this.getSysDict();\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 window.sessionStorage.removeItem('StationId');\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n //自动刷新获取数据(1000*60*10=>毫秒*秒*分钟,此时表示为10分钟)\n this.refreshData = setInterval(function () {\n _this.getSysDict();\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 getDateList: function getDateList() {\n var _this2 = this;\n\n this.loading = true;\n this.tableData = [];\n ylStQuery.ListGet(this.queryParam, function (res) {\n _this2.total = res.value.total;\n _this2.tableData = JSON.parse(JSON.stringify(res.value.rows));\n\n _this2.tableData.forEach(function (e) {\n _this2.warnSds.forEach(function (w) {\n if (e.warnSd == w.value) {\n e.warnSd = w.warnSdMsg;\n }\n });\n\n _this2.yjdjs.forEach(function (c) {\n if (e.warnGrade == c.value) {\n e.level = c.name;\n }\n });\n\n _this2.czyyfl.forEach(function (c) {\n if (e.appType == c.value) {\n e.appTypeName = c.name;\n }\n });\n });\n\n _this2.$set(_this2.tableData);\n\n _this2.loading = false;\n });\n },\n handleSizeChange: function handleSizeChange(val) {\n this.queryParam.pageBean.pageSize = val;\n this.getDateList();\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 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 //获取字典数据\n getSysDict: function getSysDict() {\n var _this3 = 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 _this3.yjdjs = response.data.yjdj;\n ylStQuery.getbasAdName({}, function (res) {\n _this3.basAdNames = res.value;\n });\n ylStQuery.getStnms({}, function (res) {\n _this3.stnms = res.value;\n });\n\n _this3.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 openDate: function openDate(val) {\n var _this4 = this;\n\n this.echartLiat = [];\n this.loadingChartData = true;\n console.log(val);\n this.title = val.stnm;\n this.timeValue = 'drp';\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 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: '',\n stcd: val.stcd,\n startTime: startTime,\n endTime: endTime,\n sttp: val.sttp\n } // {\n // \tendTime: \"2022-05-20 15:17:33\",\n // \tstartTime: \"2022-05-19 15:00:33\",\n // \tstcd: \"60749857\",\n // }\n\n };\n ylStQuery.pptnList(data.query, function (res) {\n _this4.echartLiat = res.value;\n\n if (res.value.length > 0) {\n _this4.dates = _this4.echartLiat.map(function (item) {\n return item.tm;\n });\n _this4.dangerzs = _this4.echartLiat.map(function (item) {\n if (_this4.timeValue == 'drp') {\n return item.drp;\n }\n });\n _this4.dangerjz = _this4.echartLiat.map(function (item) {\n if (_this4.timeValue == 'p1') {\n return item.jj1;\n } else if (_this4.timeValue == 'p3') {\n return item.jj3;\n } else if (_this4.timeValue == 'p6') {\n return item.jj6;\n } else if (_this4.timeValue == 'p12') {\n return item.jj12;\n } else if (_this4.timeValue == 'pd') {\n return item.jj24;\n }\n });\n _this4.dangerdz = _this4.echartLiat.map(function (item) {\n if (_this4.timeValue == 'p1') {\n return item.wx1;\n } else if (_this4.timeValue == 'p3') {\n return item.wx3;\n } else if (_this4.timeValue == 'p6') {\n return item.wx6;\n } else if (_this4.timeValue == 'p12') {\n return item.wx12;\n } else if (_this4.timeValue == 'pd') {\n return item.wx24;\n }\n });\n\n _this4.$nextTick(function () {\n _this4.getCharts();\n });\n } else {\n _this4.dangerdz = [];\n _this4.dates = [];\n _this4.dangerjz = [];\n _this4.dangerQ = [];\n _this4.dangerzs = [];\n\n _this4.$nextTick(function () {\n _this4.getCharts();\n });\n }\n\n _this4.loadingChartData = false;\n });\n },\n handleClose: function handleClose() {\n this.echartLiat = [];\n this.showFormDias = false;\n },\n changeChart: function changeChart() {\n var _this5 = this;\n\n this.echartLiat = [];\n this.loadingChartData = true;\n\n if (this.times && this.times.length > 0) {\n this.query.startTime = this.times[0];\n this.query.endTime = this.times[1];\n this.dangerdz = [];\n this.dates = [];\n this.dangerjz = [];\n this.dangerzs = [];\n this.dangerQ = [];\n ylStQuery.pptnList(this.query, function (res) {\n console.log(res.value.length);\n\n if (res.value.length > 0) {\n _this5.echartLiat = res.value;\n _this5.dates = _this5.echartLiat.map(function (item) {\n return item.tm;\n });\n _this5.dangerzs = _this5.echartLiat.map(function (item) {\n if (_this5.timeValue == 'drp') {\n return item.drp;\n } else if (_this5.timeValue == 'pn10') {\n return item.pn10;\n } else if (_this5.timeValue == 'pn30') {\n return item.pn30;\n } else if (_this5.timeValue == 'p1') {\n return item.p1;\n } else if (_this5.timeValue == 'p3') {\n return item.p3;\n } else if (_this5.timeValue == 'p6') {\n return item.p6;\n } else if (_this5.timeValue == 'p12') {\n return item.p12;\n } else if (_this5.timeValue == 'pd') {\n return item.pd;\n } else if (_this5.timeValue == 'dyp') {\n return item.dyp;\n }\n });\n _this5.dangerjz = _this5.echartLiat.map(function (item) {\n if (_this5.timeValue == 'p1') {\n return item.jj1;\n } else if (_this5.timeValue == 'p3') {\n return item.jj3;\n } else if (_this5.timeValue == 'p6') {\n return item.jj6;\n } else if (_this5.timeValue == 'p12') {\n return item.jj12;\n } else if (_this5.timeValue == 'pd') {\n return item.jj24;\n }\n });\n _this5.dangerdz = _this5.echartLiat.map(function (item) {\n if (_this5.timeValue == 'p1') {\n return item.wx1;\n } else if (_this5.timeValue == 'p3') {\n return item.wx3;\n } else if (_this5.timeValue == 'p6') {\n return item.wx6;\n } else if (_this5.timeValue == 'p12') {\n return item.wx12;\n } else if (_this5.timeValue == 'pd') {\n return item.wx24;\n }\n });\n console.log(_this5.dangerzs);\n\n _this5.$nextTick(function () {\n _this5.getCharts();\n });\n } else {\n _this5.dangerdz = [];\n _this5.dates = [];\n\n _this5.$nextTick(function () {\n _this5.getCharts();\n });\n }\n\n _this5.loadingChartData = false;\n });\n } else {\n this.$message.warning('请选择查询时间范围!');\n this.loadingChartData = false;\n this.query.startTime = '';\n this.query.endTime = '';\n this.times = [];\n this.dangerdz = [];\n this.dates = [];\n this.dangerjz = [];\n this.dangerzs = [];\n this.dangerQ = [];\n this.$nextTick(function () {\n console.log(_this5.dangerzs, 777);\n\n _this5.getCharts();\n });\n return;\n ylStQuery.pptnList(this.query, function (res) {\n return;\n\n if (res.value.length > 0) {\n _this5.echartLiat = res.value;\n _this5.dates = _this5.echartLiat.map(function (item) {\n return item.tm;\n });\n _this5.dangerzs = _this5.echartLiat.map(function (item) {\n if (_this5.timeValue == 'drp') {\n return item.drp;\n } else if (_this5.timeValue == 'pn10') {\n return item.pn10;\n } else if (_this5.timeValue == 'pn30') {\n return item.pn30;\n } else if (_this5.timeValue == 'p1') {\n return item.p1;\n } else if (_this5.timeValue == 'p3') {\n return item.p3;\n } else if (_this5.timeValue == 'p6') {\n return item.p6;\n } else if (_this5.timeValue == 'p12') {\n return item.p12;\n } else if (_this5.timeValue == 'pd') {\n return item.pd;\n } else if (_this5.timeValue == 'dyp') {\n return item.dyp;\n }\n });\n _this5.dangerjz = _this5.echartLiat.map(function (item) {\n if (_this5.timeValue == 'p1') {\n return item.jj1;\n } else if (_this5.timeValue == 'p3') {\n return item.jj3;\n } else if (_this5.timeValue == 'p6') {\n return item.jj6;\n } else if (_this5.timeValue == 'p12') {\n return item.jj12;\n } else if (_this5.timeValue == 'pd') {\n return item.jj24;\n }\n });\n _this5.dangerdz = _this5.echartLiat.map(function (item) {\n if (_this5.timeValue == 'p1') {\n return item.wx1;\n } else if (_this5.timeValue == 'p3') {\n return item.wx3;\n } else if (_this5.timeValue == 'p6') {\n return item.wx6;\n } else if (_this5.timeValue == 'p12') {\n return item.wx12;\n } else if (_this5.timeValue == 'pd') {\n return item.wx24;\n }\n });\n\n _this5.$nextTick(function () {\n console.log(_this5.dangerzs, 777);\n\n _this5.getCharts();\n });\n }\n });\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)']\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.dates\n },\n yAxis: {\n type: 'value',\n scale: true\n },\n series: [{\n name: '危险',\n type: 'line',\n itemStyle: {\n normal: {\n color: 'red',\n lineStyle: {\n color: 'red'\n }\n }\n },\n data: this.dangerdz // [120, 132, 101, 134, 90, 230, 210],\n\n }, {\n name: '警戒',\n type: 'line',\n itemStyle: {\n normal: {\n color: '#FAC858',\n lineStyle: {\n color: '#FAC858'\n }\n }\n },\n data: this.dangerjz //[220, 182, 191, 234, 290, 330, 310],\n\n }, {\n name: '降雨量(m)',\n type: 'line',\n itemStyle: {\n normal: {\n color: '#5470C6',\n lineStyle: {\n color: '#5470C6'\n }\n }\n },\n data: this.dangerzs // [150, 232, 201, 154, 190, 330, 410],\n\n }]\n };\n option && myChart.setOption(option);\n }\n }\n};",null]}