dataprocessing.js 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  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 = 'MHS_FDC';
  21. return wpId;
  22. }
  23. if (name == '牛首山风电场') {
  24. let wpId = 'NSS_FDC';
  25. return wpId;
  26. }
  27. if (name == '石板泉风电场') {
  28. let wpId = 'SBQ_FDC';
  29. return wpId;
  30. }
  31. if (name == '青山风电场') {
  32. let wpId = 'QS_FDC';
  33. return wpId;
  34. }
  35. if (name == '香山风电场') {
  36. let wpId = 'XS_FDC';
  37. return wpId;
  38. }
  39. if (name == '崇礼风电场') {
  40. let wpId = 'CL_FDC';
  41. return wpId;
  42. }
  43. if (name == '康保风电场') {
  44. let wpId = 'KB_FDC';
  45. return wpId;
  46. }
  47. if (name == '代县风电场') {
  48. let wpId = 'DX_FDC';
  49. return wpId;
  50. }
  51. }
  52. getWindPowerStationNameByNames(name)
  53. {
  54. if (name == '宁夏新能源公司') {
  55. let windStations=['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  56. return windStations;
  57. }else if (name == '麻黄山风电场') {
  58. let windStations = ['麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  59. return windStations;
  60. }else if (name == '牛首山风电场') {
  61. let windStations = ['牛首山风电场', '麻黄山风电场', '石板泉风电场', '青山风电场', '香山风电场'];
  62. return windStations;
  63. }else if (name == '石板泉风电场') {
  64. let windStations = ['石板泉风电场', '麻黄山风电场', '牛首山风电场', '青山风电场', '香山风电场'];
  65. return windStations;
  66. }else if (name == '香山风电场') {
  67. let windStations = ['香山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '青山风电场'];
  68. return windStations;
  69. }else if (name == '青山风电场') {
  70. let windStations = ['青山风电场', '麻黄山风电场', '牛首山风电场', '石板泉风电场', '香山风电场'];
  71. return windStations;
  72. }else if (name == '河北能源集团') {
  73. let windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
  74. return windStations;
  75. }else if (name == '崇礼风电场') {
  76. let windStations = ['崇礼风电场', '康保风电场', '代县风电场'];
  77. return windStations;
  78. }else if (name == '康保风电场') {
  79. let windStations = ['康保风电场', '崇礼风电场', '代县风电场'];
  80. return windStations;
  81. }else if (name == '代县风电场') {
  82. let windStations = ['代县风电场', '康保风电场', '崇礼风电场'];
  83. return windStations;
  84. }
  85. }
  86. }
  87. let dataprocessing = new Dataprocessing();
  88. export default dataprocessing;