dj1.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383
  1. <template>
  2. <div class="dj-1">
  3. <div class="action-bar">
  4. <div class="selections mg-b-16">
  5. <div class="item" @click="tabSelect(0)" :class="{ active: tabIndex == 0 }">风机运行情况信息</div>
  6. <div class="item" @click="tabSelect(1)" :class="{ active: tabIndex == 1 }">风机日详细信息</div>
  7. <div class="item" @click="tabSelect(2)" :class="{ active: tabIndex == 2 }">风场玫瑰图</div>
  8. <div class="item" @click="tabSelect(3)" :class="{ active: tabIndex == 3 }">风机玫瑰图</div>
  9. <div class="item" @click="tabSelect(4)" :class="{ active: tabIndex == 4 }">风机切入切出分析</div>
  10. </div>
  11. <div class="query mg-b-16">
  12. <div class="query-items">
  13. <div class="query-item">
  14. <div class="lable">风场:</div>
  15. <div class="search-input">
  16. <el-select v-model="wpId" clearable placeholder="请选择" popper-class="select" @change="getWtArray">
  17. <el-option v-for="item in wpArray" :key="item.id" :value="item.id" :label="item.name" />
  18. </el-select>
  19. </div>
  20. </div>
  21. <div class="query-item">
  22. <div class="lable">风机:</div>
  23. <div class="search-input">
  24. <el-select v-model="wtId" clearable placeholder="请选择" popper-class="select">
  25. <el-option v-for="item in wtArray" :key="item.id" :value="item.id" :label="item.name" />
  26. </el-select>
  27. </div>
  28. </div>
  29. <div class="query-item">
  30. <div class="lable">日期:</div>
  31. <div class="search-input">
  32. <el-date-picker v-model="recorddate" type="date" value-format="YYYY-MM-DD" placeholder="选择日期"
  33. popper-class="date-select">
  34. </el-date-picker>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="query-actions">
  39. <button class="btn green" @click="search">搜索</button>
  40. </div>
  41. </div>
  42. </div>
  43. <!-- tab1 -->
  44. <div v-if="tabIndex == 0" class="tab-1">
  45. <panel :title="'损失电量分析'" class="mg-b-16">
  46. <area-line-chart :height="'23.1481vh'" :lineData="lostChartData" :units="lostChartUnit" :areaData="LostChartBgColorData"
  47. @areaClick="areaBarChartClick" :showLegend="true" />
  48. </panel>
  49. <panel :title="'电量'" class="mg-b-16">
  50. <multiple-bar-line-chart :height="'16.6667vh'" :barData="powerChartData" :lineData="powerChartLineData" :units="['(kWh)']"
  51. :showLegend="true" />
  52. </panel>
  53. <div class="table-info">
  54. <panel class="table-panel" :title="'当日报警记录'" :showLine="false">
  55. <Table :data="warnTableData" :canScroll="true" :height="'32.5vh'" />
  56. </panel>
  57. <panel class="table-panel" :title="'当日故障记录'" :showLine="false">
  58. <Table :data="stopTableData" :canScroll="true" :height="'32.5vh'" />
  59. </panel>
  60. <panel class="table-panel" :title="'当日限电记录'" :showLine="false">
  61. <Table :data="xdTableData" :canScroll="true" :height="'32.5vh'" />
  62. </panel>
  63. </div>
  64. </div>
  65. <!-- tab2 -->
  66. <div v-if="tabIndex == 1" class="tab-2">
  67. <el-row>
  68. <el-col :span="15">
  69. <panel :title="'功率曲线'" class="mg-b-16">
  70. <marker-line-chart :height="'28vh'" :list="powerLineChartData" :units="['(MW)', '(m/s)']" :showLegend="true" />
  71. </panel>
  72. <panel :title="'日发电量信息'" class="mg-b-16 outline" :showLine="false">
  73. <div class="power-info">
  74. <div class="info-item">
  75. <div class="text">发电量:</div>
  76. <div class="value green">{{dayPowerInfo.c1}}</div>
  77. </div>
  78. <div class="info-item">
  79. <div class="text">理论发电量:</div>
  80. <div class="value green">{{dayPowerInfo.c4}}</div>
  81. </div>
  82. <div class="info-item">
  83. <div class="text">平均功率:</div>
  84. <div class="value green">{{dayPowerInfo.c7}}</div>
  85. </div>
  86. <div class="info-item">
  87. <div class="text">平均风速:</div>
  88. <div class="value green">{{dayPowerInfo.c10}}</div>
  89. </div>
  90. <div class="info-item">
  91. <div class="text">拟合优度:</div>
  92. <div class="value green">{{dayPowerInfo.c55}}</div>
  93. </div>
  94. <div class="info-item">
  95. <div class="text">运行小时:</div>
  96. <div class="value green">{{dayPowerInfo.c13}}</div>
  97. </div>
  98. <div class="info-item">
  99. <div class="text">停机小时:</div>
  100. <div class="value green">{{dayPowerInfo.c16}}</div>
  101. </div>
  102. <div class="info-item">
  103. <div class="text">故障小时:</div>
  104. <div class="value green">{{dayPowerInfo.c19}}</div>
  105. </div>
  106. <div class="info-item">
  107. <div class="text">维护小时:</div>
  108. <div class="value green">{{dayPowerInfo.c22}}</div>
  109. </div>
  110. <div class="info-item">
  111. <div class="text">中断小时:</div>
  112. <div class="value green">{{dayPowerInfo.c25}}</div>
  113. </div>
  114. <div class="info-item">
  115. <div class="text">有效风时数:</div>
  116. <div class="value green">{{dayPowerInfo.c28}}</div>
  117. </div>
  118. <div class="info-item">
  119. <div class="text">损失电量:</div>
  120. <div class="value green">{{dayPowerInfo.c31}}</div>
  121. </div>
  122. <div class="info-item">
  123. <div class="text">报警次数:</div>
  124. <div class="value green">{{dayPowerInfo.c34}}</div>
  125. </div>
  126. <div class="info-item">
  127. <div class="text">停机次数:</div>
  128. <div class="value green">{{dayPowerInfo.c37}}</div>
  129. </div>
  130. <div class="info-item">
  131. <div class="text">不饱和次数:</div>
  132. <div class="value green">{{dayPowerInfo.c40}}</div>
  133. </div>
  134. <div class="info-item">
  135. <div class="text">设备可利用率:</div>
  136. <div class="value green">{{dayPowerInfo.c43}}</div>
  137. </div>
  138. <div class="info-item">
  139. <div class="text">实际/保证偏差率:</div>
  140. <div class="value green">{{dayPowerInfo.c58}}</div>
  141. </div>
  142. <div class="info-item">
  143. <div class="text">平均温度:</div>
  144. <div class="value green">{{dayPowerInfo.c46}}</div>
  145. </div>
  146. <div class="info-item">
  147. <div class="text">平均湿度:</div>
  148. <div class="value green">{{dayPowerInfo.c49}}</div>
  149. </div>
  150. <div class="info-item">
  151. <div class="text">平均压强:</div>
  152. <div class="value green">{{dayPowerInfo.c52}}</div>
  153. </div>
  154. </div>
  155. </panel>
  156. <div class="month-info">
  157. <div class="month-info-left">
  158. <panel :title="'月发电量信息'" class="mg-b-16 outline" :showLine="false">
  159. <div class="power-info month-3">
  160. <div class="info-item">
  161. <div class="text">月发电量:</div>
  162. <div class="value green">{{dayPowerInfo.c2}}</div>
  163. </div>
  164. <div class="info-item">
  165. <div class="text">月理论发电量:</div>
  166. <div class="value green">{{dayPowerInfo.c5}}</div>
  167. </div>
  168. <div class="info-item">
  169. <div class="text">月平均功率:</div>
  170. <div class="value green">{{dayPowerInfo.c8}}</div>
  171. </div>
  172. <div class="info-item">
  173. <div class="text">月平均风速:</div>
  174. <div class="value green">{{dayPowerInfo.c11}}</div>
  175. </div>
  176. <div class="info-item">
  177. <div class="text">月拟合优度:</div>
  178. <div class="value green">{{dayPowerInfo.c56}}</div>
  179. </div>
  180. <div class="info-item">
  181. <div class="text">月运行小时:</div>
  182. <div class="value green">{{dayPowerInfo.c14}}</div>
  183. </div>
  184. <div class="info-item">
  185. <div class="text">月停机小时:</div>
  186. <div class="value green">{{dayPowerInfo.c17}}</div>
  187. </div>
  188. <div class="info-item">
  189. <div class="text">月故障小时:</div>
  190. <div class="value green">{{dayPowerInfo.c20}}</div>
  191. </div>
  192. <div class="info-item">
  193. <div class="text">月维护小时:</div>
  194. <div class="value green">{{dayPowerInfo.c23}}</div>
  195. </div>
  196. <div class="info-item">
  197. <div class="text">月中断小时:</div>
  198. <div class="value green">{{dayPowerInfo.c26}}</div>
  199. </div>
  200. <div class="info-item">
  201. <div class="text">月有效风时数:</div>
  202. <div class="value green">{{dayPowerInfo.c29}}</div>
  203. </div>
  204. <div class="info-item">
  205. <div class="text">月报警次数:</div>
  206. <div class="value green">{{dayPowerInfo.c35}}</div>
  207. </div>
  208. <div class="info-item">
  209. <div class="text">月停机次数:</div>
  210. <div class="value green">{{dayPowerInfo.c38}}</div>
  211. </div>
  212. <div class="info-item">
  213. <div class="text">月实际/保证:</div>
  214. <div class="value green">{{dayPowerInfo.c59}}</div>
  215. </div>
  216. <div class="info-item">
  217. <div class="text">设备可利用率:</div>
  218. <div class="value green">{{dayPowerInfo.c44}}</div>
  219. </div>
  220. </div>
  221. </panel>
  222. </div>
  223. <div class="month-info-right">
  224. <panel :title="'年发电量信息'" class="mg-b-16 outline" :showLine="false">
  225. <div class="power-info month-2">
  226. <div class="info-item">
  227. <div class="text">年发电量:</div>
  228. <div class="value green">{{dayPowerInfo.c3}}</div>
  229. </div>
  230. <div class="info-item">
  231. <div class="text">年拟合优度:</div>
  232. <div class="value green">{{dayPowerInfo.c57}}</div>
  233. </div>
  234. </div>
  235. </panel>
  236. <panel :title="'风资源'" class="radar-panel" :icon="'svg-wind-site'">
  237. <div class="wind-info">
  238. <div class="legend mg-r-16">
  239. <span class="dot"></span>
  240. <span>{{jfplStr}}</span>
  241. </div>
  242. <direction-radar-chart :width="'60%'" :height="'152px'" :value="windResourcesData" :showLegend="true" />
  243. </div>
  244. </panel>
  245. </div>
  246. </div>
  247. </el-col>
  248. <el-col :span="9">
  249. <panel class="table-panel outline mg-b-16" :title="'当日报警记录'" :showLine="false">
  250. <Table :data="warnTableData" :canScroll="true" :height="'23vh'" />
  251. </panel>
  252. <panel class="table-panel outline mg-b-16" :title="'当日故障记录'" :showLine="false">
  253. <Table :data="stopTableData" :canScroll="true" :height="'23vh'" />
  254. </panel>
  255. <panel class="table-panel outline" :title="'当月报警排行'" :showLine="false">
  256. <Table :data="monthWarnRecordData" :canScroll="true" :height="'23vh'" />
  257. </panel>
  258. </el-col>
  259. </el-row>
  260. </div>
  261. <!-- tab3 -->
  262. <div v-if="tabIndex == 2" class="tab-3">
  263. <el-row>
  264. <el-col :span="8">
  265. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  266. <div class="wind-info">
  267. <div class="legend mg-r-16">
  268. <span class="dot"></span>
  269. <span>{{rzdfsStr}}</span>
  270. </div>
  271. <direction-radar-chart :width="'100%'" :height="'350px'" :value="rzdfsData" />
  272. </div>
  273. </panel>
  274. </el-col>
  275. <el-col :span="8">
  276. <panel :title="'月最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  277. <div class="wind-info">
  278. <div class="legend mg-r-16">
  279. <span class="dot"></span>
  280. <span>{{yzdfsStr}}</span>
  281. </div>
  282. <direction-radar-chart :width="'100%'" :height="'350px'" :value="yzdfsData" />
  283. </div>
  284. </panel>
  285. </el-col>
  286. <el-col :span="8">
  287. <panel :title="'年最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  288. <div class="wind-info">
  289. <div class="legend mg-r-16">
  290. <span class="dot"></span>
  291. <span>{{nzdfsStr}}</span>
  292. </div>
  293. <direction-radar-chart :width="'100%'" :height="'350px'" :value="nzdfsData" />
  294. </div>
  295. </panel>
  296. </el-col>
  297. </el-row>
  298. <el-row>
  299. <el-col :span="8">
  300. <panel :title="'日风向频率'" class="radar-panel" :icon="'svg-wind-site'">
  301. <div class="wind-info">
  302. <div class="legend mg-r-16">
  303. <span class="dot"></span>
  304. <span>{{rfxplStr}}</span>
  305. </div>
  306. <direction-radar-chart :width="'100%'" :height="'350px'" :value="rfxplData" />
  307. </div>
  308. </panel>
  309. </el-col>
  310. <el-col :span="8">
  311. <panel :title="'月风向频率'" class="radar-panel" :icon="'svg-wind-site'">
  312. <div class="wind-info">
  313. <div class="legend mg-r-16">
  314. <span class="dot"></span>
  315. <span>{{yfxplStr}}</span>
  316. </div>
  317. <direction-radar-chart :width="'100%'" :height="'350px'" :value="yfxplData" />
  318. </div>
  319. </panel>
  320. </el-col>
  321. <el-col :span="8">
  322. <panel :title="'年风向频率'" class="radar-panel" :icon="'svg-wind-site'">
  323. <div class="wind-info">
  324. <div class="legend mg-r-16">
  325. <span class="dot"></span>
  326. <span>{{nfxplStr}}</span>
  327. </div>
  328. <direction-radar-chart :width="'100%'" :height="'350px'" :value="nfxplData" />
  329. </div>
  330. </panel>
  331. </el-col>
  332. </el-row>
  333. </div>
  334. <!-- tab4 -->
  335. <div v-if="tabIndex == 3" class="tab-4">
  336. <el-row>
  337. <el-col :span="8">
  338. <panel :title="'日最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  339. <div class="wind-info">
  340. <div class="legend mg-r-16">
  341. <span class="dot"></span>
  342. <span>{{rzdfsStr}}</span>
  343. </div>
  344. <direction-radar-chart :width="'100%'" :height="'350px'" :value="rzdfsData" />
  345. </div>
  346. </panel>
  347. </el-col>
  348. <el-col :span="8">
  349. <panel :title="'月最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  350. <div class="wind-info">
  351. <div class="legend mg-r-16">
  352. <span class="dot"></span>
  353. <span>{{yzdfsStr}}</span>
  354. </div>
  355. <direction-radar-chart :width="'100%'" :height="'350px'" :value="yzdfsData" />
  356. </div>
  357. </panel>
  358. </el-col>
  359. <el-col :span="8">
  360. <panel :title="'年最大风速'" class="radar-panel" :icon="'svg-wind-site'">
  361. <div class="wind-info">
  362. <div class="legend mg-r-16">
  363. <span class="dot"></span>
  364. <span>{{nzdfsStr}}</span>
  365. </div>
  366. <direction-radar-chart :width="'100%'" :height="'350px'" :value="nzdfsData" />
  367. </div>
  368. </panel>
  369. </el-col>
  370. </el-row>
  371. <el-row>
  372. <el-col :span="8">
  373. <panel :title="'日风向频率'" class="radar-panel" :icon="'svg-wind-site'">
  374. <div class="wind-info">
  375. <div class="legend mg-r-16">
  376. <span class="dot"></span>
  377. <span>{{rfxplStr}}</span>
  378. </div>
  379. <direction-radar-chart :width="'100%'" :height="'350px'" :value="rfxplData" />
  380. </div>
  381. </panel>
  382. </el-col>
  383. <el-col :span="8">
  384. <panel :title="'月风向频率'" class="radar-panel" :icon="'svg-wind-site'">
  385. <div class="wind-info">
  386. <div class="legend mg-r-16">
  387. <span class="dot"></span>
  388. <span>{{yfxplStr}}</span>
  389. </div>
  390. <direction-radar-chart :width="'100%'" :height="'350px'" :value="yfxplData" />
  391. </div>
  392. </panel>
  393. </el-col>
  394. <el-col :span="8">
  395. <panel :title="'年风向频率'" class="radar-panel" :icon="'svg-wind-site'">
  396. <div class="wind-info">
  397. <div class="legend mg-r-16">
  398. <span class="dot"></span>
  399. <span>{{nfxplStr}}</span>
  400. </div>
  401. <direction-radar-chart :width="'100%'" :height="'350px'" :value="nfxplData" />
  402. </div>
  403. </panel>
  404. </el-col>
  405. </el-row>
  406. </div>
  407. <!-- tab5 -->
  408. <div v-if="tabIndex == 4" class="tab-5">
  409. <el-row>
  410. <el-col :span="8">
  411. <panel title="日小风切入">
  412. <dual-pie-chart height="350px" :innerData="dayWindPieData" :outerData="dayWindPieData" />
  413. </panel>
  414. </el-col>
  415. <el-col :span="8">
  416. <panel title="月小风切入">
  417. <dual-pie-chart height="350px" :innerData="monthWindPieData" :outerData="monthWindPieData" />
  418. </panel>
  419. </el-col>
  420. <el-col :span="8">
  421. <panel title="年小风切入">
  422. <dual-pie-chart height="350px" :innerData="yearWindPieData" :outerData="myearWindPieData" />
  423. </panel>
  424. </el-col>
  425. </el-row>
  426. <el-row>
  427. <el-col :span="8">
  428. <panel title="日小风停机">
  429. <dual-pie-chart height="350px" :innerData="dayStopPieData" :outerData="dayStopPieData" />
  430. </panel>
  431. </el-col>
  432. <el-col :span="8">
  433. <panel title="月小风停机">
  434. <dual-pie-chart height="350px" :innerData="monthStopPieData" :outerData="monthStopPieData" />
  435. </panel>
  436. </el-col>
  437. <el-col :span="8">
  438. <panel title="年小风停机">
  439. <dual-pie-chart height="350px" :innerData="yearStopPieData" :outerData="yearStopPieData" />
  440. </panel>
  441. </el-col>
  442. </el-row>
  443. </div>
  444. <el-dialog title="区域详情查看" v-model="dialogShow" width="85%" top="10vh" custom-class="modal" :close-on-click-modal="true">
  445. <el-form ref="form" label-width="100px" inline>
  446. <el-form-item style="width: 32%;" label="开始时间:">{{form.ks}}</el-form-item>
  447. <el-form-item style="width: 32%;" label="结束时间:">{{form.js}}</el-form-item>
  448. <el-form-item style="width: 32%;" label="时长:">{{form.sc}}(小时)</el-form-item>
  449. <el-form-item style="width: 32%;" label="风速:">{{form.fs}}(m/s)</el-form-item>
  450. <el-form-item style="width: 32%;" label="功率:">{{form.gl}}(KW)</el-form-item>
  451. <el-form-item style="width: 32%;" label="理论发电量:">{{form.llfdl}}(KWh)</el-form-item>
  452. <el-form-item style="width: 32%;" label="发电量:">{{form.fdl}}(KWh)</el-form-item>
  453. <el-form-item style="width: 32%;" label="损失电量:">{{form.ssdl}}(KWh)</el-form-item>
  454. <el-form-item style="width: 32%;" label="风机状态:">{{form.fjzt}}</el-form-item>
  455. </el-form>
  456. </el-dialog>
  457. </div>
  458. </template>
  459. <script>
  460. import AreaLineChart from "../../components/chart/combination/area-line-chart.vue";
  461. import MultipleBarLineChart from "../../components/chart/combination/multiple-bar-line-chart.vue";
  462. import MarkerLineChart from "../../components/chart/line/multiple-line-chart.vue";
  463. import DualPieChart from "../../components/chart/pie/dual-pie-chart.vue";
  464. import DirectionRadarChart from "@com/chart/radar/radar-chart.vue";
  465. import panel from "../../components/coms/panel/panel.vue";
  466. import Table from "../../components/coms/table/table.vue";
  467. export default {
  468. components: { panel, AreaLineChart, MultipleBarLineChart, Table, MarkerLineChart, DirectionRadarChart, DualPieChart },
  469. setup () { },
  470. data () {
  471. return {
  472. tabIndex: 0,
  473. tableData: {
  474. column: [
  475. {
  476. name: "风机",
  477. field: "name",
  478. is_num: false,
  479. is_light: false,
  480. },
  481. {
  482. name: "描述",
  483. field: "desc",
  484. is_num: false,
  485. is_light: false,
  486. },
  487. {
  488. name: "报警时间",
  489. field: "date",
  490. is_num: false,
  491. is_light: false,
  492. },
  493. ],
  494. data: []
  495. },
  496. wpArray: [],
  497. wpId: "",
  498. wtArray: [],
  499. wtId: "",
  500. recorddate: new Date((new Date().getTime() - 3600 * 1000 * 24)).formatDate("yyyy-MM-dd"),
  501. lostChartData: [{
  502. text: "",
  503. value: []
  504. }],
  505. lostChartUnit: [],
  506. LostChartBgColorData: [{
  507. name: ""
  508. }],
  509. powerChartData: [{
  510. title: "",
  511. yAxisIndex: 0,
  512. value: []
  513. }],
  514. powerChartLineData: {
  515. name: "",
  516. unit: "",
  517. data: []
  518. },
  519. warnTableData: {
  520. column: [
  521. {
  522. name: "风机",
  523. field: "windturbineid",
  524. is_num: false,
  525. is_light: false,
  526. },
  527. {
  528. name: "描述",
  529. field: "warnDesc",
  530. is_num: false,
  531. is_light: false,
  532. },
  533. {
  534. name: "报警时间",
  535. field: "warningtime",
  536. is_num: false,
  537. is_light: false,
  538. },
  539. ],
  540. data: []
  541. },
  542. stopTableData: {
  543. column: [
  544. {
  545. name: "风机",
  546. field: "windTurbineId",
  547. is_num: false,
  548. is_light: false,
  549. },
  550. {
  551. name: "停机时间",
  552. field: "stopTime",
  553. is_num: false,
  554. is_light: false,
  555. },
  556. {
  557. name: "恢复时间",
  558. field: "starttime",
  559. is_num: false,
  560. is_light: false,
  561. },
  562. ],
  563. data: []
  564. },
  565. xdTableData: {
  566. column: [
  567. {
  568. name: "风机",
  569. field: "windturbineid",
  570. is_num: false,
  571. is_light: false,
  572. },
  573. {
  574. name: "停机时间",
  575. field: "stoptime",
  576. is_num: false,
  577. is_light: false,
  578. },
  579. {
  580. name: "恢复时间",
  581. field: "starttime",
  582. is_num: false,
  583. is_light: false,
  584. },
  585. {
  586. name: "损失电量",
  587. field: "losspower",
  588. is_num: false,
  589. is_light: false,
  590. },
  591. {
  592. name: "限电时长",
  593. field: "stophours",
  594. is_num: false,
  595. is_light: false,
  596. }
  597. ],
  598. data: []
  599. },
  600. powerLineChartData: [{
  601. title: "",
  602. yAxisIndex: 0,
  603. value: []
  604. }],
  605. dayPowerInfo: {},
  606. monthWarnRecordData: {
  607. column: [
  608. {
  609. name: "名字",
  610. field: "name",
  611. is_num: false,
  612. is_light: false,
  613. },
  614. {
  615. name: "次数",
  616. field: "frequency",
  617. is_num: true,
  618. is_light: false,
  619. }
  620. ],
  621. data: []
  622. },
  623. jfplStr: "",
  624. windResourcesData: {
  625. indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
  626. data: [{
  627. value: [44200, 14200, 20000, 35000, 50000, 38000],
  628. name: ""
  629. }]
  630. },
  631. rzdfsStr: "",
  632. rzdfsData: {
  633. indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
  634. data: [{
  635. value: [44200, 14200, 20000, 35000, 50000, 38000],
  636. name: ""
  637. }]
  638. },
  639. yzdfsStr: "",
  640. yzdfsData: {
  641. indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
  642. data: [{
  643. value: [44200, 14200, 20000, 35000, 50000, 38000],
  644. name: ""
  645. }]
  646. },
  647. nzdfsStr: "",
  648. nzdfsData: {
  649. indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
  650. data: [{
  651. value: [44200, 14200, 20000, 35000, 50000, 38000],
  652. name: ""
  653. }]
  654. },
  655. rfxplStr: "",
  656. rfxplData: {
  657. indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
  658. data: [{
  659. value: [44200, 14200, 20000, 35000, 50000, 38000],
  660. name: ""
  661. }]
  662. },
  663. yfxplStr: "",
  664. yfxplData: {
  665. indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
  666. data: [{
  667. value: [44200, 14200, 20000, 35000, 50000, 38000],
  668. name: ""
  669. }]
  670. },
  671. nfxplStr: "",
  672. nfxplData: {
  673. indicator: ["N0", "N1", "N2", "N3", "N4", "N5"],
  674. data: [{
  675. value: [44200, 14200, 20000, 35000, 50000, 38000],
  676. name: ""
  677. }]
  678. },
  679. dayWindPieData: [],
  680. monthWindPieData: [],
  681. yearWindPieData: [],
  682. dayStopPieData: [],
  683. monthStopPieData: [],
  684. yearStopPieData: [],
  685. dialogShow: false,
  686. form: {}
  687. };
  688. },
  689. methods: {
  690. // 获取风场
  691. getWpArray () {
  692. let that = this;
  693. that.API.requestData({
  694. method: "GET",
  695. subUrl: "powercompare/windfarmAjax",
  696. success (res) {
  697. that.wpArray = res.data;
  698. that.wpId = that.wpId || res.data[0].id;
  699. that.getWtArray(that.wpId, true);
  700. }
  701. });
  702. },
  703. // 获取风机
  704. getWtArray (wpId, keepRequest) {
  705. let that = this;
  706. if (wpId) {
  707. that.API.requestData({
  708. method: "GET",
  709. subUrl: "powercompare/windturbineAjax",
  710. data: {
  711. wpId
  712. },
  713. success (res) {
  714. that.wtArray = res.data;
  715. const findRes = res.data.some(ele => {
  716. return ele.id === that.wtId;
  717. });
  718. that.wtId = (findRes ? that.wtId : res.data[0].id);
  719. if (keepRequest) {
  720. that.search();
  721. }
  722. }
  723. });
  724. } else {
  725. that.wtArray = [];
  726. that.wtId = "";
  727. }
  728. },
  729. // tab1 - 获取损失电量分析图表数据
  730. getLostChartData () {
  731. let that = this;
  732. that.API.requestData({
  733. method: "POST",
  734. subUrl: "goodness/findWtRealPowerChar",
  735. data: {
  736. wtId: that.wtId,
  737. recorddate: that.recorddate
  738. },
  739. success (res) {
  740. const keyArray = ["value1", "value2", "value3", "value4"];
  741. let lostChartData = [{
  742. text: "实发功率",
  743. value: [{
  744. text: "1",
  745. value: 1,
  746. }]
  747. }, {
  748. text: "保证功率",
  749. value: []
  750. }, {
  751. text: "风速",
  752. value: []
  753. }, {
  754. text: "状态",
  755. value: []
  756. }];
  757. const lostChartUnit = ["实发功率", "保证功率", "风速", "状态"];
  758. keyArray.forEach((key, keyIndex) => {
  759. res.data.forEach(ele => {
  760. lostChartData[keyIndex].value.push({
  761. text: new Date(ele.time).formatDate("hh:mm"),
  762. value: ele[key]
  763. });
  764. });
  765. });
  766. that.lostChartData = lostChartData;
  767. that.lostChartUnit = lostChartUnit;
  768. that.getLostChartBgColorData();
  769. }
  770. });
  771. },
  772. // tab1 - 获取损失电量分析图表背景颜色
  773. getLostChartBgColorData () {
  774. let that = this;
  775. that.API.requestData({
  776. method: "POST",
  777. subUrl: "goodness/getplotBands",
  778. data: {
  779. wtId: that.wtId,
  780. recorddate: that.recorddate
  781. },
  782. success (res) {
  783. let LostChartBgColorData = [];
  784. res.data.forEach((pEle, pIndex) => {
  785. LostChartBgColorData.push({
  786. name: pEle[0].name,
  787. start: (pIndex ? LostChartBgColorData[pIndex - 1].end : 0),
  788. end: (pIndex ? LostChartBgColorData[pIndex - 1].end : 0) + ((new Date(pEle[0].time2).getTime() / 1000) - (new Date(pEle[0].time1).getTime() / 1000)),
  789. color: pEle[0].itemStyle.color,
  790. beginDate: pEle[0].time1,
  791. endDate: pEle[0].time2,
  792. wtId: that.wtId
  793. });
  794. });
  795. that.LostChartBgColorData = LostChartBgColorData;
  796. }
  797. });
  798. },
  799. // 损失电量分析图背景颜色区域点击事件
  800. areaBarChartClick (item) {
  801. let that = this;
  802. that.API.requestData({
  803. method: "POST",
  804. subUrl: "goodness/plotBandAjax",
  805. data: {
  806. wtId: item.data.wtId,
  807. beginDate: item.data.beginDate,
  808. endDate: item.data.endDate
  809. },
  810. success (res) {
  811. that.form = res.data || {};
  812. that.dialogShow = true;
  813. }
  814. });
  815. },
  816. // tab1 - 获取电量图表数据
  817. getPowerChartData () {
  818. let that = this;
  819. that.API.requestData({
  820. method: "POST",
  821. subUrl: "goodness/findRealPowerCharBy24",
  822. data: {
  823. wtId: that.wtId,
  824. recorddate: that.recorddate
  825. },
  826. success (res) {
  827. const keyArray = ["value1", "value2", "value3", "value4", "value5"];
  828. let powerChartData = [{
  829. title: "scada发电量",
  830. yAxisIndex: 0,
  831. value: []
  832. }, {
  833. title: "维护损失",
  834. yAxisIndex: 0,
  835. value: []
  836. }, {
  837. title: "故障损失",
  838. yAxisIndex: 0,
  839. value: []
  840. }, {
  841. title: "限电损失",
  842. yAxisIndex: 0,
  843. value: []
  844. }, {
  845. title: "欠发损失",
  846. yAxisIndex: 0,
  847. value: []
  848. }];
  849. let powerChartLineData = {
  850. name: "风速",
  851. unit: "(m/s)",
  852. data: []
  853. }
  854. keyArray.forEach((keyEle, keyIndex) => {
  855. res.data.forEach(ele => {
  856. powerChartData[keyIndex].value.push({
  857. text: new Date(ele.time).formatDate("hh:mm"),
  858. value: ele[keyEle]
  859. });
  860. powerChartLineData.data.push(ele.value6);
  861. });
  862. });
  863. that.powerChartData = powerChartData;
  864. that.powerChartLineData = powerChartLineData;
  865. }
  866. });
  867. },
  868. // tab1 - 获取当日报警数据
  869. getWarnData () {
  870. let that = this;
  871. that.API.requestData({
  872. method: "POST",
  873. subUrl: "goodness/bjjllist",
  874. data: {
  875. wtId: that.wtId,
  876. recorddate: that.recorddate
  877. },
  878. success (res) {
  879. res.data.list.forEach(ele => {
  880. ele.warningtime = new Date(ele.warningtime).formatDate("yyyy-MM-dd hh:mm:ss")
  881. });
  882. that.warnTableData.data = res.data.list;
  883. }
  884. });
  885. },
  886. // tab1 - 获取当日故障数据
  887. getStopData () {
  888. let that = this;
  889. that.API.requestData({
  890. method: "POST",
  891. subUrl: "goodness/gzjllist",
  892. data: {
  893. wtId: that.wtId,
  894. recorddate: that.recorddate
  895. },
  896. success (res) {
  897. res.data.list.forEach(ele => {
  898. ele.stopTime = new Date(ele.stopTime).formatDate("yyyy-MM-dd hh:mm:ss");
  899. ele.starttime = (ele.starttime ? new Date(ele.starttime).formatDate("yyyy-MM-dd hh:mm:ss") : "");
  900. });
  901. that.stopTableData.data = res.data.list;
  902. }
  903. });
  904. },
  905. // tab1 - 获取当日限电数据
  906. getXdData () {
  907. let that = this;
  908. that.API.requestData({
  909. method: "POST",
  910. subUrl: "goodness/xdjllist",
  911. data: {
  912. wtId: that.wtId,
  913. recorddate: that.recorddate
  914. },
  915. success (res) {
  916. res.data.list.forEach(ele => {
  917. ele.stopTime = new Date(ele.stopTime).formatDate("yyyy-MM-dd hh:mm:ss");
  918. ele.starttime = (ele.starttime ? new Date(ele.starttime).formatDate("yyyy-MM-dd hh:mm:ss") : "");
  919. });
  920. that.xdTableData.data = res.data.list;
  921. }
  922. });
  923. },
  924. // tab2 - 获取日发电量信息
  925. getDayPowerInfo () {
  926. let that = this;
  927. that.API.requestData({
  928. method: "POST",
  929. subUrl: "goodness/wadAjax",
  930. data: {
  931. wtId: that.wtId,
  932. recorddate: that.recorddate
  933. },
  934. success (res) {
  935. that.dayPowerInfo = res.data;
  936. }
  937. });
  938. },
  939. // tab2 - 获取当月报警排行
  940. getMonthWarnRecord () {
  941. let that = this;
  942. that.API.requestData({
  943. method: "POST",
  944. subUrl: "goodness/bjphlist",
  945. data: {
  946. wtId: that.wtId,
  947. recorddate: that.recorddate
  948. },
  949. success (res) {
  950. that.monthWarnRecordData.data = res.data;
  951. }
  952. });
  953. },
  954. // tab2 - 获取当月报警排行
  955. getPowerLineChartData () {
  956. let that = this;
  957. that.API.requestData({
  958. method: "POST",
  959. subUrl: "goodness/glchat",
  960. data: {
  961. wtId: that.wtId,
  962. recorddate: that.recorddate
  963. },
  964. success (res) {
  965. const keyArray = ["value1", "value2", "value3", "value4"];
  966. let powerLineChartData = [{
  967. title: "风速",
  968. yAxisIndex: 1,
  969. value: []
  970. }, {
  971. title: "实际拟合功率",
  972. yAxisIndex: 0,
  973. value: []
  974. }, {
  975. title: "最优功率",
  976. yAxisIndex: 0,
  977. value: []
  978. }, {
  979. title: "保证功率",
  980. yAxisIndex: 0,
  981. value: []
  982. }];
  983. keyArray.forEach((keyEle, keyIndex) => {
  984. res.data.forEach((ele, index) => {
  985. powerLineChartData[keyIndex].value.push({
  986. text: (index + 1),
  987. value: ele[keyEle]
  988. });
  989. });
  990. });
  991. that.powerLineChartData = powerLineChartData;
  992. }
  993. });
  994. },
  995. // tab2 - 获取当月报警排行
  996. getWindResources () {
  997. let that = this;
  998. that.API.requestData({
  999. method: "POST",
  1000. subUrl: "goodness/fjfzy",
  1001. data: {
  1002. wtId: that.wtId,
  1003. recorddate: that.recorddate
  1004. },
  1005. success (res) {
  1006. that.jfplStr = res.data.jfpl || "";
  1007. let windResourcesData = {
  1008. indicator: [],
  1009. data: [{
  1010. name: "",
  1011. value: []
  1012. }]
  1013. };
  1014. if (res.data.data) {
  1015. res.data.data.forEach((ele) => {
  1016. windResourcesData.indicator.push(ele.name);
  1017. windResourcesData.data[0].value.push(ele.data1);
  1018. });
  1019. }
  1020. that.windResourcesData = windResourcesData;
  1021. }
  1022. });
  1023. },
  1024. // tab3,tab4 - 获取玫瑰图
  1025. getMgt (subUrl, data, dataKey) {
  1026. let that = this;
  1027. that.API.requestData({
  1028. method: "POST",
  1029. subUrl,
  1030. data,
  1031. success (res) {
  1032. that[dataKey.split("Data")[0] + "Str"] = res.data.jfpl || "";
  1033. let mgtData = {
  1034. indicator: [],
  1035. data: [{
  1036. name: "",
  1037. value: []
  1038. }]
  1039. };
  1040. if (res.data.data) {
  1041. res.data.data.forEach((ele) => {
  1042. mgtData.indicator.push(ele.name);
  1043. mgtData.data[0].value.push(ele.data1);
  1044. });
  1045. }
  1046. that[dataKey] = mgtData;
  1047. }
  1048. });
  1049. },
  1050. // tab5 - 获取饼图
  1051. getPieChart (subUrl, type, dataKey) {
  1052. let that = this;
  1053. that.API.requestData({
  1054. method: "POST",
  1055. subUrl,
  1056. data: {
  1057. wtId: that.wtId,
  1058. recorddate: that.recorddate,
  1059. type,
  1060. },
  1061. success (res) {
  1062. let pieChart = [];
  1063. res.data.forEach(ele => {
  1064. pieChart.push({
  1065. name: ele.name,
  1066. value: ele.value2,
  1067. unit: "(m/s)"
  1068. });
  1069. });
  1070. that[dataKey] = pieChart;
  1071. }
  1072. });
  1073. },
  1074. // 切换tab
  1075. tabSelect (index) {
  1076. this.tabIndex = index;
  1077. this.search();
  1078. },
  1079. // 搜索
  1080. search () {
  1081. if (this.tabIndex === 0) {
  1082. this.getLostChartData();
  1083. this.getPowerChartData();
  1084. this.getWarnData();
  1085. this.getStopData();
  1086. this.getXdData();
  1087. } else if (this.tabIndex === 1) {
  1088. this.getWarnData();
  1089. this.getStopData();
  1090. this.getDayPowerInfo();
  1091. this.getMonthWarnRecord();
  1092. this.getPowerLineChartData();
  1093. this.getWindResources();
  1094. } else if (this.tabIndex === 2) {
  1095. const xhrParam = { wpId: this.wpId, recorddate: this.recorddate };
  1096. this.getMgt("goodness/wprzdfs", xhrParam, "rzdfsData");
  1097. this.getMgt("goodness/wpyzdfs", xhrParam, "yzdfsData");
  1098. this.getMgt("goodness/wpnzdfs", xhrParam, "nzdfsData");
  1099. this.getMgt("goodness/wprfxpl", xhrParam, "rfxplData");
  1100. this.getMgt("goodness/wpyfxpl", xhrParam, "yfxplData");
  1101. this.getMgt("goodness/wpnfxpl", xhrParam, "nfxplData");
  1102. } else if (this.tabIndex === 3) {
  1103. const xhrParam = { wtId: this.wtId, recorddate: this.recorddate };
  1104. this.getMgt("goodness/wtrzdfs", xhrParam, "rzdfsData");
  1105. this.getMgt("goodness/wtyzdfs", xhrParam, "yzdfsData");
  1106. this.getMgt("goodness/wtnzdfs", xhrParam, "nzdfsData");
  1107. this.getMgt("goodness/wtrfxpl", xhrParam, "rfxplData");
  1108. this.getMgt("goodness/wtyfxpl", xhrParam, "yfxplData");
  1109. this.getMgt("goodness/wtnfxpl", xhrParam, "nfxplData");
  1110. } else if (this.tabIndex === 4) {
  1111. this.getPieChart("goodness/pieChart", "1", "dayWindPieData");
  1112. this.getPieChart("goodness/pieChart", "2", "monthWindPieData");
  1113. this.getPieChart("goodness/pieChart", "3", "yearWindPieData");
  1114. this.getPieChart("goodness/pieChart", "4", "dayStopPieData");
  1115. this.getPieChart("goodness/pieChart", "5", "monthStopPieData");
  1116. this.getPieChart("goodness/pieChart", "6", "yearStopPieData");
  1117. }
  1118. }
  1119. },
  1120. created () {
  1121. this.getWpArray();
  1122. this.wpId = this.$route.params.wpId || "";
  1123. this.wtId = this.$route.params.wtId || "";
  1124. },
  1125. };
  1126. </script>
  1127. <style lang="less">
  1128. .dj-1 {
  1129. .action-bar {
  1130. display: flex;
  1131. .selections {
  1132. flex: 1 0 auto;
  1133. display: flex;
  1134. .item {
  1135. flex: 0 0 164px;
  1136. text-align: center;
  1137. height: 33px;
  1138. line-height: 33px;
  1139. margin-right: 8px;
  1140. color: @font-color;
  1141. font-size: @fontsize-s;
  1142. background: fade(@gray, 20);
  1143. border: 1px solid fade(@gray, 20);
  1144. &:hover,
  1145. &.active {
  1146. background: fade(@green, 20);
  1147. border: 1px solid @green;
  1148. color: @green;
  1149. cursor: pointer;
  1150. }
  1151. }
  1152. }
  1153. }
  1154. .outline {
  1155. outline: 1px solid fade(@gray, 50);
  1156. }
  1157. .com-panel .panel-header {
  1158. margin-bottom: 0px;
  1159. }
  1160. .table-info {
  1161. display: flex;
  1162. .table-panel {
  1163. flex: 1 0 calc(100% / 3 - 8px);
  1164. outline: 1px solid fade(@gray, 50);
  1165. height: 100%;
  1166. & + .table-panel {
  1167. margin-left: 8px;
  1168. }
  1169. }
  1170. }
  1171. .tab-2 {
  1172. .power-info {
  1173. display: flex;
  1174. flex-wrap: wrap;
  1175. justify-content: space-between;
  1176. &.month-3 {
  1177. .info-item {
  1178. flex: 0 0 calc(100% / 3 - 6px);
  1179. &:nth-child(-n + 5) {
  1180. margin-top: 8px;
  1181. }
  1182. &:nth-child(-n + 3) {
  1183. margin-top: 0px;
  1184. }
  1185. }
  1186. }
  1187. &.month-2 {
  1188. .info-item {
  1189. flex: 0 0 calc(100% / 2 - 4px);
  1190. &:nth-child(-n + 5) {
  1191. margin-top: 8px;
  1192. }
  1193. &:nth-child(-n + 2) {
  1194. margin-top: 0px;
  1195. }
  1196. }
  1197. }
  1198. .info-item {
  1199. display: flex;
  1200. align-items: center;
  1201. flex: 0 0 calc(100% / 5 - 8px);
  1202. background: fade(@gray, 20);
  1203. height: 4.6296vh;
  1204. line-height: 4.6296vh;
  1205. margin-top: 8px;
  1206. &:nth-child(-n + 5) {
  1207. margin-top: 0px;
  1208. }
  1209. .text {
  1210. font-size: 12px;
  1211. flex: 0 0 110px;
  1212. text-align: right;
  1213. margin-right: 24px;
  1214. color: @gray-l;
  1215. }
  1216. .value {
  1217. font-size: 16px;
  1218. }
  1219. }
  1220. }
  1221. .month-info {
  1222. display: flex;
  1223. .month-info-left {
  1224. flex: 0 0 705px;
  1225. margin-right: 10px;
  1226. }
  1227. .month-info-right {
  1228. flex: 1 0 auto;
  1229. }
  1230. }
  1231. .moon-other {
  1232. flex: 1 0 auto;
  1233. }
  1234. .radar-panel {
  1235. height: 20.5vh;
  1236. .panel-body {
  1237. height: 100%;
  1238. }
  1239. }
  1240. .wind-info {
  1241. display: flex;
  1242. .legend {
  1243. font-size: 12px;
  1244. flex: 0 0 140px;
  1245. height: 20px;
  1246. display: flex;
  1247. align-items: center;
  1248. justify-content: center;
  1249. margin-top: 32px;
  1250. margin-bottom: 16px;
  1251. .dot {
  1252. width: 7px;
  1253. height: 7px;
  1254. background: @green;
  1255. display: inline-block;
  1256. margin-right: 8px;
  1257. }
  1258. }
  1259. }
  1260. }
  1261. .tab-3,
  1262. .tab-4 {
  1263. .wind-info {
  1264. position: relative;
  1265. .legend {
  1266. position: absolute;
  1267. left: 32px;
  1268. top: 32px;
  1269. font-size: 12px;
  1270. flex: 0 0 140px;
  1271. height: 20px;
  1272. display: flex;
  1273. align-items: center;
  1274. justify-content: center;
  1275. margin-top: 32px;
  1276. margin-bottom: 16px;
  1277. .dot {
  1278. width: 7px;
  1279. height: 7px;
  1280. background: @green;
  1281. display: inline-block;
  1282. margin-right: 8px;
  1283. }
  1284. }
  1285. }
  1286. }
  1287. .tab-5 {
  1288. .panel-body {
  1289. padding: 16px;
  1290. }
  1291. }
  1292. }
  1293. </style>