analysisEvent.vue 30 KB

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