dataprocessing.js 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. class Dataprocessing {
  2. constructor() {
  3. }
  4. //
  5. putWindPowerStationName(windPowerStationName) {
  6. uni.setStorageSync('windpowerstationName', windPowerStationName);
  7. }
  8. putWindPowerStationId(windPowerStationId) {
  9. uni.setStorageSync('windPowerStationId', windPowerStationId);
  10. }
  11. getWindPowerStationName() {
  12. return uni.getStorageSync('windpowerstationName');
  13. }
  14. getWindPowerStationId() {
  15. return uni.getStorageSync('windPowerStationId');
  16. }
  17. getWindPowerStationNameById(name)
  18. {
  19. if (name == '宁夏新能源公司') {
  20. let wpId = '0';
  21. return wpId;
  22. }else if (name == '麻黄山风电场') {
  23. let wpId = 'MHS_FDC';
  24. return wpId;
  25. }else if (name == '牛首山风电场') {
  26. let wpId = 'NSS_FDC';
  27. return wpId;
  28. }else if (name == '石板泉风电场') {
  29. let wpId = 'SBQ_FDC';
  30. return wpId;
  31. }else if (name == '青山风电场') {
  32. let wpId = 'QS_FDC';
  33. return wpId;
  34. }else if (name == '香山风电场') {
  35. let wpId = 'XS_FDC';
  36. return wpId;
  37. }else if (name == '河北能源集团') {
  38. let wpId = '0';
  39. return wpId;
  40. }else if (name == '崇礼风电场') {
  41. let wpId = 'CL_FDC';
  42. return wpId;
  43. }else if (name == '康保风电场') {
  44. let wpId = 'KB_FDC';
  45. return wpId;
  46. }else if (name == '代县风电场') {
  47. let wpId = 'DX_FDC';
  48. return wpId;
  49. }
  50. }
  51. getWindPowerStationNameByWeatherId(name)
  52. {
  53. if (name == '宁夏新能源公司') {
  54. let wpId = 'MHS_FDC';
  55. return wpId;
  56. }else if (name == '麻黄山风电场') {
  57. let wpId = 'MHS_FDC';
  58. return wpId;
  59. }else if (name == '牛首山风电场') {
  60. let wpId = 'NSS_FDC';
  61. return wpId;
  62. }else if (name == '石板泉风电场') {
  63. let wpId = 'SBQ_FDC';
  64. return wpId;
  65. }else if (name == '青山风电场') {
  66. let wpId = 'QS_FDC';
  67. return wpId;
  68. }else if (name == '香山风电场') {
  69. let wpId = 'XS_FDC';
  70. return wpId;
  71. }else if (name == '河北能源集团') {
  72. let wpId = 'CL_FDC';
  73. return wpId;
  74. }else if (name == '崇礼风电场') {
  75. let wpId = 'CL_FDC';
  76. return wpId;
  77. }else if (name == '康保风电场') {
  78. let wpId = 'KB_FDC';
  79. return wpId;
  80. }else if (name == '代县风电场') {
  81. let wpId = 'DX_FDC';
  82. return wpId;
  83. }
  84. }
  85. getWindPowerStationNameByNames(name)
  86. {
  87. if (name == '宁夏新能源公司') {
  88. let windStations=['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  89. return windStations;
  90. }else if (name == '麻黄山风电场') {
  91. let windStations = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  92. return windStations;
  93. }else if (name == '牛首山风电场') {
  94. let windStations = ['牛首山风电场', '麻黄山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  95. return windStations;
  96. }else if (name == '石板泉风电场') {
  97. let windStations = ['石板泉风电场', '麻黄山风电场', '牛首山风电场', '青山风电场', '香山风电场'];
  98. return windStations;
  99. }else if (name == '香山风电场') {
  100. let windStations = ['香山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场'];
  101. return windStations;
  102. }else if (name == '青山风电场') {
  103. let windStations = ['青山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '香山风电场'];
  104. return windStations;
  105. }else if (name == '河北能源集团') {
  106. let windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
  107. return windStations;
  108. }else if (name == '崇礼风电场') {
  109. let windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
  110. return windStations;
  111. }else if (name == '康保风电场') {
  112. let windStations = ['康保风电场', '崇礼风电场', '代县风电场'];
  113. return windStations;
  114. }else if (name == '代县风电场') {
  115. let windStations = ['代县风电场', '康保风电场', '崇礼风电场'];
  116. return windStations;
  117. }
  118. }
  119. }
  120. let dataprocessing = new Dataprocessing();
  121. export default dataprocessing;