windDetailDialog.vue 59 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039
  1. <template>
  2. <div class="windDetail" :class="$store.state.isLeft ? 'windDetailWidth' : ''">
  3. <div class="action-bar">
  4. <div class="selections">
  5. <div
  6. class="selections_btn"
  7. @click="tabSelect(0)"
  8. :class="{ active: tabIndex == 0 }"
  9. >
  10. 风机运行情况信息
  11. </div>
  12. <div
  13. class="selections_btn"
  14. @click="tabSelect(1)"
  15. :class="{ active: tabIndex == 1 }"
  16. >
  17. 风机日详细信息
  18. </div>
  19. <div
  20. class="selections_btn"
  21. @click="tabSelect(2)"
  22. :class="{ active: tabIndex == 2 }"
  23. >
  24. 测风塔玫瑰图
  25. </div>
  26. <div
  27. class="selections_btn"
  28. @click="tabSelect(3)"
  29. :class="{ active: tabIndex == 3 }"
  30. >
  31. 风机玫瑰图
  32. </div>
  33. <div
  34. class="selections_btn"
  35. @click="tabSelect(4)"
  36. :class="{ active: tabIndex == 4 }"
  37. >
  38. 风机切入切出分析
  39. </div>
  40. </div>
  41. <div class="windDetailseach">
  42. <div class="query-items">
  43. <div class="query-item">
  44. <div class="label">{{ tabIndex != 2 ? "风场:" : "测风塔:" }}</div>
  45. <el-select
  46. v-model="wpId"
  47. clearable
  48. placeholder="请选择"
  49. @change="changeStationsVal"
  50. >
  51. <el-option
  52. v-for="item in tabIndex != 2 ? wpArray : cftlist"
  53. :key="item.id"
  54. :value="item.id"
  55. :label="item.name"
  56. />
  57. </el-select>
  58. </div>
  59. <div class="query-item" v-if="tabIndex != 2">
  60. <div class="label">风机:</div>
  61. <el-select
  62. v-model="wtId"
  63. clearable
  64. placeholder="请选择"
  65. popper-class="select"
  66. >
  67. <el-option
  68. v-for="item in wtArray"
  69. :key="item.id"
  70. :value="item.id"
  71. :label="item.name"
  72. />
  73. </el-select>
  74. </div>
  75. <!-- <div class="query-item">
  76. <div class="label">风场:</div>
  77. <el-select
  78. v-model="wpId"
  79. clearable
  80. placeholder="请选择"
  81. @change="changeStationsVal"
  82. >
  83. <el-option
  84. v-for="item in wpArray"
  85. :key="item.id"
  86. :value="item.id"
  87. :label="item.name"
  88. />
  89. </el-select>
  90. </div>
  91. <div class="query-item">
  92. <div class="label">风机:</div>
  93. <el-select
  94. v-model="wtId"
  95. clearable
  96. placeholder="请选择"
  97. popper-class="select"
  98. >
  99. <el-option
  100. v-for="item in wtArray"
  101. :key="item.id"
  102. :value="item.id"
  103. :label="item.aname"
  104. />
  105. </el-select>
  106. </div> -->
  107. <div class="query-item">
  108. <div class="label">日期:</div>
  109. <el-date-picker
  110. v-model="recorddate"
  111. type="date"
  112. value-format="YYYY-MM-DD"
  113. placeholder="选择日期"
  114. size="mini"
  115. popper-class="date-select"
  116. >
  117. </el-date-picker>
  118. </div>
  119. </div>
  120. <div class="query-actions">
  121. <el-button class="seach" size="mini" @click="search">搜索</el-button>
  122. </div>
  123. </div>
  124. </div>
  125. <!-- tab1 -->
  126. <div v-if="tabIndex == 0" class="TabOne tabs">
  127. <panel :title="'损失电量分析'" class="TabOne_topChart">
  128. <area-line-chart
  129. :height="'100%'"
  130. :lineData="lostChartData"
  131. :units="lostChartUnit"
  132. :areaData="LostChartBgColorData"
  133. @areaClick="areaBarChartClick"
  134. :showLegend="true"
  135. />
  136. </panel>
  137. <panel :title="'电量'" class="TabOne_centerChart">
  138. <multiple-bar-line-chart
  139. :height="'100%'"
  140. :barData="powerChartData"
  141. :lineData="powerChartLineData"
  142. :units="['(kWh)', '(m/s)']"
  143. :showLegend="true"
  144. />
  145. </panel>
  146. <div class="table-info">
  147. <panel class="table-panel" :title="'当日报警记录'" :showLine="false">
  148. <Table :data="warnTableData" :canScroll="true" :height="'100%'" />
  149. </panel>
  150. <panel class="table-panel" :title="'当日故障记录'" :showLine="false">
  151. <Table :data="stopTableData" :canScroll="true" :height="'100%'" />
  152. </panel>
  153. <panel class="table-panel" :title="'当日限电记录'" :showLine="false">
  154. <Table :data="xdTableData" :canScroll="true" :height="'100%'" />
  155. </panel>
  156. </div>
  157. </div>
  158. <!-- tab2 -->
  159. <div v-if="tabIndex == 1" class="tab-2 tabs">
  160. <el-row style="height: 100%">
  161. <el-col style="height: 100%; padding-right: 10px" :span="15">
  162. <panel :title="'功率曲线'" style="height: 270px; margin-bottom: 10px">
  163. <marker-line-chart
  164. :height="'100%'"
  165. :list="powerLineChartData"
  166. :units="['(MW)', '(功率)']"
  167. :showLegend="true"
  168. />
  169. </panel>
  170. <panel
  171. :title="'日发电量信息'"
  172. style="height: 297px; margin-bottom: 10px"
  173. :showLine="false"
  174. >
  175. <div class="power-info">
  176. <div class="info-item">
  177. <div class="text">发电量:</div>
  178. <div class="value green">{{ dayPowerInfo.rfdl }}</div>
  179. </div>
  180. <div class="info-item">
  181. <div class="text">理论发电量:</div>
  182. <div class="value green">{{ dayPowerInfo.ryfdl }}</div>
  183. </div>
  184. <div class="info-item">
  185. <div class="text">平均功率:</div>
  186. <div class="value green">{{ dayPowerInfo.rpjgl }}</div>
  187. </div>
  188. <div class="info-item">
  189. <div class="text">平均风速:</div>
  190. <div class="value green">{{ dayPowerInfo.rpjfs }}</div>
  191. </div>
  192. <div class="info-item">
  193. <div class="text">拟合优度:</div>
  194. <div class="value green">{{ dayPowerInfo.rnhyd }}</div>
  195. </div>
  196. <div class="info-item">
  197. <div class="text">运行小时:</div>
  198. <div class="value green">{{ dayPowerInfo.ryxxs }}</div>
  199. </div>
  200. <div class="info-item">
  201. <div class="text">停机小时:</div>
  202. <div class="value green">
  203. {{ Number(dayPowerInfo.rgzxs) + Number(dayPowerInfo.rjxxs) }}
  204. </div>
  205. </div>
  206. <div class="info-item">
  207. <div class="text">故障小时:</div>
  208. <div class="value green">{{ dayPowerInfo.rgzxs }}</div>
  209. </div>
  210. <div class="info-item">
  211. <div class="text">维护小时:</div>
  212. <div class="value green">{{ dayPowerInfo.rjxxs }}</div>
  213. </div>
  214. <div class="info-item">
  215. <div class="text">中断小时:</div>
  216. <div class="value green">{{ dayPowerInfo.rzdxs }}</div>
  217. </div>
  218. <div class="info-item">
  219. <div class="text">有效风时数:</div>
  220. <div class="value green">{{ dayPowerInfo.ryxfs }}</div>
  221. </div>
  222. <div class="info-item">
  223. <div class="text">损失电量:</div>
  224. <div class="value green">{{ dayPowerInfo.rssdl }}</div>
  225. </div>
  226. <div class="info-item">
  227. <div class="text">报警次数:</div>
  228. <div class="value green">{{ dayPowerInfo.rbjcs }}</div>
  229. </div>
  230. <div class="info-item">
  231. <div class="text">停机次数:</div>
  232. <div class="value green">{{ dayPowerInfo.rtjcs }}</div>
  233. </div>
  234. <div class="info-item">
  235. <div class="text">不饱和次数:</div>
  236. <div class="value green">{{ dayPowerInfo.rbbhcs }}</div>
  237. </div>
  238. <div class="info-item">
  239. <div class="text">设备可利用率:</div>
  240. <div class="value green">{{ dayPowerInfo.rsbklyl }}</div>
  241. </div>
  242. <div class="info-item">
  243. <div class="text">实际/保证偏差率:</div>
  244. <div class="value green">{{ dayPowerInfo.rsjbz }}</div>
  245. </div>
  246. <div class="info-item">
  247. <div class="text">平均温度:</div>
  248. <div class="value green">{{ dayPowerInfo.rpjwd }}</div>
  249. </div>
  250. <div class="info-item">
  251. <div class="text">平均湿度:</div>
  252. <div class="value green">{{ dayPowerInfo.rpjsd }}</div>
  253. </div>
  254. <div class="info-item">
  255. <div class="text">平均压强:</div>
  256. <div class="value green">{{ dayPowerInfo.rpjyq }}</div>
  257. </div>
  258. </div>
  259. </panel>
  260. <div class="month-info">
  261. <div class="month-info-left">
  262. <panel
  263. :title="'月发电量信息'"
  264. style="height: 100%"
  265. :showLine="false"
  266. >
  267. <div class="power-info month-3">
  268. <div class="info-item">
  269. <div class="text">月发电量:</div>
  270. <div class="value green">{{ dayPowerInfo.yfdl }}</div>
  271. </div>
  272. <div class="info-item">
  273. <div class="text">月理论发电量:</div>
  274. <div class="value green">{{ dayPowerInfo.yyfdl }}</div>
  275. </div>
  276. <div class="info-item">
  277. <div class="text">月平均功率:</div>
  278. <div class="value green">{{ dayPowerInfo.ypjgl }}</div>
  279. </div>
  280. <div class="info-item">
  281. <div class="text">月平均风速:</div>
  282. <div class="value green">{{ dayPowerInfo.ypjfs }}</div>
  283. </div>
  284. <div class="info-item">
  285. <div class="text">月拟合优度:</div>
  286. <div class="value green">{{ dayPowerInfo.ynhyd }}</div>
  287. </div>
  288. <div class="info-item">
  289. <div class="text">月运行小时:</div>
  290. <div class="value green">{{ dayPowerInfo.yyxxs }}</div>
  291. </div>
  292. <div class="info-item">
  293. <div class="text">月停机小时:</div>
  294. <div class="value green">
  295. {{
  296. Number(dayPowerInfo.ygzxs) + Number(dayPowerInfo.yjxxs)
  297. }}
  298. </div>
  299. </div>
  300. <div class="info-item">
  301. <div class="text">月故障小时:</div>
  302. <div class="value green">{{ dayPowerInfo.ygzxs }}</div>
  303. </div>
  304. <div class="info-item">
  305. <div class="text">月维护小时:</div>
  306. <div class="value green">{{ dayPowerInfo.yjxxs }}</div>
  307. </div>
  308. <div class="info-item">
  309. <div class="text">月中断小时:</div>
  310. <div class="value green">{{ dayPowerInfo.yzdxs }}</div>
  311. </div>
  312. <div class="info-item">
  313. <div class="text">月有效风时数:</div>
  314. <div class="value green">{{ dayPowerInfo.yyxfs }}</div>
  315. </div>
  316. <div class="info-item">
  317. <div class="text">月报警次数:</div>
  318. <div class="value green">{{ dayPowerInfo.ybjcs }}</div>
  319. </div>
  320. <div class="info-item">
  321. <div class="text">月停机次数:</div>
  322. <div class="value green">{{ dayPowerInfo.ytjcs }}</div>
  323. </div>
  324. <div class="info-item">
  325. <div class="text">月实际/保证:</div>
  326. <div class="value green">{{ dayPowerInfo.ysjbz }}</div>
  327. </div>
  328. <div class="info-item">
  329. <div class="text">设备可利用率:</div>
  330. <div class="value green">{{ dayPowerInfo.ysbklyl }}</div>
  331. </div>
  332. </div>
  333. </panel>
  334. </div>
  335. <div class="month-info-right">
  336. <panel
  337. :title="'年发电量信息'"
  338. style="height: calc(100% - 220px - 10px)"
  339. :showLine="false"
  340. >
  341. <div class="power-info month-2">
  342. <div class="info-item">
  343. <div class="text">年发电量:</div>
  344. <div class="value green">{{ dayPowerInfo.nfdl }}</div>
  345. </div>
  346. <div class="info-item">
  347. <div class="text">年拟合优度:</div>
  348. <div class="value green">{{ dayPowerInfo.nnhyd }}</div>
  349. </div>
  350. </div>
  351. </panel>
  352. <panel
  353. :title="'风资源'"
  354. class="radar-panel"
  355. :icon="'svg-wind-site'"
  356. >
  357. <div class="wind-info">
  358. <div class="legend mg-r-16" v-if="jfplStr.length">
  359. <span class="dot"></span>
  360. <span style="color: #fff; white-space: nowrap">{{
  361. jfplStr
  362. }}</span>
  363. </div>
  364. <direction-radar-chart
  365. :width="'80%'"
  366. :height="'100%'"
  367. :series="windResourcesData"
  368. :showLegend="true"
  369. />
  370. </div>
  371. </panel>
  372. </div>
  373. </div>
  374. </el-col>
  375. <el-col :span="9" style="height: 100%">
  376. <panel
  377. class="table-panel outline"
  378. :title="'当日报警记录'"
  379. :showLine="false"
  380. >
  381. <Table :data="warnTableData" :canScroll="true" :height="'23vh'" />
  382. </panel>
  383. <panel
  384. class="table-panel outline"
  385. :title="'当日故障记录'"
  386. :showLine="false"
  387. >
  388. <Table :data="stopTableData" :canScroll="true" :height="'23vh'" />
  389. </panel>
  390. <panel
  391. class="table-panel outline"
  392. :title="'当月报警排行'"
  393. :showLine="false"
  394. >
  395. <Table
  396. :data="monthWarnRecordData"
  397. :canScroll="true"
  398. :height="'23vh'"
  399. />
  400. </panel>
  401. </el-col>
  402. </el-row>
  403. </div>
  404. <!-- tab3 -->
  405. <div v-if="tabIndex == 2" class="tab-3 tabs">
  406. <el-row style="height: calc((100% - 10px) / 2); margin-bottom: 10px">
  407. <el-col :span="8" class="tabColSty">
  408. <panel
  409. :title="'日最大风速'"
  410. class="radar-panel"
  411. :icon="'svg-wind-site'"
  412. >
  413. <div class="wind-info">
  414. <div class="legend">
  415. <span class="dot"></span>
  416. <span class="titSty">{{ rzdfsStr }}</span>
  417. </div>
  418. <!-- <radar-chart
  419. :width="'100%'"
  420. :height="'350px'"
  421. :value="rzdfsData"
  422. title="日最大风速"
  423. /> -->
  424. <rander-new-chart
  425. width="100%"
  426. height="100%"
  427. :lenged="rzdfsLen"
  428. :xAxis="rzdfsxaisx"
  429. :series="rzdfsData"
  430. :isRadar="false"
  431. />
  432. </div>
  433. </panel>
  434. </el-col>
  435. <el-col :span="8" class="tabColSty">
  436. <panel
  437. :title="'月最大风速'"
  438. class="radar-panel"
  439. :icon="'svg-wind-site'"
  440. >
  441. <div class="wind-info">
  442. <div class="legend">
  443. <span class="dot"></span>
  444. <span class="titSty">{{ yzdfsStr }}</span>
  445. </div>
  446. <!-- <radar-chart
  447. :width="'100%'"
  448. :height="'350px'"
  449. :value="yzdfsData"
  450. title="月最大风速"
  451. /> -->
  452. <rander-new-chart
  453. width="100%"
  454. height="100%"
  455. :lenged="yzdfsLen"
  456. :xAxis="yzdfsxaisx"
  457. :series="yzdfsData"
  458. :isRadar="false"
  459. />
  460. </div>
  461. </panel>
  462. </el-col>
  463. <el-col :span="8" class="tabColSty">
  464. <panel
  465. :title="'年最大风速'"
  466. class="radar-panel"
  467. :icon="'svg-wind-site'"
  468. >
  469. <div class="wind-info">
  470. <div class="legend">
  471. <span class="dot"></span>
  472. <span class="titSty">{{ nzdfsStr }}</span>
  473. </div>
  474. <!-- <radar-chart
  475. :width="'100%'"
  476. :height="'350px'"
  477. :value="nzdfsData"
  478. title="年最大风速"
  479. /> -->
  480. <rander-new-chart
  481. width="100%"
  482. height="100%"
  483. :lenged="nzdfsLen"
  484. :xAxis="nzdfsxaisx"
  485. :series="nzdfsData"
  486. :isRadar="false"
  487. />
  488. </div>
  489. </panel>
  490. </el-col>
  491. </el-row>
  492. <el-row style="height: calc((100% - 10px) / 2)">
  493. <el-col :span="8" class="tabColSty">
  494. <panel
  495. :title="'日风向频率'"
  496. class="radar-panel"
  497. :icon="'svg-wind-site'"
  498. >
  499. <div class="wind-info">
  500. <div class="legend">
  501. <span class="dot"></span>
  502. <span class="titSty">{{ rfxplStr }}</span>
  503. </div>
  504. <!-- <radar-chart
  505. :width="'100%'"
  506. :height="'350px'"
  507. :value="rfxplData"
  508. title="日风向频率"
  509. /> -->
  510. <rander-new-chart
  511. width="100%"
  512. height="100%"
  513. :lenged="rfxplLen"
  514. :xAxis="rfxplxaisx"
  515. :series="rfxplData"
  516. :isRadar="false"
  517. />
  518. </div>
  519. </panel>
  520. </el-col>
  521. <el-col :span="8" class="tabColSty">
  522. <panel
  523. :title="'月风向频率'"
  524. class="radar-panel"
  525. :icon="'svg-wind-site'"
  526. >
  527. <div class="wind-info">
  528. <div class="legend">
  529. <span class="dot"></span>
  530. <span class="titSty">{{ yfxplStr }}</span>
  531. </div>
  532. <!-- <radar-chart
  533. :width="'100%'"
  534. :height="'350px'"
  535. :value="yfxplData"
  536. title="月风向频率"
  537. /> -->
  538. <rander-new-chart
  539. width="100%"
  540. height="100%"
  541. :lenged="yfxplLen"
  542. :xAxis="yfxplxaisx"
  543. :series="yfxplData"
  544. :isRadar="false"
  545. />
  546. </div>
  547. </panel>
  548. </el-col>
  549. <el-col :span="8" class="tabColSty">
  550. <panel
  551. :title="'年风向频率'"
  552. class="radar-panel"
  553. :icon="'svg-wind-site'"
  554. >
  555. <div class="wind-info">
  556. <div class="legend">
  557. <span class="dot"></span>
  558. <span class="titSty">{{ nfxplStr }}</span>
  559. </div>
  560. <!-- <radar-chart
  561. :width="'100%'"
  562. :height="'350px'"
  563. :value="nfxplData"
  564. title="年风向频率"
  565. /> -->
  566. <rander-new-chart
  567. width="100%"
  568. height="100%"
  569. :lenged="nfxplLen"
  570. :xAxis="nfxplxaisx"
  571. :series="nfxplData"
  572. :isRadar="false"
  573. />
  574. </div>
  575. </panel>
  576. </el-col>
  577. </el-row>
  578. </div>
  579. <!-- tab4 -->
  580. <div v-if="tabIndex == 3" class="tab-4 tabs">
  581. <el-row style="height: calc((100% - 10px) / 2); margin-bottom: 10px">
  582. <el-col :span="8" class="tabColSty">
  583. <panel
  584. :title="'日最大风速'"
  585. class="radar-panel"
  586. :icon="'svg-wind-site'"
  587. >
  588. <div class="wind-info">
  589. <div class="legend mg-r-16">
  590. <span class="dot"></span>
  591. <span class="titSty">{{ rzdfsStr }}</span>
  592. </div>
  593. <!-- <radar-chart
  594. :width="'100%'"
  595. :height="'350px'"
  596. :value="rzdfsData"
  597. title="日最大风速"
  598. /> -->
  599. <rander-new-chart
  600. width="100%"
  601. height="100%"
  602. :lenged="rzdfsLen"
  603. :xAxis="rzdfsxaisx"
  604. :series="rzdfsData"
  605. :isRadar="false"
  606. />
  607. </div>
  608. </panel>
  609. </el-col>
  610. <el-col :span="8" class="tabColSty">
  611. <panel
  612. :title="'月最大风速'"
  613. class="radar-panel"
  614. :icon="'svg-wind-site'"
  615. >
  616. <div class="wind-info">
  617. <div class="legend mg-r-16">
  618. <span class="dot"></span>
  619. <span class="titSty">{{ yzdfsStr }}</span>
  620. </div>
  621. <!-- <radar-chart
  622. :width="'100%'"
  623. :height="'350px'"
  624. :value="yzdfsData"
  625. title="月最大风速"
  626. /> -->
  627. <rander-new-chart
  628. width="100%"
  629. height="100%"
  630. :lenged="yzdfsLen"
  631. :xAxis="yzdfsxaisx"
  632. :series="yzdfsData"
  633. :isRadar="false"
  634. />
  635. </div>
  636. </panel>
  637. </el-col>
  638. <el-col :span="8" class="tabColSty">
  639. <panel
  640. :title="'年最大风速'"
  641. class="radar-panel"
  642. :icon="'svg-wind-site'"
  643. >
  644. <div class="wind-info">
  645. <div class="legend mg-r-16">
  646. <span class="dot"></span>
  647. <span class="titSty">{{ nzdfsStr }}</span>
  648. </div>
  649. <!-- <radar-chart
  650. :width="'100%'"
  651. :height="'350px'"
  652. :value="nzdfsData"
  653. title="年最大风速"
  654. /> -->
  655. <rander-new-chart
  656. width="100%"
  657. height="100%"
  658. :lenged="nzdfsLen"
  659. :xAxis="nzdfsxaisx"
  660. :series="nzdfsData"
  661. :isRadar="false"
  662. />
  663. </div>
  664. </panel>
  665. </el-col>
  666. </el-row>
  667. <el-row style="height: calc((100% - 10px) / 2)">
  668. <el-col :span="8" class="tabColSty">
  669. <panel
  670. :title="'日风向频率'"
  671. class="radar-panel"
  672. :icon="'svg-wind-site'"
  673. >
  674. <div class="wind-info">
  675. <div class="legend">
  676. <span class="dot"></span>
  677. <span class="titSty">{{ rfxplStr }}</span>
  678. </div>
  679. <!-- <radar-chart
  680. :width="'100%'"
  681. :height="'350px'"
  682. :value="rfxplData"
  683. title="日风向频率"
  684. /> -->
  685. <rander-new-chart
  686. width="100%"
  687. height="100%"
  688. :lenged="rfxplLen"
  689. :xAxis="rfxplxaisx"
  690. :series="rfxplData"
  691. :isRadar="false"
  692. />
  693. </div>
  694. </panel>
  695. </el-col>
  696. <el-col :span="8" class="tabColSty">
  697. <panel
  698. :title="'月风向频率'"
  699. class="radar-panel"
  700. :icon="'svg-wind-site'"
  701. >
  702. <div class="wind-info">
  703. <div class="legend">
  704. <span class="dot"></span>
  705. <span class="titSty">{{ yfxplStr }}</span>
  706. </div>
  707. <!-- <radar-chart
  708. :width="'100%'"
  709. :height="'350px'"
  710. :value="yfxplData"
  711. title="月风向频率"
  712. /> -->
  713. <rander-new-chart
  714. width="100%"
  715. height="100%"
  716. :lenged="yfxplLen"
  717. :xAxis="yfxplxaisx"
  718. :series="yfxplData"
  719. :isRadar="false"
  720. />
  721. </div>
  722. </panel>
  723. </el-col>
  724. <el-col :span="8" class="tabColSty">
  725. <panel
  726. :title="'年风向频率'"
  727. class="radar-panel"
  728. :icon="'svg-wind-site'"
  729. >
  730. <div class="wind-info">
  731. <div class="legend">
  732. <span class="dot"></span>
  733. <span class="titSty">{{ nfxplStr }}</span>
  734. </div>
  735. <!-- <radar-chart
  736. :width="'100%'"
  737. :height="'350px'"
  738. :value="nfxplData"
  739. title="年风向频率"
  740. /> -->
  741. <rander-new-chart
  742. width="100%"
  743. height="100%"
  744. :lenged="nfxplLen"
  745. :xAxis="nfxplxaisx"
  746. :series="nfxplData"
  747. :isRadar="false"
  748. />
  749. </div>
  750. </panel>
  751. </el-col>
  752. </el-row>
  753. </div>
  754. <!-- tab5 -->
  755. <div v-if="tabIndex == 4" class="tab-5 tabs">
  756. <el-row style="height: calc((100% - 10px) / 2); margin-bottom: 10px">
  757. <el-col :span="8">
  758. <panel title="日小风切入">
  759. <dual-pie-chart
  760. width="100%"
  761. height="350px"
  762. title="日切入频率分析"
  763. :series="dayWindPieData"
  764. />
  765. </panel>
  766. </el-col>
  767. <el-col :span="8">
  768. <panel title="月小风切入">
  769. <dual-pie-chart
  770. width="100%"
  771. height="350px"
  772. title="月切入频率分析"
  773. :series="monthWindPieData"
  774. />
  775. </panel>
  776. </el-col>
  777. <el-col :span="8">
  778. <panel title="年小风切入">
  779. <dual-pie-chart
  780. width="100%"
  781. height="350px"
  782. title="年切入频率分析"
  783. :series="yearWindPieData"
  784. />
  785. </panel>
  786. </el-col>
  787. </el-row>
  788. <el-row style="height: calc((100% - 10px) / 2)">
  789. <el-col :span="8">
  790. <panel title="日小风切出">
  791. <dual-pie-chart
  792. width="100%"
  793. height="350px"
  794. title="日切出频率分析"
  795. :series="dayStopPieData"
  796. />
  797. </panel>
  798. </el-col>
  799. <el-col :span="8">
  800. <panel title="月小风切出">
  801. <dual-pie-chart
  802. width="100%"
  803. height="350px"
  804. title="月切出频率分析"
  805. :series="monthStopPieData"
  806. />
  807. </panel>
  808. </el-col>
  809. <el-col :span="8">
  810. <panel title="年小风切出">
  811. <dual-pie-chart
  812. width="100%"
  813. height="350px"
  814. title="年切出频率分析"
  815. :series="yearStopPieData"
  816. />
  817. </panel>
  818. </el-col>
  819. </el-row>
  820. </div>
  821. <el-dialog
  822. v-model="dialogShow"
  823. width="85%"
  824. top="120px"
  825. :close-on-click-modal="true"
  826. >
  827. <template #title>
  828. <div class="dialog-title">
  829. <div class="title">区域详情查看</div>
  830. </div>
  831. </template>
  832. <el-form ref="form" label-width="100px" inline>
  833. <el-form-item style="width: 32%" label="开始时间:">{{
  834. form.ks
  835. }}</el-form-item>
  836. <el-form-item style="width: 32%" label="结束时间:">{{
  837. form.js
  838. }}</el-form-item>
  839. <el-form-item style="width: 32%" label="时长:"
  840. >{{ form.sc }}(小时)</el-form-item
  841. >
  842. <el-form-item style="width: 32%" label="风速:"
  843. >{{ form.fs }}(m/s)</el-form-item
  844. >
  845. <el-form-item style="width: 32%" label="功率:"
  846. >{{ form.gl }}(KW)</el-form-item
  847. >
  848. <el-form-item style="width: 32%" label="理论发电量:"
  849. >{{ form.llfdl }}(KWh)</el-form-item
  850. >
  851. <el-form-item style="width: 32%" label="发电量:"
  852. >{{ form.fdl }}(KWh)</el-form-item
  853. >
  854. <el-form-item style="width: 32%" label="损失电量:"
  855. >{{ form.ssdl }}(KWh)</el-form-item
  856. >
  857. <el-form-item style="width: 32%" label="风机状态:">{{
  858. form.fjzt
  859. }}</el-form-item>
  860. </el-form>
  861. </el-dialog>
  862. </div>
  863. </template>
  864. <script>
  865. import AreaLineChart from "@/components/chart/combination/area-line-chart.vue";
  866. import MultipleBarLineChart from "@/components/chart/combination/multiple-bar-line-chart.vue";
  867. import MarkerLineChart from "@/components/chart/line/multiple-line-chart.vue";
  868. import DualPieChart from "@/components/chart/pie/dual-pie-chart.vue";
  869. import DirectionRadarChart from "@/components/chart/radar/direction-radar-chart.vue";
  870. import RadarChart from "@/components/chart/radar/radar-chart.vue";
  871. import panel from "@/components/coms/panel/panel.vue";
  872. import Table from "@/components/coms/table/table.vue";
  873. import randerNewChart from "./raderswithhart.vue";
  874. import {
  875. getApifindWtRealPowerChar,
  876. getApigetplotBands,
  877. getApiplotBandAjax,
  878. getApifindRealPowerCharBy24,
  879. getApibjjllist,
  880. getApigzjllist,
  881. getApixdjllist,
  882. getApiwadAjax,
  883. getApibjphlist,
  884. getApiglchat,
  885. getApifjfzy,
  886. getApiequipmentList,
  887. getApiWeatherstation,
  888. getApiComMGTWP,
  889. getApiComMGTWT,
  890. getApiComPie,
  891. } from "@/api/monthlyPerformanceAnalysis";
  892. import * as echarts from "echarts";
  893. export default {
  894. components: {
  895. panel,
  896. AreaLineChart,
  897. MultipleBarLineChart,
  898. Table,
  899. MarkerLineChart,
  900. DirectionRadarChart,
  901. DualPieChart,
  902. RadarChart,
  903. randerNewChart,
  904. },
  905. props: {
  906. wpArray: {
  907. type: Array,
  908. default: () => [],
  909. },
  910. },
  911. data() {
  912. return {
  913. tabIndex: 0,
  914. tableData: {
  915. column: [
  916. {
  917. name: "风机",
  918. field: "name",
  919. is_num: false,
  920. is_light: false,
  921. },
  922. {
  923. name: "描述",
  924. field: "desc",
  925. is_num: false,
  926. is_light: false,
  927. },
  928. {
  929. name: "报警时间",
  930. field: "date",
  931. is_num: false,
  932. is_light: false,
  933. },
  934. ],
  935. data: [],
  936. },
  937. wpId: "",
  938. wtArray: [],
  939. wtId: "",
  940. recorddate: "",
  941. lostChartData: [
  942. {
  943. text: "",
  944. value: [],
  945. },
  946. ],
  947. lostChartUnit: [],
  948. LostChartBgColorData: [
  949. // {
  950. // name: "",
  951. // },
  952. ],
  953. powerChartData: [],
  954. powerChartLineData: {},
  955. warnTableData: {
  956. column: [
  957. {
  958. name: "风机",
  959. field: "windturbineid",
  960. is_num: false,
  961. is_light: false,
  962. },
  963. {
  964. name: "描述",
  965. field: "warnDesc",
  966. is_num: false,
  967. is_light: false,
  968. },
  969. {
  970. name: "报警时间",
  971. field: "warningtime",
  972. is_num: false,
  973. is_light: false,
  974. },
  975. ],
  976. data: [],
  977. },
  978. stopTableData: {
  979. column: [
  980. {
  981. name: "风机",
  982. field: "windTurbineId",
  983. is_num: false,
  984. is_light: false,
  985. },
  986. {
  987. name: "停机时间",
  988. field: "stopTime",
  989. is_num: false,
  990. is_light: false,
  991. },
  992. {
  993. name: "恢复时间",
  994. field: "starttime",
  995. is_num: false,
  996. is_light: false,
  997. },
  998. ],
  999. data: [],
  1000. },
  1001. xdTableData: {
  1002. column: [
  1003. {
  1004. name: "风机",
  1005. field: "windturbineid",
  1006. is_num: false,
  1007. is_light: false,
  1008. },
  1009. {
  1010. name: "停机时间",
  1011. field: "stoptime",
  1012. is_num: false,
  1013. is_light: false,
  1014. },
  1015. {
  1016. name: "恢复时间",
  1017. field: "starttime",
  1018. is_num: false,
  1019. is_light: false,
  1020. },
  1021. {
  1022. name: "损失电量",
  1023. field: "losspower",
  1024. is_num: false,
  1025. is_light: false,
  1026. },
  1027. {
  1028. name: "限电时长",
  1029. field: "stophours",
  1030. is_num: false,
  1031. is_light: false,
  1032. },
  1033. ],
  1034. data: [],
  1035. },
  1036. powerLineChartData: [
  1037. {
  1038. title: "",
  1039. yAxisIndex: 0,
  1040. value: [],
  1041. },
  1042. ],
  1043. dayPowerInfo: {},
  1044. monthWarnRecordData: {
  1045. column: [
  1046. {
  1047. name: "名字",
  1048. field: "name",
  1049. is_num: false,
  1050. is_light: false,
  1051. },
  1052. {
  1053. name: "次数",
  1054. field: "frequency",
  1055. is_num: true,
  1056. is_light: false,
  1057. },
  1058. ],
  1059. data: [],
  1060. },
  1061. jfplStr: "",
  1062. windResourcesData: {},
  1063. rzdfsStr: "",
  1064. rzdfsLen: [],
  1065. rzdfsData: [],
  1066. rzdfsxaisx: {
  1067. type: "category",
  1068. boundaryGap: false,
  1069. data: [],
  1070. splitLine: {
  1071. show: true,
  1072. },
  1073. },
  1074. yzdfsStr: "",
  1075. yzdfslen: [],
  1076. yzdfsData: [],
  1077. yzdfsxaisx: {
  1078. type: "category",
  1079. boundaryGap: false,
  1080. data: [],
  1081. splitLine: {
  1082. show: true,
  1083. },
  1084. },
  1085. nzdfsStr: "",
  1086. nzdfsLen: [],
  1087. nzdfsData: [],
  1088. nzdfsxaisx: {
  1089. type: "category",
  1090. boundaryGap: false,
  1091. data: [],
  1092. splitLine: {
  1093. show: true,
  1094. },
  1095. },
  1096. rfxplStr: "",
  1097. rfxplLen: [],
  1098. rfxplData: [],
  1099. rfxplxaisx: {
  1100. type: "category",
  1101. boundaryGap: false,
  1102. data: [],
  1103. splitLine: {
  1104. show: true,
  1105. },
  1106. },
  1107. yfxplStr: "",
  1108. yfxplLen: [],
  1109. yfxplData: [],
  1110. yfxplxaisx: {
  1111. type: "category",
  1112. boundaryGap: false,
  1113. data: [],
  1114. splitLine: {
  1115. show: true,
  1116. },
  1117. },
  1118. nfxplStr: "",
  1119. nfxplLen: [],
  1120. nfxplData: [],
  1121. nfxplxaisx: {
  1122. type: "category",
  1123. boundaryGap: false,
  1124. data: [],
  1125. splitLine: {
  1126. show: true,
  1127. },
  1128. },
  1129. dayWindPieData: [],
  1130. monthWindPieData: [],
  1131. yearWindPieData: [],
  1132. dayStopPieData: [],
  1133. monthStopPieData: [],
  1134. yearStopPieData: [],
  1135. dialogShow: false,
  1136. form: {},
  1137. hisWpid: "",
  1138. hisSubid: "",
  1139. hisWtid: "",
  1140. };
  1141. },
  1142. computed: {
  1143. cftlist() {
  1144. return this.$store.state.cftList;
  1145. },
  1146. },
  1147. methods: {
  1148. init(row) {
  1149. this.wpId = row.windtpowerstationId;
  1150. // this.wtId = row.windturbineId.substring(row.windturbineId.indexOf('_F'))
  1151. this.wtId = row.windturbineId;
  1152. this.tabIndex = 0;
  1153. this.getWindData();
  1154. this.search();
  1155. },
  1156. // 切换风场
  1157. changeStationsVal(val) {
  1158. this.wpId = val;
  1159. if (this.tabIndex == 2) {
  1160. this.hisSubid = val;
  1161. } else {
  1162. this.getWindData();
  1163. }
  1164. },
  1165. // 获取风机
  1166. async getWindData() {
  1167. let params = {
  1168. companyId: "",
  1169. wpIds: this.wpId,
  1170. projectIds: "",
  1171. lineIds: "",
  1172. type: 0,
  1173. };
  1174. const { data: datas } = await getApiequipmentList(params);
  1175. this.wtArray = datas.data;
  1176. this.wtId = datas.data[0].id;
  1177. },
  1178. // tab1 ----------------------------------------
  1179. // tab1 - 获取损失电量分析图表数据
  1180. async getLostChartData() {
  1181. let that = this;
  1182. let params = {
  1183. wtId: that.wtId,
  1184. recorddate: that.recorddate,
  1185. };
  1186. const { data: datas } = await getApifindWtRealPowerChar(params);
  1187. if (datas && datas.data.length > 0) {
  1188. const keyArray = ["value1", "value2", "value3"];
  1189. let lostChartData = [
  1190. {
  1191. text: "实发功率",
  1192. value: [
  1193. // {
  1194. // text: "1",
  1195. // value: 1,
  1196. // },
  1197. ],
  1198. },
  1199. {
  1200. text: "保证功率",
  1201. value: [],
  1202. },
  1203. {
  1204. text: "风速",
  1205. value: [],
  1206. },
  1207. ];
  1208. const lostChartUnit = ["实发功率", "保证功率", "风速"];
  1209. keyArray.forEach((key, keyIndex) => {
  1210. datas.data.forEach((ele) => {
  1211. lostChartData[keyIndex].value.push({
  1212. text: new Date(ele.time).formatDate("hh:mm"),
  1213. value: ele[key],
  1214. });
  1215. });
  1216. });
  1217. that.lostChartData = lostChartData;
  1218. that.lostChartUnit = lostChartUnit;
  1219. that.getLostChartBgColorData();
  1220. }
  1221. },
  1222. // tab1 - 获取损失电量分析图表背景颜色
  1223. async getLostChartBgColorData() {
  1224. let that = this;
  1225. let params = {
  1226. wtId: that.wtId,
  1227. recorddate: that.recorddate,
  1228. };
  1229. const { data: datas } = await getApigetplotBands(params);
  1230. if (datas && datas.data.length > 0) {
  1231. let LostChartBgColorData = [];
  1232. datas.data.forEach((pEle, pIndex) => {
  1233. LostChartBgColorData.push({
  1234. name: pEle[0].name,
  1235. start: pIndex ? LostChartBgColorData[pIndex - 1].end : 0,
  1236. end:
  1237. (pIndex ? LostChartBgColorData[pIndex - 1].end : 0) +
  1238. (new Date(pEle[0].time2).getTime() / 1000 -
  1239. new Date(pEle[0].time1).getTime() / 1000),
  1240. color: pEle[0].itemStyle.color,
  1241. beginDate: pEle[0].time1,
  1242. endDate: pEle[0].time2,
  1243. wtId: that.wtId,
  1244. });
  1245. });
  1246. that.LostChartBgColorData = LostChartBgColorData;
  1247. }
  1248. },
  1249. // 损失电量分析图背景颜色区域点击事件
  1250. async areaBarChartClick(item) {
  1251. let that = this;
  1252. let params = {
  1253. wtId: item.data.wtId,
  1254. beginDate: item.data.beginDate,
  1255. endDate: item.data.endDate,
  1256. };
  1257. const { data: datas } = await getApiplotBandAjax(params);
  1258. if (datas && datas.data) {
  1259. that.form = datas.data || {};
  1260. that.dialogShow = true;
  1261. }
  1262. },
  1263. // tab1 - 获取电量图表数据
  1264. async getPowerChartData() {
  1265. let that = this;
  1266. let params = {
  1267. wtId: that.wtId,
  1268. recorddate: that.recorddate,
  1269. };
  1270. const { data: datas } = await getApifindRealPowerCharBy24(params);
  1271. if (datas && datas.data.length > 0) {
  1272. const keyArray = ["value1", "value2", "value3", "value4", "value5"];
  1273. let powerChartData = [
  1274. {
  1275. title: "scada发电量",
  1276. type: "bar",
  1277. yAxisIndex: 0,
  1278. value: [],
  1279. },
  1280. {
  1281. title: "维护损失",
  1282. type: "bar",
  1283. yAxisIndex: 0,
  1284. value: [],
  1285. },
  1286. {
  1287. title: "故障损失",
  1288. type: "bar",
  1289. yAxisIndex: 0,
  1290. value: [],
  1291. },
  1292. {
  1293. title: "限电损失",
  1294. type: "bar",
  1295. yAxisIndex: 0,
  1296. value: [],
  1297. },
  1298. {
  1299. title: "欠发损失",
  1300. type: "bar",
  1301. yAxisIndex: 0,
  1302. value: [],
  1303. },
  1304. ];
  1305. let powerChartLineData = {
  1306. name: "风速",
  1307. unit: "(m/s)",
  1308. type: "line",
  1309. data: [],
  1310. };
  1311. for (let i = 0; i < keyArray.length; i++) {
  1312. let keyEle = keyArray[i];
  1313. for (let j = 0; j < datas.data.length; j++) {
  1314. let ele = datas.data[j];
  1315. powerChartData[i].value.push({
  1316. text: new Date(ele.time).formatDate("MM-dd hh:mm"),
  1317. value: ele[keyEle],
  1318. });
  1319. powerChartLineData.data.push(ele.value6);
  1320. }
  1321. }
  1322. that.powerChartData = powerChartData;
  1323. that.powerChartLineData = powerChartLineData;
  1324. }
  1325. },
  1326. // tab1 - 获取当日报警数据
  1327. async getWarnData() {
  1328. let that = this;
  1329. let params = {
  1330. wtId: that.wtId,
  1331. recorddate: that.recorddate,
  1332. pageNum: "1",
  1333. pageSize: "5",
  1334. };
  1335. // const { data: datas } = await getApibjjllist(params);
  1336. // if (datas && datas.data && datas.data.records.length > 0) {
  1337. // datas.data.records.forEach((ele) => {
  1338. // ele.warningtime = new Date(ele.warningtime).formatDate(
  1339. // "yyyy-MM-dd hh:mm:ss"
  1340. // );
  1341. // });
  1342. // that.warnTableData.data = datas.data.records;
  1343. // }
  1344. },
  1345. // tab1 - 获取当日故障数据
  1346. async getStopData() {
  1347. let that = this;
  1348. let params = {
  1349. wtId: that.wtId,
  1350. recorddate: that.recorddate,
  1351. pageNum: "1",
  1352. pageSize: "5",
  1353. };
  1354. // const { data: datas } = await getApigzjllist(params);
  1355. // if (datas && datas.data && datas.data.records.length > 0) {
  1356. // datas.data.records.forEach((ele) => {
  1357. // ele.stopTime = new Date(ele.stopTime).formatDate(
  1358. // "yyyy-MM-dd hh:mm:ss"
  1359. // );
  1360. // ele.starttime = ele.starttime
  1361. // ? new Date(ele.starttime).formatDate("yyyy-MM-dd hh:mm:ss")
  1362. // : "";
  1363. // });
  1364. // that.stopTableData.data = datas.data.records;
  1365. // }
  1366. },
  1367. // tab1 - 获取当日限电数据
  1368. async getXdData() {
  1369. let that = this;
  1370. let params = {
  1371. wtId: that.wtId,
  1372. recorddate: that.recorddate,
  1373. pageNum: "1",
  1374. pageSize: "5",
  1375. };
  1376. // const { data: datas } = await getApixdjllist(params);
  1377. // if (datas && datas.data && datas.data.records.length > 0) {
  1378. // datas.data.records.forEach((ele) => {
  1379. // ele.stopTime = new Date(ele.stopTime).formatDate(
  1380. // "yyyy-MM-dd hh:mm:ss"
  1381. // );
  1382. // ele.starttime = ele.starttime
  1383. // ? new Date(ele.starttime).formatDate("yyyy-MM-dd hh:mm:ss")
  1384. // : "";
  1385. // });
  1386. // that.xdTableData.data = datas.data.records;
  1387. // }
  1388. },
  1389. // tab2 ----------------------------------------
  1390. // tab2 - 获取日发电量信息
  1391. async getDayPowerInfo() {
  1392. let that = this;
  1393. let params = {
  1394. wtId: that.wtId,
  1395. recorddate: that.recorddate,
  1396. };
  1397. const { data: datas } = await getApiwadAjax(params);
  1398. if (datas && datas.data) {
  1399. that.dayPowerInfo = datas.data;
  1400. }
  1401. },
  1402. // tab2 - 获取当月报警排行
  1403. async getMonthWarnRecord() {
  1404. let that = this;
  1405. let params = {
  1406. wtId: that.wtId,
  1407. recorddate: that.recorddate,
  1408. pageNum: "1",
  1409. pageSize: "5",
  1410. };
  1411. const { data: datas } = await getApibjphlist(params);
  1412. if (datas && datas.data) {
  1413. that.monthWarnRecordData.data = datas.data;
  1414. }
  1415. },
  1416. // tab2 - 获取当月报警排行
  1417. async getPowerLineChartData() {
  1418. let that = this;
  1419. let params = {
  1420. wtId: that.wtId,
  1421. recorddate: that.recorddate,
  1422. };
  1423. const { data: datas } = await getApiglchat(params);
  1424. if (datas && datas.data.length > 0) {
  1425. const keyArray = ["value2", "value3", "value4"];
  1426. let powerLineChartData = [
  1427. {
  1428. title: "实际拟合功率",
  1429. yAxisIndex: 0,
  1430. value: [],
  1431. },
  1432. {
  1433. title: "最优功率",
  1434. yAxisIndex: 0,
  1435. value: [],
  1436. },
  1437. {
  1438. title: "保证功率",
  1439. yAxisIndex: 0,
  1440. value: [],
  1441. },
  1442. ];
  1443. keyArray.forEach((keyEle, keyIndex) => {
  1444. datas.data.forEach((ele, index) => {
  1445. powerLineChartData[keyIndex].value.push({
  1446. text: index + 1,
  1447. value: ele[keyEle],
  1448. });
  1449. });
  1450. });
  1451. that.powerLineChartData = powerLineChartData;
  1452. }
  1453. },
  1454. // tab2 - 获取风资源
  1455. async getWindResources() {
  1456. let that = this;
  1457. let params = {
  1458. wtId: that.wtId,
  1459. recorddate: that.recorddate,
  1460. };
  1461. const { data: datas } = await getApifjfzy(params);
  1462. if (datas && datas.data) {
  1463. that.jfplStr = datas.data.jfpl || "";
  1464. let windResourcesData = {
  1465. data: [],
  1466. name: [],
  1467. };
  1468. if (datas.data.data) {
  1469. datas.data.data.forEach((ele, index) => {
  1470. let jiaodu = (360 / 16) * index;
  1471. windResourcesData.data.push([ele.data1, jiaodu]);
  1472. windResourcesData.name.push(ele.name);
  1473. });
  1474. windResourcesData.data.push([datas.data.data[0].data1, 0]);
  1475. }
  1476. that.windResourcesData = windResourcesData;
  1477. }
  1478. },
  1479. // tab3,tab4 - 获取玫瑰图
  1480. async getMgt(subUrl, data, dataKey, logFlg) {
  1481. let that = this;
  1482. let params = {};
  1483. if (logFlg === "wp") {
  1484. params.url = subUrl;
  1485. params.recorddate = data.recorddate;
  1486. params.wpId = data.wpId;
  1487. const { data: datas } = await getApiComMGTWP(params);
  1488. // this.changeAllMsg(datas, dataKey);
  1489. this.changeAllMsgNewChart(datas, dataKey);
  1490. } else {
  1491. params.url = subUrl;
  1492. params.recorddate = data.recorddate;
  1493. params.wtId = data.wtId;
  1494. const { data: datas } = await getApiComMGTWT(params);
  1495. // this.changeAllMsg(datas, dataKey);
  1496. this.changeAllMsgNewChart(datas, dataKey);
  1497. }
  1498. },
  1499. //整合数据
  1500. changeAllMsg(datas, dataKey) {
  1501. if (datas && datas.data) {
  1502. let strrt = dataKey.split("Data")[0] + "Str";
  1503. this[strrt] = datas.data.jfpl || "";
  1504. let mgtData = {
  1505. indicator: [],
  1506. data: [
  1507. {
  1508. name: "",
  1509. value: [],
  1510. },
  1511. ],
  1512. };
  1513. let indicatorArr = [
  1514. { nameZn: "北", nameEn: "N" },
  1515. { nameZn: "北北西", nameEn: "NNW" },
  1516. { nameZn: "北西", nameEn: "NW" },
  1517. { nameZn: "西北西", nameEn: "WNW" },
  1518. { nameZn: "西", nameEn: "W" },
  1519. { nameZn: "西南西", nameEn: "WSW" },
  1520. { nameZn: "南西", nameEn: "SW" },
  1521. { nameZn: "南南西", nameEn: "SSW" },
  1522. { nameZn: "南", nameEn: "S" },
  1523. { nameZn: "南南东", nameEn: "SSE" },
  1524. { nameZn: "南东", nameEn: "SE" },
  1525. { nameZn: "东南东", nameEn: "ESE" },
  1526. { nameZn: "东", nameEn: "E" },
  1527. { nameZn: "东北东", nameEn: "ENE" },
  1528. { nameZn: "北东", nameEn: "NE" },
  1529. { nameZn: "北北东", nameEn: "NNE" },
  1530. ];
  1531. if (datas.data.data.length > 0) {
  1532. datas.data.data.forEach((ele) => {
  1533. mgtData.data[0].value.push(ele.data1);
  1534. indicatorArr.forEach((itc) => {
  1535. let str = "";
  1536. if (ele.name.substring(0, ele.name.indexOf(" ")) === itc.nameEn) {
  1537. str = ele.name.replace(itc.nameEn, itc.nameZn);
  1538. str = str.substring(0, str.indexOf(" "));
  1539. mgtData.indicator.push(str);
  1540. }
  1541. });
  1542. });
  1543. }
  1544. this[dataKey] = mgtData;
  1545. }
  1546. },
  1547. changeAllMsgNewChart(datas, dataKey) {
  1548. if (datas && datas.data) {
  1549. let strrt = dataKey.split("Data")[0] + "Str";
  1550. let strLen = dataKey.split("Data")[0] + "Len";
  1551. let strxaisx = dataKey.split("Data")[0] + "xaisx";
  1552. this[strrt] = datas.data.jfpl || "";
  1553. this[strxaisx].data = [];
  1554. this[strLen] = [];
  1555. this[dataKey] = [];
  1556. let lengedSer = [];
  1557. let series = [];
  1558. let objsxArrAll = [];
  1559. if (datas.data.data.length > 0) {
  1560. datas.data.data.forEach((item) => {
  1561. let str = item.name.substring(
  1562. item.name.indexOf(" ") + 1,
  1563. item.name.length
  1564. );
  1565. if (lengedSer.indexOf(str) === -1) {
  1566. lengedSer.push(str);
  1567. }
  1568. });
  1569. for (let i = 0; i < lengedSer.length; i++) {
  1570. // debugger
  1571. let ia = lengedSer[i];
  1572. let objsxArr = [];
  1573. let objsxArrObj = {
  1574. name: "",
  1575. data: [],
  1576. };
  1577. for (let j = 0; j < datas.data.data.length; j++) {
  1578. let ic = datas.data.data[j];
  1579. let objsx = {
  1580. fx: "",
  1581. data: "",
  1582. };
  1583. objsx.fx = ic.name.substring(0, ic.name.indexOf(" "));
  1584. if (ic.name.indexOf(ia) > 0) {
  1585. objsx.data = ic.data1;
  1586. } else {
  1587. objsx.data = 0;
  1588. }
  1589. objsxArr.push(objsx);
  1590. }
  1591. objsxArrObj.name = ia;
  1592. objsxArrObj.data = objsxArr;
  1593. objsxArrAll.push(objsxArrObj);
  1594. }
  1595. objsxArrAll.forEach((iiv, index) => {
  1596. let barObj = {
  1597. type: "bar",
  1598. data: [],
  1599. coordinateSystem: "polar",
  1600. name: iiv.name,
  1601. stack: "a",
  1602. emphasis: {
  1603. focus: "series",
  1604. },
  1605. };
  1606. if (index === 0) {
  1607. iiv.data.forEach((iu) => {
  1608. this[strxaisx].data.push(iu.fx);
  1609. });
  1610. }
  1611. iiv.data.forEach((iu) => {
  1612. barObj.data.push(iu.data);
  1613. });
  1614. series.push(barObj);
  1615. });
  1616. } else {
  1617. lengedSer = [];
  1618. series = [];
  1619. }
  1620. this[strLen] = lengedSer;
  1621. this[dataKey] = series;
  1622. }
  1623. },
  1624. // tab5 - 获取饼图
  1625. async getPieChart(subUrl, type, dataKey) {
  1626. let that = this;
  1627. let params = {
  1628. url: subUrl,
  1629. wtId: that.wtId,
  1630. recorddate: that.recorddate,
  1631. type: type,
  1632. };
  1633. const { data: datas } = await getApiComPie(params);
  1634. // const datas = await request({
  1635. // method: "GET",
  1636. // url: subUrl + `?recorddate=${params.recorddate}&wtId=${params.wtId}&type=${params.type}`
  1637. // })
  1638. // if (datas && datas.data.length>0) {
  1639. // let pieChart = [];
  1640. // datas.data.forEach((ele) => {
  1641. // pieChart.push({
  1642. // name: ele.name,
  1643. // value: ele.value2,
  1644. // unit: "(m/s)",
  1645. // });
  1646. // });
  1647. // that[dataKey] = pieChart;
  1648. // }
  1649. if (datas && datas.data.length > 0) {
  1650. let series = [];
  1651. let color1 = [
  1652. "#da0d68",
  1653. "#da1d23",
  1654. "#ebb40f",
  1655. "#187a2f",
  1656. "#0aa3b5",
  1657. "#c94930",
  1658. "#ad213e",
  1659. ];
  1660. let color2 = [
  1661. "#cc7b6a",
  1662. "#db646a",
  1663. "#80a89d",
  1664. "#794752",
  1665. "#7a9bae",
  1666. "#039fb8",
  1667. "#5e777b",
  1668. ];
  1669. let color3 = [
  1670. "#62aa3c",
  1671. "#03a653",
  1672. "#038549",
  1673. "#28b44b",
  1674. "#a3a830",
  1675. "#7ac141",
  1676. "#a2bb2b",
  1677. ];
  1678. let color4 = [
  1679. "#e65832",
  1680. "#da1d23",
  1681. "#4b55ae",
  1682. "#3aa255",
  1683. "#0aa3b5",
  1684. "#1c99ff",
  1685. "#ebb40f",
  1686. ];
  1687. datas.data.forEach((ele, idx) => {
  1688. series.push({ name: ele.name, value: ele.value2 });
  1689. });
  1690. that[dataKey] = series;
  1691. }
  1692. },
  1693. // 切换tab
  1694. tabSelect(index) {
  1695. if (this.tabIndex == 2) {
  1696. this.hisSubid = this.wpId;
  1697. } else {
  1698. this.hisWpid = this.wpId;
  1699. }
  1700. if (index == 2) {
  1701. this.wpId = this.hisSubid ? this.hisSubid : this.cftlist[0].id;
  1702. } else {
  1703. this.wpId = this.hisWpid ? this.hisWpid : this.wpArray[0].id;
  1704. }
  1705. this.tabIndex = index;
  1706. this.search();
  1707. },
  1708. // 搜索
  1709. search() {
  1710. if (this.tabIndex === 0) {
  1711. this.getLostChartData();
  1712. this.getPowerChartData();
  1713. this.getWarnData();
  1714. this.getStopData();
  1715. this.getXdData();
  1716. } else if (this.tabIndex === 1) {
  1717. this.getWarnData();
  1718. this.getStopData();
  1719. this.getDayPowerInfo();
  1720. this.getMonthWarnRecord();
  1721. this.getPowerLineChartData();
  1722. this.getWindResources();
  1723. } else if (this.tabIndex === 2) {
  1724. const xhrParam = { wpId: this.wpId, recorddate: this.recorddate };
  1725. this.getMgt(`/goodness/wprzdfs`, xhrParam, "rzdfsData", "wp");
  1726. this.getMgt(`/goodness/wpyzdfs`, xhrParam, "yzdfsData", "wp");
  1727. this.getMgt(`/goodness/wpnzdfs`, xhrParam, "nzdfsData", "wp");
  1728. this.getMgt(`/goodness/wprfxpl`, xhrParam, "rfxplData", "wp");
  1729. this.getMgt(`/goodness/wpyfxpl`, xhrParam, "yfxplData", "wp");
  1730. this.getMgt(`/goodness/wpnfxpl`, xhrParam, "nfxplData", "wp");
  1731. } else if (this.tabIndex === 3) {
  1732. const xhrParam = { wtId: this.wtId, recorddate: this.recorddate };
  1733. this.getMgt(`/goodness/wtrzdfs`, xhrParam, "rzdfsData", "wt");
  1734. this.getMgt(`/goodness/wtyzdfs`, xhrParam, "yzdfsData", "wt");
  1735. this.getMgt(`/goodness/wtnzdfs`, xhrParam, "nzdfsData", "wt");
  1736. this.getMgt(`/goodness/wtrfxpl`, xhrParam, "rfxplData", "wt");
  1737. this.getMgt(`/goodness/wtyfxpl`, xhrParam, "yfxplData", "wt");
  1738. this.getMgt(`/goodness/wtnfxpl`, xhrParam, "nfxplData", "wt");
  1739. } else if (this.tabIndex === 4) {
  1740. this.getPieChart(`/goodness/pieChart`, "1", "dayWindPieData");
  1741. this.getPieChart(`/goodness/pieChart`, "2", "monthWindPieData");
  1742. this.getPieChart(`/goodness/pieChart`, "3", "yearWindPieData");
  1743. this.getPieChart(`/goodness/pieChart`, "4", "dayStopPieData");
  1744. this.getPieChart(`/goodness/pieChart`, "5", "monthStopPieData");
  1745. this.getPieChart(`/goodness/pieChart`, "6", "yearStopPieData");
  1746. }
  1747. },
  1748. },
  1749. };
  1750. </script>
  1751. <style lang="less">
  1752. .windDetailWidth {
  1753. width: calc(100%-50px);
  1754. margin-left: 50px;
  1755. }
  1756. .windDetail {
  1757. height: 100%;
  1758. .action-bar {
  1759. display: flex;
  1760. padding: 10px 0 20px 0;
  1761. .selections {
  1762. flex: 1 0 auto;
  1763. display: flex;
  1764. .selections_btn {
  1765. flex: 0 0 164px;
  1766. text-align: center;
  1767. height: 33px;
  1768. line-height: 33px;
  1769. margin-right: 8px;
  1770. color: #b9b9b9;
  1771. font-size: 1.296vh;
  1772. background: fade(#606769, 20);
  1773. border: 1px solid fade(#606769, 20);
  1774. border-radius: 20px;
  1775. &:hover,
  1776. &.active {
  1777. background: rgba(5, 187, 76, 0.6);
  1778. // border: 1px solid #0046c7;
  1779. color: #fff;
  1780. cursor: pointer;
  1781. }
  1782. }
  1783. }
  1784. .windDetailseach {
  1785. display: flex;
  1786. .query-items {
  1787. flex: 0 0 auto;
  1788. display: flex;
  1789. align-items: center;
  1790. .query-item {
  1791. flex: 0 0 auto;
  1792. display: flex;
  1793. align-items: center;
  1794. .label {
  1795. color: #fff;
  1796. }
  1797. }
  1798. }
  1799. .query-actions {
  1800. .el-button {
  1801. background: rgba(5, 187, 76, 0.6);
  1802. border: 1px solid #3b6c53;
  1803. border-radius: 13px;
  1804. color: #fff;
  1805. &:hover {
  1806. background: rgba(5, 187, 76, 0.9);
  1807. border-radius: 13px;
  1808. color: #fff;
  1809. }
  1810. }
  1811. }
  1812. }
  1813. }
  1814. .tabs {
  1815. height: calc(100% - 55px);
  1816. }
  1817. .outline {
  1818. outline: 1px solid fade(#606769, 50);
  1819. }
  1820. .TabOne {
  1821. .TabOne_topChart {
  1822. height: calc((100% - 260px) / 2);
  1823. margin-bottom: 10px;
  1824. }
  1825. .TabOne_centerChart {
  1826. margin-bottom: 10px;
  1827. height: calc((100% - 260px) / 2);
  1828. }
  1829. .table-info {
  1830. display: flex;
  1831. height: 260px;
  1832. .table-panel {
  1833. flex: 1 0 calc(100% / 3 - 8px);
  1834. outline: 1px solid fade(#606769, 50);
  1835. height: 100%;
  1836. & + .table-panel {
  1837. margin-left: 8px;
  1838. }
  1839. }
  1840. }
  1841. }
  1842. .tab-2 {
  1843. .power-info {
  1844. display: flex;
  1845. flex-wrap: wrap;
  1846. justify-content: space-between;
  1847. height: 100%;
  1848. &.month-3 {
  1849. .info-item {
  1850. height: calc((100% - 8px * 4) / 5);
  1851. line-height: calc((100% - 8px * 4) / 5);
  1852. flex: 0 0 calc(100% / 3 - 6px);
  1853. &:nth-child(-n + 3) {
  1854. margin-top: 0px;
  1855. }
  1856. }
  1857. }
  1858. &.month-2 {
  1859. .info-item {
  1860. flex: 0 0 calc(100% / 2 - 4px);
  1861. height: calc(100% - 8px);
  1862. &:nth-child(-n + 5) {
  1863. margin-top: 8px;
  1864. }
  1865. &:nth-child(-n + 2) {
  1866. margin-top: 0px;
  1867. }
  1868. }
  1869. }
  1870. .info-item {
  1871. display: flex;
  1872. align-items: center;
  1873. flex: 0 0 calc(100% / 5 - 8px);
  1874. background: fade(#606769, 20);
  1875. height: calc((100% - 8px * 3) / 4);
  1876. line-height: calc((100% - 8px * 3) / 4);
  1877. &:nth-child(-n + 5) {
  1878. margin-top: 0px;
  1879. }
  1880. .text {
  1881. font-size: 12px;
  1882. flex: 0 0 110px;
  1883. text-align: right;
  1884. margin-right: 24px;
  1885. color: #fff;
  1886. }
  1887. .value {
  1888. font-size: 16px;
  1889. color: #1c99ff;
  1890. }
  1891. }
  1892. }
  1893. .month-info {
  1894. display: flex;
  1895. height: calc(100% - 270px - 297px - 20px);
  1896. .month-info-left {
  1897. height: 100%;
  1898. flex: 0 0 705px;
  1899. margin-right: 10px;
  1900. }
  1901. .month-info-right {
  1902. height: 100%;
  1903. flex: 1 0 auto;
  1904. }
  1905. }
  1906. .radar-panel {
  1907. height: 220px;
  1908. .wind-info {
  1909. height: 100%;
  1910. }
  1911. }
  1912. .table-panel {
  1913. margin-bottom: 10px;
  1914. height: calc((100% - 10px * 2) / 3);
  1915. &:nth-child(3) {
  1916. margin-bottom: 0px;
  1917. }
  1918. }
  1919. .wind-info {
  1920. display: flex;
  1921. .legend {
  1922. font-size: 12px;
  1923. height: 20px;
  1924. display: flex;
  1925. align-items: center;
  1926. justify-content: center;
  1927. margin-top: 32px;
  1928. margin-bottom: 16px;
  1929. .dot {
  1930. width: 7px;
  1931. height: 7px;
  1932. background: #0046c7;
  1933. display: inline-block;
  1934. margin-right: 8px;
  1935. }
  1936. }
  1937. }
  1938. }
  1939. .tab-3,
  1940. .tab-4 {
  1941. .tabColSty {
  1942. height: 100%;
  1943. .radar-panel {
  1944. height: 100%;
  1945. }
  1946. }
  1947. .wind-info {
  1948. position: relative;
  1949. height: 100%;
  1950. .legend {
  1951. position: absolute;
  1952. left: 500px;
  1953. top: 0;
  1954. font-size: 12px;
  1955. flex: 0 0 140px;
  1956. height: 20px;
  1957. display: flex;
  1958. align-items: center;
  1959. justify-content: center;
  1960. margin-top: 32px;
  1961. margin-bottom: 16px;
  1962. .dot {
  1963. width: 7px;
  1964. height: 7px;
  1965. background: #0046c7;
  1966. display: inline-block;
  1967. margin-right: 8px;
  1968. }
  1969. .titSty {
  1970. color: #fff;
  1971. white-space: nowrap;
  1972. }
  1973. }
  1974. }
  1975. }
  1976. .tab-5 {
  1977. .panel-body {
  1978. padding: 16px;
  1979. }
  1980. }
  1981. }
  1982. </style>