windDetailDialog.vue 58 KB

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