analysisEvent.vue 40 KB

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