analysisEvent.vue 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634
  1. <!--
  2. * @Author: your name
  3. * @Date: 2024-05-29 09:13:51
  4. * @LastEditTime: 2024-05-31 16:26:47
  5. * @LastEditors: bogon
  6. * @Description: In User Settings Edit
  7. * @FilePath: /performance-test/src/views/performance/components/analysisEvent.vue
  8. -->
  9. <template>
  10. <div>
  11. <el-form ref="form" :model="form" label-width="120px">
  12. <el-row type="flex" justify="end">
  13. <el-col :span="5">
  14. <el-form-item class="searchFrom">
  15. <el-button type="primary" @click="onSubmit" size="small"
  16. >分析</el-button
  17. >
  18. <el-button size="small">重置</el-button>
  19. <i @click="drawer = true" class="el-icon-setting"></i>
  20. </el-form-item>
  21. </el-col>
  22. </el-row>
  23. <el-collapse v-model="activeNames">
  24. <el-collapse-item title="基础筛选:" name="1">
  25. <el-row class="flex-wrap-row" :gutter="5">
  26. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  27. <el-form-item
  28. label="分析类型"
  29. v-if="checkedCities.find((item) => item === '分析类型')"
  30. >
  31. <el-select
  32. v-model="form.region"
  33. placeholder="请选择分析类型"
  34. size="small"
  35. >
  36. <el-option label="类型一" value="shanghai"></el-option>
  37. <el-option label="类型二" value="beijing"></el-option>
  38. </el-select> </el-form-item
  39. ></el-col>
  40. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  41. <el-form-item
  42. label="机组编号"
  43. v-if="checkedCities.find((item) => item === '机组编号')"
  44. >
  45. <el-select
  46. multiple
  47. v-model="form.region"
  48. placeholder="请选择机组编号"
  49. size="small"
  50. >
  51. <el-option label="类型一" value="shanghai"></el-option>
  52. <el-option label="类型二" value="beijing"></el-option>
  53. </el-select> </el-form-item
  54. ></el-col>
  55. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="5">
  56. <el-form-item
  57. label="滤除月份"
  58. v-if="checkedCities.find((item) => item === '滤除月份')"
  59. >
  60. <el-date-picker
  61. width="200"
  62. size="small"
  63. type="dates"
  64. v-model="value4"
  65. placeholder="选择一个或多个日期"
  66. >
  67. </el-date-picker>
  68. </el-form-item>
  69. </el-col>
  70. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="9">
  71. <el-form-item
  72. label="分析时间"
  73. v-if="checkedCities.find((item) => item === '分析时间')"
  74. >
  75. <el-date-picker
  76. size="small"
  77. v-model="value1"
  78. type="daterange"
  79. range-separator="至"
  80. start-placeholder="开始日期"
  81. end-placeholder="结束日期"
  82. >
  83. </el-date-picker> </el-form-item
  84. ></el-col>
  85. </el-row>
  86. </el-collapse-item>
  87. <el-collapse-item
  88. title="SACAD数据测点过滤设置:"
  89. name="2"
  90. v-if="checkedCities.find((item) => item === 'SCADA数据过滤')"
  91. >
  92. <el-row :gutter="5">
  93. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  94. <el-form-item label="风速过滤">
  95. <div class="demo-input-suffix">
  96. <el-input
  97. type="number"
  98. size="small"
  99. placeholder="最小值"
  100. v-model="input1"
  101. >
  102. </el-input>
  103. <el-input
  104. type="number"
  105. size="small"
  106. placeholder="最大值"
  107. v-model="input2"
  108. >
  109. </el-input>
  110. </div>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  114. <el-form-item label="桨距角过滤">
  115. <div class="demo-input-suffix">
  116. <el-input
  117. type="number"
  118. size="small"
  119. placeholder="最小值"
  120. v-model="input1"
  121. >
  122. </el-input>
  123. <el-input
  124. type="number"
  125. size="small"
  126. placeholder="最大值"
  127. v-model="input2"
  128. >
  129. </el-input>
  130. </div>
  131. </el-form-item>
  132. </el-col>
  133. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  134. <el-form-item label="有功功率过滤">
  135. <div class="demo-input-suffix">
  136. <el-input
  137. type="number"
  138. size="small"
  139. placeholder="最小值"
  140. v-model="input1"
  141. >
  142. </el-input>
  143. <el-input
  144. type="number"
  145. size="small"
  146. placeholder="最大值"
  147. v-model="input2"
  148. >
  149. </el-input>
  150. </div>
  151. </el-form-item>
  152. </el-col>
  153. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  154. <el-form-item label="发电机转速过滤">
  155. <div class="demo-input-suffix">
  156. <el-input
  157. type="number"
  158. size="small"
  159. placeholder="最小值"
  160. v-model="input1"
  161. >
  162. </el-input>
  163. <el-input
  164. type="number"
  165. size="small"
  166. placeholder="最大值"
  167. v-model="input2"
  168. >
  169. </el-input>
  170. </div>
  171. </el-form-item>
  172. </el-col>
  173. </el-row>
  174. </el-collapse-item>
  175. <el-collapse-item
  176. title="图像轴系设置:"
  177. name="3"
  178. v-if="checkedCities.find((item) => item === '图像设置')"
  179. >
  180. <el-row :gutter="5">
  181. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  182. <el-form-item label="发电机转矩">
  183. <div class="demo-input-suffix">
  184. <el-input
  185. type="number"
  186. size="small"
  187. placeholder="步长"
  188. v-model="input1"
  189. >
  190. </el-input>
  191. <el-input
  192. type="number"
  193. size="small"
  194. placeholder="最小值"
  195. v-model="input2"
  196. >
  197. </el-input>
  198. <el-input
  199. type="number"
  200. size="small"
  201. placeholder="最大值"
  202. v-model="input2"
  203. >
  204. </el-input>
  205. </div>
  206. </el-form-item>
  207. </el-col>
  208. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  209. <el-form-item label="风能利用系数">
  210. <div class="demo-input-suffix">
  211. <el-input
  212. type="number"
  213. size="small"
  214. placeholder="步长"
  215. v-model="input1"
  216. >
  217. </el-input>
  218. <el-input
  219. type="number"
  220. size="small"
  221. placeholder="最小值"
  222. v-model="input2"
  223. >
  224. </el-input>
  225. <el-input
  226. type="number"
  227. size="small"
  228. placeholder="最大值"
  229. v-model="input2"
  230. >
  231. </el-input>
  232. </div>
  233. </el-form-item>
  234. </el-col>
  235. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  236. <el-form-item label="叶尖转速比">
  237. <div class="demo-input-suffix">
  238. <el-input
  239. type="number"
  240. size="small"
  241. placeholder="步长"
  242. v-model="input1"
  243. >
  244. </el-input>
  245. <el-input
  246. type="number"
  247. size="small"
  248. placeholder="最小值"
  249. v-model="input2"
  250. >
  251. </el-input>
  252. <el-input
  253. type="number"
  254. size="small"
  255. placeholder="最大值"
  256. v-model="input2"
  257. >
  258. </el-input>
  259. </div>
  260. </el-form-item>
  261. </el-col>
  262. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  263. <el-form-item label="有功功率">
  264. <div class="demo-input-suffix">
  265. <el-input
  266. type="number"
  267. size="small"
  268. placeholder="步长"
  269. v-model="input1"
  270. >
  271. </el-input>
  272. <el-input
  273. type="number"
  274. size="small"
  275. placeholder="最小值"
  276. v-model="input2"
  277. >
  278. </el-input>
  279. <el-input
  280. type="number"
  281. size="small"
  282. placeholder="最大值"
  283. v-model="input2"
  284. >
  285. </el-input>
  286. </div>
  287. </el-form-item>
  288. </el-col>
  289. <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="6">
  290. <el-form-item label="桨距角">
  291. <div class="demo-input-suffix">
  292. <el-input
  293. type="number"
  294. size="small"
  295. placeholder="步长"
  296. v-model="input1"
  297. >
  298. </el-input>
  299. <el-input
  300. type="number"
  301. size="small"
  302. placeholder="最小值"
  303. v-model="input2"
  304. >
  305. </el-input>
  306. <el-input
  307. type="number"
  308. size="small"
  309. placeholder="最大值"
  310. v-model="input2"
  311. >
  312. </el-input>
  313. </div>
  314. </el-form-item>
  315. </el-col>
  316. </el-row>
  317. </el-collapse-item>
  318. </el-collapse>
  319. </el-form>
  320. <el-card shadow="always" class="box-card">
  321. <el-row>
  322. <el-col :span="12"
  323. ><div class="left">
  324. <div>
  325. <span>机组编号:</span>
  326. <el-select v-model="value" placeholder="请选择" size="small">
  327. <el-option
  328. v-for="item in options"
  329. :key="item.value"
  330. :label="item.label"
  331. :value="item.value"
  332. >
  333. </el-option>
  334. </el-select>
  335. </div>
  336. <div>1.额定功率(Rated Power):指发电机组在标准工况下</div>
  337. <div>2.发电机类型(Generator Type):</div>
  338. <div>3.经度(Longitude):</div>
  339. <div>4.维度(Dimensionality):</div>
  340. <div>5.海拔高度(Altitude):</div>
  341. <div>6.并网时间(Grid connection time):</div>
  342. <div>7.是否标杆(Benchmarking or not):</div>
  343. <div>8.地理位置(Location):不同地理位置的气候条件</div>
  344. <div>
  345. 9.供应商信息(Manufacturer
  346. Information):制造商的信誉、技术水平和售后
  347. </div>
  348. <div>
  349. 10.维护需求(Maintenance Requirements):风力发电机组需要定期
  350. </div>
  351. <div>11.预期寿命(Expected Lifetime):风力发电机组的设计寿命</div>
  352. </div>
  353. </el-col>
  354. <el-col :span="12">
  355. <div class="right">
  356. <iframe src="/html/A01.html" frameborder="0"></iframe>
  357. </div>
  358. </el-col>
  359. </el-row>
  360. </el-card>
  361. <el-drawer
  362. title="偏好设置"
  363. :visible.sync="drawer"
  364. :direction="direction"
  365. :before-close="handleClose"
  366. class="drawerOption"
  367. >
  368. <el-row>
  369. <el-col :span="12"
  370. ><div class="drawerLeft">
  371. <div style="text-align: center; font-size: 16px">常用功能设置</div>
  372. <el-checkbox
  373. :indeterminate="isIndeterminate"
  374. v-model="checkAll"
  375. @change="handleCheckAllChange"
  376. >全选</el-checkbox
  377. >
  378. <div style="margin: 15px 0"></div>
  379. <el-checkbox-group
  380. v-model="checkedCities"
  381. @change="handleCheckedCitiesChange"
  382. >
  383. <el-checkbox v-for="city in cities" :label="city" :key="city">{{
  384. city
  385. }}</el-checkbox>
  386. <el-checkbox
  387. label="SCADA数据过滤"
  388. key="SCADA数据过滤"
  389. ></el-checkbox>
  390. <div class="checkFromRow">
  391. <el-row>
  392. <el-col :span="12">发电机转速测点</el-col>
  393. <el-col :span="12">桨距角值测点</el-col>
  394. <el-col :span="12">有功功率测点</el-col>
  395. <el-col :span="12">风速速度测点</el-col>
  396. </el-row>
  397. </div>
  398. <el-checkbox label="图像设置" key="图像设置"></el-checkbox>
  399. <div class="checkFromRow">
  400. <el-row>
  401. <el-col :span="12">发电机转矩轴系</el-col>
  402. <el-col :span="12">桨距角轴系</el-col>
  403. <el-col :span="12">叶尖速比轴系</el-col>
  404. <el-col :span="12">有功功率轴系</el-col>
  405. <el-col :span="12">发电机转矩轴系</el-col>
  406. </el-row>
  407. </div>
  408. </el-checkbox-group>
  409. </div></el-col
  410. >
  411. <el-col :span="12">
  412. <div class="drawerRight">
  413. <div style="text-align: center; font-size: 16px">已选中功能</div>
  414. <ul>
  415. <li v-for="func in checkedCities" :key="func">
  416. {{ func }}
  417. <el-button
  418. type="text"
  419. icon="el-icon-delete"
  420. @click="removeFunction(func)"
  421. ></el-button>
  422. </li>
  423. </ul></div
  424. ></el-col>
  425. </el-row>
  426. <div class="demo-drawer__footer">
  427. <el-button @click="handleClose">取 消</el-button>
  428. <el-button type="primary" @click="handleClose">{{ "确 定" }}</el-button>
  429. </div>
  430. </el-drawer>
  431. </div>
  432. </template>
  433. <script>
  434. export default {
  435. data() {
  436. return {
  437. value4: "",
  438. value1: "",
  439. form: {},
  440. activeNames: ["1", "2", "3"],
  441. checkAll: false,
  442. checkedCities: ["分析类型", "分析时间", "滤除月份", "机组编号"],
  443. cities: ["分析类型", "分析时间", "滤除月份", "机组编号"],
  444. isIndeterminate: true,
  445. drawer: false,
  446. direction: "rtl",
  447. value: "",
  448. options: [],
  449. editableTabsValue: "2",
  450. editableTabs: [
  451. {
  452. title: "Tab 1",
  453. name: "1",
  454. content: "Tab 1 content",
  455. },
  456. {
  457. title: "Tab 2",
  458. name: "2",
  459. content: "Tab 2 content",
  460. },
  461. ],
  462. form: {
  463. name: "",
  464. region: "",
  465. date1: "",
  466. date2: "",
  467. delivery: false,
  468. type: [],
  469. resource: "",
  470. desc: "",
  471. },
  472. formData: { content: "<p>Hello, Tinymce!</p>" },
  473. tabIndex: 2,
  474. };
  475. },
  476. methods: {
  477. handleCheckAllChange(val) {
  478. this.checkedCities = val
  479. ? [...this.cities, "SCADA数据过滤", "图像设置"]
  480. : [];
  481. this.isIndeterminate = false;
  482. },
  483. handleCheckedCitiesChange(value) {
  484. let checkedCount = value.length;
  485. this.checkAll = checkedCount === this.cities.length + 2;
  486. this.isIndeterminate =
  487. checkedCount > 0 && checkedCount < this.cities.length + 2;
  488. },
  489. removeFunction(item) {
  490. this.checkedCities = this.checkedCities.filter((fuc) => fuc !== item);
  491. },
  492. handleClose(done) {
  493. this.$confirm("确认关闭?")
  494. .then((_) => {
  495. // done();
  496. this.drawer = false;
  497. })
  498. .catch((_) => {});
  499. },
  500. // 鼠标单击的事件
  501. onClick(e, editor) {
  502. console.log("Element clicked");
  503. console.log(e);
  504. console.log(editor);
  505. },
  506. onSubmit() {
  507. console.log("submit!");
  508. },
  509. // 清空内容
  510. clear() {
  511. this.$refs.editor.clear();
  512. },
  513. handleTabsEdit(targetName, action) {
  514. if (action === "add") {
  515. let newTabName = ++this.tabIndex + "";
  516. this.editableTabs.push({
  517. title: "New Tab",
  518. name: newTabName,
  519. content: "New Tab content",
  520. });
  521. this.editableTabsValue = newTabName;
  522. }
  523. if (action === "remove") {
  524. let tabs = this.editableTabs;
  525. let activeName = this.editableTabsValue;
  526. if (activeName === targetName) {
  527. tabs.forEach((tab, index) => {
  528. if (tab.name === targetName) {
  529. let nextTab = tabs[index + 1] || tabs[index - 1];
  530. if (nextTab) {
  531. activeName = nextTab.name;
  532. }
  533. }
  534. });
  535. }
  536. this.editableTabsValue = activeName;
  537. this.editableTabs = tabs.filter((tab) => tab.name !== targetName);
  538. }
  539. },
  540. },
  541. };
  542. </script>
  543. <style scoped lang="scss">
  544. .box-card {
  545. margin: 10px 0;
  546. width: 100%;
  547. font-size: 14px;
  548. .el-card__body {
  549. width: 100%;
  550. .left {
  551. > div {
  552. line-height: 3;
  553. }
  554. }
  555. .right {
  556. height: 450px;
  557. width: 100%;
  558. iframe{
  559. width: 100%;
  560. height: 100%;
  561. }
  562. }
  563. }
  564. }
  565. ::v-deep .searchFrom {
  566. .el-form-item__content {
  567. display: flex !important;
  568. justify-content: end !important;
  569. align-items: center !important;
  570. i {
  571. margin-left: 10px;
  572. font-size: 20px;
  573. }
  574. }
  575. }
  576. .drawerOption {
  577. .el-checkbox-group {
  578. line-height: 40px !important;
  579. }
  580. .drawerLeft {
  581. margin-left: 20px;
  582. color: #606266 !important;
  583. }
  584. .checkFromRow {
  585. .el-col-12 {
  586. color: #606266 !important;
  587. font-size: 14px;
  588. }
  589. .el-col-12:nth-child(even) {
  590. text-align: end !important;
  591. }
  592. }
  593. .drawerRight {
  594. margin-right: 20px;
  595. color: #606266 !important;
  596. font-size: 14px;
  597. ul {
  598. list-style-type: none;
  599. padding: 0;
  600. color: #606266 !important;
  601. li {
  602. display: flex;
  603. align-items: center;
  604. justify-content: space-between;
  605. padding: 0px 10px;
  606. line-height: 40px !important;
  607. }
  608. }
  609. }
  610. .demo-drawer__footer {
  611. display: flex;
  612. margin-top: 50px;
  613. justify-content: center;
  614. }
  615. }
  616. ::v-deep.el-input--small .el-input__inner {
  617. width: 200px !important;
  618. }
  619. .demo-input-suffix {
  620. display: flex !important;
  621. }
  622. ::v-deep.demo-input-suffix .el-input--small {
  623. width: 100px !important;
  624. }
  625. ::v-deep.demo-input-suffix .el-input--small .el-input__inner {
  626. width: 90px !important;
  627. }
  628. .abalysisType {
  629. margin-top: 30px;
  630. }
  631. </style>