{"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\\Index.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bbsl-fvue\\src\\views\\frontScreens\\Index.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.to-string\";\nimport \"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\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 VueSeamlessScroll from 'vue-seamless-scroll';\nimport indexApi from '@/api/frontScreen/index.js';\nimport stationsModel from \"./components/stationsModel.vue\";\nimport stationsDetails from \"./components/stationsDetails.vue\";\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nexport default {\n components: {\n VueSeamlessScroll: VueSeamlessScroll,\n stationsModel: stationsModel,\n stationsDetails: stationsDetails\n },\n data: function data() {\n return {\n showDetail: false,\n sstpListType: {\n appType: '',\n sstp: '1',\n query: ''\n },\n weatherThreeDays: [{\n date: '2022-03-18',\n daypower: '≤3',\n daytemp: '31',\n dayweather: '晴',\n daywind: '南',\n nightpower: '≤3',\n nighttemp: '19',\n nightweather: '晴',\n nightwind: '南',\n week: '5'\n }, {\n date: '2022-03-19',\n daypower: '≤3',\n daytemp: '32',\n dayweather: '晴',\n daywind: '东',\n nightpower: '≤3',\n nighttemp: '17',\n nightweather: '小雨',\n nightwind: '东',\n week: '6'\n }, {\n date: '2022-03-20',\n daypower: '≤3',\n daytemp: '25',\n dayweather: '小雨',\n daywind: '北',\n nightpower: '≤3',\n nighttemp: '12',\n nightweather: '小雨',\n nightwind: '北',\n week: '7'\n }],\n weatherToday: {\n date: '2022-03-18',\n daypower: '≤3',\n daytemp: '31',\n dayweather: '晴',\n daywind: '南',\n nightpower: '≤3',\n nighttemp: '19',\n nightweather: '晴',\n nightwind: '南',\n week: '5'\n },\n // 政区基础概况\n regionData: [],\n // 水位报警\n waterAlarm: [],\n // 雨量报警\n rainAlarm: [],\n //视频报警\n videoAlarm: [{\n count: 0,\n name: '视频',\n list: []\n }],\n sqInput: false,\n yqInput: false,\n stInput: false,\n value1: '',\n //实时水情搜索\n value2: '',\n //实时雨情搜索\n value3: '',\n //生态流量搜索\n //测站正常率\n stationList: [],\n //工程概况\n projectList: [],\n countList: [],\n projectTotal: null,\n //临界河道水位排行\n criticalRiverList: [],\n //临界水库水位排行\n criticalRsvrList: [],\n //当年取水量统计\n yearWaterPalns: [],\n //生态流量\n flowList: [],\n sstpList: [],\n //日累计降雨排行\n rainfallData: [],\n // 测站故障率\n showType: true,\n totalFailure: null,\n totalFailureOption: null,\n typeFailure1: null,\n typeFailure1Option: null,\n typeFailure2: null,\n typeFailure2Option: null,\n typeFailure3: null,\n typeFailure3Option: null,\n stationFailure: null,\n stationFailureOption: null,\n // 测站数量统计\n currentQpType: 1,\n headerBtn: [// {\n // name: '总计',\n // key: 'total',\n // },\n {\n name: '水库',\n key: 1\n }, {\n name: '山洪',\n key: 2\n }, {\n name: '中小河流',\n key: 3\n }],\n headerData1: [{\n name: '雨量站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-yuliang'\n }, {\n name: '水库水位站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shuiwen'\n }, {\n name: '渗流站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shenliu'\n }, {\n name: '渗压站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shenya'\n }, {\n name: '位移站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-weiyi'\n }, {\n name: '视频站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shipin'\n }],\n headerData2: [{\n name: '雨量站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-yuliang'\n }, {\n name: '河道水文站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shuiwen'\n }, {\n name: '河道水位站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shuiwei'\n }, {\n name: '水库水位站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shuiwen'\n }, {\n name: '广播站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-guangbo'\n }],\n headerData3: [{\n name: '雨量站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-yuliang'\n }, {\n name: '河道水文站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shuiwen'\n }, {\n name: '河道水位站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shuiwei'\n }, {\n name: '视频站',\n total: 30,\n normal: 28,\n error: 2,\n icon: 'bbsl-shipin'\n }],\n headerData: [],\n // 工程概况分类title\n projectItemTitle: '所有',\n // 工程概况\n projectItemData: [{\n name: '水库',\n num: 43,\n total: 125\n }, {\n name: '堤防',\n num: 42,\n total: 125\n }, // {\n // name: '分洪',\n // num: 37,\n // total: 125\n // },\n {\n name: '水电站',\n num: 3,\n total: 125\n }],\n projectItemDataAll: [{\n name: '水库',\n num: 43,\n total: 125\n }, {\n name: '堤防',\n num: 42,\n total: 125\n }, // {\n // name: '分洪',\n // num: 37,\n // total: 125\n // },\n {\n name: '水电站',\n num: 3,\n total: 125\n }],\n // projectItemData1: [\n // {\n // name: '水库',\n // num: 1,\n // total: 20\n // },\n // {\n // name: '堤防',\n // num: 7,\n // total: 20\n // },\n // {\n // name: '分洪',\n // num: 12,\n // total: 20\n // },\n // {\n // name: '水电站',\n // num: 0,\n // total: 20\n // }\n // ],\n // projectItemData2: [\n // {\n // name: '水库',\n // num: 1,\n // total: 5\n // },\n // {\n // name: '堤防',\n // num: 3,\n // total: 5\n // },\n // {\n // name: '分洪',\n // num: 1,\n // total: 5\n // },\n // {\n // name: '水电站',\n // num: 0,\n // total: 5\n // }\n // ],\n // projectItemData3: [\n // {\n // name: '水库',\n // num: 20,\n // total: 110\n // },\n // {\n // name: '堤防',\n // num: 43,\n // total: 110\n // },\n // {\n // name: '分洪',\n // num: 35,\n // total: 110\n // },\n // {\n // name: '水电站',\n // num: 12,\n // total: 110\n // }\n // ],\n pie: null,\n pieOption: {},\n // 累计雨量\n rainfallType: '1',\n rainfallTypeList: [{\n name: '山洪',\n key: '1'\n }, {\n name: '中小河流',\n key: '3'\n }, {\n name: '水库',\n key: '2'\n }, {\n name: '全部',\n key: ''\n }],\n displacementType: 'x',\n displacementTypeList: [{\n name: '东',\n key: 'x'\n }, {\n name: '北',\n key: 'y'\n }, {\n name: '垂直',\n key: 'Z'\n }],\n // 大坝位移排行\n displacementData: [{\n key: '1',\n name: 'XX水库',\n place: 'xx点位',\n num: 50,\n total: 174,\n frist: 50\n }, {\n key: '2',\n name: 'XX水库',\n place: 'xx点位',\n num: 42,\n total: 174,\n frist: 50\n }, {\n key: '3',\n name: 'XX水库',\n place: 'xx点位',\n num: 37,\n total: 174,\n frist: 50\n }, {\n key: '4',\n name: 'XX水库',\n place: 'xx点位',\n num: 29,\n total: 174,\n frist: 50\n }, {\n key: '5',\n name: 'XX水库',\n place: 'xx点位',\n num: 16,\n total: 174,\n frist: 50\n }],\n // 临界水位\n criticalWaterLevel: null,\n criticalType: 0,\n criticalTypeList: [{\n name: '水库',\n key: 'reservoir'\n }, {\n name: '河道',\n key: 'river'\n }],\n // 水库渗流\n reservoirSeepage: null,\n ecologicalFlowHeader: [{\n key: 'id',\n width: '14px',\n name: ''\n }, {\n key: 'stnm',\n width: '20%',\n name: '测站'\n }, {\n key: 'z',\n width: '10%',\n name: '水位'\n }, {\n key: 'q',\n width: '10%',\n name: '流量'\n }, {\n key: 'fsltdz',\n width: '10%',\n name: '核定值'\n }, {\n key: 'tm',\n width: 'calc(21% - 14px)',\n name: '时间'\n }],\n ecologicalFlowData: [],\n // 实时雨情传参\n realtimeRainType: {\n appType: '1',\n fromSzsk: false,\n query: ''\n },\n // 实时水情传参\n realtimeWaterType: {\n appType: '1',\n fromSzsk: false,\n query: ''\n },\n rainTypeList: [{\n name: '山洪',\n key: '1'\n }, {\n name: '中小河流',\n key: '3'\n }, {\n name: '水库',\n key: '2'\n }, {\n name: '全部',\n key: ''\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 // 实时雨情表头\n realtimeRainHeader: [{\n key: 'order',\n width: '14px',\n name: ''\n }, {\n key: 'stnm',\n width: '25%',\n name: '测站'\n }, // {\n // key: 'rz',\n // width: '14%',\n // name: '当前水位',\n // },\n {\n key: 'p1',\n width: '16%',\n name: '当前雨量'\n }, {\n key: 'yjz1',\n width: '16%',\n name: '警戒阈值'\n }, {\n key: 'yjz2',\n width: '16%',\n name: '危险阈值'\n }, {\n key: 'time',\n width: 'calc(20% - 14px)',\n name: '时间'\n }],\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: '12%',\n name: '当前水位'\n }, // {\n // key: 'warnVal',\n // width: '14%',\n // name: '当前雨量',\n // },\n {\n key: 'fsltdz1',\n width: '16%',\n name: '警戒阈值'\n }, {\n key: 'fsltdz2',\n width: '16%',\n name: '保证阈值'\n }, {\n key: 'time',\n width: 'calc(20% - 14px)',\n name: '时间'\n }],\n realtimeRainData: [],\n // 雨情预警阈值\n // 警戒\n rainWarn: '',\n // 危险\n rainDanger: '',\n // 水情预警阈值\n // 警戒\n waterGuarantee: '',\n // 保证\n waterDanger: '',\n realtimeWaterData: [],\n fetchWater: null,\n fetchWaterOption: null,\n errCount: 0\n };\n },\n filters: {\n dateText: function dateText(index) {\n if (index === 0) {\n return '今天';\n } else if (index === 1) {\n return '明天';\n } else {\n return '后天';\n }\n },\n weekText: function weekText(value) {\n var text = '星期';\n\n if (value == 1) {\n return text + '一';\n } else if (value == 2) {\n return text + '二';\n } else if (value == 3) {\n return text + '三';\n } else if (value == 4) {\n return text + '四';\n } else if (value == 5) {\n return text + '五';\n } else if (value == 6) {\n return text + '六';\n } else if (value == 7) {\n return text + '七';\n }\n }\n },\n computed: {\n optionSingleHeightTime: function optionSingleHeightTime() {\n return {\n limitMoveNum: 6,\n singleHeight: 29,\n waitTime: 2500\n };\n }\n },\n created: function created() {\n //this.getWeather()\n this.getAdministration(); //获取行政基础概况\n\n this.getSwWarning(); //水位报警统计\n\n this.getYlWarning(); //雨量报警统计\n\n this.getStation(); //测站正常率\n\n this.getProject(''); //工程概况\n\n this.getFlowList(1); //生态流量\n\n this.getCriticalRiver(); //河道临界水位\n\n this.getYearWaterPaln(); //当年取水量统计\n\n this.getPrecipitation(); //日累计降雨排行\n\n this.getRealTimeWaterList(); //实时水情\n\n this.getRealTimeRainList(); //实时雨情\n\n this.sstpList = dictUtils.getDictItemsFromCache('czlb-stzlx');\n console.log(this.sstpList);\n this.sstpList.push({\n name: '全部',\n value: ''\n }); // this.formatIcon()\n },\n // 监听异常发生变化,语音播报\n watch: {\n errCount: function errCount() {\n this.aplayAudio();\n }\n },\n mounted: function mounted() {\n var _this = this;\n\n // 初始测站概况\n //this.initTotalFailure()\n //this.initTypeFailure1()\n //this.initTypeFailure2()\n //this.initTypeFailure3()\n //this.initFetchWater()\n // 初始化饼图\n //this.initPie()\n // 初始化临界水位\n //this.initCriticalBar()\n // 初始化水库渗流\n // this.initReservoirBar()\n this.$root.$on('resize', function () {\n _this.resize(500);\n });\n this.headerData = this[\"headerData\".concat(this.currentQpType)];\n },\n methods: {\n sqInputs: function sqInputs() {\n this.sqInput = !this.sqInput;\n },\n yqInputs: function yqInputs() {\n this.yqInput = !this.yqInput;\n },\n StInputs: function StInputs() {\n this.stInput = !this.stInput;\n },\n btnMp: function btnMp() {\n this.errCount += 1;\n },\n getWeather: function getWeather() {\n var _this2 = this;\n\n //indexApi方法接口报错\n indexApi.getWeather(function (data) {\n _this2.weatherThreeDays = data.forecasts[0].casts.slice(0, 3);\n _this2.weatherToday = data.forecasts[0].casts[0];\n\n _this2.formatIcon();\n });\n },\n //获取行政基础概况\n getAdministration: function getAdministration() {\n var _this3 = this;\n\n var icons = ['bbsl-heliu', 'bbsl-jiedao', 'bbsl-juweihui'];\n indexApi.govSector(function (res) {\n if (res.state) {\n _this3.regionData = res.value;\n\n _this3.regionData.map(function (ee, i) {\n icons.map(function (e, index) {\n if (i == index) {\n ee.icon = e;\n }\n });\n });\n }\n });\n },\n Warning: function Warning() {\n var _this4 = this;\n\n indexApi.swWarning(function (res) {\n if (res.state) {\n _this4.waterAlarm = res.value;\n }\n });\n indexApi.ylWarning(function (res) {\n if (res.state) {\n _this4.rainAlarm = res.value;\n }\n });\n },\n //水位报警统计\n getSwWarning: function getSwWarning() {\n var _this5 = this;\n\n indexApi.swWarning(function (res) {\n if (res.state) {\n _this5.waterAlarm = res.value;\n res.value.forEach(function (e) {\n if (e.count > 0) {\n _this5.$refs.audio.play();\n\n return;\n } else {\n _this5.$refs.audio.pause();\n }\n });\n }\n });\n },\n //雨量报警统计\n getYlWarning: function getYlWarning() {\n var _this6 = this;\n\n indexApi.ylWarning(function (res) {\n if (res.state) {\n _this6.rainAlarm = res.value;\n res.value.forEach(function (e) {\n if (e.count > 0) {\n _this6.$refs.audio.play();\n\n return;\n } else {\n _this6.$refs.audio.pause();\n }\n });\n }\n });\n },\n //测站正常率\n getStation: function getStation() {\n var _this7 = this;\n\n indexApi.station(function (res) {\n if (res.state) {\n _this7.stationList = res.value;\n\n _this7.$nextTick(function () {\n _this7.initTotalFailure();\n\n _this7.statementStart(); // this.initTypeFailure1()\n // this.initTypeFailure2()\n // this.initTypeFailure3()\n\n });\n }\n });\n },\n //工程概况\n getProject: function getProject(val) {\n var _this8 = this;\n\n indexApi.project(val, function (res) {\n if (res.state) {\n _this8.countList = res.value.countList;\n _this8.projectList = res.value.projectList;\n\n _this8.projectList.forEach(function (item) {\n // 删除分洪\n if (item.typeName == '分洪') {\n _this8.projectList.splice(1, 1);\n } // console.log(item.typeName == \"分洪\");\n\n }); // 方法2\n\n\n _this8.projectTotal = 0;\n\n _this8.countList.forEach(function (item) {\n _this8.projectTotal += item.count;\n });\n\n _this8.$nextTick(function () {\n _this8.initPie();\n });\n }\n });\n },\n //生态流量\n getFlowList: function getFlowList(value1, value2) {\n var _this9 = this;\n\n // 转换为表单格式\n var item = new FormData();\n\n if (!!value1 && !value2) {\n item.append('sstp', value1);\n }\n\n if (!!value1 && !!value2) {\n item.append('sstp', value1);\n item.append('query', value2);\n }\n\n indexApi.flowList(item, function (res) {\n if (res.state) {\n _this9.flowList = res.value;\n var list = dictUtils.getDictItemsFromCache('yjdj');\n\n _this9.flowList.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 list.forEach(function (l) {\n if (e.warnGrade == l.value) {\n e.warnGrade = l.name;\n }\n });\n });\n }\n });\n },\n //临界河道水位排行\n getCriticalRiver: function getCriticalRiver() {\n var _this10 = this;\n\n indexApi.criticalRiver(function (res) {\n if (res.state) {\n _this10.criticalRiverList = res.value;\n\n _this10.$nextTick(function () {// this.initCriticalBar()\n });\n }\n });\n },\n //临界水库水位排行\n getCriticalRsvr: function getCriticalRsvr() {\n var _this11 = this;\n\n indexApi.criticalRsvr(function (res) {\n if (res.state) {\n _this11.criticalRsvrList = res.value;\n\n _this11.$nextTick(function () {// this.initCriticalBar()\n });\n }\n });\n },\n //当年取水量统计\n getYearWaterPaln: function getYearWaterPaln() {\n var _this12 = this;\n\n var params = {\n rscd: '',\n time: '',\n waterId: '',\n year: 0\n };\n indexApi.yearWaterPaln(params, function (res) {\n if (res.state) {\n _this12.yearWaterPalns = res.value;\n\n _this12.$nextTick(function () {\n _this12.initFetchWater();\n });\n }\n });\n },\n //日累计降雨排行\n getPrecipitation: function getPrecipitation() {\n var _this13 = this;\n\n indexApi.precipitation(this.rainfallType, function (res) {\n if (res.state) {\n _this13.rainfallData = res.value;\n }\n });\n },\n // 实时水情搜索\n inputSqData: function inputSqData() {\n this.realtimeWaterType.query = this.value1;\n this.getRealTimeWaterList();\n },\n // 实时雨情搜索\n inputYqData: function inputYqData() {\n this.realtimeRainType.query = this.value2;\n this.getRealTimeRainList();\n },\n // 生态流量搜索\n inputStData: function inputStData() {\n this.sstpListType.query = this.value3;\n console.log(this.sstpListType.sstp);\n this.getFlowList(this.sstpListType.sstp, this.value3);\n },\n //实时雨情\n getRealTimeRainList: function getRealTimeRainList() {\n var _this14 = this;\n\n indexApi.realTimeRainLists(this.realtimeRainType, function (res) {\n if (res.state) {\n _this14.realtimeRainData = res.value;\n console.log(_this14.realtimeRainData + 'rain');\n var yjdjList = dictUtils.getDictItemsFromCache('yjdj');\n var ssList = dictUtils.getDictItemsFromCache('ss');\n var warn = '警戒';\n var danger = '危险';\n\n _this14.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 _this14.rainWarn = a.yjz;\n }\n\n if (danger == a.gradeName) {\n _this14.rainDanger = a.yjz;\n }\n });\n });\n }\n });\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\n n = r1 >= r2 ? r1 : r2;\n return ((arg1 * m - arg2 * m) / m).toFixed(n);\n },\n // 实时水情\n getRealTimeWaterList: function getRealTimeWaterList() {\n var _this15 = this;\n\n indexApi.realTimeWaterLists(this.realtimeWaterType, function (res) {\n if (res.state) {\n _this15.realtimeWaterData = res.value; // 预警等级\n\n var yjdjList = dictUtils.getDictItemsFromCache('yjdj'); // 水势\n\n var ssList = dictUtils.getDictItemsFromCache('ss');\n\n _this15.realtimeWaterData.forEach(function (e) {\n console.log(e.rz, e.nrstlv);\n\n if (e.rz > e.nrstlv) {\n e.transfinite = _this15.floatSub(e.rz, e.nrstlv);\n } else {\n e.transfinite = '--';\n }\n\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 noMusic: function noMusic() {\n this.$refs.audio.pause();\n },\n formatIcon: function formatIcon() {\n this.weatherThreeDays.forEach(function (item) {\n if (item.dayweather == '晴') {\n item.weatherIcon = 'yintian';\n } else if (item.dayweather == '多云') {\n item.weatherIcon = 'duoyun';\n } else if (item.dayweather == '阴') {\n item.weatherIcon = 'yintian';\n } else if (item.dayweather == '霾') {\n item.weatherIcon = 'wumai';\n } else if (item.dayweather == '雷阵雨') {\n item.weatherIcon = 'leizhenyu';\n } else if (item.dayweather == '雨') {\n item.weatherIcon = 'xiaoyu';\n } else if (item.dayweather == '小雨') {\n item.weatherIcon = 'xiaoyu';\n } else if (item.dayweather == '中雨') {\n item.weatherIcon = 'zhongyu';\n } else if (item.dayweather == '大雨') {\n item.weatherIcon = 'dayu';\n } else if (item.dayweather == '暴雨') {\n item.weatherIcon = 'baoyu';\n } else if (item.dayweather == '大暴雨') {\n item.weatherIcon = 'dabaoyu';\n } else if (item.dayweather == '中雨-大雨' || item.dayweather == '小雨-中雨' || item.dayweather == '大雨-暴雨' || item.dayweather == '暴雨-大暴雨') {\n item.weatherIcon = 'zhongyuzhuandayu';\n } else if (item.dayweather.indexOf('风') != -1) {\n item.weatherIcon = 'dafeng';\n } else {\n item.weatherIcon = 'dawu';\n }\n });\n },\n resize: function resize(delay) {\n var _this16 = this;\n\n // 动态计算表格的高度,自适应当前容器\n setTimeout(function () {\n _this16.pie.resize();\n\n _this16.fetchWater.resize(); // this.criticalWaterLevel.resize()\n\n\n _this16.totalFailure.resize();\n\n if (_this16.showType) {\n _this16.typeFailure1.resize();\n\n _this16.typeFailure2.resize();\n\n _this16.typeFailure3.resize();\n } else {\n _this16.stationFailure.resize();\n } // this.reservoirSeepage.resize()\n\n }, delay || 0);\n },\n // 切换测站数量统计类型\n changeEqItem: function changeEqItem(key) {\n this.currentQpType = key;\n this.headerData = this[\"headerData\".concat(key)];\n },\n // 切换降雨量统计类型\n changeRainfallType: function changeRainfallType(key) {\n if (key == '') {\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/resMonitor/dayYlQuery'\n });\n window.open(routeData.href, '_blank');\n } else {\n this.rainfallType = key;\n this.getPrecipitation();\n }\n },\n // 切换大坝位移统计类型\n changeDisplacementType: function changeDisplacementType(key) {\n this.displacementType = key;\n },\n // 切换临界水位统计类型\n changeCriticalType: function changeCriticalType(key) {\n this.criticalType = key;\n\n if (key == 0) {\n this.getCriticalRiver();\n } else if (key == 1) {\n this.getCriticalRsvr();\n }\n },\n changesstpListType: function changesstpListType(val) {\n if (val == '') {\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/sqMonitor/sdzQuery'\n });\n window.open(routeData.href, '_blank');\n } else {\n this.sstpListType.sstp = val;\n this.getFlowList(this.sstpListType.sstp);\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.realtimeRainType.appType = key;\n this.getRealTimeRainList();\n } // if (key == 'all') {\n // \tlet path = '/bizPlat/monitor/resMonitor/ylStQuery'\n // \tconst {\n // \t\thref\n // \t} = this.$router.resolve({\n // \t\tpath,\n // \t})\n // \twindow.open(href, '_blank', console.log(href))\n // } else {\n // \tthis.realtimeRainType = key\n // }\n\n },\n // 切换实时水情统计类型\n changeWaterType: function changeWaterType(key) {\n console.log(key);\n\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.realtimeWaterType.appType = key;\n this.getRealTimeWaterList();\n }\n },\n // 点击查询实时水情具体信息\n searchWaterData: function searchWaterData(val) {\n console.log(val);\n var address = val.stcd;\n var page;\n\n if (val.sttp == 'ZQ' || val.sttp == 'ZZ') {\n page = 'second';\n } else if (val.sttp == 'RR') {\n page = 'first';\n }\n\n console.log(page); // this.$store.commit(\"index/addressMap\", address);\n // this.$store.commit(\"index/cdPage\", page);\n\n window.sessionStorage.setItem('StationId', address);\n window.sessionStorage.setItem('pages', page);\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/sqMonitor/swStQuery'\n });\n window.open(routeData.href, '_blank');\n },\n // 点击查询实时雨情具体信息\n searchRainData: function searchRainData(val) {\n console.log(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 searchSstpData: function searchSstpData(val) {\n var address = val.stnm;\n window.sessionStorage.setItem('StationId', address);\n var routeData = this.$router.resolve({\n path: '/bizPlat/monitor/sqMonitor/sdzQuery'\n });\n window.open(routeData.href, '_blank');\n },\n // 初始化测站概况 stationList\n initTotalFailure: function initTotalFailure() {\n var totalFailureDom = document.getElementById('totalFailure');\n this.totalFailure = echarts.init(totalFailureDom);\n this.totalFailureOption = {\n title: {\n text: '测站概况',\n textStyle: {\n fontSize: 12,\n color: '#fff'\n },\n left: 'center',\n top: 'top'\n },\n legend: {\n bottom: 0,\n right: 0,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10,\n orient: 'vertical'\n },\n tooltip: {\n appendToBody: true,\n trigger: 'item',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n formatter: '{b}测站
数量:{c} 个 ,占比:{d}%'\n },\n series: [{\n name: '测站概况',\n type: 'pie',\n radius: ['46%', '70%'],\n showEmptyCircle: true,\n avoidLabelOverlap: true,\n itemStyle: {\n opacity: 1,\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(255,255,255,0.2)',\n borderRadius: 6\n },\n label: {\n formatter: '{b}\\n{d}%',\n color: '#fff'\n },\n top: '10%',\n bottom: 0,\n // emphasis: {\n // focus: 'series',\n // disabled: true,\n // },\n data: [{\n value: this.stationList.allNormalCount,\n name: '正常',\n key: '2',\n label: {\n show: false // normal: {\n // position: 'center',\n // },\n\n }\n }, {\n value: this.stationList.allFaultCount,\n name: '故障',\n key: '1',\n label: {\n show: false // normal: {\n // position: 'center',\n // },\n\n }\n }],\n color: ['#0091ff', '#ee6666']\n }]\n };\n this.totalFailureOption && this.totalFailure.setOption(this.totalFailureOption);\n },\n statementStart: function statementStart() {\n var _this17 = this;\n\n this.stationList.appTypeList.forEach(function (item, index) {\n _this17.drawDevice(index, item);\n });\n },\n drawDevice: function drawDevice(index, item) {\n // 基于准备好的dom,初始化echarts实例\n this.$nextTick(function () {\n var _this18 = this;\n\n var myChart = echarts.init(document.getElementById('myChart' + index));\n var tableList = [];\n\n for (var i in item) {\n if (i == 'normalCount') {\n tableList.push({\n name: '正常',\n value: item[i],\n title: item.appType,\n label: {\n show: false // normal: {\n // position: 'center',\n // },\n\n },\n itemStyle: {\n color: '#0091ff'\n }\n });\n } else if (i == 'faultCount') {\n tableList.push({\n name: '故障',\n value: item[i],\n title: item.appType,\n label: {\n show: false // normal: {\n // position: 'center',\n // },\n\n },\n itemStyle: {\n color: '#ee6666'\n }\n });\n }\n } // return\n\n\n this.typeFailure1Option = {\n title: {\n text: item.appType,\n textStyle: {\n fontSize: 12,\n color: '#fff'\n },\n left: 'center',\n top: 'top'\n },\n legend: {\n bottom: 0,\n right: 0,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10,\n orient: 'vertical'\n },\n tooltip: {\n appendToBody: true,\n trigger: 'item',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n formatter: '{b}测站
数量:{c} 个 ,占比:{d}%'\n },\n series: [{\n name: '测站概况',\n type: 'pie',\n radius: ['46%', '70%'],\n showEmptyCircle: true,\n legendHoverLink: false,\n //是否启用图例 hover 时的联动高亮 默认true\n hoverAnimation: false,\n avoidLabelOverlap: false,\n itemStyle: {\n opacity: 1,\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(255,255,255,0.2)',\n borderRadius: 6\n },\n label: {\n formatter: '{b}\\n{d}%',\n color: '#fff'\n },\n top: '10%',\n bottom: 0,\n // emphasis: {\n // disabled: true,\n // focus: 'series',\n // },\n data: tableList,\n color: ['#ee6666', '#6767ff']\n }]\n };\n this.typeFailure1Option && myChart.setOption(this.typeFailure1Option);\n myChart.on('click', function (params) {\n myChart.dispose(); //this.typeFailure2.dispose()\n //this.typeFailure3.dispose()\n\n _this18.showType = false;\n\n _this18.$nextTick(function () {\n _this18.initStationFailure(params.data.title);\n }); // if (params.componentType == 'title') {\n // this.changePieDetail('all')\n // } else if (params.componentType == 'series') {\n // this.changePieDetail(params.data.key, params.data.name)\n // }\n\n });\n });\n },\n // 水库测站概况\n initTypeFailure1: function initTypeFailure1() {\n var _this19 = this;\n\n var typeFailure1Dom = document.getElementById('typeFailure1');\n this.typeFailure1 = echarts.init(typeFailure1Dom);\n this.typeFailure1Option = {\n title: {\n text: '水库测站',\n textStyle: {\n fontSize: 12,\n color: '#fff'\n },\n left: 'center',\n top: 'top'\n },\n legend: {\n bottom: 0,\n right: 0,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10,\n orient: 'vertical'\n },\n tooltip: {\n appendToBody: true,\n trigger: 'item',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n formatter: '{b}测站
数量:{c} 个 ,占比:{d}%'\n },\n series: [{\n name: '测站概况',\n type: 'pie',\n radius: ['46%', '70%'],\n showEmptyCircle: true,\n avoidLabelOverlap: true,\n itemStyle: {\n opacity: 1,\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(255,255,255,0.2)',\n borderRadius: 6\n },\n label: {\n formatter: '{b}\\n{d}%',\n color: '#fff'\n },\n top: '10%',\n bottom: 0,\n emphasis: {\n disabled: true\n },\n data: [{\n value: 2,\n name: '故障',\n key: '1',\n label: {\n show: false,\n normal: {\n position: 'center'\n }\n }\n }, {\n value: 82,\n name: '正常',\n key: '2',\n label: {\n show: false,\n normal: {\n position: 'center'\n }\n }\n }],\n color: ['#ee6666', '#6767ff']\n }]\n };\n this.typeFailure1Option && this.typeFailure1.setOption(this.typeFailure1Option);\n this.typeFailure1.on('click', function (params) {\n console.log(params);\n\n _this19.typeFailure1.dispose();\n\n _this19.typeFailure2.dispose();\n\n _this19.typeFailure3.dispose();\n\n _this19.showType = false;\n\n _this19.$nextTick(function () {\n _this19.initStationFailure('水库');\n }); // console.log(params);\n // if (params.componentType == 'title') {\n // this.changePieDetail('all')\n // } else if (params.componentType == 'series') {\n // this.changePieDetail(params.data.key, params.data.name)\n // }\n\n });\n },\n // 山洪测站概况\n initTypeFailure2: function initTypeFailure2() {\n var _this20 = this;\n\n var typeFailure2Dom = document.getElementById('typeFailure2');\n this.typeFailure2 = echarts.init(typeFailure2Dom);\n this.typeFailure2Option = {\n title: {\n text: '山洪测站',\n textStyle: {\n fontSize: 12,\n color: '#fff'\n },\n left: 'center',\n top: 'top'\n },\n legend: {\n bottom: 0,\n right: 0,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10,\n orient: 'vertical'\n },\n tooltip: {\n appendToBody: true,\n trigger: 'item',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n formatter: '{b}测站
数量:{c} 个 ,占比:{d}%'\n },\n series: [{\n name: '测站概况',\n type: 'pie',\n radius: ['46%', '70%'],\n showEmptyCircle: true,\n avoidLabelOverlap: true,\n itemStyle: {\n opacity: 1,\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(255,255,255,0.2)',\n borderRadius: 6\n },\n label: {\n formatter: '{b}\\n{d}%',\n color: '#fff'\n },\n top: '10%',\n bottom: 0,\n emphasis: {\n disabled: true\n },\n data: [{\n value: 1,\n name: '故障',\n key: '1',\n label: {\n show: false,\n normal: {\n position: 'center'\n }\n }\n }, {\n value: 90,\n name: '正常',\n key: '2',\n label: {\n show: false,\n normal: {\n position: 'center'\n }\n }\n }],\n color: ['#ee6666', '#40b27d']\n }]\n };\n this.typeFailure2Option && this.typeFailure2.setOption(this.typeFailure2Option);\n this.typeFailure2.on('click', function (params) {\n _this20.typeFailure1.dispose();\n\n _this20.typeFailure2.dispose();\n\n _this20.typeFailure3.dispose();\n\n _this20.showType = false;\n\n _this20.$nextTick(function () {\n _this20.initStationFailure('山洪');\n });\n });\n },\n // 水文测站概况\n initTypeFailure3: function initTypeFailure3() {\n var _this21 = this;\n\n var typeFailure3Dom = document.getElementById('typeFailure3');\n this.typeFailure3 = echarts.init(typeFailure3Dom);\n this.typeFailure3Option = {\n title: {\n text: '水文测站',\n textStyle: {\n fontSize: 12,\n color: '#fff'\n },\n left: 'center',\n top: 'top'\n },\n legend: {\n bottom: 0,\n right: 0,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10,\n orient: 'vertical'\n },\n tooltip: {\n appendToBody: true,\n trigger: 'item',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n formatter: '{b}测站
数量:{c} 个 ,占比:{d}%'\n },\n series: [{\n name: '测站概况',\n type: 'pie',\n radius: ['46%', '70%'],\n showEmptyCircle: true,\n avoidLabelOverlap: true,\n itemStyle: {\n opacity: 1,\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(255,255,255,0.2)',\n borderRadius: 6\n },\n label: {\n formatter: '{b}\\n{d}%',\n color: '#fff'\n },\n top: '10%',\n bottom: 0,\n emphasis: {\n disabled: true\n },\n data: [{\n value: 1,\n name: '故障',\n key: '1',\n label: {\n show: false,\n normal: {\n position: 'center'\n }\n }\n }, {\n value: 190,\n name: '正常',\n key: '2',\n label: {\n show: false,\n normal: {\n position: 'center'\n }\n }\n }],\n color: ['#ee6666', '#4cb5ff']\n }]\n };\n this.typeFailure3Option && this.typeFailure3.setOption(this.typeFailure3Option);\n this.typeFailure3.on('click', function (params) {\n _this21.typeFailure1.dispose();\n\n _this21.typeFailure2.dispose();\n\n _this21.typeFailure3.dispose();\n\n _this21.showType = false;\n\n _this21.$nextTick(function () {\n _this21.initStationFailure('水文');\n });\n });\n },\n // 测站详情\n initStationFailure: function initStationFailure(key) {\n var _this22 = this;\n\n var stationFailureDom = document.getElementById('stationFailure');\n this.stationFailure = echarts.init(stationFailureDom);\n var tableList = [];\n this.stationList.appTypeList.forEach(function (e) {\n if (e.appType == key) {\n tableList = e.stationRespVos;\n }\n });\n var criticalName = [];\n var Alist = [];\n var Blist = [];\n tableList.forEach(function (e) {\n criticalName.push(e.sttp);\n Alist.push(e.normalCount);\n Blist.push(e.faultCount);\n });\n this.stationFailureOption = {\n title: {\n text: \"\".concat(key, \"\\u6D4B\\u7AD9\\u8BE6\\u60C5\"),\n textStyle: {\n fontSize: 12,\n color: '#fff'\n },\n left: 'center',\n top: 'top'\n },\n top: 6,\n bottom: 20,\n legend: {\n top: 5,\n right: 5,\n textStyle: {\n color: '#fff',\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: '#fff'\n },\n axisPointer: {\n type: 'cross',\n label: {\n backgroundColor: '#576580'\n }\n }\n },\n grid: {\n top: 30,\n right: '2%',\n bottom: 20\n },\n xAxis: {\n data: criticalName,\n type: 'category',\n axisLabel: {\n show: true,\n textStyle: {\n color: '#fff'\n }\n }\n },\n yAxis: {\n scale: true,\n axisLabel: {\n formatter: '{value} 个'\n },\n axisLine: {\n show: true\n },\n splitLine: {\n show: false\n },\n splitNumber: 2\n },\n series: [{\n name: '正常',\n data: Alist,\n type: 'bar',\n showBackground: true,\n itemStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: '#06c206'\n }, {\n offset: 0.5,\n color: '#06c206'\n }, {\n offset: 1,\n color: '#aef3ae'\n }]) // barBorderRadius: [20, 20, 0, 0],\n\n },\n barWidth: 14\n }, {\n name: '故障',\n data: Blist,\n type: 'bar',\n showBackground: true,\n itemStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: '#ee6666'\n }, {\n offset: 0.5,\n color: '#ee6666'\n }, {\n offset: 1,\n color: '#eeb7b7'\n }]) // barBorderRadius: [20, 20, 0, 0],\n\n },\n barWidth: 14\n }]\n };\n this.stationFailureOption && this.stationFailure.setOption(this.stationFailureOption);\n this.stationFailure.getZr().on('click', function (params) {\n var pointInPixel = [params.offsetX, params.offsetY];\n\n if (_this22.stationFailure.containPixel('grid', pointInPixel)) {\n var xIndex = _this22.stationFailure.convertFromPixel({\n seriesIndex: 0\n }, pointInPixel)[0]; // console.log(xIndex)\n\n\n console.log(tableList[xIndex]);\n console.log(params);\n var name = tableList[xIndex].sttp;\n\n _this22.$nextTick(function () {\n var title = key + ' - ' + name;\n var data = {\n type: key,\n stationType: name // seriesName: params.seriesName\n\n };\n\n _this22.$refs.stationsForm.open(title, data);\n });\n }\n });\n this.stationFailure.getZr().on('mousemove', function (param) {\n var pointInPixel = [param.offsetX, param.offsetY];\n\n if (_this22.stationFailure.containPixel('grid', pointInPixel)) {\n //若鼠标滑过区域位置在当前图表范围内 鼠标设置为小手\n _this22.stationFailure.getZr().setCursorStyle('pointer');\n } else {\n _this22.stationFailure.getZr().setCursorStyle('default');\n }\n });\n },\n handleBack: function handleBack() {\n var _this23 = this;\n\n this.showType = true;\n this.stationFailure.dispose();\n this.$refs.stationsModel.close();\n this.$nextTick(function () {\n _this23.statementStart(); // this.initTypeFailure1()\n // this.initTypeFailure2()\n // this.initTypeFailure3()\n\n });\n },\n handlePopup: function handlePopup(title, type, data, logo) {\n var _this24 = this;\n\n this.$nextTick(function () {\n _this24.$refs.stationsModel.open(title, type, data, logo);\n });\n },\n // 初始化取水\n initFetchWater: function initFetchWater() {\n var fetchWaterDom = document.getElementById('fetchWater');\n this.fetchWater = echarts.init(fetchWaterDom);\n var Alist = [];\n var Blist = [];\n\n for (var i in this.yearWaterPalns) {\n if (i.length < 8) {\n Alist.push(this.yearWaterPalns[i]);\n } else if (i.length > 8) {\n Blist.push(this.yearWaterPalns[i]);\n }\n }\n\n this.fetchWaterOption = {\n tooltip: {\n trigger: 'axis',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n },\n axisPointer: {\n type: 'cross',\n label: {\n backgroundColor: '#576580'\n }\n }\n },\n grid: {\n top: 30,\n right: '5%',\n left: '14%',\n bottom: 50\n },\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 xAxis: {\n type: 'category',\n data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],\n axisPointer: {\n type: 'shadow'\n }\n },\n yAxis: {\n type: 'value',\n axisLabel: {\n formatter: '{value}'\n },\n splitLine: {\n lineStyle: {\n color: '#7c7c7c'\n }\n },\n scale: true\n },\n series: [{\n name: '实际取水量',\n type: 'bar',\n tooltip: {\n valueFormatter: function valueFormatter(value) {\n return value + '万m³';\n }\n },\n data: Alist,\n itemStyle: {\n color: '#6767ff'\n }\n }, {\n name: '计划取水量',\n type: 'line',\n smooth: true,\n tooltip: {\n valueFormatter: function valueFormatter(value) {\n return value + '万m³';\n }\n },\n data: Blist,\n itemStyle: {\n color: '#ff9a00'\n }\n }]\n };\n this.fetchWaterOption && this.fetchWater.setOption(this.fetchWaterOption);\n },\n // 初始化饼图\n initPie: function initPie() {\n var _this25 = this;\n\n var pieDom = document.getElementById('pie-container');\n this.pie = echarts.init(pieDom);\n var dataEcharts = [];\n\n for (var i = 0; i < this.countList.length; i++) {\n dataEcharts.push({\n name: this.countList[i].statusName,\n value: this.countList[i].count,\n type: this.countList[i].status\n });\n }\n\n this.pieOption = {\n title: {\n text: '总计 ' + this.projectTotal,\n left: 'center',\n top: 'center',\n textStyle: {\n fontSize: 12,\n color: '#fff'\n },\n triggerEvent: true\n },\n legend: {\n bottom: 0,\n right: 0,\n textStyle: {\n color: '#adb9ba'\n },\n icon: 'circle',\n itemWidth: 10,\n itemHeight: 10,\n orient: 'vertical'\n },\n tooltip: {\n trigger: 'item',\n backgroundColor: 'rgba(0,0,0,0.7)',\n textStyle: {\n color: '#dddee0'\n }\n },\n series: [{\n name: '工程概况',\n type: 'pie',\n radius: ['50%', '70%'],\n avoidLabelOverlap: true,\n itemStyle: {\n opacity: 1,\n shadowBlur: 10,\n shadowOffsetX: 2,\n shadowOffsetY: 2,\n shadowColor: 'rgba(255,255,255,0.2)',\n borderRadius: 6\n },\n label: {\n alignTo: 'edge',\n formatter: '{name|{b}} {num|{c} 个}',\n minMargin: 5,\n edgeDistance: 90,\n lineHeight: 15,\n padding: [10, 0, 0, 0],\n rich: {\n name: {\n fontSize: 12,\n color: '#f5f5f5'\n },\n num: {\n fontSize: 10,\n color: '#999'\n }\n }\n },\n labelLine: {\n length: 10,\n length2: 0,\n maxSurfaceAngle: 80\n },\n data: dataEcharts,\n color: ['#0091ff', '#ff9a00', '#5e5eff']\n }]\n };\n this.pieOption && this.pie.setOption(this.pieOption);\n this.pie.on('click', function (params) {\n if (params.componentType == 'series') {\n if (params.data.type) {\n _this25.getProject(params.data.type);\n\n _this25.projectItemTitle = params.data.name;\n }\n } else if (params.componentType == 'title') {\n _this25.getProject('');\n\n _this25.projectItemTitle = '所有';\n }\n });\n this.pie.on('legendselectchanged', function (params) {\n // 获取点击图例的选中状态\n var isSelected = params.selected[params.name]; // 在控制台中打印\n //console.log(\n //\t(isSelected ? '选中了' : '取消选中了') +\n //\t'图例' +\n //\tparams.name\n //)\n });\n },\n changePieDetail: function changePieDetail(key, name) {\n if (key == 'all') {\n this.projectItemData = this.projectItemDataAll;\n this.projectItemTitle = '所有';\n } else if (key && key !== 'all') {\n this.projectItemData = this[\"projectItemData\".concat(key)];\n this.projectItemTitle = name;\n }\n },\n // 初始化临界水位\n initCriticalBar: function initCriticalBar() {\n var waterLevelDom = document.getElementById('criticalWaterLevel');\n this.criticalWaterLevel = echarts.init(waterLevelDom);\n var criticalName = [];\n var Alist = [];\n var Blist = [];\n\n if (this.criticalType == 1) {\n this.criticalRsvrList.forEach(function (e) {\n criticalName.push(e.stnm);\n Alist.push(e.rz);\n Blist.push(e.warnVal);\n });\n } else {\n this.criticalRiverList.forEach(function (e) {\n criticalName.push(e.stnm);\n Alist.push(e.z);\n Blist.push(e.warnVal);\n });\n }\n\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 xAxis: {\n data: criticalName,\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 name: '实时水位',\n data: Alist,\n type: 'bar',\n showBackground: true,\n itemStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: '#188df0'\n }, {\n offset: 0.5,\n color: '#188df0'\n }, {\n offset: 1,\n color: '#86c5f8'\n }]) // barBorderRadius: [20, 20, 0, 0],\n\n },\n barWidth: 14\n }, {\n name: '警戒水位',\n data: Blist,\n type: 'bar',\n showBackground: true,\n itemStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: '#f69502'\n }, {\n offset: 0.5,\n color: '#f69502'\n }, {\n offset: 1,\n color: '#ffd9a3'\n }])\n },\n barWidth: 14\n }]\n };\n option && this.criticalWaterLevel.setOption(option);\n },\n // 初始化水库渗流 纵向\n initReservoirBar: function initReservoirBar() {\n var reservoirSeepageDom = document.getElementById('reservoirSeepage');\n this.reservoirSeepage = echarts.init(reservoirSeepageDom);\n var option = {\n legend: {\n // right: 5,\n // top: 8,\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: 36,\n right: '2%',\n bottom: 50\n },\n dataset: {\n source: [['product', '实时渗流', '临界渗流'], ['水库1', 83.3, 85.8], ['水库2', 68.1, 73.4], ['水库3', 75.2, 86.4], ['水库4', 40.4, 53.9], ['水库5', 38.4, 66.9]]\n },\n xAxis: {\n type: 'category',\n axisLabel: {\n show: true,\n textStyle: {\n color: '#adb9ba'\n },\n formatter: function formatter(value) {\n var ret = ''; //拼接加\\n返回的类目项\n\n var maxLength = 3; //每项显示文字个数\n\n var valLength = value.length; //X轴类目项的文字个数\n\n var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数\n\n if (rowN > 1) {\n //如果类目项的文字大于3,\n for (var i = 0; i < rowN; i++) {\n var temp = ''; //每次截取的字符串\n\n var start = i * maxLength; //开始截取的位置\n\n var end = start + maxLength; //结束截取的位置\n //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧\n\n temp = value.substring(start, end) + '\\n';\n ret += temp; //凭借最终的字符串\n }\n\n return ret;\n } else {\n return value;\n }\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: [20, 20, 0, 0]\n },\n barWidth: 10\n }, {\n type: 'bar',\n showBackground: true,\n itemStyle: {\n color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{\n offset: 0,\n color: '#f69502'\n }, {\n offset: 0.5,\n color: '#f69502'\n }, {\n offset: 1,\n color: '#ffd9a3'\n }]),\n barBorderRadius: [20, 20, 0, 0]\n },\n barWidth: 10\n }]\n };\n option && this.reservoirSeepage.setOption(option);\n }\n }\n};",null]}