index.js 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. import request from "../utils/request";
  2. const getwindpowerVal=()=>{
  3. return request({
  4. baseURL: process.env.VUE_APP_API,
  5. url:`/windpowerw/getwindpowerVal.action`,
  6. method:"get"
  7. })
  8. }
  9. const getwindpowerLine=()=>{
  10. return request({
  11. baseURL: process.env.VUE_APP_API,
  12. url:`/windpowerw/getwindpowerLine.action`,
  13. method:"get"
  14. })
  15. }
  16. const getStation=()=>{
  17. return request({
  18. baseURL: process.env.VUE_APP_APIs,
  19. url:`/ghost/wplist`,
  20. method:"get"
  21. })
  22. }
  23. const getGroupList=(data)=>{
  24. return request({
  25. baseURL: process.env.VUE_APP_APIs,
  26. url:`/ghost/wtlist?wpid=${data.wpid}`,
  27. method:"get"
  28. })
  29. }
  30. const getTableData=(data)=>{
  31. return request({
  32. baseURL: process.env.VUE_APP_APIs,
  33. url:`/ghost/function?wpid=${data.wpid}&beginDate=${data.beginDate}&endDate=${data.endDate}`,
  34. method:"get"
  35. })
  36. }
  37. const getNature=(data)=>{
  38. return request({
  39. baseURL: process.env.VUE_APP_APIs,
  40. url:`/ghost/nature?wpid=${data.wpid}&beginDate=${data.beginDate}&endDate=${data.endDate}`,
  41. method:"get"
  42. })
  43. }
  44. const getShutdownevent=(data)=>{
  45. return request({
  46. baseURL: process.env.VUE_APP_APIs,
  47. url:`ghost/shutdownevent?wpid=${data.wpid}&beginDate=${data.beginDate}&endDate=${data.endDate}&type=${data.type}`,
  48. method:"get"
  49. })
  50. }
  51. const natureReal=(data)=>{
  52. return request({
  53. baseURL: process.env.VUE_APP_APIs,
  54. url:`/ghost/natureReal?wpid=${data.wpid}`,
  55. method:"get"
  56. })
  57. }
  58. const freedomList=(data)=>{
  59. return request({
  60. baseURL: process.env.VUE_APP_APIs,
  61. url:`ghost/freedomList?wtid=${data.wtid}&beginDate=${data.beginDate}&endDate=${data.endDate}&uniformcodes=${data.uniformcodes}&interval=${data.interval}`,
  62. method:"get"
  63. })
  64. }
  65. const wtls=(data)=>{
  66. return request({
  67. baseURL: process.env.VUE_APP_APIs,
  68. url:`/ghost/wtls`,
  69. method:"get"
  70. })
  71. }
  72. const points=(data)=>{
  73. return request({
  74. baseURL: process.env.VUE_APP_APIs,
  75. url:`/ghost/points`,
  76. method:"get"
  77. })
  78. }
  79. const faultrecord=(data)=>{
  80. return request({
  81. baseURL: process.env.VUE_APP_APIs,
  82. url:`ghost/faultrecord?wpid=${data.wpid}&wtid=${data.wtid}&begin=${data.begin}&end=${data.end}&faulttype=${data.faulttype}&type=${data.type}`,
  83. method:"get"
  84. })
  85. }
  86. const faultrecordAdd=(pairs)=>{
  87. return request({
  88. baseURL: process.env.VUE_APP_APIs,
  89. url:`ghost/faultrecord`,
  90. method:"post",
  91. data:pairs
  92. })
  93. }
  94. const faultrecordEdit=(pairs)=>{
  95. return request({
  96. baseURL: process.env.VUE_APP_APIs,
  97. url:`ghost/faultrecord`,
  98. method:"put",
  99. data:pairs
  100. })
  101. }
  102. const faultrecordDel=(data)=>{
  103. return request({
  104. baseURL: process.env.VUE_APP_APIs,
  105. url:`ghost/faultrecord/${data.id}`,
  106. method:"delete"
  107. })
  108. }
  109. const mainrecord=(data)=>{
  110. return request({
  111. baseURL: process.env.VUE_APP_APIs,
  112. url:`ghost/mainrecord?wpid=${data.wpid}&wtid=${data.wtid}&begin=${data.begin}&end=${data.end}&type=${data.type}`,
  113. method:"get"
  114. })
  115. }
  116. const mainrecordAdd=(pairs)=>{
  117. return request({
  118. baseURL: process.env.VUE_APP_APIs,
  119. url:`ghost/mainrecord`,
  120. method:"post",
  121. data:pairs
  122. })
  123. }
  124. const mainrecordEdit=(pairs)=>{
  125. return request({
  126. baseURL: process.env.VUE_APP_APIs,
  127. url:`ghost/mainrecord`,
  128. method:"put",
  129. data:pairs
  130. })
  131. }
  132. const mainrecordDel=(data)=>{
  133. return request({
  134. baseURL: process.env.VUE_APP_APIs,
  135. url:`ghost/mainrecord/${data.id}`,
  136. method:"delete"
  137. })
  138. }
  139. const getLines = (data)=>{
  140. return request({
  141. baseURL: process.env.VUE_APP_APIs,
  142. url:`ghost/getLines?wpid=${data.wpid}`,
  143. method:"get"
  144. })
  145. }
  146. const getslStatus = (data)=>{
  147. return request({
  148. baseURL: process.env.VUE_APP_APIs,
  149. url:`ghost/getslStatus`,
  150. method:"get"
  151. })
  152. }
  153. const involved = (data)=>{
  154. return request({
  155. baseURL: process.env.VUE_APP_APIs,
  156. url:`ghost/involved?wpid=${data.wpid}&begin=${data.begin}&end=${data.end}&type=${data.type}`,
  157. method:"get"
  158. })
  159. }
  160. const involvedAdd=(pairs)=>{
  161. return request({
  162. baseURL: process.env.VUE_APP_APIs,
  163. url:`ghost/involved`,
  164. method:"post",
  165. data:pairs
  166. })
  167. }
  168. const involvedEdit=(pairs)=>{
  169. return request({
  170. baseURL: process.env.VUE_APP_APIs,
  171. url:`ghost/involved`,
  172. method:"put",
  173. data:pairs
  174. })
  175. }
  176. const involvedDel=(data)=>{
  177. return request({
  178. baseURL: process.env.VUE_APP_APIs,
  179. url:`ghost/involved/${data.id}`,
  180. method:"delete"
  181. })
  182. }
  183. export default {
  184. getwindpowerVal,
  185. getwindpowerLine,
  186. getStation,
  187. getTableData,
  188. getNature,
  189. getShutdownevent,
  190. natureReal,
  191. freedomList,
  192. wtls,
  193. points,
  194. faultrecord,
  195. faultrecordAdd,
  196. faultrecordEdit,
  197. faultrecordDel,
  198. mainrecord,
  199. mainrecordAdd,
  200. mainrecordEdit,
  201. mainrecordDel,
  202. getGroupList,
  203. getLines,
  204. getslStatus,
  205. involved,
  206. involvedAdd,
  207. involvedEdit,
  208. involvedDel,
  209. };