windDetailDialog.vue 59 KB

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