{"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\\frontScreens\\components\\gisTabComponents\\RealTimeRain.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\components\\gisTabComponents\\RealTimeRain.vue","mtime":1684458238606},{"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.split\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/web.dom.iterable\";\nimport \"regenerator-runtime/runtime\";\nimport _asyncToGenerator from \"D:/jenkins/workspace/bbsl-fvue/node_modules/@babel/runtime/helpers/esm/asyncToGenerator\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 RealTimeRainModel from \"./module/RealTimeRainModel.vue\";\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport { gisCompMixin } from '@/mixins/gisCompMixin.js';\nimport gisMap from '@/api/frontScreen/gisMap.js'; // RealTimeRain\n\nexport default {\n name: 'RealTimeRain',\n components: {\n RealTimeRainModel: RealTimeRainModel\n },\n mixins: [gisCompMixin],\n data: function data() {\n return {\n title: '实时',\n params: {\n appTypeList: [],\n endTime: '',\n id: '',\n mpcd: '',\n periodTime: 'p1',\n rscd: '',\n startTime: '',\n stcd: '',\n stlc: '',\n stnm: '',\n sttp: '',\n sttpList: [],\n tm: '',\n usfl: '',\n warnGrade: ''\n },\n yjdj: [],\n tabComp: true,\n // 指定坐标字段\n lg: 'lgtd',\n lt: 'lttd',\n modelName: 'RealTimeRainModel',\n activeName: 'realTime',\n form: {\n appType: [],\n stnm: '',\n time: 'p1',\n timeRange: []\n },\n typeIcon: true,\n iconTypeKey: 'warnGrade',\n pickerOptions: {\n shortcuts: [{\n text: '最近一周',\n onClick: function onClick(picker) {\n var end = new Date();\n var start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近一个月',\n onClick: function onClick(picker) {\n var end = new Date();\n var start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);\n picker.$emit('pick', [start, end]);\n }\n }, {\n text: '最近三个月',\n onClick: function onClick(picker) {\n var end = new Date();\n var start = new Date();\n start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);\n picker.$emit('pick', [start, end]);\n }\n }]\n },\n iconUrl3: require(\"./../../../../assets/img/gis_rain1.png\"),\n iconUrl2: require(\"./../../../../assets/img/gis_rain3.png\"),\n iconUrl1: require(\"./../../../../assets/img/gis_rain2.png\"),\n iconUrl0: require(\"./../../../../assets/img/gis_rain.png\"),\n timeOptions: [{\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 filterData: [],\n originData: [{\n stnm: '测站1',\n appType: '山洪',\n lgtd: '106.484406',\n lttd: '29.831273',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站2',\n appType: '山洪',\n lgtd: '106.367665',\n lttd: '29.762964',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站3',\n appType: '山洪',\n lgtd: '106.448409',\n lttd: '29.68299',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站4',\n appType: '水文',\n lgtd: '106.448509',\n lttd: '29.68239',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站5',\n appType: '水文',\n lgtd: '106.434606',\n lttd: '29.837273',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站6',\n appType: '水文',\n lgtd: '106.388665',\n lttd: '29.767964',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站7',\n appType: '水文',\n lgtd: '106.398409',\n lttd: '29.78399',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站8',\n appType: '水库',\n lgtd: '106.598709',\n lttd: '29.89799',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }, {\n stnm: '测站9',\n appType: '水库',\n lgtd: '106.498709',\n lttd: '29.69799',\n num1: '1',\n num2: '50',\n time: '2022-02-03'\n }],\n //类型 实时 历史\n tabType: [{\n name: '实时',\n value: 'realTime'\n } // {\n // \tname: '历史',\n // \tvalue: 'history'\n // },\n ],\n czyyfl: [],\n //测站应用分类\n column: [],\n realTimeColumn: [{\n label: '测站名称',\n prop: 'stnm',\n width: 120\n }, {\n label: '雨量',\n prop: 'dyp',\n width: 40\n }, {\n label: '时间',\n prop: 'moditime',\n width: 150\n }, {\n label: '报警等级',\n prop: 'level',\n width: 80\n }],\n historyColumn: [{\n label: '测站名称',\n prop: 'stnm'\n }, {\n label: '时段雨量',\n prop: 'drp'\n }, {\n label: '时间',\n prop: 'moditime',\n width: 140\n }],\n currentPoint: {\n stnm: ''\n }\n };\n },\n created: function created() {\n this.czyyfl = dictUtils.getDictItemsFromCache('czyyfl');\n this.czzl = dictUtils.getDictItemsFromCache('czzl');\n this.yjdj = dictUtils.getDictItemsFromCache('yjdj');\n this.column = this.realTimeColumn;\n },\n mounted: function mounted() {\n var _this = this;\n\n this.$nextTick( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _context.next = 2;\n return _this.getFindResList();\n\n case 2:\n _this.initMarkers();\n\n case 3:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }))); //自动刷新获取数据(1000*60*10=>毫秒*秒*分钟,此时表示为10分钟)\n\n this.refreshData = setInterval(function () {\n _this.getFindResList();\n\n _this.updateMarkers();\n }, 1000 * 60 * 10);\n },\n //生命周期若已设置定时器,需清空定时器beforeDestroy()\n beforeDestroy: function beforeDestroy() {\n clearInterval(this.refreshData);\n this.refreshData = null;\n },\n methods: {\n tableRowClassName: function tableRowClassName(row) {\n if (row.row.warnGrade == 2) {\n return 'orange-row';\n } else if (row.row.warnGrade == 1) {\n return 'alert-row';\n } else if (row.row.warnGrade == 3) {\n return 'warning-row';\n }\n },\n timeChangeSj: function () {\n var _timeChangeSj = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(val) {\n return regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n this.params.startTime = val[0];\n this.params.endTime = val[1];\n _context2.next = 4;\n return this.getFindResList();\n\n case 4:\n this.updateMarkers();\n\n case 5:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function timeChangeSj(_x) {\n return _timeChangeSj.apply(this, arguments);\n }\n\n return timeChangeSj;\n }(),\n timeChange: function () {\n var _timeChange = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(val) {\n return regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n this.params.periodTime = val;\n _context3.next = 3;\n return this.getFindResListOne();\n\n case 3:\n // let list = JSON.parse(JSON.stringify(this.filterData))\n // list.forEach(e => {\n // \tswitch (val) {\n // \t\tcase '':\n // \t\t\te.timeName = e.drp\n // \t\t\tbreak\n // \t\tcase 'pn10':\n // \t\t\te.timeName = e.pn10\n // \t\t\tbreak\n // \t\tcase 'pn30':\n // \t\t\te.timeName = e.pn30\n // \t\t\tbreak\n // \t\tcase 'p1':\n // \t\t\te.timeName = e.p1\n // \t\t\tbreak\n // \t\tcase 'p3':\n // \t\t\te.timeName = e.p3\n // \t\t\tbreak\n // \t\tcase 'p6':\n // \t\t\te.timeName = e.p6\n // \t\t\tbreak\n // \t\tcase 'p12':\n // \t\t\te.timeName = e.p12\n // \t\t\tbreak\n // \t\tcase 'p24':\n // \t\t\te.timeName = e.p24\n // \t\t\tbreak\n // \t\tcase 'drp':\n // \t\t\te.timeName = e.drp\n // \t\t\tbreak\n // \t}\n // })\n // this.filterData = list\n this.updateMarkers();\n\n case 4:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function timeChange(_x2) {\n return _timeChange.apply(this, arguments);\n }\n\n return timeChange;\n }(),\n updateMarkers: function updateMarkers() {\n // 获得新的列表数据后清除旧的标点、重新创建地图标点\n this.searchClear = true;\n this.clearMarkers();\n this.searchClear = false;\n this.initMarkers();\n },\n changeStation: function () {\n var _changeStation = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(val) {\n return regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n this.params.appTypeList = val;\n _context4.next = 3;\n return this.getFindResList();\n\n case 3:\n this.updateMarkers();\n\n case 4:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function changeStation(_x3) {\n return _changeStation.apply(this, arguments);\n }\n\n return changeStation;\n }(),\n getFindResListOne: function getFindResListOne() {\n var _this2 = this;\n\n return new Promise(function (resolve, reject) {\n gisMap.RealTimeRain(_this2.params, function (res) {\n if (res.state) {\n _this2.filterData = res.value;\n\n _this2.filterData.forEach(function (e) {\n if (e.tm) {\n e.tmMonth = e.tm.replace('-', '/').split('/')[1].slice(0, 11).replace('-', '/');\n }\n\n if (_this2.params.periodTime == e.warnSd) {\n if (e.warnGrade == 2 || e.warnGrade == 1) {} else {\n e.warnGrade = 0;\n }\n } else {\n e.warnGrade = 0;\n }\n\n if (e.warnGrade) {\n _this2.yjdj.forEach(function (c) {\n if (e.warnGrade == c.value) {\n e.level = c.name;\n }\n });\n }\n });\n\n resolve();\n }\n\n reject();\n });\n });\n },\n getFindResList: function getFindResList() {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n if (_this3.title == '实时') {\n // console.log(111)\n gisMap.RealTimeRain(_this3.params, function (res) {\n if (res.state) {\n _this3.params.periodTime = _this3.form.time;\n res.value.forEach(function (e) {\n if (e.tm) {\n e.tmMonth = e.tm.replace('-', '/').split('/')[1].slice(0, 11).replace('-', '/');\n }\n\n if (_this3.params.periodTime == e.warnSd) {\n if (e.warnGrade == 2 || e.warnGrade == 1) {} else {\n e.warnGrade = 0;\n }\n } else {\n e.warnGrade = 0;\n }\n\n if (e.warnGrade) {\n _this3.yjdj.forEach(function (c) {\n if (e.warnGrade == c.value) {\n e.level = c.name;\n }\n });\n }\n });\n _this3.filterData = res.value;\n resolve();\n }\n\n reject();\n });\n }\n\n if (_this3.title == '历史') {\n gisMap.waterHistoryList(_this3.params, function (res) {\n if (res.state) {\n _this3.filterData = res.value;\n\n _this3.filterData.forEach(function (e) {\n if (e.warnGrade) {\n _this3.yjdj.forEach(function (c) {\n if (e.warnGrade == c.value) {\n e.level = c.name;\n }\n });\n } else {\n e.warnGrade = 0;\n }\n });\n\n resolve();\n }\n\n reject();\n });\n }\n });\n },\n changeSearch: function () {\n var _changeSearch = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(val) {\n return regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n this.params.stnm = val;\n _context5.next = 3;\n return this.getFindResList();\n\n case 3:\n this.updateMarkers(); // if (!val) {\n // this.filterData = this.filterData\n // return\n // }\n // this.filterData = this.filterData.filter(item => item.stnm == val)\n\n case 4:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this);\n }));\n\n function changeSearch(_x4) {\n return _changeSearch.apply(this, arguments);\n }\n\n return changeSearch;\n }(),\n handleTabClick: function () {\n var _handleTabClick = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(key) {\n return regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n this.calcTableHeight();\n this.map.closePopup();\n this.form.timeRange = [];\n this.title = key.label;\n this.params = {};\n _context6.next = 7;\n return this.getFindResList();\n\n case 7:\n this.updateMarkers();\n\n case 8:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6, this);\n }));\n\n function handleTabClick(_x5) {\n return _handleTabClick.apply(this, arguments);\n }\n\n return handleTabClick;\n }()\n }\n};",null]}