2 Комити d1b72029e3 ... b3ed6b843d

Аутор SHA1 Порука Датум
  wangjiawen b3ed6b843d Merge branch 'master' of http://49.4.49.126:3000/Gyee_web/sisMobilePhone пре 4 година
  wangjiawen c8968b0a18 地图 пре 4 година

+ 15 - 50
common/dataprocessing.js

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

+ 1 - 6
components/drawer/threeLineDrawer.vue

@@ -66,12 +66,7 @@
 			},
 			closeDrawer: function() {
 				this.drawerIsShow = false;
-				
-				if(this.$parent!=undefined)
-				{
-					this.$parent.leftbar();
-				}
-				
+				this.$parent.leftbar();
 			},
 			clickChangeColor: function(index) {
 				this.changeGary = index;

+ 154 - 62
components/monitor/MatrixMonitor.vue

@@ -177,10 +177,18 @@
 		data: function() {
 			return {
 				address: '',
-				userid:'',
-				permissionsInformation:[],
 				badge: 22,
-				drawerList: [],
+				drawerList: [{
+					name: '首页'
+				}, {
+					name: '状态监视'
+				}, {
+					name: '矩阵监视'
+				}, {
+					name: '风场监视'
+				}, {
+					name: '人员监视'
+				}],
 				plusDrawerList: [],
 				windStationName: '',
 				modalWindStationName: '',
@@ -1184,19 +1192,53 @@
 		// 	this.windStationListHeight=(this.windStation.length*50+40)+"px"
 		// },
 		onShow() {
-			this.address = this.dataprocessing.getWindPowerStationName();
-			this.FDC = this.dataprocessing.getWindPowerStationId();
-			this.windPowerStationId = this.dataprocessing.getWindPowerStationId();
-
+			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';
+			}
 		},
 		created: function() {
 			this.viewUserid();
-			this.monitoringAuthority();
+			this.address = this.getWindPowerStationNameToSessionStorage();
 
-			this.address = this.dataprocessing.getWindPowerStationName();
-			this.FDC = this.dataprocessing.getWindPowerStationId();
-			this.windPowerStationId = this.dataprocessing.getWindPowerStationId();
+			this.windPowerStationId = uni.getStorageSync('windPowerStationId');
+			this.FDC = uni.getStorageSync('windPowerStationId');
 
+			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();
@@ -1206,9 +1248,66 @@
 			this.cWidth40 = uni.upx2px(5000);
 			this.cHeight40 = uni.upx2px(350);
 
-			this.windStation = this.dataprocessing.getWindPowerStationNameByNames(this.address);
-			this.windStationName = this.windStation[0].replace('风电场', '');
-
+			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.windStationListHeight = this.windStation.length * 50 + 40 + 'px';
 			this.spopupWrapperHeight = this.windStation.length * 50 + 90 + 'px';
 			this.windowWidth = uni.getSystemInfoSync().windowWidth;
@@ -1257,37 +1356,6 @@
 					},
 				})
 			},
-			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);
@@ -1323,21 +1391,45 @@
 				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);
-				this.FDC =this.dataprocessing.getWindPowerStationNameById(item);
+	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.dataprocessing.putWindPowerStationId(this.FDC);
 			},
 			getWindMotorStatusCard: function() {
 				this.jieRu = 0;
@@ -1469,10 +1561,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];

+ 5 - 15
components/weatherProphethomepage/WeatherProphethomepage.vue

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

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

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