analysisEvent.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201
  1. <!--
  2. * @Author: your name
  3. * @Date: 2024-05-29 09:13:51
  4. * @LastEditTime: 2025-02-07 15:05:03
  5. * @LastEditors: bogon
  6. * @Description: In User Settings Edit
  7. * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
  8. -->
  9. <template>
  10. <!-- 分析事件页面 -->
  11. <div v-loading="loading">
  12. <el-form
  13. ref="form"
  14. :model="form"
  15. label-position="right"
  16. label-width="100px"
  17. >
  18. <el-row type="flex" justify="end">
  19. <el-col :span="5">
  20. <el-form-item class="searchFrom">
  21. <el-button type="primary" @click="onSubmit" size="small"
  22. >分析</el-button
  23. >
  24. <el-button size="small" @click="resetForm">重置</el-button>
  25. <!-- <el-button
  26. type="info"
  27. size="small"
  28. @click="drawer = true"
  29. icon="el-icon-setting"
  30. ></el-button> -->
  31. <i @click="drawer = true" class="el-icon-setting setting"></i>
  32. </el-form-item>
  33. </el-col>
  34. </el-row>
  35. <el-collapse v-model="activeNames">
  36. <el-collapse-item title="数据关联:" name="1">
  37. <el-row class="flex-wrap-row" :gutter="5">
  38. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  39. <el-form-item
  40. label="机组名称"
  41. v-if="checkedCities.find((item) => item === '机组名称')"
  42. >
  43. <el-select
  44. multiple
  45. collapse-tags
  46. v-model="form.turbines"
  47. placeholder="请选择机组名称"
  48. size="small"
  49. clearable
  50. >
  51. <el-checkbox
  52. v-model="checkedTurbines"
  53. @change="selectAllTurbines"
  54. >全选</el-checkbox
  55. >
  56. <el-option
  57. v-for="item in windEngineGroupList"
  58. :key="item.engineCode"
  59. :label="item.engineName"
  60. :value="item.engineCode"
  61. ></el-option>
  62. </el-select>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  66. <el-form-item
  67. label="分析类型"
  68. v-if="checkedCities.find((item) => item === '分析类型')"
  69. prop=""
  70. >
  71. <el-select
  72. v-model="form.configAnalysis"
  73. placeholder="请选择分析类型"
  74. size="small"
  75. collapse-tags
  76. multiple
  77. clearable
  78. >
  79. <el-checkbox v-model="checked" @change="selectAll"
  80. >全选</el-checkbox
  81. >
  82. <el-option
  83. v-for="(item, indsanal) in analysisTypeList"
  84. :key="item.typeCode + indsanal + 'analysisTypeList'"
  85. :label="item.typeName"
  86. :value="item.typeCode"
  87. ></el-option>
  88. </el-select> </el-form-item
  89. ></el-col>
  90. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  91. <el-form-item
  92. label="数据源"
  93. v-if="checkedCities.find((item) => item === '数据源')"
  94. >
  95. <el-select
  96. v-model="form.scada"
  97. placeholder="请选择SCADA数据"
  98. size="small"
  99. clearable
  100. @change="handleScada"
  101. >
  102. <el-option
  103. v-for="(TranItem, indTran) in transferTypeData"
  104. :key="TranItem.transferType + TranItem + 'transferTypeData'"
  105. :label="TranItem.transferTypeName"
  106. :value="TranItem.transferType"
  107. ></el-option>
  108. </el-select>
  109. </el-form-item>
  110. </el-col>
  111. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  112. <el-form-item
  113. label="开始时间"
  114. v-if="checkedCities.find((item) => item === '分析时间')"
  115. >
  116. <el-date-picker
  117. value-format="yyyy-MM-dd HH:mm:ss"
  118. v-model="picker[0]"
  119. size="small"
  120. type="datetime"
  121. placeholder="选择分析开始时间"
  122. :picker-options="pickerOptions"
  123. >
  124. </el-date-picker>
  125. <!-- <el-date-picker
  126. value-format="yyyy-MM-dd HH:mm:ss"
  127. v-model="picker"
  128. type="datetimerange"
  129. size="small"
  130. range-separator="至"
  131. start-placeholder="开始日期"
  132. end-placeholder="结束日期"
  133. :picker-options="pickerOptions"
  134. >
  135. </el-date-picker> -->
  136. </el-form-item></el-col
  137. >
  138. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  139. <el-form-item
  140. label="结束时间"
  141. v-if="checkedCities.find((item) => item === '分析时间')"
  142. >
  143. <el-date-picker
  144. value-format="yyyy-MM-dd HH:mm:ss"
  145. v-model="picker[1]"
  146. size="small"
  147. type="datetime"
  148. placeholder="选择分析结束时间"
  149. :picker-options="pickerOptions"
  150. >
  151. </el-date-picker> </el-form-item
  152. ></el-col>
  153. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  154. <el-form-item
  155. label="滤除月份"
  156. v-if="checkedCities.find((item) => item === '滤除月份')"
  157. >
  158. <el-date-picker
  159. value-format="yyyy-MM"
  160. width="200"
  161. size="small"
  162. type="months"
  163. v-model="form.excludingMonths"
  164. placeholder="选择一个或多个月"
  165. >
  166. </el-date-picker>
  167. </el-form-item>
  168. </el-col>
  169. </el-row>
  170. </el-collapse-item>
  171. <el-collapse-item
  172. title="数据源测点过滤设置:"
  173. name="2"
  174. v-if="checkedCities.find((item) => item === '数据源过滤')"
  175. >
  176. <el-row :gutter="5">
  177. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  178. <el-form-item label="风速过滤">
  179. <div class="demo-input-suffix">
  180. <el-input
  181. type="number"
  182. :min="1"
  183. size="small"
  184. placeholder="最小值"
  185. v-model="form.valueWindSpeed[0]"
  186. @input="ensureMinValue(form.valueWindSpeed, 0)"
  187. >
  188. </el-input>
  189. <el-input
  190. type="number"
  191. :min="1"
  192. size="small"
  193. placeholder="最大值"
  194. v-model="form.valueWindSpeed[1]"
  195. @input="ensureMinValue(form.valueWindSpeed, 1)"
  196. >
  197. </el-input>
  198. </div>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  202. <el-form-item label="桨距角过滤">
  203. <div class="demo-input-suffix">
  204. <el-input
  205. type="number"
  206. :min="1"
  207. size="small"
  208. placeholder="最小值"
  209. v-model="form.valuePitchAngle[0]"
  210. @input="ensureMinValue(form.valuePitchAngle, 0)"
  211. >
  212. </el-input>
  213. <el-input
  214. type="number"
  215. :min="1"
  216. size="small"
  217. placeholder="最大值"
  218. v-model="form.valuePitchAngle[1]"
  219. @input="ensureMinValue(form.valuePitchAngle, 1)"
  220. >
  221. </el-input>
  222. </div>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  226. <el-form-item label="有功功率过滤">
  227. <div class="demo-input-suffix">
  228. <el-input
  229. type="number"
  230. :min="1"
  231. size="small"
  232. placeholder="最小值"
  233. v-model="form.valueActivePower[0]"
  234. @input="ensureMinValue(form.valueActivePower, 0)"
  235. >
  236. </el-input>
  237. <el-input
  238. type="number"
  239. :min="1"
  240. size="small"
  241. placeholder="最大值"
  242. v-model="form.valueActivePower[1]"
  243. @input="ensureMinValue(form.valueActivePower, 1)"
  244. >
  245. </el-input>
  246. </div>
  247. </el-form-item>
  248. </el-col>
  249. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  250. <el-form-item label="发电机转速过滤">
  251. <div class="demo-input-suffix">
  252. <el-input
  253. type="number"
  254. :min="1"
  255. size="small"
  256. placeholder="最小值"
  257. v-model="form.valueGeneratorSpeed[0]"
  258. @input="ensureMinValue(form.valueGeneratorSpeed, 0)"
  259. >
  260. </el-input>
  261. <el-input
  262. type="number"
  263. :min="1"
  264. size="small"
  265. placeholder="最大值"
  266. v-model="form.valueGeneratorSpeed[1]"
  267. @input="ensureMinValue(form.valueGeneratorSpeed, 1)"
  268. >
  269. </el-input>
  270. </div>
  271. </el-form-item>
  272. </el-col>
  273. </el-row>
  274. </el-collapse-item>
  275. <el-collapse-item
  276. title="图像坐标系设置:"
  277. name="3"
  278. v-if="checkedCities.find((item) => item === '图像设置')"
  279. >
  280. <el-row :gutter="5">
  281. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  282. <el-form-item label="直驱发电机转速坐标系">
  283. <div class="demo-input-suffix">
  284. <el-input
  285. type="number"
  286. :min="1"
  287. size="small"
  288. placeholder="步长"
  289. v-model="form.dgeneratorSpeed[0]"
  290. @input="ensureMinValue(form.dgeneratorSpeed, 0)"
  291. >
  292. </el-input>
  293. <el-input
  294. type="number"
  295. :min="1"
  296. size="small"
  297. placeholder="最小值"
  298. v-model="form.dgeneratorSpeed[1]"
  299. @input="ensureMinValue(form.dgeneratorSpeed, 1)"
  300. >
  301. </el-input>
  302. <el-input
  303. type="number"
  304. :min="1"
  305. size="small"
  306. placeholder="最大值"
  307. v-model="form.dgeneratorSpeed[2]"
  308. @input="ensureMinValue(form.dgeneratorSpeed, 2)"
  309. >
  310. </el-input>
  311. </div>
  312. </el-form-item>
  313. </el-col>
  314. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  315. <el-form-item label="非直驱发电机转速坐标系设置">
  316. <div class="demo-input-suffix">
  317. <el-input
  318. type="number"
  319. :min="1"
  320. size="small"
  321. placeholder="步长"
  322. v-model="form.igeneratorSpeed[0]"
  323. @input="ensureMinValue(form.igeneratorSpeed, 0)"
  324. >
  325. </el-input>
  326. <el-input
  327. type="number"
  328. :min="1"
  329. size="small"
  330. placeholder="最小值"
  331. v-model="form.igeneratorSpeed[1]"
  332. @input="ensureMinValue(form.igeneratorSpeed, 1)"
  333. >
  334. </el-input>
  335. <el-input
  336. type="number"
  337. :min="1"
  338. size="small"
  339. placeholder="最大值"
  340. v-model="form.igeneratorSpeed[2]"
  341. @input="ensureMinValue(form.igeneratorSpeed, 2)"
  342. >
  343. </el-input>
  344. </div>
  345. </el-form-item>
  346. </el-col>
  347. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  348. <el-form-item label="直驱发电机转矩坐标系">
  349. <div class="demo-input-suffix">
  350. <el-input
  351. type="number"
  352. :min="1"
  353. size="small"
  354. placeholder="步长"
  355. v-model="form.dgeneratorTorque[0]"
  356. @input="ensureMinValue(form.dgeneratorTorque, 0)"
  357. >
  358. </el-input>
  359. <el-input
  360. type="number"
  361. :min="1"
  362. size="small"
  363. placeholder="最小值"
  364. v-model="form.dgeneratorTorque[1]"
  365. @input="ensureMinValue(form.dgeneratorTorque, 1)"
  366. >
  367. </el-input>
  368. <el-input
  369. type="number"
  370. :min="1"
  371. size="small"
  372. placeholder="最大值"
  373. v-model="form.dgeneratorTorque[2]"
  374. @input="ensureMinValue(form.dgeneratorTorque, 2)"
  375. >
  376. </el-input>
  377. </div>
  378. </el-form-item>
  379. </el-col>
  380. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  381. <el-form-item label="非直驱发电机转矩坐标系">
  382. <div class="demo-input-suffix">
  383. <el-input
  384. type="number"
  385. :min="1"
  386. size="small"
  387. placeholder="步长"
  388. v-model="form.igeneratorTorque[0]"
  389. @input="ensureMinValue(form.igeneratorTorque, 0)"
  390. >
  391. </el-input>
  392. <el-input
  393. type="number"
  394. :min="1"
  395. size="small"
  396. placeholder="最小值"
  397. v-model="form.igeneratorTorque[1]"
  398. @input="ensureMinValue(form.igeneratorTorque, 1)"
  399. >
  400. </el-input>
  401. <el-input
  402. type="number"
  403. :min="1"
  404. size="small"
  405. placeholder="最大值"
  406. v-model="form.igeneratorTorque[2]"
  407. @input="ensureMinValue(form.igeneratorTorque, 2)"
  408. >
  409. </el-input>
  410. </div>
  411. </el-form-item>
  412. </el-col>
  413. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  414. <el-form-item label="风能利用系数">
  415. <div class="demo-input-suffix">
  416. <el-input
  417. type="number"
  418. :min="1"
  419. size="small"
  420. placeholder="步长"
  421. v-model="form.cp[0]"
  422. @input="ensureMinValue(form.cp, 0)"
  423. >
  424. </el-input>
  425. <el-input
  426. type="number"
  427. :min="1"
  428. size="small"
  429. placeholder="最小值"
  430. v-model="form.cp[1]"
  431. @input="ensureMinValue(form.cp, 1)"
  432. >
  433. </el-input>
  434. <el-input
  435. type="number"
  436. :min="1"
  437. size="small"
  438. placeholder="最大值"
  439. v-model="form.cp[2]"
  440. @input="ensureMinValue(form.cp, 2)"
  441. >
  442. </el-input>
  443. </div>
  444. </el-form-item>
  445. </el-col>
  446. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  447. <el-form-item label="叶尖转速比">
  448. <div class="demo-input-suffix">
  449. <el-input
  450. type="number"
  451. :min="1"
  452. size="small"
  453. placeholder="步长"
  454. v-model="form.tsr[0]"
  455. @input="ensureMinValue(form.tsr, 0)"
  456. >
  457. </el-input>
  458. <el-input
  459. type="number"
  460. :min="1"
  461. size="small"
  462. placeholder="最小值"
  463. v-model="form.tsr[1]"
  464. @input="ensureMinValue(form.tsr, 1)"
  465. >
  466. </el-input>
  467. <el-input
  468. type="number"
  469. :min="1"
  470. size="small"
  471. placeholder="最大值"
  472. v-model="form.tsr[2]"
  473. @input="ensureMinValue(form.tsr, 2)"
  474. >
  475. </el-input>
  476. </div>
  477. </el-form-item>
  478. </el-col>
  479. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  480. <el-form-item label="有功功率">
  481. <div class="demo-input-suffix">
  482. <el-input
  483. type="number"
  484. :min="1"
  485. size="small"
  486. placeholder="步长"
  487. v-model="form.activePower[0]"
  488. @input="ensureMinValue(form.activePower, 0)"
  489. >
  490. </el-input>
  491. <el-input
  492. type="number"
  493. :min="1"
  494. size="small"
  495. placeholder="最小值"
  496. v-model="form.activePower[1]"
  497. @input="ensureMinValue(form.activePower, 1)"
  498. >
  499. </el-input>
  500. <el-input
  501. type="number"
  502. :min="1"
  503. size="small"
  504. placeholder="最大值"
  505. v-model="form.activePower[2]"
  506. @input="ensureMinValue(form.activePower, 2)"
  507. >
  508. </el-input>
  509. </div>
  510. </el-form-item>
  511. </el-col>
  512. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  513. <el-form-item label="桨距角">
  514. <div class="demo-input-suffix">
  515. <el-input
  516. type="number"
  517. :min="1"
  518. size="small"
  519. placeholder="步长"
  520. v-model="form.pitchAngle[0]"
  521. @input="ensureMinValue(form.pitchAngle, 0)"
  522. >
  523. </el-input>
  524. <el-input
  525. type="number"
  526. :min="1"
  527. size="small"
  528. placeholder="最小值"
  529. v-model="form.pitchAngle[1]"
  530. @input="ensureMinValue(form.pitchAngle, 1)"
  531. >
  532. </el-input>
  533. <el-input
  534. type="number"
  535. :min="1"
  536. size="small"
  537. placeholder="最大值"
  538. v-model="form.pitchAngle[2]"
  539. @input="ensureMinValue(form.pitchAngle, 2)"
  540. >
  541. </el-input>
  542. </div>
  543. </el-form-item>
  544. </el-col>
  545. </el-row>
  546. </el-collapse-item>
  547. </el-collapse>
  548. </el-form>
  549. <el-card shadow="always" class="box-card">
  550. <el-row>
  551. <div class="filedView">风场信息概览</div>
  552. </el-row>
  553. <el-row>
  554. <el-col :span="12">
  555. <div class="left">
  556. <el-table :data="batchList" border>
  557. <el-table-column prop="engineName" label="风机名称">
  558. </el-table-column>
  559. <el-table-column prop="ratedCapacity" label="额定容量/KW">
  560. </el-table-column>
  561. <el-table-column prop="ratedWindSpeed" label="额定风速(m/s)">
  562. </el-table-column>
  563. <el-table-column prop="hubHeight" label="轮毂高度(m)">
  564. </el-table-column>
  565. <el-table-column prop="sightcing" label="是否标杆">
  566. <template slot-scope="{ row }">
  567. {{ row.sightcing == 1 ? "是" : "否" }}
  568. </template>
  569. </el-table-column>
  570. </el-table>
  571. <div class="pagination-container">
  572. <el-pagination
  573. @current-change="handleCurrentChange"
  574. :current-page.sync="formInline.pageNum"
  575. layout="total, prev, pager, next"
  576. :page-size="formInline.pageSize"
  577. :total="formInline.totalSize"
  578. >
  579. </el-pagination>
  580. </div>
  581. </div>
  582. </el-col>
  583. <el-col :span="12" v-loading="htmlLoading">
  584. <div class="right">
  585. <Map></Map>
  586. </div>
  587. </el-col>
  588. </el-row>
  589. </el-card>
  590. <el-drawer
  591. title="偏好设置"
  592. :visible.sync="drawer"
  593. :direction="direction"
  594. :before-close="handleClose"
  595. class="drawerOption"
  596. >
  597. <el-row>
  598. <el-col :span="12"
  599. ><div class="drawerLeft">
  600. <div style="text-align: center; font-size: 16px">常用功能设置</div>
  601. <el-checkbox
  602. :indeterminate="isIndeterminate"
  603. v-model="checkAll"
  604. @change="handleCheckAllChange"
  605. >全选</el-checkbox
  606. >
  607. <div style="margin: 15px 0"></div>
  608. <el-checkbox-group
  609. v-model="checkedCities"
  610. @change="handleCheckedCitiesChange"
  611. >
  612. <el-checkbox v-for="city in cities" :label="city" :key="city">{{
  613. city
  614. }}</el-checkbox>
  615. <el-checkbox label="数据源过滤" key="数据源过滤"></el-checkbox>
  616. <div class="checkFromRow">
  617. <el-row>
  618. <el-col :span="12">发电机转速测点</el-col>
  619. <el-col :span="12">桨距角值测点</el-col>
  620. <el-col :span="12">有功功率测点</el-col>
  621. <el-col :span="12">风速速度测点</el-col>
  622. </el-row>
  623. </div>
  624. <el-checkbox label="图像设置" key="图像设置"></el-checkbox>
  625. <div class="checkFromRow">
  626. <el-row>
  627. <el-col :span="12">发电机转矩坐标系</el-col>
  628. <el-col :span="12">桨距角坐标系</el-col>
  629. <el-col :span="12">叶尖速比坐标系</el-col>
  630. <el-col :span="12">有功功率坐标系</el-col>
  631. <el-col :span="12">发电机转矩坐标系</el-col>
  632. </el-row>
  633. </div>
  634. </el-checkbox-group>
  635. </div></el-col
  636. >
  637. <el-col :span="12">
  638. <div class="drawerRight">
  639. <div style="text-align: center; font-size: 16px">已选中功能</div>
  640. <ul>
  641. <li v-for="func in checkedCities" :key="func">
  642. {{ func }}
  643. <el-button
  644. type="text"
  645. icon="el-icon-delete"
  646. @click="removeFunction(func)"
  647. ></el-button>
  648. </li>
  649. </ul></div
  650. ></el-col>
  651. </el-row>
  652. <div class="demo-drawer__footer">
  653. <el-button @click="handleClose">取 消</el-button>
  654. <el-button type="primary" @click="handleClose">{{ "确 定" }}</el-button>
  655. </div>
  656. </el-drawer>
  657. </div>
  658. </template>
  659. <script>
  660. import {
  661. analysisEditQuery,
  662. analysis,
  663. queryDataTime,
  664. queryAllTypeScada,
  665. } from "@/api/performance";
  666. import {
  667. getWindEngineGroup,
  668. windEngineGrouPage,
  669. getWindEngineGroupRatedListByFieldCodePage,
  670. } from "@/api/ledger";
  671. import Map from "./map.vue";
  672. import axios from "axios";
  673. export default {
  674. components: {
  675. Map,
  676. },
  677. props: {
  678. activeName: String,
  679. },
  680. data() {
  681. return {
  682. formInline: {
  683. pageNum: 1,
  684. pageSize: 10,
  685. totalSize: 0,
  686. },
  687. batchList: [],
  688. checkedTurbines: false,
  689. checked: false,
  690. htmlLoading: false,
  691. engineCode: null, //台账机组编号
  692. picker: [],
  693. dataMinTime: null,
  694. dataMaxTime: null,
  695. // pickerOptions: {
  696. // disabledDate: this.disabledDate,
  697. // },
  698. loading: false,
  699. form: {
  700. configAnalysis: null, //分析类型
  701. powerFarmID: null, //风场编号//通过路由获取的默认传递的
  702. dataBatchNum: null, //批次号
  703. scada: "minute", //scada数类型
  704. turbines: [], //机组编号
  705. beginTime: null, //开始时间
  706. endTime: null, //结束时间
  707. excludingMonths: null, //过滤月份
  708. valueWindSpeed: [], //风速值最大最小 数组第一值为min 第二个 max
  709. valuePitchAngle: [], //桨距角最大最小
  710. valueActivePower: [], //有功功率
  711. valueGeneratorSpeed: [], //发电机转速
  712. //图像
  713. dgeneratorSpeed: [], //直驱发电机转速轴系 第一个值为步长 第二个min 第三个 max
  714. igeneratorSpeed: [], //非直驱发电机转速轴系设置
  715. dgeneratorTorque: [], //直驱发电机转矩轴系
  716. igeneratorTorque: [], //非直驱发电机转矩轴系
  717. cp: [], //风能利用系数轴系
  718. tsr: [], //叶尖速比轴系
  719. pitchAngle: [], //桨距角轴系
  720. activePower: [], //有功功率轴系
  721. },
  722. activeNames: ["1", "2", "3"],
  723. checkAll: false,
  724. checkedCities: ["分析类型", "数据源", "分析时间", "滤除月份", "机组名称"],
  725. cities: ["分析类型", "数据源", "分析时间", "滤除月份", "机组名称"],
  726. isIndeterminate: true,
  727. drawer: false,
  728. direction: "rtl",
  729. value: "",
  730. options: [],
  731. tabIndex: 2,
  732. analysisTypeList: [],
  733. windEngineGroupList: [],
  734. windDetail: {},
  735. transferTypeData: [],
  736. // 时间范围数组
  737. timeRanges: [
  738. // { start: '2024-12-01 00:00:00', end: '2024-12-30 23:59:59' },
  739. // { start: '2024-10-01 00:00:00', end: '2024-10-30 23:59:59' },
  740. // { start: '2024-05-01 00:00:00', end: '2024-05-30 23:59:59' },
  741. ],
  742. };
  743. },
  744. computed: {
  745. pickerOptions() {
  746. return {
  747. disabledDate: this.disabledDate,
  748. };
  749. },
  750. },
  751. watch: {
  752. activeName: {
  753. handler(newVal, oldVal) {
  754. // console.log(newVal, "新值 分析事件");
  755. },
  756. },
  757. },
  758. created() {
  759. //获取分析 分析类型、机组编号 列表
  760. this.getWindCodeList();
  761. this.getQueryDataTime();
  762. this.getFengjiList();
  763. queryAllTypeScada().then((res) => {
  764. this.transferTypeData = res.data;
  765. this.getTimeList();
  766. });
  767. },
  768. methods: {
  769. getTimeList() {
  770. axios
  771. .post("/transDataWeb/dataTransfer/getTimeRange", {
  772. transferType: this.form.scada,
  773. windFarmCode: this.$route.query.fieldEngineCode,
  774. })
  775. .then((res) => {
  776. console.log(res, "jieguo ");
  777. if (res.data.code === 200) {
  778. this.timeRanges = res.data.datas;
  779. console.log(this.timeRanges, "this.timeRanges");
  780. // this.formData = { ...res.data.datas };
  781. }
  782. })
  783. .catch((error) => {});
  784. },
  785. getFengjiList() {
  786. getWindEngineGroupRatedListByFieldCodePage({
  787. fieldCode: this.$route.query.fieldEngineCode,
  788. ...this.formInline,
  789. totalSize: undefined,
  790. }).then((res) => {
  791. this.batchList = res.data.list;
  792. this.formInline.totalSize = res.data.totalSize;
  793. });
  794. },
  795. //分页数据切换
  796. handleCurrentChange(val) {
  797. this.formInline.pageNum = val;
  798. this.getFengjiList();
  799. },
  800. // disabledDate(time) {
  801. // if (!this.dataMinTime || !this.dataMaxTime) {
  802. // return false;
  803. // }
  804. // const minTime = new Date(this.dataMinTime).getTime();
  805. // const maxTime = new Date(this.dataMaxTime).getTime();
  806. // return time.getTime() < minTime || time.getTime() > maxTime;
  807. // },
  808. // 禁用日期函数
  809. disabledDate(time) {
  810. const timeInMs = time.getTime();
  811. // 判断日期是否在任意一个时间范围内
  812. const isDisabled = !this.timeRanges.some((range) => {
  813. const start = new Date(range.startTime).getTime();
  814. const end = new Date(range.endTime).getTime();
  815. return timeInMs >= start && timeInMs <= end;
  816. });
  817. return isDisabled;
  818. },
  819. handleScada() {
  820. this.getQueryDataTime();
  821. },
  822. handleScada() {
  823. this.getTimeList();
  824. this.getQueryDataTime();
  825. },
  826. async getQueryDataTime() {
  827. const res = await queryDataTime({
  828. batchCode: this.$route.query.batchCode,
  829. dataTransferType: this.form.scada,
  830. });
  831. if (res.data && res.data.dataMinTime && res.data.dataMaxTime) {
  832. this.dataMinTime = res.data.dataMinTime; // 可选最小时间
  833. this.dataMaxTime = res.data.dataMaxTime; // 可选最大时间
  834. // 更新日期选择器的默认范围
  835. } else {
  836. this.dataMinTime = null; // 可选最小时间
  837. this.dataMaxTime = null; // 可选最大时间
  838. }
  839. },
  840. selectAllTurbines() {
  841. this.form.turbines = [];
  842. if (this.checkedTurbines) {
  843. this.windEngineGroupList.map((item) => {
  844. this.form.turbines.push(item.engineCode);
  845. });
  846. } else {
  847. this.form.turbines = [];
  848. }
  849. },
  850. selectAll() {
  851. this.form.configAnalysis = [];
  852. if (this.checked) {
  853. this.analysisTypeList.map((item) => {
  854. this.form.configAnalysis.push(item.typeCode);
  855. });
  856. } else {
  857. this.form.configAnalysis = [];
  858. }
  859. },
  860. ensureMinValue(field, index) {
  861. if (field[index] < 1) {
  862. field[index] = 1;
  863. }
  864. },
  865. handleEngineCode(e) {
  866. this.engineCode = e;
  867. this.getWindEngList();
  868. },
  869. async getWindEngList() {
  870. this.loading = true;
  871. try {
  872. const res = await getWindEngineGroup({
  873. engineCode: this.engineCode,
  874. });
  875. this.loading = false;
  876. this.windDetail = res.data;
  877. } catch (error) {
  878. this.loading = false;
  879. console.error(error);
  880. }
  881. },
  882. async getAnalysis() {
  883. this.loading = true;
  884. try {
  885. await analysis({
  886. // ...this.form,
  887. configAnalysis:
  888. this.form.configAnalysis !== null
  889. ? this.form.configAnalysis
  890. : undefined, //分析类型
  891. powerFarmID: this.$route.query.fieldEngineCode, //风场编号//通过路由获取的默认传递的
  892. dataBatchNum: this.$route.query.batchCode, //批次号
  893. scada: this.form.scada !== null ? this.form.scada : undefined, //scada数类型
  894. turbines:
  895. this.form.turbines.length > 0 ? this.form.turbines : undefined, //机组编号
  896. excludingMonths:
  897. this.form.excludingMonths === null
  898. ? undefined
  899. : this.form.excludingMonths, //过滤月份
  900. valueWindSpeed:
  901. this.form.valueWindSpeed.length > 0
  902. ? this.form.valueWindSpeed
  903. : undefined, //风速值最大最小 数组第一值为min 第二个 max
  904. valuePitchAngle:
  905. this.form.valuePitchAngle.length > 0
  906. ? this.form.valuePitchAngle
  907. : undefined, //桨距角最大最小
  908. valueActivePower:
  909. this.form.valueActivePower.length > 0
  910. ? this.form.valueActivePower
  911. : undefined, //有功功率
  912. valueGeneratorSpeed:
  913. this.form.valueGeneratorSpeed.length > 0
  914. ? this.form.valueGeneratorSpeed
  915. : undefined, //发电机转速
  916. //图像
  917. dgeneratorSpeed:
  918. this.form.dgeneratorSpeed.length > 0
  919. ? this.form.dgeneratorSpeed
  920. : undefined, //直驱发电机转速轴系 第一个值为步长 第二个min 第三个 max
  921. igeneratorSpeed:
  922. this.form.igeneratorSpeed.length > 0
  923. ? this.form.igeneratorSpeed
  924. : undefined, //非直驱发电机转速轴系设置
  925. dgeneratorTorque:
  926. this.form.dgeneratorTorque.length > 0
  927. ? this.form.dgeneratorTorque
  928. : undefined, //直驱发电机转矩轴系
  929. igeneratorTorque:
  930. this.form.igeneratorTorque.length > 0
  931. ? this.form.igeneratorTorque
  932. : undefined, //非直驱发电机转矩轴系
  933. cp: this.form.cp.length > 0 ? this.form.cp : undefined, //风能利用系数轴系
  934. tsr: this.form.tsr.length > 0 ? this.form.tsr : undefined, //叶尖速比轴系
  935. pitchAngle:
  936. this.form.pitchAngle.length > 0 ? this.form.pitchAngle : undefined, //桨距角轴系
  937. activePower:
  938. this.form.activePower.length > 0
  939. ? this.form.activePower
  940. : undefined, //有功功率轴系
  941. beginTime: this.picker[0], //开始时间
  942. endTime: this.picker[1], //结束时间
  943. });
  944. this.$message({
  945. type: "success",
  946. message: "已分析请前往分析详情中查看结果",
  947. });
  948. this.loading = false;
  949. } catch (error) {
  950. console.error(error);
  951. this.loading = false;
  952. }
  953. },
  954. async getWindCodeList() {
  955. this.loading = true;
  956. try {
  957. const response = await analysisEditQuery({
  958. batchCode: this.$route.query.batchCode,
  959. });
  960. if (
  961. response.data.windEngineGroupList === null ||
  962. response.data.windEngineGroupList.length === 0
  963. ) {
  964. this.$message({
  965. type: "warning",
  966. message: "当前风场没有风机,无法进行分析",
  967. });
  968. // this.$router.push("/home/performance/assetssMag");
  969. }
  970. this.form.powerFarmID = this.$route.query.fieldEngineCode;
  971. this.form.dataBatchNum = this.$route.query.batchCode;
  972. this.analysisTypeList = response.data.analysisTypeList;
  973. this.windEngineGroupList = response.data.windEngineGroupList;
  974. this.engineCode =
  975. response.data.windEngineGroupList !== null &&
  976. response.data.windEngineGroupList.length > 0
  977. ? response.data.windEngineGroupList[0].engineCode
  978. : null;
  979. if (response.data.windEngineGroupList.length > 0) {
  980. //获取台账机组编号
  981. this.getWindEngList();
  982. }
  983. this.loading = false;
  984. } catch (error) {
  985. this.$message({
  986. type: "error",
  987. message: error,
  988. });
  989. this.loading = false;
  990. this.$router.push("/home/performance/assetssMag");
  991. }
  992. },
  993. handleCheckAllChange(val) {
  994. this.checkedCities = val
  995. ? [...this.cities, "SCADA数据过滤", "图像设置"]
  996. : [];
  997. this.isIndeterminate = false;
  998. },
  999. handleCheckedCitiesChange(value) {
  1000. let checkedCount = value.length;
  1001. this.checkAll = checkedCount === this.cities.length + 2;
  1002. this.isIndeterminate =
  1003. checkedCount > 0 && checkedCount < this.cities.length + 2;
  1004. },
  1005. removeFunction(item) {
  1006. this.checkedCities = this.checkedCities.filter((fuc) => fuc !== item);
  1007. },
  1008. handleClose(done) {
  1009. this.$confirm("确认关闭?")
  1010. .then((_) => {
  1011. // done();
  1012. this.drawer = false;
  1013. })
  1014. .catch((_) => {});
  1015. },
  1016. onSubmit() {
  1017. this.getAnalysis();
  1018. },
  1019. resetForm() {
  1020. this.picker = [];
  1021. this.form = {
  1022. configAnalysis: null, //分析类型
  1023. powerFarmID: this.$route.query.fieldEngineCode, //风场编号//通过路由获取的默认传递的
  1024. dataBatchNum: this.$route.query.batchCode, //批次号
  1025. scada: "minute", //scada数类型
  1026. turbines: [], //机组编号
  1027. beginTime: null, //开始时间
  1028. endTime: null, //结束时间
  1029. excludingMonths: null, //过滤月份
  1030. valueWindSpeed: [], //风速值最大最小 数组第一值为min 第二个 max
  1031. valuePitchAngle: [], //桨距角最大最小
  1032. valueActivePower: [], //有功功率
  1033. valueGeneratorSpeed: [], //发电机转速
  1034. //图像
  1035. dgeneratorSpeed: [], //直驱发电机转速轴系 第一个值为步长 第二个min 第三个 max
  1036. igeneratorSpeed: [], //非直驱发电机转速轴系设置
  1037. dgeneratorTorque: [], //直驱发电机转矩轴系
  1038. igeneratorTorque: [], //非直驱发电机转矩轴系
  1039. cp: [], //风能利用系数轴系
  1040. tsr: [], //叶尖速比轴系
  1041. pitchAngle: [], //桨距角轴系
  1042. activePower: [], //有功功率轴系
  1043. };
  1044. },
  1045. // 清空内容
  1046. clear() {
  1047. this.$refs.editor.clear();
  1048. },
  1049. },
  1050. };
  1051. </script>
  1052. <style scoped lang="scss">
  1053. .box-card {
  1054. margin: 10px 0;
  1055. width: 100%;
  1056. font-size: 14px;
  1057. height: 100%;
  1058. .filedView {
  1059. height: 60px;
  1060. line-height: 60px;
  1061. background-color: #fff;
  1062. color: #303133;
  1063. cursor: pointer;
  1064. border-bottom: 1px solid #ebeef5;
  1065. font-size: 16px;
  1066. text-align: center;
  1067. font-weight: 500;
  1068. margin-bottom: 10px;
  1069. }
  1070. .el-card__body {
  1071. width: 100%;
  1072. height: 100% !important;
  1073. .left {
  1074. > div {
  1075. line-height: 3;
  1076. }
  1077. }
  1078. .el-row {
  1079. height: 100%;
  1080. width: 100%;
  1081. }
  1082. .el-col {
  1083. min-height: 500px;
  1084. }
  1085. .right {
  1086. height: 500px;
  1087. width: 100%;
  1088. iframe {
  1089. width: 100%;
  1090. height: 100%;
  1091. }
  1092. }
  1093. }
  1094. }
  1095. .el-select-dropdown__wrap {
  1096. .el-select-dropdown__list {
  1097. .el-checkbox {
  1098. display: flex;
  1099. justify-content: end;
  1100. margin: 0px 20px;
  1101. }
  1102. }
  1103. }
  1104. // .setting {
  1105. // font-size: 20px;
  1106. // font-weight: 900;
  1107. // }
  1108. ::v-deep.el-select--small,
  1109. ::v-deep.el-select__tags {
  1110. width: 220px !important;
  1111. // min-width: 180px !important;
  1112. .el-tag--light {
  1113. display: flex;
  1114. justify-content: space-between;
  1115. }
  1116. .el-tag--light:nth-child(1) {
  1117. width: 125px;
  1118. }
  1119. }
  1120. ::v-deep .searchFrom {
  1121. .el-form-item__content {
  1122. display: flex !important;
  1123. justify-content: end !important;
  1124. align-items: center !important;
  1125. i {
  1126. margin-left: 10px;
  1127. font-size: 24px;
  1128. font-weight: 800;
  1129. }
  1130. }
  1131. }
  1132. ::v-deep.drawerOption {
  1133. .el-drawer {
  1134. width: 33% !important;
  1135. }
  1136. .el-checkbox-group {
  1137. line-height: 40px !important;
  1138. }
  1139. .drawerLeft {
  1140. margin-left: 20px;
  1141. color: #606266 !important;
  1142. }
  1143. .checkFromRow {
  1144. .el-col-12 {
  1145. color: #606266 !important;
  1146. font-size: 14px;
  1147. }
  1148. .el-col-12:nth-child(even) {
  1149. text-align: end !important;
  1150. }
  1151. }
  1152. .drawerRight {
  1153. margin-right: 20px;
  1154. color: #606266 !important;
  1155. font-size: 14px;
  1156. ul {
  1157. list-style-type: none;
  1158. padding: 0;
  1159. color: #606266 !important;
  1160. li {
  1161. display: flex;
  1162. align-items: center;
  1163. justify-content: space-between;
  1164. padding: 0px 10px;
  1165. line-height: 40px !important;
  1166. }
  1167. }
  1168. }
  1169. .demo-drawer__footer {
  1170. display: flex;
  1171. margin-top: 50px;
  1172. justify-content: center;
  1173. }
  1174. }
  1175. ::v-deep.el-input--small .el-input__inner {
  1176. width: 220px !important;
  1177. }
  1178. .demo-input-suffix {
  1179. display: flex !important;
  1180. }
  1181. ::v-deep.demo-input-suffix .el-input--small {
  1182. width: 100px !important;
  1183. }
  1184. ::v-deep.demo-input-suffix .el-input--small .el-input__inner {
  1185. width: 90px !important;
  1186. }
  1187. .abalysisType {
  1188. margin-top: 30px;
  1189. }
  1190. ::v-deep .el-table th.el-table__cell > .cell {
  1191. display: block !important;
  1192. }
  1193. </style>