analysisEvent.vue 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228
  1. <!--
  2. * @Author: your name
  3. * @Date: 2024-05-29 09:13:51
  4. * @LastEditTime: 2025-02-25 14:36:02
  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">
  553. <span></span>
  554. <span>风场信息概览</span>
  555. <el-button type="primary" size="small" @click="handleBtn"
  556. >切换{{ disableMsg }}</el-button
  557. >
  558. </div>
  559. </el-row>
  560. <el-row>
  561. <el-col :span="24" v-if="disableMsg === '地图'">
  562. <div class="left">
  563. <el-table :data="batchList" border>
  564. <el-table-column prop="engineName" label="风机名称">
  565. </el-table-column>
  566. <el-table-column prop="ratedCapacity" label="额定容量/KW">
  567. </el-table-column>
  568. <el-table-column prop="ratedWindSpeed" label="额定风速(m/s)">
  569. </el-table-column>
  570. <el-table-column prop="hubHeight" label="轮毂高度(m)">
  571. </el-table-column>
  572. <el-table-column prop="sightcing" label="是否标杆">
  573. <template slot-scope="{ row }">
  574. {{ row.sightcing == 1 ? "是" : "否" }}
  575. </template>
  576. </el-table-column>
  577. </el-table>
  578. <div class="pagination-container">
  579. <el-pagination
  580. @current-change="handleCurrentChange"
  581. :current-page.sync="formInline.pageNum"
  582. layout="total, prev, pager, next"
  583. :page-size="formInline.pageSize"
  584. :total="formInline.totalSize"
  585. >
  586. </el-pagination>
  587. </div>
  588. </div>
  589. </el-col>
  590. <el-col :span="24" v-loading="htmlLoading" v-else>
  591. <div class="right">
  592. <Map></Map>
  593. </div>
  594. </el-col>
  595. </el-row>
  596. </el-card>
  597. <el-drawer
  598. title="偏好设置"
  599. :visible.sync="drawer"
  600. :direction="direction"
  601. :before-close="handleClose"
  602. class="drawerOption"
  603. >
  604. <el-row>
  605. <el-col :span="12"
  606. ><div class="drawerLeft">
  607. <div style="text-align: center; font-size: 16px">常用功能设置</div>
  608. <el-checkbox
  609. :indeterminate="isIndeterminate"
  610. v-model="checkAll"
  611. @change="handleCheckAllChange"
  612. >全选</el-checkbox
  613. >
  614. <div style="margin: 15px 0"></div>
  615. <el-checkbox-group
  616. v-model="checkedCities"
  617. @change="handleCheckedCitiesChange"
  618. >
  619. <el-checkbox v-for="city in cities" :label="city" :key="city">{{
  620. city
  621. }}</el-checkbox>
  622. <el-checkbox label="数据源过滤" key="数据源过滤"></el-checkbox>
  623. <div class="checkFromRow">
  624. <el-row>
  625. <el-col :span="12">发电机转速测点</el-col>
  626. <el-col :span="12">桨距角值测点</el-col>
  627. <el-col :span="12">有功功率测点</el-col>
  628. <el-col :span="12">风速速度测点</el-col>
  629. </el-row>
  630. </div>
  631. <!-- <el-checkbox label="图像设置" key="图像设置"></el-checkbox>
  632. <div class="checkFromRow">
  633. <el-row>
  634. <el-col :span="12">发电机转矩坐标系</el-col>
  635. <el-col :span="12">桨距角坐标系</el-col>
  636. <el-col :span="12">叶尖速比坐标系</el-col>
  637. <el-col :span="12">有功功率坐标系</el-col>
  638. <el-col :span="12">发电机转矩坐标系</el-col>
  639. </el-row>
  640. </div> -->
  641. </el-checkbox-group>
  642. </div></el-col
  643. >
  644. <el-col :span="12">
  645. <div class="drawerRight">
  646. <div style="text-align: center; font-size: 16px">已选中功能</div>
  647. <ul>
  648. <li v-for="func in checkedCities" :key="func">
  649. {{ func }}
  650. <el-button
  651. type="text"
  652. icon="el-icon-delete"
  653. @click="removeFunction(func)"
  654. ></el-button>
  655. </li>
  656. </ul></div
  657. ></el-col>
  658. </el-row>
  659. <div class="demo-drawer__footer">
  660. <el-button @click="handleClose">取 消</el-button>
  661. <el-button type="primary" @click="handleClose">{{ "确 定" }}</el-button>
  662. </div>
  663. </el-drawer>
  664. </div>
  665. </template>
  666. <script>
  667. import {
  668. analysisEditQuery,
  669. analysis,
  670. queryDataTime,
  671. queryAllTypeScada,
  672. } from "@/api/performance";
  673. import {
  674. getWindEngineGroup,
  675. windEngineGrouPage,
  676. getWindEngineGroupRatedListByFieldCodePage,
  677. } from "@/api/ledger";
  678. import Map from "./map.vue";
  679. import axios from "axios";
  680. export default {
  681. components: {
  682. Map,
  683. },
  684. props: {
  685. activeName: String,
  686. },
  687. data() {
  688. return {
  689. disableMsg: "表格",
  690. formInline: {
  691. pageNum: 1,
  692. pageSize: 10,
  693. totalSize: 0,
  694. },
  695. batchList: [],
  696. checkedTurbines: false,
  697. checked: false,
  698. htmlLoading: false,
  699. engineCode: null, //台账机组编号
  700. picker: [],
  701. dataMinTime: null,
  702. dataMaxTime: null,
  703. // pickerOptions: {
  704. // disabledDate: this.disabledDate,
  705. // },
  706. loading: false,
  707. form: {
  708. configAnalysis: null, //分析模型
  709. powerFarmID: null, //风场编号//通过路由获取的默认传递的
  710. dataBatchNum: null, //批次号
  711. scada: "", //scada数类型
  712. turbines: [], //机组编号
  713. beginTime: null, //开始时间
  714. endTime: null, //结束时间
  715. excludingMonths: null, //过滤月份
  716. valueWindSpeed: [], //风速值最大最小 数组第一值为min 第二个 max
  717. valuePitchAngle: [], //桨距角最大最小
  718. valueActivePower: [], //有功功率
  719. valueGeneratorSpeed: [], //发电机转速
  720. //图像
  721. dgeneratorSpeed: [], //直驱发电机转速轴系 第一个值为步长 第二个min 第三个 max
  722. igeneratorSpeed: [], //非直驱发电机转速轴系设置
  723. dgeneratorTorque: [], //直驱发电机转矩轴系
  724. igeneratorTorque: [], //非直驱发电机转矩轴系
  725. cp: [], //风能利用系数轴系
  726. tsr: [], //叶尖速比轴系
  727. pitchAngle: [], //桨距角轴系
  728. activePower: [], //有功功率轴系
  729. },
  730. activeNames: ["1", "2", "3"],
  731. checkAll: false,
  732. checkedCities: ["分析模型", "数据源", "分析时间", "滤除月份", "机组名称"],
  733. cities: ["分析模型", "数据源", "分析时间", "滤除月份", "机组名称"],
  734. isIndeterminate: true,
  735. drawer: false,
  736. direction: "rtl",
  737. value: "",
  738. options: [],
  739. tabIndex: 2,
  740. analysisTypeList: [],
  741. windEngineGroupList: [],
  742. windDetail: {},
  743. transferTypeData: [],
  744. // 时间范围数组
  745. timeRanges: [
  746. // { start: '2024-12-01 00:00:00', end: '2024-12-30 23:59:59' },
  747. // { start: '2024-10-01 00:00:00', end: '2024-10-30 23:59:59' },
  748. // { start: '2024-05-01 00:00:00', end: '2024-05-30 23:59:59' },
  749. ],
  750. };
  751. },
  752. computed: {
  753. pickerOptions() {
  754. return {
  755. disabledDate: this.disabledDate,
  756. };
  757. },
  758. },
  759. watch: {
  760. activeName: {
  761. handler(newVal, oldVal) {
  762. // console.log(newVal, "新值 分析事件");
  763. },
  764. },
  765. },
  766. created() {
  767. //获取分析 分析模型、机组编号 列表
  768. this.getWindCodeList();
  769. this.getQueryDataTime();
  770. this.getFengjiList();
  771. queryAllTypeScada().then((res) => {
  772. this.transferTypeData = res.data;
  773. this.getTimeList();
  774. });
  775. },
  776. methods: {
  777. //切换风机信息展示
  778. handleBtn() {
  779. this.disableMsg = this.disableMsg == "表格" ? "地图" : "表格";
  780. },
  781. getTimeList() {
  782. let scada = [];
  783. if (this.form.scada) {
  784. scada.push(this.form.scada);
  785. } else {
  786. scada = this.form.configAnalysis.map((item) => {
  787. console.log(item.split("|")[1]);
  788. return item.split("|")[1];
  789. });
  790. console.log([...new Set(scada)], "scada");
  791. }
  792. axios
  793. .post("/transDataWeb/dataTransfer/getTimeRange", {
  794. transferType: [...new Set(scada)],
  795. windFarmCode: this.$route.query.fieldEngineCode,
  796. })
  797. .then((res) => {
  798. if (res.data.code === 200) {
  799. this.timeRanges = res.data.datas;
  800. console.log(this.timeRanges, "this.timeRanges");
  801. // this.formData = { ...res.data.datas };
  802. }
  803. })
  804. .catch((error) => {});
  805. },
  806. getFengjiList() {
  807. getWindEngineGroupRatedListByFieldCodePage({
  808. fieldCode: this.$route.query.fieldEngineCode,
  809. ...this.formInline,
  810. totalSize: undefined,
  811. }).then((res) => {
  812. this.batchList = res.data.list;
  813. this.formInline.totalSize = res.data.totalSize;
  814. });
  815. },
  816. //分页数据切换
  817. handleCurrentChange(val) {
  818. this.formInline.pageNum = val;
  819. this.getFengjiList();
  820. },
  821. // disabledDate(time) {
  822. // if (!this.dataMinTime || !this.dataMaxTime) {
  823. // return false;
  824. // }
  825. // const minTime = new Date(this.dataMinTime).getTime();
  826. // const maxTime = new Date(this.dataMaxTime).getTime();
  827. // return time.getTime() < minTime || time.getTime() > maxTime;
  828. // },
  829. // 禁用日期函数
  830. disabledDate(time) {
  831. const timeInMs = time.getTime();
  832. // 判断日期是否在任意一个时间范围内
  833. const isDisabled = !this.timeRanges.some((range) => {
  834. const start = new Date(range.startTime).getTime();
  835. const end = new Date(range.endTime).getTime();
  836. return timeInMs >= start && timeInMs <= end;
  837. });
  838. return isDisabled;
  839. },
  840. handleScadaAnalysis() {
  841. this.getTimeList();
  842. // this.getQueryDataTime();
  843. },
  844. handleScada() {
  845. this.getTimeList();
  846. // this.getQueryDataTime();
  847. },
  848. async getQueryDataTime() {
  849. const res = await queryDataTime({
  850. batchCode: this.$route.query.batchCode,
  851. dataTransferType: this.form.scada,
  852. });
  853. if (res.data && res.data.dataMinTime && res.data.dataMaxTime) {
  854. this.dataMinTime = res.data.dataMinTime; // 可选最小时间
  855. this.dataMaxTime = res.data.dataMaxTime; // 可选最大时间
  856. // 更新日期选择器的默认范围
  857. } else {
  858. this.dataMinTime = null; // 可选最小时间
  859. this.dataMaxTime = null; // 可选最大时间
  860. }
  861. },
  862. selectAllTurbines() {
  863. this.form.turbines = [];
  864. if (this.checkedTurbines) {
  865. this.windEngineGroupList.map((item) => {
  866. this.form.turbines.push(item.engineCode);
  867. });
  868. } else {
  869. this.form.turbines = [];
  870. }
  871. },
  872. selectAll() {
  873. this.form.configAnalysis = [];
  874. if (this.checked) {
  875. this.analysisTypeList.map((item) => {
  876. this.form.configAnalysis.push(item.typeCode);
  877. });
  878. } else {
  879. this.form.configAnalysis = [];
  880. }
  881. },
  882. ensureMinValue(field, index) {
  883. if (field[index] < 1) {
  884. field[index] = 1;
  885. }
  886. },
  887. handleEngineCode(e) {
  888. this.engineCode = e;
  889. this.getWindEngList();
  890. },
  891. async getWindEngList() {
  892. this.loading = true;
  893. try {
  894. const res = await getWindEngineGroup({
  895. engineCode: this.engineCode,
  896. });
  897. this.loading = false;
  898. this.windDetail = res.data;
  899. } catch (error) {
  900. this.loading = false;
  901. console.error(error);
  902. }
  903. },
  904. async getAnalysis() {
  905. this.loading = true;
  906. try {
  907. await analysis({
  908. // ...this.form,
  909. configAnalysis:
  910. this.form.configAnalysis !== null
  911. ? this.form.configAnalysis
  912. : undefined, //分析模型
  913. powerFarmID: this.$route.query.fieldEngineCode, //风场编号//通过路由获取的默认传递的
  914. dataBatchNum: this.$route.query.batchCode, //批次号
  915. scada: this.form.scada !== null ? this.form.scada : undefined, //scada数类型
  916. turbines:
  917. this.form.turbines.length > 0 ? this.form.turbines : undefined, //机组编号
  918. excludingMonths:
  919. this.form.excludingMonths === null
  920. ? undefined
  921. : this.form.excludingMonths, //过滤月份
  922. valueWindSpeed:
  923. this.form.valueWindSpeed.length > 0
  924. ? this.form.valueWindSpeed
  925. : undefined, //风速值最大最小 数组第一值为min 第二个 max
  926. valuePitchAngle:
  927. this.form.valuePitchAngle.length > 0
  928. ? this.form.valuePitchAngle
  929. : undefined, //桨距角最大最小
  930. valueActivePower:
  931. this.form.valueActivePower.length > 0
  932. ? this.form.valueActivePower
  933. : undefined, //有功功率
  934. valueGeneratorSpeed:
  935. this.form.valueGeneratorSpeed.length > 0
  936. ? this.form.valueGeneratorSpeed
  937. : undefined, //发电机转速
  938. //图像
  939. dgeneratorSpeed:
  940. this.form.dgeneratorSpeed.length > 0
  941. ? this.form.dgeneratorSpeed
  942. : undefined, //直驱发电机转速轴系 第一个值为步长 第二个min 第三个 max
  943. igeneratorSpeed:
  944. this.form.igeneratorSpeed.length > 0
  945. ? this.form.igeneratorSpeed
  946. : undefined, //非直驱发电机转速轴系设置
  947. dgeneratorTorque:
  948. this.form.dgeneratorTorque.length > 0
  949. ? this.form.dgeneratorTorque
  950. : undefined, //直驱发电机转矩轴系
  951. igeneratorTorque:
  952. this.form.igeneratorTorque.length > 0
  953. ? this.form.igeneratorTorque
  954. : undefined, //非直驱发电机转矩轴系
  955. cp: this.form.cp.length > 0 ? this.form.cp : undefined, //风能利用系数轴系
  956. tsr: this.form.tsr.length > 0 ? this.form.tsr : undefined, //叶尖速比轴系
  957. pitchAngle:
  958. this.form.pitchAngle.length > 0 ? this.form.pitchAngle : undefined, //桨距角轴系
  959. activePower:
  960. this.form.activePower.length > 0
  961. ? this.form.activePower
  962. : undefined, //有功功率轴系
  963. beginTime: this.picker[0], //开始时间
  964. endTime: this.picker[1], //结束时间
  965. });
  966. this.$message({
  967. type: "success",
  968. message: "已分析请前往分析详情中查看结果",
  969. });
  970. this.loading = false;
  971. } catch (error) {
  972. console.error(error);
  973. this.loading = false;
  974. }
  975. },
  976. async getWindCodeList() {
  977. this.loading = true;
  978. try {
  979. const response = await analysisEditQuery({
  980. batchCode: this.$route.query.batchCode,
  981. });
  982. if (
  983. response.data.windEngineGroupList === null ||
  984. response.data.windEngineGroupList.length === 0
  985. ) {
  986. this.$message({
  987. type: "warning",
  988. message: "当前风场没有风机,无法进行分析",
  989. });
  990. // this.$router.push("/home/performance/assetssMag");
  991. }
  992. this.form.powerFarmID = this.$route.query.fieldEngineCode;
  993. this.form.dataBatchNum = this.$route.query.batchCode;
  994. this.analysisTypeList = response.data.analysisTypeList;
  995. this.windEngineGroupList = response.data.windEngineGroupList;
  996. this.engineCode =
  997. response.data.windEngineGroupList !== null &&
  998. response.data.windEngineGroupList.length > 0
  999. ? response.data.windEngineGroupList[0].engineCode
  1000. : null;
  1001. if (response.data.windEngineGroupList.length > 0) {
  1002. //获取台账机组编号
  1003. this.getWindEngList();
  1004. }
  1005. this.loading = false;
  1006. } catch (error) {
  1007. this.$message({
  1008. type: "error",
  1009. message: error,
  1010. });
  1011. this.loading = false;
  1012. this.$router.push("/home/performance/assetssMag");
  1013. }
  1014. },
  1015. handleCheckAllChange(val) {
  1016. this.checkedCities = val
  1017. ? [...this.cities, "数据源过滤", "图像设置"]
  1018. : [];
  1019. this.isIndeterminate = false;
  1020. },
  1021. handleCheckedCitiesChange(value) {
  1022. let checkedCount = value.length;
  1023. this.checkAll = checkedCount === this.cities.length + 2;
  1024. this.isIndeterminate =
  1025. checkedCount > 0 && checkedCount < this.cities.length + 2;
  1026. },
  1027. removeFunction(item) {
  1028. this.checkedCities = this.checkedCities.filter((fuc) => fuc !== item);
  1029. },
  1030. handleClose(done) {
  1031. this.$confirm("确认关闭?")
  1032. .then((_) => {
  1033. // done();
  1034. this.drawer = false;
  1035. })
  1036. .catch((_) => {});
  1037. },
  1038. onSubmit() {
  1039. this.getAnalysis();
  1040. },
  1041. resetForm() {
  1042. this.picker = [];
  1043. this.form = {
  1044. configAnalysis: null, //分析模型
  1045. powerFarmID: this.$route.query.fieldEngineCode, //风场编号//通过路由获取的默认传递的
  1046. dataBatchNum: this.$route.query.batchCode, //批次号
  1047. scada: "", //scada数类型
  1048. turbines: [], //机组编号
  1049. beginTime: null, //开始时间
  1050. endTime: null, //结束时间
  1051. excludingMonths: null, //过滤月份
  1052. valueWindSpeed: [], //风速值最大最小 数组第一值为min 第二个 max
  1053. valuePitchAngle: [], //桨距角最大最小
  1054. valueActivePower: [], //有功功率
  1055. valueGeneratorSpeed: [], //发电机转速
  1056. //图像
  1057. dgeneratorSpeed: [], //直驱发电机转速轴系 第一个值为步长 第二个min 第三个 max
  1058. igeneratorSpeed: [], //非直驱发电机转速轴系设置
  1059. dgeneratorTorque: [], //直驱发电机转矩轴系
  1060. igeneratorTorque: [], //非直驱发电机转矩轴系
  1061. cp: [], //风能利用系数轴系
  1062. tsr: [], //叶尖速比轴系
  1063. pitchAngle: [], //桨距角轴系
  1064. activePower: [], //有功功率轴系
  1065. };
  1066. },
  1067. // 清空内容
  1068. clear() {
  1069. this.$refs.editor.clear();
  1070. },
  1071. },
  1072. };
  1073. </script>
  1074. <style scoped lang="scss">
  1075. .box-card {
  1076. margin: 10px 0;
  1077. width: 100%;
  1078. font-size: 14px;
  1079. height: 100%;
  1080. .filedView {
  1081. height: 60px;
  1082. // line-height: 60px;
  1083. background-color: #fff;
  1084. color: #303133;
  1085. cursor: pointer;
  1086. border-bottom: 1px solid #ebeef5;
  1087. font-size: 16px;
  1088. text-align: center;
  1089. display: flex;
  1090. justify-content: space-between;
  1091. align-items: center;
  1092. font-weight: 500;
  1093. margin-bottom: 10px;
  1094. }
  1095. .el-card__body {
  1096. width: 100%;
  1097. height: 100% !important;
  1098. .left {
  1099. > div {
  1100. line-height: 3;
  1101. }
  1102. }
  1103. .el-row {
  1104. height: 100%;
  1105. width: 100%;
  1106. }
  1107. .el-col {
  1108. min-height: 500px;
  1109. }
  1110. .right {
  1111. height: 500px;
  1112. width: 100%;
  1113. iframe {
  1114. width: 100%;
  1115. height: 100%;
  1116. }
  1117. }
  1118. }
  1119. }
  1120. .el-select-dropdown__wrap {
  1121. .el-select-dropdown__list {
  1122. .el-checkbox {
  1123. display: flex;
  1124. justify-content: end;
  1125. margin: 0px 20px;
  1126. }
  1127. }
  1128. }
  1129. // .setting {
  1130. // font-size: 20px;
  1131. // font-weight: 900;
  1132. // }
  1133. ::v-deep.el-select--small,
  1134. ::v-deep.el-select__tags {
  1135. width: 220px !important;
  1136. // min-width: 180px !important;
  1137. .el-tag--light {
  1138. display: flex;
  1139. justify-content: space-between;
  1140. }
  1141. .el-tag--light:nth-child(1) {
  1142. width: 125px;
  1143. }
  1144. }
  1145. ::v-deep .searchFrom {
  1146. .el-form-item__content {
  1147. display: flex !important;
  1148. justify-content: end !important;
  1149. align-items: center !important;
  1150. i {
  1151. margin-left: 10px;
  1152. font-size: 24px;
  1153. font-weight: 800;
  1154. }
  1155. }
  1156. }
  1157. ::v-deep.drawerOption {
  1158. .el-drawer {
  1159. width: 33% !important;
  1160. }
  1161. .el-checkbox-group {
  1162. line-height: 40px !important;
  1163. }
  1164. .drawerLeft {
  1165. margin-left: 20px;
  1166. color: #606266 !important;
  1167. }
  1168. .checkFromRow {
  1169. .el-col-12 {
  1170. color: #606266 !important;
  1171. font-size: 14px;
  1172. }
  1173. .el-col-12:nth-child(even) {
  1174. text-align: end !important;
  1175. }
  1176. }
  1177. .drawerRight {
  1178. margin-right: 20px;
  1179. color: #606266 !important;
  1180. font-size: 14px;
  1181. ul {
  1182. list-style-type: none;
  1183. padding: 0;
  1184. color: #606266 !important;
  1185. li {
  1186. display: flex;
  1187. align-items: center;
  1188. justify-content: space-between;
  1189. padding: 0px 10px;
  1190. line-height: 40px !important;
  1191. }
  1192. }
  1193. }
  1194. .demo-drawer__footer {
  1195. display: flex;
  1196. margin-top: 50px;
  1197. justify-content: center;
  1198. }
  1199. }
  1200. ::v-deep.el-input--small .el-input__inner {
  1201. width: 220px !important;
  1202. }
  1203. .demo-input-suffix {
  1204. display: flex !important;
  1205. }
  1206. ::v-deep.demo-input-suffix .el-input--small {
  1207. width: 100px !important;
  1208. }
  1209. ::v-deep.demo-input-suffix .el-input--small .el-input__inner {
  1210. width: 90px !important;
  1211. }
  1212. .abalysisType {
  1213. margin-top: 30px;
  1214. }
  1215. ::v-deep .el-table th.el-table__cell > .cell {
  1216. display: block !important;
  1217. }
  1218. </style>