dj1.vue 42 KB

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