{"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\\riverWaterChildren.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\monitor\\sqMonitor\\components\\riverWaterChildren.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.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//\nimport riverDerivedData from \"./model/riverDerivedData.vue\";\nimport swStQuery from '@/api/monitor/resMonitor/swStQuery.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: 'resWaterChilfren',\n components: {\n riverDerivedData: riverDerivedData\n },\n mixins: [TableMixin],\n data: function data() {\n return {\n title: '',\n yjdjs: [],\n loading: false,\n basAdNames: [],\n //行政区\n wptns: [],\n //水势下拉\n rvNames: [],\n //河流树\n stcds: [],\n //测站下拉\n statuss: [{\n name: '在线',\n value: '1'\n }, {\n name: '不在线',\n value: '0'\n }],\n multipleSelection: [],\n // 复选框\n setKesLabel: {\n value: 'code',\n label: 'name',\n children: 'children'\n },\n setKesLabels: {\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 rvCode: null,\n stcd: null,\n stnm: null,\n addvcd: null,\n usfl: null,\n wptn: null //水势\n\n }\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 czyyfl: [],\n times: [],\n //选择时间\n query: {\n stcd: null,\n stnm: null,\n startTime: null,\n endTime: null\n },\n timeList: [],\n jzList: [],\n bzList: [],\n fhList: [],\n zgList: [],\n zzList: [],\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 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 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 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.jzList = [];\n this.bzList = [];\n this.fhList = [];\n this.zgList = [];\n this.zzList = [];\n this.echartLiat = [];\n swStQuery.getChartsList(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.jzList.push(e.jz);\n\n _this2.bzList.push(e.bz);\n\n _this2.fhList.push(e.fh);\n\n _this2.zgList.push(e.zg);\n\n _this2.zzList.push(e.zz);\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 } else {\n _this2.timeList = [];\n _this2.jzList = [];\n _this2.bzList = [];\n _this2.fhList = [];\n _this2.zgList = [];\n _this2.zzList = [];\n\n _this2.$nextTick(function () {\n _this2.getCharts();\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.jzList = [];\n this.bzList = [];\n this.fhList = [];\n this.zgList = [];\n this.zzList = [];\n this.echartLiat = [];\n swStQuery.getChartsList(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.jzList.push(e.jz);\n\n _this3.bzList.push(e.bz);\n\n _this3.fhList.push(e.fh);\n\n _this3.zgList.push(e.zg);\n\n _this3.zzList.push(e.zz);\n });\n }\n\n _this3.$nextTick(function () {\n console.log(_this3.dangerzs, 666);\n\n _this3.getCharts();\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.times = [];\n this.timeList = [];\n this.jzList = [];\n this.bzList = [];\n this.fhList = [];\n this.zgList = [];\n this.zzList = [];\n this.echartLiat = [];\n this.$nextTick(function () {\n _this3.getCharts();\n });\n return;\n swStQuery.getChartsList(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.jzList.push(e.jz);\n\n _this3.bzList.push(e.bz);\n\n _this3.fhList.push(e.fh);\n\n _this3.zgList.push(e.zg);\n\n _this3.zzList.push(e.zz);\n });\n }\n\n _this3.$nextTick(function () {\n console.log(_this3.dangerzs, 777);\n\n _this3.getCharts();\n });\n\n _this3.loadingChartData = false;\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: ['保证水位', '警戒水位', '当前水位']\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.bzList,\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.jzList,\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 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.ListGets(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 _this4.wptns.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 e.thresholdData.forEach(function (t) {\n if (t.gradeName == '警戒') {\n e.alertValue = t.fsltdz;\n } else if (t.gradeName == '保证') {\n e.ensureValue = t.fsltdz;\n }\n });\n\n if (e.z > e.alertValue) {\n e.transfinite = _this4.floatSub(e.z, e.alertValue);\n } else {\n e.transfinite = '--';\n }\n });\n\n _this4.$set(_this4.tableData);\n\n _this4.loading = false;\n });\n },\n handleSelectionChange: function handleSelectionChange(val) {\n this.multipleSelection = val.map(function (item) {\n return item.id;\n });\n },\n handleClose: function handleClose() {\n this.echartLiat = [];\n this.showFormDias = false;\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 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.wptns = response.data.ss; //水电站类型\n // 行政区查询\n\n swStQuery.getbasAdName({}, function (res) {\n _this5.basAdNames = res.value;\n });\n swStQuery.getrvName({}, function (res) {\n _this5.rvNames = res.value;\n });\n swStQuery.getStcd({}, function (res) {\n _this5.stcds = res.value;\n });\n\n _this5.getDateList();\n }, function (error) {\n reject(error);\n });\n });\n }\n }\n};",null]}