windDetailDialog.vue 62 KB

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