index.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810
  1. <script setup name="combine">
  2. import searchCop from "./components/search.vue";
  3. import excelCop from "@/components/excel.vue";
  4. import treeCop from "@/components/tree.vue";
  5. import tableCop from "@/views/powerGenerating/dataFilter/components/table.vue";
  6. import {
  7. getWindFittingExcelShow,
  8. getWindFittingData,
  9. getProcessData,
  10. getProcessTree,
  11. getWindFittingTree,
  12. getWindFittingShow,
  13. getWindFittingFilter,
  14. getWindFittingAlarms,
  15. } from "@/api/powerGenerating/index.js";
  16. import SubmitBtn from "@/components/SubmitBtn.vue";
  17. import { ref, nextTick, onActivated, onMounted, reactive } from "vue";
  18. import { ElMessage } from "element-plus";
  19. import CurrentScatterChart from "./components/current-scatter-chart.vue";
  20. const currentId = ref("");
  21. /**excel 开始 */
  22. const excelCheckboxShow = ref(false);
  23. const excelType = ref("");
  24. const excelCheckIds = ref([]);
  25. const excelList = ref([]);
  26. const funExcelChange = async (obj) => {
  27. //点击excel项时
  28. activeTab.value = "1";
  29. isChartArea.value = false;
  30. tableShowId.value = obj.id;
  31. currentId.value = obj.id;
  32. tableName.value = obj.name;
  33. excelType.value = obj.type; // 接收excel的type 用于控制右侧tab展示
  34. let res = null;
  35. let chartRes = {
  36. scatterhs: [[]],
  37. scatterls: [[]],
  38. sjgl: [[]],
  39. llgl: [[]],
  40. cpz: [[]],
  41. };
  42. let chartResponse = null;
  43. tableLoading.value = true;
  44. if (obj.type === "process") {
  45. res = await getProcessData({ id: obj.id });
  46. } else if (obj.type === "fitting") {
  47. activeTab.value = "2";
  48. res = await getWindFittingShow({ id: obj.id });
  49. // res = tableRes
  50. // chartResponse = dotRes
  51. chartResponse = await getWindFittingExcelShow({ id: obj.id, p: 1 });
  52. }
  53. if (res.code === 200) {
  54. tableColumn.value = res.data.title.map((o) => {
  55. return {
  56. prop: o.key,
  57. width: o.des === "时间" ? 100 : 80,
  58. label: o.des,
  59. };
  60. });
  61. tableData.value = res.data.data;
  62. tableLoading.value = false;
  63. } else {
  64. tableLoading.value = false;
  65. }
  66. if (chartResponse && chartResponse.code === 200) {
  67. chartRes = chartResponse.data;
  68. markDot.pcl5 = chartRes.obj.pc5ratio;
  69. markDot.pcl10 = chartRes.obj.pc10ratio;
  70. markDot.pcl12 = chartRes.obj.pc12ratio;
  71. markDot.pcl25 = chartRes.obj.pc25ratio;
  72. avgObj.title = chartRes.obj.path
  73. .substring(
  74. chartRes.obj.path.indexOf(chartRes.obj.station + "_") +
  75. (chartRes.obj.station + "_").length
  76. )
  77. .split("_")[0];
  78. avgObj.cpavg = Number(chartRes.obj.cpavg).toFixed(2);
  79. avgObj.frequency = Number(chartRes.obj.frequency).toFixed(2);
  80. avgObj.pcratio = Number(chartRes.obj.pcratio).toFixed(2);
  81. dataSet.value = JSON.stringify([
  82. {
  83. source: chartRes.wyd,
  84. // source: chartRes.scatterls
  85. },
  86. {
  87. source: chartRes.yyd,
  88. // source: chartRes.scatterhs
  89. },
  90. ]);
  91. const color = [
  92. "#1C99FF",
  93. "#FF8700",
  94. "#3D54BE",
  95. "#fa8c16",
  96. "#1DA0D7",
  97. "#DD5044",
  98. ];
  99. seriesData.value = [
  100. {
  101. name: "拟合功率",
  102. type: "line",
  103. symbol: "line", //设定为实心点
  104. symbolSize: 0, //设定实心点的大小
  105. smooth: true, //这个是把线变成曲线
  106. data: chartRes.sjgl,
  107. xAxisIndex: 0,
  108. },
  109. {
  110. name: "保证功率",
  111. type: "line",
  112. symbol: "line", //设定为实心点
  113. symbolSize: 0, //设定实心点的大小
  114. smooth: true, //这个是把线变成曲线
  115. data: chartRes.llgl,
  116. xAxisIndex: 0,
  117. },
  118. {
  119. type: "effectScatter",
  120. showEffectOn: "emphasis",
  121. rippleEffect: {
  122. scale: 1,
  123. },
  124. name: "无用点",
  125. symbolSize: (data) => {
  126. return data.s ? (data.s > 10 ? 10 : data.s) : 4;
  127. },
  128. datasetIndex: 0,
  129. encode: {
  130. x: "x",
  131. y: "y",
  132. },
  133. xAxisIndex: 0,
  134. yAxisIndex: 0,
  135. },
  136. {
  137. type: "effectScatter",
  138. showEffectOn: "emphasis",
  139. rippleEffect: {
  140. scale: 1,
  141. },
  142. name: "有用点",
  143. symbolSize: (data) => {
  144. return data.s ? (data.s > 10 ? 10 : data.s) : 4;
  145. },
  146. datasetIndex: 1,
  147. encode: {
  148. x: "x",
  149. y: "y",
  150. },
  151. xAxisIndex: 0,
  152. yAxisIndex: 0,
  153. },
  154. {
  155. name: "Cp值",
  156. type: "line",
  157. symbol: "line", //设定为实心点
  158. symbolSize: 0, //设定实心点的大小
  159. smooth: true, //这个是把线变成曲线
  160. data: chartRes.cpz,
  161. xAxisIndex: 0,
  162. yAxisIndex: 1,
  163. },
  164. ];
  165. }
  166. };
  167. const funExcelCheckChange = ({ checkArr, data }) => {
  168. //bug
  169. excelCheckIds.value = checkArr;
  170. };
  171. /**excel fitData */
  172. const excelFitList = ref([]);
  173. /**prepare tree 开始 */
  174. const treeData = ref([]);
  175. const actTreeNode = ref(null); //当前激活的treeNode
  176. const funRepeatMap = (arr, type = "prepare") => {
  177. return arr.map((o) => {
  178. if (o.children) {
  179. const findIndex = o.children.findIndex((p) => !!p.type);
  180. if (findIndex !== -1) {
  181. o.childs = o.children;
  182. o.children = [];
  183. if (!actTreeNode.value && type === "process") {
  184. //判断当且仅有process获取tree时 赋值
  185. actTreeNode.value = o;
  186. }
  187. }
  188. }
  189. return {
  190. ...o,
  191. children: o.children ? funRepeatMap(o.children, type) : [],
  192. };
  193. });
  194. };
  195. const funGetTree = async () => {
  196. const res = await getProcessTree();
  197. treeData.value = funRepeatMap(res.data);
  198. excelList.value = [];
  199. };
  200. const funCurrentChange = ({ current, currentNode }) => {
  201. excelCheckboxShow.value = true;
  202. if (current.childs) {
  203. excelList.value = current.childs.map((o) => {
  204. return {
  205. id: o.id,
  206. interval: o.interval,
  207. path: o.path,
  208. prepareid: o.prepareid,
  209. station: o.station,
  210. time: o.time,
  211. type: o.type,
  212. windturbine: o.windturbine,
  213. name: o.path.substring(
  214. o.path.indexOf(o.station + "_") + (o.station + "_").length
  215. ),
  216. };
  217. });
  218. } else {
  219. excelList.value = [];
  220. }
  221. };
  222. const funTreeCheckChange = ({
  223. current,
  224. checkedNodes,
  225. checkedKeys,
  226. halfCheckedNodes,
  227. halfCheckedKeys,
  228. }) => {
  229. //tree change -> excel change
  230. funCurrentChange({ current, currentNode: "" });
  231. const checkIds = [];
  232. if (checkedNodes.length) {
  233. for (const node of checkedNodes) {
  234. if (node.childs && node.childs.length) {
  235. for (const child of node.childs) {
  236. checkIds.push(child.id);
  237. }
  238. }
  239. }
  240. }
  241. excelCheckIds.value = checkIds;
  242. };
  243. /**process tree 开始 */
  244. const processTreeData = ref([]);
  245. const funGetProcessTree = async (flag = true) => {
  246. //flag控制是否获取tree的第一项 true为可获取
  247. actTreeNode.value = null;
  248. const res = await getWindFittingTree();
  249. excelFitList.value = [];
  250. processTreeData.value = funRepeatMap(res.data, flag ? "process" : "prepare"); //flag控制对actTreeNode赋值
  251. if (actTreeNode.value) {
  252. funProcessCurrentChange({ current: actTreeNode.value, currentNode: null });
  253. const child = actTreeNode.value.childs[0];
  254. const obj = {
  255. id: child.id,
  256. interval: child.interval,
  257. path: child.path,
  258. prepareid: child.prepareid,
  259. station: child.station,
  260. time: child.time,
  261. type: child.type,
  262. windturbine: child.windturbine,
  263. name: child.path.substring(
  264. child.path.indexOf(child.station + "_") + (child.station + "_").length
  265. ),
  266. };
  267. funExcelChange(obj);
  268. }
  269. };
  270. const funProcessCurrentChange = ({ current, currentNode }) => {
  271. if (current.childs) {
  272. excelFitList.value = current.childs.map((o) => {
  273. return {
  274. id: o.id,
  275. interval: o.interval,
  276. path: o.path,
  277. prepareid: o.prepareid,
  278. station: o.station,
  279. time: o.time,
  280. type: o.type,
  281. windturbine: o.windturbine,
  282. name: o.path.substring(
  283. o.path.indexOf(o.station + "_") + (o.station + "_").length
  284. ),
  285. };
  286. });
  287. } else {
  288. excelFitList.value = [];
  289. }
  290. };
  291. /**table 开始 */
  292. const tableShowId = ref("");
  293. const tableColumn = ref([]);
  294. const tableLoading = ref(false);
  295. const tableName = ref("");
  296. const tableData = ref([]);
  297. /**table 结束 */
  298. /**search 开始 */
  299. const funSubmit = async (query) => {
  300. if (!excelCheckIds.value.length) {
  301. ElMessage.error("请勾选要预处理的项");
  302. return false;
  303. }
  304. const params = {
  305. ...query,
  306. ids: excelCheckIds.value.join(","),
  307. };
  308. const res = await getWindFittingData(params);
  309. if (res.code === 200) {
  310. ElMessage.success(res.msg);
  311. funGetProcessTree(false); //阻止获取tree第一项数据及图表
  312. const excelInfo = res.data;
  313. /**拟合完成后 显示右侧图表及数据 */
  314. funExcelChange({
  315. id: excelInfo.id,
  316. name: excelInfo.path.substring(
  317. excelInfo.path.indexOf(excelInfo.station + "_") +
  318. (excelInfo.station + "_").length
  319. ),
  320. type: "fitting",
  321. });
  322. }
  323. };
  324. /**chart Data */
  325. const avgObj = reactive({
  326. //平均cpz等
  327. title: "",
  328. cpavg: "",
  329. frequency: "",
  330. pcratio: "",
  331. });
  332. const markDot = reactive({
  333. //3-5 point点等
  334. pcl5: null,
  335. pcl10: null,
  336. pcl12: null,
  337. pcl25: null,
  338. });
  339. const xAxisData = ref([]);
  340. const chartRef = ref(); //chart 的ref
  341. const seriesData = ref([]);
  342. const isChartArea = ref(false); // 用来控制图表是否区域划分
  343. const dataSet = ref("");
  344. const funChartSelect = async (batch) => {
  345. const wDataArr = [];
  346. const yDataArr = [];
  347. let scatterls = [];
  348. let scatterhs = [];
  349. let dataSetObj = [];
  350. wtData.value = [];
  351. if (batch?.length && dataSet.value) {
  352. scatterls = batch[0].selected[2].dataIndex;
  353. scatterhs = batch[0].selected[3].dataIndex;
  354. if (scatterls?.length || scatterhs?.length) {
  355. dataSetObj = JSON.parse(dataSet.value);
  356. if (scatterls?.length) {
  357. for (const scatterIndex of scatterls) {
  358. wDataArr.push(dataSetObj[0].source[scatterIndex].k);
  359. }
  360. }
  361. if (scatterhs?.length) {
  362. for (const scatterIndex of scatterhs) {
  363. yDataArr.push(dataSetObj[1].source[scatterIndex].k);
  364. }
  365. }
  366. const wtRes = await getWindFittingFilter({
  367. yk: yDataArr.join(","),
  368. wk: wDataArr.join(","),
  369. only: dataRadom.value,
  370. });
  371. if (wtRes.code === 200) {
  372. let id = 1;
  373. const tempArr = []; //用于以风机id 聚合dataArr
  374. if (wtRes.data?.length) {
  375. for (const data of wtRes.data) {
  376. if (tempArr.length) {
  377. const findIndex = tempArr.findIndex((o) => o.wtId === data.wtId);
  378. if (findIndex !== -1) {
  379. if (!tempArr[findIndex].children) {
  380. tempArr[findIndex].children = [];
  381. }
  382. tempArr[findIndex].children.push({
  383. ...data,
  384. id: id,
  385. filter: data.filter === 0 ? "是" : "否",
  386. });
  387. id++;
  388. } else {
  389. tempArr.push({
  390. ...data,
  391. id: id,
  392. filter: data.filter === 0 ? "是" : "否",
  393. });
  394. id++;
  395. }
  396. } else {
  397. tempArr.push({
  398. ...data,
  399. id: id,
  400. filter: data.filter === 0 ? "是" : "否",
  401. });
  402. id++;
  403. }
  404. }
  405. wtDialog.value = true;
  406. nextTick(() => {
  407. wtTab.value = "table";
  408. wtData.value = tempArr;
  409. });
  410. }
  411. }
  412. }
  413. }
  414. };
  415. const funChartArea = () => {
  416. if (seriesData.value?.length) {
  417. if (!isChartArea.value) {
  418. // 请求一下
  419. seriesData.value[0] = {
  420. ...seriesData.value[0],
  421. markLine: {
  422. symbol: "none",
  423. label: {
  424. show: false,
  425. },
  426. lineStyle: {
  427. color: "rgba(96,174,255, 1)",
  428. },
  429. data: [
  430. {
  431. xAxis: 3,
  432. valueIndex: 0,
  433. },
  434. {
  435. xAxis: 5,
  436. valueIndex: 0,
  437. },
  438. {
  439. xAxis: 10,
  440. valueIndex: 0,
  441. },
  442. {
  443. xAxis: 12,
  444. valueIndex: 0,
  445. },
  446. {
  447. xAxis: 25,
  448. valueIndex: 0,
  449. },
  450. ],
  451. },
  452. markArea: {
  453. label: {
  454. fontSize: 13,
  455. color: "#ccc",
  456. fontWeight: "normal",
  457. fontFamily: "Arial",
  458. },
  459. itemStyle: {
  460. color: "rgba(236,245,255, 0)",
  461. },
  462. emphasis: {
  463. itemStyle: {
  464. color: "rgba(96,174,255, 0.5)",
  465. },
  466. },
  467. data: [
  468. [
  469. {
  470. name: `3~5m 偏差率: ${markDot.pcl5}%`,
  471. xAxis: 3,
  472. },
  473. {
  474. xAxis: 5,
  475. },
  476. ],
  477. [
  478. {
  479. name: `5~10m 偏差率: ${markDot.pcl10}%`,
  480. xAxis: 5,
  481. },
  482. {
  483. xAxis: 10,
  484. },
  485. ],
  486. [
  487. {
  488. name: `10~12m 偏差率: ${markDot.pcl12}%`,
  489. xAxis: 10,
  490. },
  491. {
  492. xAxis: 12,
  493. },
  494. ],
  495. [
  496. {
  497. name: `12~25m 偏差率: ${markDot.pcl25}%`,
  498. xAxis: 12,
  499. },
  500. {
  501. xAxis: 25,
  502. },
  503. ],
  504. ],
  505. },
  506. };
  507. isChartArea.value = true;
  508. } else {
  509. seriesData.value[0] = {
  510. ...seriesData.value[0],
  511. markLine: null,
  512. markArea: null,
  513. };
  514. isChartArea.value = false;
  515. }
  516. }
  517. };
  518. const handleClick = (val) => {
  519. wtTab.value = val.props.name;
  520. if (wtTab.value === "problem") {
  521. faultDataFn();
  522. } else if (wtTab.value === "warning") {
  523. warnDataFn();
  524. }
  525. };
  526. //故障数据
  527. const faultDataFn = async () => {
  528. let params = {
  529. only: dataRadom.value,
  530. table: "alarmWt",
  531. };
  532. const faultRes = await getWindFittingAlarms(params);
  533. faultData.value = faultRes.data;
  534. };
  535. //预警数据
  536. const warnDataFn = async () => {
  537. let params = {
  538. only: dataRadom.value,
  539. table: "alarmCt",
  540. };
  541. const warnRes = await getWindFittingAlarms(params);
  542. warnData.value = warnRes.data;
  543. };
  544. /**dialog 数据 */
  545. const wtDialog = ref(false);
  546. const wtData = ref([]);
  547. const faultData = ref([]);
  548. const warnData = ref([]);
  549. const wtTab = ref("table");
  550. // 随机数
  551. const dataRadom = ref(null);
  552. /**tab */
  553. const activeTab = ref("1");
  554. /**created */
  555. funGetTree();
  556. funGetProcessTree();
  557. /**mounted */
  558. /**activated */
  559. onActivated(() => {
  560. funGetTree();
  561. funGetProcessTree();
  562. });
  563. </script>
  564. <template>
  565. <div class="container-wrapper">
  566. <search-cop @submit="funSubmit"> </search-cop>
  567. <el-dialog v-model="wtDialog" draggable>
  568. <template #title>
  569. <div class="dialog-title">
  570. <div class="title">风机功率点位</div>
  571. </div>
  572. </template>
  573. <el-tabs v-model="wtTab" @tab-click="handleClick">
  574. <el-tab-pane label="数据" name="table">
  575. <el-table :data="wtData" row-key="id" :max-height="550">
  576. <el-table-column property="wtId" align="center" label="风机" />
  577. <el-table-column
  578. property="time"
  579. sortable
  580. :width="160"
  581. align="center"
  582. label="时间"
  583. />
  584. <el-table-column
  585. property="speed"
  586. sortable
  587. align="center"
  588. label="风速(m/s)"
  589. />
  590. <el-table-column
  591. property="power"
  592. sortable
  593. align="center"
  594. label="功率(kW)"
  595. />
  596. <el-table-column
  597. property="rr"
  598. sortable
  599. align="center"
  600. label="转速"
  601. />
  602. <el-table-column
  603. property="filter"
  604. sortable
  605. align="center"
  606. label="是否有用点"
  607. />
  608. </el-table>
  609. </el-tab-pane>
  610. <el-tab-pane label="故障" name="problem">
  611. <el-table :data="faultData" row-key="id" :max-height="550">
  612. <el-table-column property="deviceId" align="center" label="风机" />
  613. <el-table-column
  614. property="ts"
  615. sortable
  616. :width="160"
  617. align="center"
  618. label="时间"
  619. >
  620. <template v-slot="scope">
  621. {{ new Date(scope.row.ts).formatDate("yyyy-MM-dd hh:mm:ss") }}
  622. </template>
  623. </el-table-column>
  624. <el-table-column
  625. property="characteristic"
  626. sortable
  627. align="center"
  628. label="特性"
  629. />
  630. <el-table-column
  631. property="components"
  632. sortable
  633. align="center"
  634. label="部件"
  635. />
  636. <el-table-column
  637. property="description"
  638. sortable
  639. align="center"
  640. label="描述"
  641. />
  642. </el-table>
  643. </el-tab-pane>
  644. <el-tab-pane label="预警" name="warning">
  645. <el-table :data="warnData" row-key="id" :max-height="550">
  646. <el-table-column property="deviceId" align="center" label="风机" />
  647. <el-table-column
  648. property="ts"
  649. sortable
  650. :width="160"
  651. align="center"
  652. label="时间"
  653. >
  654. <template v-slot="scope">
  655. {{ new Date(scope.row.ts).formatDate("yyyy-MM-dd hh:mm:ss") }}
  656. </template>
  657. </el-table-column>
  658. <el-table-column
  659. property="characteristic"
  660. sortable
  661. align="center"
  662. label="特性"
  663. />
  664. <el-table-column
  665. property="components"
  666. sortable
  667. align="center"
  668. label="部件"
  669. />
  670. <el-table-column
  671. property="description"
  672. sortable
  673. align="center"
  674. label="描述"
  675. />
  676. </el-table>
  677. </el-tab-pane>
  678. </el-tabs>
  679. </el-dialog>
  680. <div class="power-data-wrapper card-shadow wrapper">
  681. <div class="card-title">数据展示</div>
  682. <div class="data-wrapper">
  683. <div class="data-left-wrapper">
  684. <tree-cop
  685. class="tree-height"
  686. :data="treeData"
  687. @checkChange="funTreeCheckChange"
  688. :show-checkbox="true"
  689. @currentChange="funCurrentChange"
  690. @refresh="funGetTree"
  691. />
  692. <tree-cop
  693. class="tree-height"
  694. :dropdownMenu="['export', 'delete', 'save']"
  695. :data="processTreeData"
  696. @currentChange="funProcessCurrentChange"
  697. @refresh="funGetProcessTree"
  698. />
  699. </div>
  700. <div class="data-excel-wrapper">
  701. <excel-cop
  702. class="excel-height"
  703. :checkIds="excelCheckIds"
  704. :showCheckbox="excelCheckboxShow"
  705. :data="excelList"
  706. @excelChange="funExcelChange"
  707. @checkChange="funExcelCheckChange"
  708. />
  709. <excel-cop
  710. :currentIds="currentId"
  711. class="excel-height"
  712. :data="excelFitList"
  713. @excelChange="funExcelChange"
  714. />
  715. </div>
  716. <div class="data-table-wrapper card-shadow">
  717. <SubmitBtn
  718. class="submit-btn"
  719. desc="区域划分"
  720. v-if="activeTab === '2' && excelType === 'fitting'"
  721. @click="funChartArea"
  722. ></SubmitBtn>
  723. <el-tabs v-model="activeTab" class="data-table-tabs">
  724. <el-tab-pane label="表格数据" name="1"> </el-tab-pane>
  725. <el-tab-pane
  726. label="图表展示"
  727. name="2"
  728. v-if="excelType === 'fitting'"
  729. >
  730. </el-tab-pane>
  731. <table-cop
  732. v-show="activeTab === '1'"
  733. :showShadow="false"
  734. :data="tableData"
  735. :loading="tableLoading"
  736. :column="tableColumn"
  737. :tableId="tableShowId"
  738. :tableName="tableName"
  739. />
  740. <div v-show="activeTab === '2'" class="data-chart-wrapper">
  741. <CurrentScatterChart
  742. ref="chartRef"
  743. width="100%"
  744. height="100%"
  745. :chartTitle="
  746. avgObj.title +
  747. '&nbsp;&nbsp;' +
  748. '平均Cp值:' +
  749. avgObj.cpavg +
  750. '; 静风频率:' +
  751. avgObj.frequency +
  752. '%; 曲线偏差率:' +
  753. avgObj.pcratio +
  754. '%'
  755. "
  756. :xAxisData="xAxisData"
  757. :yAxisData="{ splitLine: { show: false } }"
  758. :seriesData="seriesData"
  759. :showLegend="true"
  760. :brushSelected="!isChartArea"
  761. :dataSet="dataSet"
  762. @getSelected="funChartSelect"
  763. />
  764. </div>
  765. </el-tabs>
  766. </div>
  767. </div>
  768. </div>
  769. </div>
  770. </template>
  771. <style lang="less" scoped>
  772. .el-tabs ::v-deep {
  773. height: calc(100% - 22px);
  774. .el-tabs__item {
  775. color: #b3b3b3;
  776. padding: 0 12px;
  777. }
  778. .el-tabs__nav-wrap::after {
  779. background-color: #14221f;
  780. }
  781. .el-tabs__active-bar {
  782. background-color: #05bb4c;
  783. }
  784. .el-tabs__item.is-active,
  785. .el-tabs__item:hover {
  786. color: #05bb4c;
  787. }
  788. .el-tabs__content {
  789. height: calc(100% - 45px);
  790. .table-wrapper {
  791. width: 100%;
  792. }
  793. .data-chart-wrapper {
  794. width: 100%;
  795. height: 100%;
  796. }
  797. }
  798. }
  799. </style>