Browse Source

新增通用文件

shilin 4 years ago
parent
commit
6bb9226fc0
1 changed files with 102 additions and 0 deletions
  1. 102 0
      common/dataprocessing.js

+ 102 - 0
common/dataprocessing.js

@@ -0,0 +1,102 @@
+class Dataprocessing {
+	constructor() {
+
+	}
+
+	
+	//
+	putWindPowerStationName(windPowerStationName) {
+		uni.setStorageSync('windpowerstationName', windPowerStationName);
+	}
+	
+	putWindPowerStationId(windPowerStationId) {
+		uni.setStorageSync('windPowerStationId', windPowerStationId);
+	}
+	
+	getWindPowerStationName() {
+		return uni.getStorageSync('windpowerstationName');
+	}
+	
+	getWindPowerStationId() {
+		return uni.getStorageSync('windPowerStationId');
+	}
+	
+	getWindPowerStationNameById(name)
+	{
+		
+		if (name == '麻黄山风电场') {
+		
+			let  wpId = 'MHS_FDC';
+			return wpId;
+		}
+		if (name == '牛首山风电场') {
+			let  wpId = 'NSS_FDC';
+			return wpId;
+		}
+		if (name == '石板泉风电场') {
+			let  wpId = 'SBQ_FDC';
+			return wpId;
+		}
+		if (name == '青山风电场') {
+			let  wpId = 'QS_FDC';
+			return wpId;
+		}
+		if (name == '香山风电场') {
+			let  wpId = 'XS_FDC';
+			return wpId;
+		}
+		if (name == '崇礼风电场') {
+			let  wpId = 'CL_FDC';
+			return wpId;
+		}
+		if (name == '康保风电场') {
+			let  wpId = 'KB_FDC';
+			return wpId;
+		}
+		if (name == '代县风电场') {
+			let  wpId = 'DX_FDC';
+			return wpId;
+		}
+	}
+	
+	getWindPowerStationNameByNames(name)
+	{	
+		if (name == '宁夏新能源公司') {
+			
+			let  windStations=['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
+			return windStations;
+		}else if (name == '麻黄山风电场') {
+			let  windStations = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
+			return windStations;
+		}else if (name == '牛首山风电场') {
+			let  windStations = ['牛首山风电场', '麻黄山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
+			return windStations;
+		}else if (name == '石板泉风电场') {
+			let  windStations = ['石板泉风电场', '麻黄山风电场', '牛首山风电场', '青山风电场', '香山风电场'];
+			return windStations;
+		}else if (name == '香山风电场') {
+			let  windStations = ['香山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场'];
+			return windStations;
+		}else if (name == '青山风电场') {
+			let  windStations = ['青山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '香山风电场'];
+			return windStations;
+		}else if (name == '河北能源集团') {
+			let  windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
+			return windStations;
+		}else if (name == '崇礼风电场') {
+			let  windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
+			return windStations;
+		}else if (name == '康保风电场') {
+			let  windStations = ['康保风电场', '崇礼风电场', '代县风电场'];
+			return windStations;
+		}else if (name == '代县风电场') {
+			let  windStations = ['代县风电场', '康保风电场', '崇礼风电场'];
+			return windStations;
+		}
+	}
+
+	
+}
+
+let dataprocessing = new Dataprocessing();
+export default dataprocessing;