소스 검색

修改气象和矩阵模块数据展示

shilin 4 년 전
부모
커밋
1cd9b12196

+ 50 - 15
common/dataprocessing.js

@@ -23,37 +23,72 @@ class Dataprocessing {
 	
 	getWindPowerStationNameById(name)
 	{
-		
-		if (name == '麻黄山风电场') {
+		if (name == '宁夏新能源公司') {
+			let  wpId = '0';
+			return wpId;
+		}else if (name == '麻黄山风电场') {
 		
 			let  wpId = 'MHS_FDC';
 			return wpId;
-		}
-		if (name == '牛首山风电场') {
+		}else if (name == '牛首山风电场') {
 			let  wpId = 'NSS_FDC';
 			return wpId;
-		}
-		if (name == '石板泉风电场') {
+		}else if (name == '石板泉风电场') {
 			let  wpId = 'SBQ_FDC';
 			return wpId;
-		}
-		if (name == '青山风电场') {
+		}else if (name == '青山风电场') {
 			let  wpId = 'QS_FDC';
 			return wpId;
-		}
-		if (name == '香山风电场') {
+		}else if (name == '香山风电场') {
 			let  wpId = 'XS_FDC';
 			return wpId;
-		}
-		if (name == '崇礼风电场') {
+		}else if (name == '河北能源集团') {
+			let  wpId = '0';
+			return wpId;
+		}else if (name == '崇礼风电场') {
 			let  wpId = 'CL_FDC';
 			return wpId;
-		}
-		if (name == '康保风电场') {
+		}else if (name == '康保风电场') {
 			let  wpId = 'KB_FDC';
 			return wpId;
+		}else if (name == '代县风电场') {
+			let  wpId = 'DX_FDC';
+			return wpId;
 		}
-		if (name == '代县风电场') {
+	}
+	
+	getWindPowerStationNameByWeatherId(name)
+	{
+		
+		if (name == '宁夏新能源公司') {
+			let  wpId = 'MHS_FDC';
+			return wpId;
+		}else if (name == '麻黄山风电场') {
+		
+			let  wpId = 'MHS_FDC';
+			return wpId;
+		}else if (name == '牛首山风电场') {
+			let  wpId = 'NSS_FDC';
+			return wpId;
+		}else if (name == '石板泉风电场') {
+			let  wpId = 'SBQ_FDC';
+			return wpId;
+		}else if (name == '青山风电场') {
+			let  wpId = 'QS_FDC';
+			return wpId;
+		}else if (name == '香山风电场') {
+			let  wpId = 'XS_FDC';
+			return wpId;
+		}else if (name == '河北能源集团') {
+			let  wpId = 'CL_FDC';
+			return wpId;
+		}else if (name == '崇礼风电场') {
+			let  wpId = 'CL_FDC';
+			return wpId;
+		}else if (name == '康保风电场') {
+			let  wpId = 'KB_FDC';
+			return wpId;
+		}else if (name == '代县风电场') {
 			let  wpId = 'DX_FDC';
 			return wpId;
 		}

+ 62 - 154
components/monitor/MatrixMonitor.vue

@@ -177,18 +177,10 @@
 		data: function() {
 			return {
 				address: '',
+				userid:'',
+				permissionsInformation:[],
 				badge: 22,
-				drawerList: [{
-					name: '首页'
-				}, {
-					name: '状态监视'
-				}, {
-					name: '矩阵监视'
-				}, {
-					name: '风场监视'
-				}, {
-					name: '人员监视'
-				}],
+				drawerList: [],
 				plusDrawerList: [],
 				windStationName: '',
 				modalWindStationName: '',
@@ -1192,53 +1184,19 @@
 		// 	this.windStationListHeight=(this.windStation.length*50+40)+"px"
 		// },
 		onShow() {
-			this.windPowerStationId = uni.getStorageSync('windPowerStationId');
-			this.address = this.getWindPowerStationNameToSessionStorage();
-			if (this.address == '宁夏新能源公司') {
-				this.FDC = 'MHS_FDC';
-			}
-			if (this.address == '麻黄山风电场') {
-				this.FDC = 'MHS_FDC';
-			}
-			if (this.address == '牛首山风电场') {
-				this.FDC = 'NSS_FDC';
-			}
-			if (this.address == '石板泉风电场') {
-				this.FDC = 'SBQ_FDC';
-			}
-			if (this.address == '青山风电场') {
-				this.FDC = 'QS_FDC';
-			}
-			if (this.address == '香山风电场') {
-				this.FDC = 'XS_FDC';
-			}
-			if (this.address == '河北能源集团') {
-				this.FDC = 'CL_FDC';
-			}
-			if (this.address == '崇礼风电场') {
-				this.FDC = 'CL_FDC';
-			}
-			if (this.address == '康保风电场') {
-				this.FDC = 'KB_FDC';
-			}
-			if (this.address == '代县风电场') {
-				this.FDC = 'DX_FDC';
-			}
+			this.address = this.dataprocessing.getWindPowerStationName();
+			this.FDC = this.dataprocessing.getWindPowerStationId();
+			this.windPowerStationId = this.dataprocessing.getWindPowerStationId();
+
 		},
 		created: function() {
 			this.viewUserid();
-			this.address = this.getWindPowerStationNameToSessionStorage();
+			this.monitoringAuthority();
 
-			this.windPowerStationId = uni.getStorageSync('windPowerStationId');
-			this.FDC = uni.getStorageSync('windPowerStationId');
+			this.address = this.dataprocessing.getWindPowerStationName();
+			this.FDC = this.dataprocessing.getWindPowerStationId();
+			this.windPowerStationId = this.dataprocessing.getWindPowerStationId();
 
-			if (this.address == '宁夏新能源公司') {
-				this.FDC = 'MHS_FDC';
-			}
-			if (this.address == '河北能源集团') {
-				this.FDC = 'CL_FDC';
-			}
-			uni.setStorageSync('windPowerStationId', this.FDC);
 			this.$nextTick(function() {
 				//this.getWeatherDataToday();
 				//this.getWeatherData7();
@@ -1248,66 +1206,9 @@
 			this.cWidth40 = uni.upx2px(5000);
 			this.cHeight40 = uni.upx2px(350);
 
-			if (this.address == '宁夏新能源公司') {
-				this.windStation = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'MHS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '麻黄山风电场') {
-				this.windStation = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'MHS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '牛首山风电场') {
-				this.windStation = ['牛首山风电场', '麻黄山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'NSS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '石板泉风电场') {
-				this.windStation = ['石板泉风电场', '麻黄山风电场', '牛首山风电场', '青山风电场', '香山风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'SBQ_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '香山风电场') {
-				this.windStation = ['香山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'XS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '青山风电场') {
-				this.windStation = ['青山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '香山风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'QS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '河北能源集团') {
-				this.windStation = ['崇礼风电场', '康保风电场', '代县风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'QS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '崇礼风电场') {
-				this.windStation = ['崇礼风电场', '康保风电场', '代县风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'QS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '康保风电场') {
-				this.windStation = ['康保风电场', '崇礼风电场', '代县风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'QS_FDC';
-				// this.getWeatherDataToday();
-			}
-			if (this.address == '代县风电场') {
-				this.windStation = ['代县风电场', '康保风电场', '崇礼风电场'];
-				this.windStationName = this.windStation[0].replace('风电场', '');
-				// this.windPowerStationId = 'QS_FDC';
-				// this.getWeatherDataToday();
-			}
+			this.windStation = this.dataprocessing.getWindPowerStationNameByNames(this.address);
+			this.windStationName = this.windStation[0].replace('风电场', '');
+
 			this.windStationListHeight = this.windStation.length * 50 + 40 + 'px';
 			this.spopupWrapperHeight = this.windStation.length * 50 + 90 + 'px';
 			this.windowWidth = uni.getSystemInfoSync().windowWidth;
@@ -1356,6 +1257,37 @@
 					},
 				})
 			},
+			monitoringAuthority: function() {
+				let _this = this;
+				_this.userid = uni.getStorageSync('userid')
+				uni.request({
+					url: 'http://' + this.backStageIp + ':' + this.backStagePort +
+						'/GyeepermissionController/GyeePermissionList?userid=' + _this.userid,
+					data: {},
+					method: 'GET',
+					success: function(res) {
+						console.log(res);
+						for (let i = 0; i < res.data.data.length; i++) {
+							if (res.data.data[i].describes == "监视") {
+								var b = {};
+								_this.$set(b, "gyeePermissionList", res.data.data[i].gyeePermissionList);
+								_this.permissionsInformation.push(b);
+								console.log(_this.permissionsInformation);
+								for (let k = 0; k < _this.permissionsInformation[0].gyeePermissionList.length; k++) {
+									if (_this.permissionsInformation[0].gyeePermissionList[k].parent == 1) {
+										var c = {};
+										var d = {};
+										_this.$set(c, "name", _this.permissionsInformation[0].gyeePermissionList[k].permisssionname);
+										_this.$set(c, "remark1", _this.permissionsInformation[0].gyeePermissionList[k].remark1);
+										_this.drawerList.push(c);
+									}
+								}
+								console.log(_this.drawerList)
+							}
+						}
+					}
+				})
+			},
 			pushWindPowerStationNameToSessionStorage(windpowerstationName) {
 				uni.setStorageSync('windpowerstationName', windpowerstationName);
 				//sessionStorage.setItem('windpowerstationName', windpowerstationName);
@@ -1391,45 +1323,21 @@
 				this.modalName = null;
 			},
 			choiceWindStation: function(item, index) {
-	this.choiceIndex = index;
-	this.windStationName = item.replace('风电场', '');
-	this.modalWindStationName = item.replace('风电场', '');
-	this.address = item;
-	this.pushWindPowerStationNameToSessionStorage(item);
-	let _this = this;
-	setTimeout(function() {
-		// _this.hideModal();
-		_this.showCenterVisible = false;
-		_this.choiceIndex = -1;
-		_this.cardCur = index;
-	}, 1000);
-	if (this.windStationName == '麻黄山') {
-	
-		this.FDC = 'MHS_FDC';
-		
-	}
-	if (this.windStationName == '牛首山') {
-		this.FDC = 'NSS_FDC';
-	}
-	if (this.windStationName == '石板泉') {
-		this.FDC = 'SBQ_FDC';
-	}
-	if (this.windStationName == '青山') {
-		this.FDC = 'QS_FDC';
-	}
-	if (this.windStationName == '香山') {
-		this.FDC = 'XS_FDC';
-	}
-	if (this.windStationName == '崇礼') {
-		this.FDC = 'CL_FDC';
-	}
-	if (this.windStationName == '康保') {
-		this.FDC = 'KB_FDC';
-	}
-	if (this.windStationName == '代县') {
-		this.FDC = 'YMG_FDC';
-	}
+				this.choiceIndex = index;
+				this.windStationName = item.replace('风电场', '');
+				this.modalWindStationName = item.replace('风电场', '');
+				this.address = item;
+				this.pushWindPowerStationNameToSessionStorage(item);
+				let _this = this;
+				setTimeout(function() {
+					// _this.hideModal();
+					_this.showCenterVisible = false;
+					_this.choiceIndex = -1;
+					_this.cardCur = index;
+				}, 1000);
+				this.FDC =this.dataprocessing.getWindPowerStationNameById(item);
 				
+				this.dataprocessing.putWindPowerStationId(this.FDC);
 			},
 			getWindMotorStatusCard: function() {
 				this.jieRu = 0;
@@ -1561,10 +1469,10 @@
 				this.cardCur = e.detail.current;
 				for (let i = 0; i < this.windStation.length; i++) {
 					if (this.cardCur == i) {
-						
+
 						if (this.windStation[i].search('风电场') != -1) {
-							
-							this.address=this.windStation[i];
+
+							this.address = this.windStation[i];
 							this.windStationName = this.windStation[i].replace('风电场', '');
 						} else {
 							this.windStationName = this.windStation[i];

+ 15 - 5
components/weatherProphethomepage/WeatherProphethomepage.vue

@@ -961,7 +961,16 @@
 						for(let j=0;j<res.data.data.length;j++){
 							var a = {};
 							_this.$set(a,"name",res.data.data[j].describes);
-							_this.$set(a,"windId",res.data.data[j].name);
+							
+							if (res.data.data[j].describes == '宁夏新能源公司') {
+								_this.$set(a,"windId",'MHS_FDC');
+							}else if(res.data.data[j].describes == '河北能源集团')
+							{
+								_this.$set(a,"windId",'CL_FDC');
+							}else{
+								_this.$set(a,"windId",res.data.data[j].name);
+							}
+							
 							_this.plusDrawerList.push(a);
 						}
 					},
@@ -1032,7 +1041,7 @@
 					_this.cardCur = index;
 				}, 1000);
 				
-				this.FDC =this.dataprocessing.getWindPowerStationNameById(item);
+				this.FDC =this.dataprocessing.getWindPowerStationNameByWeatherId(item);
 
 				this.dataprocessing.putWindPowerStationId(this.FDC);
 				//uni.setStorageSync('windPowerStationId',this.FDC);
@@ -2068,7 +2077,8 @@
 	}
 
 	.scrollList {
-		height: 380px;
+		height: 750upx;
+		margin-top: 40upx ;
 	}
 
 	.cardContenter40 {
@@ -2331,12 +2341,12 @@
 		border-right-color: #19B5BC;
 	}
 
-	.scrollList {
+/* 	.scrollList {
 		// height:20%;
 		height: 130px;
 		width: 95%;
 		margin: 0px auto;
-	}
+	} */
 
 	.dayButtonWhite {
 		height: 25px;

+ 5 - 2
components/weatherProphethomepage/weatherDetail/Detail.vue

@@ -211,8 +211,11 @@
 		created: function() {
 			//this.pushWindPowerStationNameToSessionStorage("麻黄山");
 
-			this.address = this.getWindPowerStationNameToSessionStorage();
-			this.windPowerStationId=uni.getStorageSync('windPowerStationId');
+			this.address = this.dataprocessing.getWindPowerStationName();
+			this.FDC=this.dataprocessing.getWindPowerStationId();
+			this.windPowerStationId =this.dataprocessing.getWindPowerStationId();
+			
+			
 			this.getWeatherData();
 			this.windowWidth=uni.getSystemInfoSync().windowWidth;
 			this.windowHeight=uni.getSystemInfoSync().windowHeight;