analysisEvent.vue 38 KB

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