{"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\\DigitalReservoir.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\DigitalReservoir.vue","mtime":1687666136950},{"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.split\";\nimport \"core-js/modules/es6.regexp.replace\";\nimport \"core-js/modules/es6.function.name\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 * as echarts from 'echarts';\nimport towns from \"./js/towns\";\nimport indexApi from '@/api/frontScreen/index.js';\nimport VueSeamlessScroll from 'vue-seamless-scroll';\nimport stationsModel from \"./components/stationsModel.vue\";\nimport digitalReservoir from '@/api/frontScreen/digitalReservoir.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport req from '@/request.js';\nexport default {\n name: 'DigitalReservoir',\n components: {\n VueSeamlessScroll: VueSeamlessScroll,\n stationsModel: stationsModel\n },\n data: function data() {\n return {\n /**\n * 水库选择器\n * */\n searchSituations: [],\n rscdID: '',\n rsnms: [],\n //水库下拉\n // aictiveNum:0,\n currentPoint: 0,\n myChart: null,\n option: null,\n capacity: 286.49,\n storage: 241.28,\n reservoirTotal: 0,\n situations: {},\n //概况\n params: {\n rscd: '',\n time: '',\n waterId: '',\n year: 0\n },\n // 实时雨情传参\n realtimeRainType: {\n appType: '2',\n fromSzsk: true,\n query: ''\n },\n // 实时水情传参\n realtimeWaterType: {\n appType: '2',\n fromSzsk: true,\n query: ''\n },\n WaterTypeList: [{\n name: '山洪',\n key: '1'\n }, {\n name: '中小河流',\n key: '3'\n }, {\n name: '水库',\n key: '2'\n }, {\n name: '全部',\n key: ''\n }],\n realtimeWaterData: [],\n // 实时水情表头\n realtimeWaterHeader: [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'stnm',\n width: '20%',\n name: '测站'\n }, {\n key: 'rz',\n width: '15%',\n name: '当前水位'\n }, // {\n // key: 'warnVal',\n // width: '14%',\n // name: '当前雨量',\n // },\n {\n key: 'fsltdz1',\n width: '15%',\n name: '正常水位'\n }, {\n key: 'fsltdz2',\n width: '18%',\n name: '设计洪水位'\n }, {\n key: 'time',\n width: 'calc(20% - 14px)',\n name: '时间'\n }],\n realtimeRainData: [],\n // 实时雨情表头\n realtimeRainHeader: [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'stnm',\n width: '20%',\n name: '测站'\n }, // {\n // key: 'rz',\n // width: '14%',\n // name: '当前水位',\n // },\n {\n key: 'p1',\n width: '15%',\n name: '当前雨量'\n }, {\n key: 'yjz1',\n width: '15%',\n name: '警戒阈值'\n }, {\n key: 'yjz2',\n width: '15%',\n name: '危险阈值'\n }, {\n key: 'time',\n width: 'calc(20% - 14px)',\n name: '时间'\n }],\n reservoirItemData: [{\n name: '全部',\n num: 0,\n key: 0,\n iconKey: 'all'\n }, {\n name: '中型',\n num: 0,\n key: 4,\n iconKey: 'zhong'\n }, {\n name: '小 (1) 型',\n num: 0,\n key: 5,\n iconKey: 'xiao1'\n }, {\n name: '小 (2) 型',\n num: 0,\n key: 6,\n iconKey: 'xiao2'\n }],\n SearchReservoirItemData: [{\n name: '中型',\n num: 0,\n key: 4,\n iconKey: 'zhong'\n }, {\n name: '小 (1) 型',\n num: 0,\n key: 5,\n iconKey: 'xiao1'\n }, {\n name: '小 (2) 型',\n num: 0,\n key: 6,\n iconKey: 'xiao2'\n }],\n safeAndMaintain: [],\n stationData: [{\n sttp: '雨量站',\n count: 0,\n normalCount: 0,\n faultCount: 0,\n icon: 'bbsl-yuliang'\n }, {\n sttp: '水库水位站',\n count: 0,\n normalCount: 0,\n faultCount: 0,\n icon: 'bbsl-shuiwen'\n }, {\n sttp: '生态流量站',\n count: 0,\n normalCount: 0,\n faultCount: 0,\n icon: 'bbsl-shenliu'\n }, {\n sttp: '渗压点',\n count: 0,\n normalCount: 0,\n faultCount: 0,\n icon: 'bbsl-shenya'\n }, {\n sttp: '位移点',\n count: 0,\n normalCount: 0,\n faultCount: 0,\n icon: 'bbsl-weiyi'\n }, {\n sttp: '视频站',\n count: 0,\n normalCount: 0,\n faultCount: 0,\n icon: 'bbsl-shipin'\n }],\n // 累计雨量\n rainfallData: [],\n rainfallData1: [{\n key: '1',\n name: '测站1',\n num: 50,\n total: 174,\n frist: 50\n }, {\n key: '2',\n name: '测站2',\n num: 42,\n total: 174,\n frist: 50\n }, {\n key: '3',\n name: '测站3',\n num: 37,\n total: 174,\n frist: 50\n }, {\n key: '4',\n name: '测站4',\n num: 29,\n total: 174,\n frist: 50\n }, {\n key: '5',\n name: '测站5',\n num: 16,\n total: 174,\n frist: 50\n }],\n inspectionHeader: [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'rsnm',\n width: 'calc(100% - 14px)',\n name: '已巡检水库'\n } // {\n // key: 'incn',\n // width: '30%',\n // name: '内容',\n // },\n // {\n // key: 'isNormal',\n // width: '10%',\n // name: '状态',\n // },\n // {\n // key: 'insdt',\n // width: 'calc(30% - 14px)',\n // name: '巡检日期',\n // },\n ],\n inspectionHeader1: [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'rsnm',\n width: 'calc(100% - 14px)',\n name: '已巡检水库'\n } // {\n // key: 'incn',\n // width: '30%',\n // name: '内容',\n // },\n // {\n // key: 'isNormal',\n // width: '10%',\n // name: '状态',\n // },\n // {\n // key: 'insdt',\n // width: 'calc(30% - 14px)',\n // name: '巡检日期',\n // },\n ],\n inspectionHeader2: [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'rsnm',\n width: 'calc(100% - 14px)',\n name: '未巡检水库'\n }],\n inspectionData: [],\n inspectionData1: [],\n inspectionData2: [],\n floodLimit: null,\n safeMaintain: [],\n // 超汛限 滚动表\n floodLimitHeader: [{\n key: 'order',\n width: '20%',\n name: '危险等级'\n }, {\n key: 'rsnm',\n width: '20%',\n name: '水库'\n }, {\n key: 'fsltdz',\n width: '15%',\n name: '预警阈值'\n }, {\n key: 'rz',\n width: '15%',\n name: '当前水位'\n }, {\n key: 'tm',\n width: 'calc(20% - 14px)',\n name: '时间'\n }],\n floodLimitData: [// {\n // rsnm: '水库1',\n // limit: 125,\n // current: 128,\n // differ: 3,\n // time: '04-05 12:02:08',\n // },\n ],\n inspectionPieChart: null,\n inspectionPieOption: null,\n inspectionPieData: [{\n value: 0,\n name: '已巡检'\n }, {\n value: 0,\n name: '未巡检'\n }],\n problemPieData: [{\n value: 0,\n name: '已处理巡检问题'\n }, {\n value: 0,\n name: '未处理巡检问题'\n }],\n instepTitle: '已巡检',\n problemTitle: '已处理巡检问题',\n problemPieChart: null,\n problemPieOption: null,\n problemHeader: [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'rsnm',\n width: '20%',\n name: '水库'\n }, {\n key: 'incn',\n width: '20%',\n name: '已处理问题'\n }, {\n key: 'excUser',\n width: '20%',\n name: '处理人'\n }, {\n key: 'excTime',\n width: '20%',\n name: '处理时间'\n }, {\n key: 'createTime',\n width: 'calc(20% - 14px)',\n name: '巡检时间'\n }],\n problemData: [],\n hasInspectionReservoirs: [],\n //已巡检水库\n noInspectionReservoirs: [],\n //未巡检水库\n problemData1: [],\n problemData2: [],\n regionData: [],\n // 水位报警\n waterAlarm: [],\n // 雨量报警\n rainAlarm: [],\n //视频报警\n // TODO 模拟数据\n videoAlarm: {\n count: 0,\n name: '水库',\n list: []\n }\n };\n },\n computed: {\n optionSingleHeightTime1: function optionSingleHeightTime1() {\n return {\n singleHeight: 29,\n waitTime: 1000\n };\n },\n optionSingleHeightTime2: function optionSingleHeightTime2() {\n return {\n singleHeight: 29,\n waitTime: 2500\n };\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n this.initMap(); // 初始化临界水位\n // this.initFloodLimitBar()\n // 初始化巡检\n // this.initInspectionChart()\n // this.initProblemChart()\n\n this.$root.$on('resize', function () {\n _this.resize(500);\n }); // this.problemData = this.problemData1\n },\n created: function created() {\n this.getResSituation(); //水库概况\n // this.getResDetail()//水库详情\n\n this.getStationSituation(); //测站概况\n // this.grtLatestIns() //最新巡检\n\n this.getRealTimeRainList(); //实时雨情\n\n this.getRealTimeWaterList(); //实时水情\n\n this.getSuperLimitedRank(); //超汛限柱状图\n\n this.getInsResult(); //当日巡检水库\n\n this.getInsQuestion(); //当日巡检问题\n\n this.Warning();\n this.getSysDict(); //水库名称下拉\n // this.grtStatistical() //当年巡检排名\n // this.getDayYlList()//日雨量累计排行\n },\n methods: {\n //获取字典数据\n getSysDict: function getSysDict() {\n var _this2 = 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 indexApi.getRsnm({}, function (res) {\n _this2.rsnms = res.value;\n console.log(_this2.rsnms, '水库');\n });\n }, function (error) {\n reject(error);\n });\n });\n },\n showInput: function showInput() {\n this.sqInput = !this.sqInput;\n },\n // 地图搜索水库位置\n inputskData: function () {\n var _inputskData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(id) {\n var _this3 = this;\n\n var resReqVo;\n return regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n console.log(id);\n\n if (!(id != '' && id != null && id != undefined)) {\n _context.next = 6;\n break;\n }\n\n console.log('执行了');\n resReqVo = {\n rscd: id\n };\n _context.next = 6;\n return digitalReservoir.resSituation(resReqVo, function (res) {\n if (res.state) {\n _this3.searchSituations = res.value;\n _this3.reservoirTotal = res.value.resCount;\n\n _this3.searchSituations.countVoList.forEach(function (e) {\n for (var index = 0; index < _this3.SearchReservoirItemData.length; index++) {\n var i = _this3.SearchReservoirItemData[index];\n\n if (e.name == i.name) {\n i.num = e.count;\n i.list = e.list;\n\n _this3.handleMapMark(i, index + 1);\n }\n }\n });\n }\n });\n\n case 6:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee);\n }));\n\n function inputskData(_x) {\n return _inputskData.apply(this, arguments);\n }\n\n return inputskData;\n }(),\n // 切换实时水情统计类型\n changeWaterType: function changeWaterType(key) {\n if (key == '') {\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/sqMonitor/swStQuery'\n });\n window.open(routeData.href, '_blank');\n } else {\n this.getRealTimeWaterList();\n }\n },\n //打开报警弹框\n handlePopup: function handlePopup(title, type, data, logo) {\n var _this4 = this;\n\n this.$nextTick(function () {\n _this4.$refs.stationsModel.open(title, type, data, logo);\n });\n },\n //水位 雨量\n Warning: function Warning() {\n var _this5 = this;\n\n indexApi.swWarning(function (res) {\n if (res.state) {\n _this5.waterAlarm = res.value;\n\n _this5.waterAlarm.forEach(function (e) {\n if (e.name == '水库') {\n _this5.waterAlarm = e;\n }\n });\n }\n });\n indexApi.ylWarning(function (res) {\n if (res.state) {\n _this5.rainAlarm = res.value;\n\n _this5.rainAlarm.forEach(function (e) {\n if (e.name == '水库') {\n _this5.rainAlarm = e;\n }\n });\n }\n });\n },\n // 实时水情\n getRealTimeWaterList: function getRealTimeWaterList() {\n var _this6 = this;\n\n indexApi.realTimeWaterList(this.realtimeWaterType, function (res) {\n if (res.state) {\n _this6.realtimeWaterData = res.value; // 预警等级\n\n var yjdjList = dictUtils.getDictItemsFromCache('yjdj'); // 水势\n\n var ssList = dictUtils.getDictItemsFromCache('ss');\n\n _this6.realtimeWaterData.forEach(function (e) {\n if (!e.tm) {\n e.tm = '';\n } else {\n e.tm = e.tm.replace('-', '/').split('/')[1].slice(0, 11).replace('-', '/');\n }\n\n yjdjList.forEach(function (l) {\n if (e.warnGrade == l.value) {\n e.warnGrade = l.name;\n }\n });\n ssList.forEach(function (s) {\n if (e.rwptn = s.value) {\n e.rwptn = s.name;\n }\n });\n });\n }\n });\n },\n // 点击查询实时水情具体信息\n searchWaterData: function searchWaterData(val) {\n var address = val.stcd;\n window.sessionStorage.setItem('StationId', address);\n window.sessionStorage.setItem('pages', 'first');\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/sqMonitor/swStQuery'\n });\n window.open(routeData.href, '_blank');\n },\n //实时雨情\n getRealTimeRainList: function getRealTimeRainList() {\n var _this7 = this;\n\n indexApi.realTimeRainList(this.realtimeRainType, function (res) {\n if (res.state) {\n _this7.realtimeRainData = res.value;\n var yjdjList = dictUtils.getDictItemsFromCache('yjdj');\n var ssList = dictUtils.getDictItemsFromCache('ss');\n var warn = '警戒';\n var danger = '危险';\n\n _this7.realtimeRainData.forEach(function (e) {\n if (!e.tm) {\n e.tm = '';\n } else {\n e.tm = e.tm.replace('-', '/').split('/')[1].slice(0, 11).replace('-', '/');\n }\n\n yjdjList.forEach(function (l) {\n if (e.warnGrade == l.value) {\n e.warnGrade = l.name;\n }\n });\n ssList.forEach(function (s) {\n if (e.rwptn = s.value) {\n e.rwptn = s.name;\n }\n });\n e.thresholdData.forEach(function (a) {\n if (warn == a.gradeName) {\n _this7.rainWarn = a.yjz;\n }\n\n if (danger == a.gradeName) {\n _this7.rainDanger = a.yjz;\n }\n });\n });\n }\n });\n },\n // 切换实时雨情统计类型\n changeRainType: function changeRainType(key) {\n if (key == '') {\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/sqMonitor/swStQuery'\n });\n window.open(routeData.href, '_blank');\n } else {\n this.getRealTimeRainList();\n }\n },\n // 点击查询实时水情具体信息\n searchRainData: function searchRainData(val) {\n var address = val.stcd;\n window.sessionStorage.setItem('StationId', address);\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/resMonitor/ylStQuery'\n });\n window.open(routeData.href, '_blank');\n },\n //水库概况\n getResSituation: function getResSituation() {\n var _this8 = this;\n\n var resReqVo = {\n rscd: '',\n time: '',\n waterId: '',\n year: 0\n };\n digitalReservoir.resSituation(resReqVo, function (res) {\n if (res.state) {\n _this8.situations = res.value;\n console.log(res.value);\n res.value.countVoList.forEach(function (e) {\n _this8.reservoirItemData.forEach(function (i) {\n if (e.name == i.name) {\n i.num = e.count;\n i.list = e.list;\n }\n });\n });\n _this8.reservoirTotal = res.value.resCount;\n\n _this8.handleMapMark('', 0);\n }\n });\n },\n //测站概况\n getStationSituation: function getStationSituation() {\n var _this9 = this;\n\n // return\n digitalReservoir.stationSituation(this.params, function (res) {\n if (res.state) {\n res.value.forEach(function (e) {\n _this9.stationData.forEach(function (s) {\n if (s.sttp == '雨量站') {\n console.log(s);\n } else if (e.sttp == s.sttp) {\n s.count = e.count;\n s.normalCount = e.normalCount;\n s.faultCount = e.faultCount;\n }\n });\n });\n _this9.stationData[0].count = _this9.stationData[1].count;\n _this9.stationData[0].faultCount = _this9.stationData[1].faultCount;\n _this9.stationData[0].normalCount = _this9.stationData[1].normalCount;\n }\n });\n },\n // 点击查询超讯限具体信息\n searchReservoirData: function searchReservoirData(val) {\n var address = val.stcd;\n window.sessionStorage.setItem('StationId', address);\n window.sessionStorage.setItem('pages', 'first');\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/sqMonitor/swStQuery'\n });\n window.open(routeData.href, '_blank');\n },\n //超汛限柱状图\n getSuperLimitedRank: function getSuperLimitedRank() {\n var _this10 = this;\n\n digitalReservoir.superLimitedRank(function (res) {\n if (res.state) {\n _this10.floodLimitData = res.value[0].list;\n var list = dictUtils.getDictItemsFromCache('yjdj');\n\n _this10.floodLimitData.forEach(function (e) {\n if (!e.sendDate) {\n e.sendDate = '';\n } else {\n e.sendDate = e.sendDate.replace('-', '/').split('/')[1].slice(0, 11).replace('-', '/');\n }\n\n list.forEach(function (l) {\n if (e.warnGrade == l.value) {\n e.warnGradeName = l.name;\n }\n });\n });\n }\n });\n },\n //当年巡检排名\n grtStatistical: function grtStatistical() {\n var _this11 = this;\n\n digitalReservoir.statistical(this.params, function (res) {\n if (res.state) {\n _this11.rainfallData = res.value;\n }\n });\n },\n //最新巡检\n grtLatestIns: function grtLatestIns() {\n var _this12 = this;\n\n digitalReservoir.latestIns(this.params, function (res) {\n if (res.state) {\n _this12.inspectionData1 = _this12.inspectionData = res.value;\n }\n });\n },\n //日雨量累计排行\n getDayYlList: function getDayYlList() {\n var _this13 = this;\n\n digitalReservoir.dayYlList('', function (res) {\n if (res.state) {\n _this13.rainfallData1 = res.value;\n }\n });\n },\n //当日巡检水库\n getInsResult: function getInsResult() {\n var _this14 = this;\n\n var param = {\n insStatus: 0,\n rscd: '',\n time: '',\n waterId: '',\n year: 0\n };\n digitalReservoir.insResult(param, function (res) {\n if (res.state) {\n res.value.forEach(function (e) {\n if (e.insStatus == 1) {\n ;\n _this14.hasInspectionReservoirs = e.list ? e.list : [], _this14.inspectionPieData[0].value = e.list ? e.list.length : 0;\n } else {\n ;\n _this14.noInspectionReservoirs = e.list ? e.list : [], _this14.inspectionPieData[1].value = e.list ? e.list.length : 0;\n }\n });\n _this14.inspectionData = _this14.hasInspectionReservoirs;\n\n _this14.$nextTick(function () {\n _this14.initInspectionChart();\n });\n }\n });\n },\n //当日巡检问题\n getInsQuestion: function getInsQuestion() {\n var _this15 = this;\n\n var param = {\n insStatus: 0,\n rscd: '',\n time: '',\n waterId: '',\n year: 0\n };\n digitalReservoir.insQuestion(param, function (res) {\n if (res.state) {\n res.value.forEach(function (e) {\n if (e.insStatus == 1) {\n _this15.problemData1 = e.list ? e.list : [];\n _this15.problemPieData[0].value = e.list ? e.list.length : 0;\n } else {\n _this15.problemData2 = e.list ? e.list : [];\n _this15.problemPieData[1].value = e.list ? e.list.length : 0;\n }\n });\n _this15.problemData = _this15.problemData1;\n\n _this15.$nextTick(function () {\n _this15.initProblemChart();\n });\n }\n });\n },\n handleStation: function handleStation(title, type, data) {\n var czlbList = dictUtils.getDictItemsFromCache('tj-czlb');\n czlbList.forEach(function (e) {\n if (e.name == title) {\n data.sttp = e.value;\n }\n });\n this.$refs.stationsModel.open(title, type, data);\n },\n resize: function resize(delay) {\n var _this16 = this;\n\n // 动态计算表格的高度,自适应当前容器\n setTimeout(function () {\n _this16.floodLimit.resize();\n\n _this16.myChart.resize();\n\n _this16.inspectionPieChart.resize();\n\n _this16.problemPieChart.resize();\n }, delay || 0);\n },\n initFloodLimitBar: function initFloodLimitBar() {\n var floodLimitDom = document.getElementById('flood-limit');\n this.floodLimit = echarts.init(floodLimitDom);\n var option = {\n legend: {\n left: 5,\n bottom: 5,\n textStyle: {\n color: '#adb9ba',\n fontSize: 10\n },\n itemWidth: 10,\n itemHeight: 10\n },\n tooltip: {\n trigger: 'axis',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n }\n },\n grid: {\n top: 30,\n right: '2%',\n bottom: 50\n },\n dataset: {\n source: [['product', '汛限水位'], ['xxx水库1', 307, 85.8], ['xxX水库2', 256, 73.4], ['xxx水库3', 335, 86.4], ['xxx水库4', 389, 53.9], ['xxx水库5', 298, 66.9]]\n },\n xAxis: {\n type: 'category',\n axisLabel: {\n show: true,\n textStyle: {\n color: '#fff'\n }\n }\n },\n yAxis: {\n axisLine: {\n show: true\n },\n splitLine: {\n show: false\n },\n scale: true\n },\n series: [{\n type: 'bar',\n showBackground: true,\n itemStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: '#6767ff'\n }, {\n offset: 0.5,\n color: '#6767ff'\n }, {\n offset: 1,\n color: '#bcbcf8'\n }]),\n barBorderRadius: [40, 40, 0, 0]\n },\n barWidth: 14\n }]\n };\n option && this.floodLimit.setOption(option);\n },\n initMap: function initMap() {\n var _this17 = this;\n\n this.myChart = echarts.init(document.getElementById('map-container')); // 注册 echarts 地图\n\n echarts.registerMap('beibei', towns);\n var markPointData = [];\n this.option = {\n visualMap: {\n show: false,\n min: 0,\n max: 300,\n inRange: {\n color: ['#e0ffff', '#006edd']\n },\n calculable: true\n },\n geo: {\n type: 'map',\n map: 'beibei',\n roam: true,\n label: {\n //地图显示的地点名\n show: true,\n color: '#fff',\n fontSize: 10\n },\n itemStyle: {\n areaColor: '#188df0',\n //地图区域的颜色(没有数据时会按照这个颜色显示)\n borderColor: '#d2d2d3',\n //地图区域的边框\n borderWidth: 1 // shadowOffsetX: 0,\n // shadowOffsetY: 10,\n // shadowColor: '#043b68',\n\n },\n emphasis: {\n disabled: true,\n //高亮的显示设置\n label: {\n color: '#fff'\n },\n itemStyle: {\n areaColor: '#f69502',\n opacity: 1\n }\n },\n // emphasis: {\n // disabled: true,\n // },\n tooltip: {\n show: false\n },\n select: {\n disabled: true\n },\n layoutCenter: ['50%', '50%'],\n layoutSize: '105%',\n regions: [{\n name: '柳荫镇',\n itemStyle: {\n areaColor: '#087bda'\n }\n }, {\n name: '水土街道',\n itemStyle: {\n areaColor: '#087bda'\n }\n }, {\n name: '天生街道',\n itemStyle: {\n areaColor: '#087bda'\n }\n }, {\n name: '歇马街道',\n itemStyle: {\n areaColor: '#087bda'\n }\n }, {\n name: '东阳街道',\n itemStyle: {\n areaColor: '#087bda'\n }\n }, {\n name: '童家溪镇',\n itemStyle: {\n areaColor: '#087bda'\n }\n }, {\n name: '北温泉街道',\n itemStyle: {\n areaColor: '#4caaf7'\n }\n }, {\n name: '静观镇',\n itemStyle: {\n areaColor: '#4caaf7'\n }\n }, {\n name: '蔡家岗街道',\n itemStyle: {\n areaColor: '#4caaf7'\n }\n }]\n },\n tooltip: {\n trigger: 'item'\n },\n series: [{\n type: 'scatter',\n symbol: function symbol(value, params) {\n var iconKey = value[2];\n return 'image://' + require(\"@/assets/img/dw_\".concat(iconKey, \".png\"));\n },\n coordinateSystem: 'geo',\n symbolSize: [30, 30],\n data: markPointData,\n zlevel: 1,\n itemStyle: {\n opacity: 1\n },\n tooltip: {\n show: true,\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n formatter: function formatter(params, ticket, callback) {\n var text = params.data[3]; // $.get(\n // 'detail?name=' + params.name,\n // function (content) {\n // callback(ticket, toHTML(content))\n // }\n // )\n\n return text;\n }\n }\n }]\n };\n this.myChart.setOption(this.option);\n this.myChart.on('click', function (params) {\n // return\n var key = params.value[3];\n var rscd = params.value[4]; // if (params.componentType == 'title') {\n // this.changePieDetail('all')\n // } else if (params.componentType == 'series') {\n // this.changePieDetail(params.data.key)\n // }\n\n _this17.$router.push({\n path: '/frontPlat/digitalReservoir/' + key,\n query: {\n rscd: rscd,\n rsnm: key\n }\n });\n });\n },\n handleMapMark: function handleMapMark(item, index) {\n console.log(item, index);\n var iconKey;\n var markPointData = [];\n\n if (index == 0) {\n this.currentPoint = 0;\n iconKey = 'all';\n this.reservoirItemData.forEach(function (r) {\n if (r.list) {\n iconKey = r.iconKey;\n r.list.forEach(function (e) {\n markPointData.push([e.eslg, e.nrlt, iconKey, e.rsnm, e.rscd]);\n });\n }\n });\n } else {\n this.currentPoint = index;\n iconKey = item.iconKey;\n\n if (item.list) {\n item.list.forEach(function (e) {\n markPointData.push([e.eslg, e.nrlt, iconKey, e.rsnm, e.rscd]);\n });\n }\n } // markPointData = [\n // \t[106.386126, 29.791592, iconKey, '水库1'],\n // \t[106.51321, 29.820836, iconKey, '水库2'],\n // \t[106.486126, 29.801592, iconKey, '水库3'],\n // \t[106.561321, 29.870836, iconKey, '水库4'],\n // ]\n\n\n this.option.series[0].data = markPointData;\n this.myChart.setOption(this.option);\n },\n initInspectionChart: function initInspectionChart() {\n var _this18 = this;\n\n var inspectionDom = document.getElementById('inspectionChart');\n this.inspectionPieChart = echarts.init(inspectionDom);\n this.inspectionPieOption = {\n tooltip: {\n trigger: 'item',\n formatter: '{a}
{b} : {c}个 ({d}%)',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n }\n },\n legend: {\n bottom: 10,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10\n },\n series: [{\n name: '巡检水库',\n type: 'pie',\n // radius: '50%',\n radius: ['46%', '66%'],\n center: ['50%', '50%'],\n label: {\n color: '#f5f5f5'\n },\n labelLine: {\n lineStyle: {\n color: 'rgba(255, 255, 255, 0.3)'\n },\n smooth: 0.2,\n length: 2,\n length2: 6\n },\n itemStyle: {\n normal: {\n color: function color(params) {\n //自定义颜色\n var colorList = ['#4caaf7', '#ee6666'];\n return colorList[params.dataIndex];\n }\n }\n },\n data: this.inspectionPieData\n } // {\n // name: '巡检问题',\n // type: 'pie',\n // radius: '50%',\n // center: ['75%', '50%'],\n // roseType: 'radius',\n // label: {\n // color: '#f5f5f5',\n // },\n // labelLine: {\n // lineStyle: {\n // color: 'rgba(255, 255, 255, 0.3)',\n // },\n // smooth: 0.2,\n // length: 2,\n // length2: 6,\n // },\n // itemStyle: {\n // normal: {\n // color: function (params) {\n // //自定义颜色\n // var colorList = ['#91cc75', '#ee6666']\n // return colorList[params.dataIndex]\n // },\n // },\n // },\n // data: this.problemPieData,\n // },\n ]\n };\n this.inspectionPieChart.setOption(this.inspectionPieOption);\n this.inspectionPieChart.on('click', function (params) {\n if (params.seriesName == '巡检水库') {\n if (_this18.instepTitle == params.name) {\n return;\n } else {\n _this18.instepTitle = params.name;\n\n if (params.name == '已巡检') {\n _this18.inspectionHeader = _this18.inspectionHeader1;\n _this18.inspectionData = _this18.hasInspectionReservoirs;\n } else {\n _this18.inspectionHeader = _this18.inspectionHeader2;\n _this18.inspectionData = _this18.noInspectionReservoirs;\n }\n }\n } else if (params.seriesName == '巡检问题') {\n if (_this18.problemTitle == params.name) {\n return;\n } else {\n _this18.problemTitle = params.name;\n\n if (params.name == '已处理巡检问题') {\n _this18.problemData = _this18.problemData1;\n } else {\n _this18.problemData = _this18.problemData2;\n }\n }\n }\n });\n },\n initProblemChart: function initProblemChart() {\n var _this19 = this;\n\n var problemDom = document.getElementById('problemChart');\n this.problemPieChart = echarts.init(problemDom);\n this.problemPieOption = {\n tooltip: {\n trigger: 'item',\n formatter: '{a}
{b} : {c}个 ({d}%)',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n }\n },\n legend: {\n bottom: 0,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10\n },\n series: [{\n name: '巡检问题',\n type: 'pie',\n radius: ['46%', '66%'],\n center: ['50%', '45%'],\n label: {\n color: '#f5f5f5'\n },\n labelLine: {\n lineStyle: {\n color: 'rgba(255, 255, 255, 0.3)'\n },\n smooth: 0.2,\n length: 2,\n length2: 6\n },\n itemStyle: {\n normal: {\n color: function color(params) {\n //自定义颜色\n var colorList = ['#91cc75', '#ee6666'];\n return colorList[params.dataIndex];\n }\n }\n },\n data: this.problemPieData\n }]\n };\n this.problemPieChart.setOption(this.problemPieOption);\n this.problemPieChart.on('click', function (params) {\n if (params.seriesName == '巡检问题') {\n if (_this19.problemTitle == params.name) {\n return;\n } else {\n if (_this19.problemTitle == params.name) {\n return;\n } else {\n _this19.problemTitle = params.name;\n\n if (params.name == '已处理巡检问题') {\n _this19.problemData = _this19.problemData1;\n _this19.problemHeader = [];\n var col = [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'rsnm',\n width: '20%',\n name: '水库'\n }, {\n key: 'incn',\n width: '20%',\n name: '已处理问题'\n }, {\n key: 'excUser',\n width: '20%',\n name: '处理人'\n }, {\n key: 'excTime',\n width: '20%',\n name: '处理时间'\n }, {\n key: 'createTime',\n width: 'calc(20% - 14px)',\n name: '巡检时间'\n }];\n _this19.problemHeader = col;\n } else {\n var _col = [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'rsnm',\n width: '25%',\n name: '水库'\n }, {\n key: 'structure',\n width: '23%',\n name: '位置'\n }, {\n key: 'incc',\n width: '20%',\n name: '巡检结论'\n }, {\n key: 'insdt',\n width: 'calc(30% - 14px)',\n name: '巡检时间'\n }];\n _this19.problemData = _this19.problemData2;\n _this19.problemHeader = _col;\n }\n }\n }\n }\n });\n }\n }\n};",null]}