qushiDialog.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  1. <template>
  2. <div>
  3. <el-dialog
  4. class="dialogs"
  5. width="85%"
  6. top="120px"
  7. v-model="dialogCurveVisible"
  8. :show-close="true"
  9. @close="handleClose"
  10. >
  11. <template #title>
  12. <div class="dialog-title">
  13. <img class="dialog-title-img" src="@assets/imgs/dialog-title.png" />
  14. <div class="title">{{ chartName }}</div>
  15. <!-- <i class="el-icon-full-screen" @click="c"></i>-->
  16. </div>
  17. </template>
  18. <div class="dialog-body" style="height: 480px; width: 100%">
  19. <div style="margin-top: -8px; margin-bottom: 20px">
  20. <div
  21. style="
  22. height: 20px;
  23. line-height: 20px;
  24. flex-direction: row;
  25. align-items: center;
  26. display: flex;
  27. "
  28. >
  29. <div class="qushi-form">
  30. <div class="station">
  31. 开始时间
  32. <div style="margin-left: 5px; margin-right: 10px">
  33. <el-date-picker
  34. v-model="starttime"
  35. type="datetime"
  36. placeholder="选择日期"
  37. popper-class="date-select"
  38. format="YYYY-MM-DD HH:mm:ss"
  39. >
  40. </el-date-picker>
  41. </div>
  42. </div>
  43. <div class="station">
  44. 结束时间
  45. <div style="margin-left: 5px; margin-right: 10px">
  46. <el-date-picker
  47. v-model="endtime"
  48. type="datetime"
  49. popper-class="date-select"
  50. placeholder="选择日期"
  51. format="YYYY-MM-DD HH:mm:ss"
  52. >
  53. </el-date-picker>
  54. </div>
  55. </div>
  56. <div class="station">
  57. 时间间隔(秒)
  58. <div>
  59. <el-input-number
  60. size="medium"
  61. v-model="numgap"
  62. :precision="0"
  63. ></el-input-number>
  64. </div>
  65. </div>
  66. <el-button
  67. style="margin-left: 15px"
  68. round
  69. :disabled="timerFlag"
  70. size="mini"
  71. class="searchColor"
  72. @click="throttleSearch"
  73. >查询
  74. </el-button>
  75. </div>
  76. <div class="qushi-tools">
  77. <el-button
  78. class="customColor"
  79. round
  80. size="mini"
  81. type="primary"
  82. @click="showYsetDialog"
  83. icon="el-icon-edit"
  84. >自定义多坐标
  85. </el-button>
  86. <el-tooltip
  87. class="item"
  88. effect="dark"
  89. content="导出"
  90. placement="bottom"
  91. >
  92. <el-button
  93. class="updownTit"
  94. round
  95. size="mini"
  96. type="primary"
  97. @click="exportDatas"
  98. >
  99. <i class="svg-icon svg-icon-sm svg-icon-white">
  100. <SvgIcon svgid="svg-dataout"></SvgIcon
  101. ></i>
  102. </el-button>
  103. </el-tooltip>
  104. </div>
  105. </div>
  106. </div>
  107. <img
  108. class="dialog-img"
  109. style="bottom: -166px"
  110. src="@assets/imgs/dialog.png"
  111. />
  112. <windChartCom
  113. ref="windChartCom"
  114. :height="chartHeight"
  115. :list="chartsData"
  116. :interval="intervalgap"
  117. :units="units"
  118. :unitDatas="unitDatas"
  119. :showLegend="false"
  120. :showXdata="false"
  121. :animate="false"
  122. :ratio="1000"
  123. />
  124. </div>
  125. <div class="economicTable1 mentues met" style="margin-top: 10px">
  126. <el-table
  127. :data="detailsValue"
  128. class="table-fixed tables"
  129. ref="multipleTable"
  130. :cell-style="tagCellStyle"
  131. height="230px"
  132. fit
  133. stripe
  134. >
  135. <el-table-column
  136. align="center"
  137. v-for="item in tableHeader"
  138. :key="item.code"
  139. :prop="item.code"
  140. :label="item.title"
  141. :width="item.width ? item.width : ''"
  142. show-overflow-tooltip
  143. >
  144. </el-table-column>
  145. <!-- <el-table-column
  146. align="center"
  147. prop="name"
  148. label="指标名称"
  149. width="500"
  150. show-overflow-tooltip
  151. >
  152. </el-table-column>
  153. <el-table-column
  154. align="center"
  155. prop="tagName"
  156. label="描述"
  157. width="400"
  158. show-overflow-tooltip
  159. >
  160. </el-table-column>
  161. <el-table-column
  162. align="center"
  163. prop="dateTime"
  164. label="快照时间"
  165. width="200"
  166. >
  167. </el-table-column>
  168. <el-table-column align="center" prop="value" label="快照值">
  169. </el-table-column>
  170. <el-table-column align="center" prop="minvalue" label="最小值">
  171. </el-table-column>
  172. <el-table-column align="center" prop="maxvalue" label="最大值">
  173. </el-table-column>
  174. <el-table-column align="center" prop="avgvalue" label="平均值">
  175. </el-table-column> -->
  176. <el-table-column
  177. prop="showy"
  178. label="操作"
  179. align="center"
  180. width="110"
  181. style="cursor: pointer"
  182. >
  183. <template v-slot="scoped">
  184. <i
  185. style="cursor: pointer"
  186. class="svg-icon svg-icon-sm svg-icon-gray checkIcon"
  187. >
  188. <SvgIcon
  189. :svgid="scoped.row.showy ? 'svg-show' : 'svg-hide'"
  190. ></SvgIcon
  191. ></i>
  192. <el-switch
  193. v-model="scoped.row.showy"
  194. @change="curveSwitchData(scoped.row)"
  195. inactive-color="rgba(0,0,0,0)"
  196. active-color="rgba(0,0,0,0)"
  197. >
  198. </el-switch>
  199. </template>
  200. </el-table-column>
  201. </el-table>
  202. </div>
  203. </el-dialog>
  204. <el-dialog
  205. class="ysetDialog"
  206. width="43%"
  207. v-model="ysetDialogVisible"
  208. :show-close="true"
  209. >
  210. <template #title>
  211. <div class="dialog-title">
  212. <img class="dialog-title-img" src="@assets/imgs/dialog-title.png" />
  213. <div class="title">{{ ysetName }}</div>
  214. </div>
  215. </template>
  216. <div class="dialog-body mentuese metse" style="height: 320px">
  217. <el-table
  218. :data="tagDatas"
  219. class="table-fixed tables"
  220. ref="multipleTable"
  221. :cell-style="tagCellStyle2"
  222. height="100%"
  223. style="width: 100%"
  224. fit
  225. empty-text="暂无数据"
  226. stripe
  227. >
  228. <el-table-column
  229. prop="tagName"
  230. label="指标名称"
  231. align="center"
  232. fixed
  233. width="420"
  234. >
  235. </el-table-column>
  236. <el-table-column
  237. prop="minvalue"
  238. label="最小值"
  239. align="center"
  240. fixed
  241. width="180"
  242. >
  243. <template v-slot="scoped">
  244. <el-input-number
  245. size="small"
  246. v-model="scoped.row.min"
  247. controls-position="right"
  248. ></el-input-number>
  249. </template>
  250. </el-table-column>
  251. <el-table-column
  252. prop="maxvalue"
  253. label="最大值"
  254. align="center"
  255. fixed
  256. width="180"
  257. >
  258. <template v-slot="scoped">
  259. <el-input-number
  260. size="small"
  261. v-model="scoped.row.max"
  262. controls-position="right"
  263. ></el-input-number>
  264. </template>
  265. </el-table-column>
  266. </el-table>
  267. </div>
  268. <img
  269. class="dialog-img"
  270. style="position: absolute; bottom: 50px; right: 0"
  271. src="@assets/imgs/dialog.png"
  272. />
  273. <el-row
  274. class="footerButton changeButton"
  275. style="text-align: center; margin-top: 20px"
  276. >
  277. <el-button
  278. size="medium"
  279. style="width: 125px"
  280. round
  281. @click="cancelMultiys()"
  282. >取消多坐标</el-button
  283. >
  284. <el-button type="primary" size="medium" round @click="saveEditTagInfo()"
  285. >确定</el-button
  286. >
  287. </el-row>
  288. </el-dialog>
  289. </div>
  290. </template>
  291. <script>
  292. import {
  293. GetWtPoints,
  294. GetWpPoints,
  295. GetPointFitting,
  296. GetSubPoints,
  297. GetProPoints,
  298. } from "@/api/points/index.js";
  299. import SvgIcon from "@com/coms/icon/svg-icon.vue";
  300. import dayjs from "dayjs";
  301. import windChartCom from "./lineCharts.vue";
  302. import { outExportExcel } from "@/tools/excel/exportExcel.js"; //引入文件
  303. export default {
  304. name: "changeCheck", //趋势对比
  305. components: {
  306. windChartCom,
  307. SvgIcon,
  308. },
  309. props: {
  310. data: {
  311. type: String,
  312. required: true,
  313. },
  314. chartName: {
  315. type: String,
  316. default: "对比曲线",
  317. },
  318. index: {
  319. type: String,
  320. required: true,
  321. },
  322. title: {
  323. type: String,
  324. required: true,
  325. },
  326. },
  327. data() {
  328. return {
  329. tableHeader: [
  330. { title: "指标名称", code: "name", width: 500 },
  331. { title: "描述", code: "tagName", width: 400 },
  332. { title: "快照时间", code: "dateTime", width: 200 },
  333. { title: "快照值", code: "value" },
  334. { title: "最大值", code: "maxvalue" },
  335. { title: "最小值", code: "minvalue" },
  336. { title: "平均值", code: "avgvalue" },
  337. ],
  338. value: true,
  339. dialogVisibles: false,
  340. stse: [],
  341. sts: [],
  342. statiomName: [],
  343. leng: "",
  344. x: 500,
  345. y: 250,
  346. starttime: new Date(),
  347. endtime: "",
  348. stationTit: null,
  349. dragging: false,
  350. currentX: 50,
  351. currentY: 0,
  352. initialX: 0,
  353. initialY: 0,
  354. tableShow: true,
  355. tmp: [],
  356. detailsValue: [],
  357. numgap: 900,
  358. intervalgap: 7,
  359. tmpData: "",
  360. units: [],
  361. color: [
  362. "#1985de",
  363. "#ff8300",
  364. "#06a746",
  365. "#3eede7",
  366. "#eb0f7c",
  367. "#dfdc0a",
  368. "#de0feb",
  369. "#cca4e3",
  370. ],
  371. unitDatas: [{ flag: false, min: 0, max: 0, codex: 0 }],
  372. tagDatas: [],
  373. handleSwitch: false,
  374. chartsData: [],
  375. chartsDataAll: [],
  376. dialogCurveVisible: false,
  377. ysetDialogVisible: false,
  378. ysetName: "自定义多坐标",
  379. visibles: "",
  380. cilent: "",
  381. dialogFull: false,
  382. chartHeight: "420px",
  383. tagNames: "",
  384. pointIds: "",
  385. searchFlag: false, //判断是否重置多坐标
  386. changeYset: false, //是否设置过多坐标
  387. ined: 1, //查询测点类型
  388. timerFlag: false,
  389. };
  390. },
  391. created() {
  392. this.starttime = new Date(new Date().setHours(0, 0, 0, 0));
  393. this.endtime = new Date();
  394. },
  395. methods: {
  396. // 防止按钮频繁点击
  397. throttleSearch() {
  398. this.timerFlag = true;
  399. setTimeout(() => {
  400. this.searchChartData();
  401. this.timerFlag = false;
  402. }, 2000);
  403. },
  404. // 指标样式
  405. tagCellStyle({ row, column, rowIndex, columnIndex }) {
  406. if (!row.showy) {
  407. return { color: "#525252", fontSize: "11px" };
  408. }
  409. if ((columnIndex == 0 || columnIndex == 1) && row.showy) {
  410. return { color: this.color[rowIndex], fontSize: "13px" };
  411. } else {
  412. return { padding: "6px 0px" };
  413. }
  414. },
  415. // 指标样式
  416. tagCellStyle2({ row, column, rowIndex, columnIndex }) {
  417. if (columnIndex == 0) {
  418. return { color: this.color[rowIndex] + "!important", fontSize: "13px" };
  419. } else {
  420. return { padding: "6px 0px" };
  421. }
  422. },
  423. // 取消多坐标
  424. cancelMultiys() {
  425. this.searchFlag = false;
  426. this.units = [];
  427. this.unitDatas = [];
  428. this.tagDatas.forEach((value, index) => {
  429. if (index == 0) {
  430. this.units.push(this.chartsData[0].title);
  431. this.unitDatas.push({ flag: false, min: 0, max: 0, codex: 0 });
  432. }
  433. });
  434. this.chartsData.forEach((value2, index2) => {
  435. value2.yAxisIndex = 0;
  436. });
  437. this.ysetDialogVisible = false;
  438. this.changeYset = false;
  439. },
  440. // 展示多坐标弹窗
  441. showYsetDialog() {
  442. var maxy = this.$refs.windChartCom.childMethod(0);
  443. this.tagDatas.forEach((value, index) => {
  444. if (value.showy) {
  445. value.max = this.$refs.windChartCom.childMethod(index);
  446. } else {
  447. value.max = maxy;
  448. }
  449. });
  450. this.ysetDialogVisible = true;
  451. this.changeYset = true;
  452. },
  453. // 保存多坐标信息
  454. saveEditTagInfo() {
  455. if (this.changeYset) {
  456. this.units = [];
  457. this.unitDatas = [];
  458. this.chartsData.forEach((value, index) => {
  459. value.yAxisIndex = 0;
  460. });
  461. this.tagDatas.forEach((value, index) => {
  462. if (index == 0) {
  463. this.units.push(this.chartsData[0].title);
  464. this.unitDatas.push({
  465. flag: true,
  466. min: value.min,
  467. max: value.max,
  468. codex: 0,
  469. });
  470. }
  471. if (index > 0) {
  472. this.units.push(value.tagName);
  473. this.unitDatas.push({
  474. flag: true,
  475. min: value.min,
  476. max: value.max,
  477. codex: index,
  478. });
  479. this.chartsData.forEach((value2, index2) => {
  480. if (value2.title == value.tagName) {
  481. value2.yAxisIndex = index;
  482. }
  483. });
  484. }
  485. });
  486. this.changeYset = true;
  487. } else {
  488. this.changeYset = false;
  489. }
  490. this.ysetDialogVisible = false;
  491. },
  492. exportDatas() {
  493. let tableHeader = this.tableHeader.map((item) => item.title);
  494. let tableKey = this.tableHeader.map((item) => item.code);
  495. outExportExcel(
  496. tableHeader,
  497. tableKey,
  498. this.detailsValue,
  499. "对比曲线导出数据"
  500. );
  501. },
  502. c() {
  503. this.dialogFull ? (this.dialogFull = false) : (this.dialogFull = true);
  504. },
  505. curveSwitchData(e) {
  506. this.value = e.showy;
  507. var option = "{";
  508. this.detailsValue.forEach((value, index) => {
  509. option += "'" + value.tagName + "'" + ":" + value.showy + ",";
  510. });
  511. option = option.substring(0, option.length - 1);
  512. option += "}";
  513. var json = eval("(" + option + ")");
  514. this.$refs.windChartCom.changDateVisible(json);
  515. },
  516. // 弹窗首次加载对比曲线
  517. openCurvDatas(valse, ined, wtid) {
  518. this.ined = ined;
  519. this.searchFlag = false;
  520. this.changeYset = false;
  521. this.wtid = wtid;
  522. this.dialogCurveVisible = true;
  523. this.detailsValue = [];
  524. this.tagDatas = [];
  525. this.units = [];
  526. this.unitDatas = [];
  527. this.numgap = 900;
  528. this.intervalgap = 7;
  529. let tagNames = "";
  530. this.tmpData = valse;
  531. this.tmpData.forEach((value, index) => {
  532. tagNames += value.sts + ",";
  533. });
  534. this.tagNames = tagNames.substring(0, tagNames.length - 1);
  535. if (ined == 1) {
  536. this.getWpPoints(wtid);
  537. } else if (ined == 2) {
  538. this.getWtPoints(wtid);
  539. } else if (ined == 3) {
  540. this.getPoints(this.tagNames);
  541. } else if (ined == 4) {
  542. this.getSubPoints(wtid);
  543. } else if (ined == 5) {
  544. this.getProPoints(wtid);
  545. }
  546. },
  547. // 查询设备测点
  548. getWtPoints(wtid) {
  549. GetWtPoints({
  550. wtid,
  551. uniformcodes: this.tagNames,
  552. }).then((res) => {
  553. this.tmpData.forEach((item) => {
  554. res.data.data.forEach((i) => {
  555. if (item.sts == i.uniformCode) {
  556. item.sts = i.nemCode;
  557. item.statiomName = i.name;
  558. }
  559. });
  560. // if()
  561. });
  562. let pointIds = "";
  563. res.data.data.forEach((value) => {
  564. pointIds += value.nemCode + ",";
  565. });
  566. pointIds = pointIds.substring(0, pointIds.length - 1);
  567. this.getPoints(pointIds);
  568. });
  569. },
  570. // 查询场站测点
  571. getWpPoints(wpid) {
  572. GetWpPoints({
  573. wpid,
  574. uniformcodes: this.tagNames,
  575. }).then((res) => {
  576. let resData = res.data.data.map((item) => {
  577. if (item == null) {
  578. return {};
  579. } else {
  580. return { ...item };
  581. }
  582. });
  583. let pointIds = "";
  584. this.tmpData.forEach((item) => {
  585. resData.forEach((i) => {
  586. if (Object.keys(i).length) {
  587. if (item.sts == i.uniformCode) {
  588. item.sts = i.nemCode;
  589. item.statiomName = i.name;
  590. }
  591. } else {
  592. item.sts = "";
  593. item.statiomName = "";
  594. }
  595. });
  596. });
  597. resData.forEach((value) => {
  598. if (value == {}) {
  599. value.nemCode = "";
  600. }
  601. pointIds += value.nemCode + ",";
  602. });
  603. pointIds = pointIds.substring(0, pointIds.length - 1);
  604. this.getPoints(pointIds);
  605. });
  606. },
  607. // 查询调度场站测点
  608. getSubPoints(wpid) {
  609. GetSubPoints({
  610. wpid,
  611. uniformcodes: this.tagNames,
  612. }).then((res) => {
  613. this.tmpData.forEach((item) => {
  614. res.data.data.forEach((i) => {
  615. if (item.sts == i.uniformCode) {
  616. item.sts = i.nemCode;
  617. item.statiomName = i.name;
  618. }
  619. });
  620. });
  621. let pointIds = "";
  622. res.data.data.forEach((value) => {
  623. pointIds += value.nemCode + ",";
  624. });
  625. pointIds = pointIds.substring(0, pointIds.length - 1);
  626. this.getPoints(pointIds);
  627. });
  628. },
  629. // 查询场站期次测点
  630. getProPoints(wpid) {
  631. GetProPoints({
  632. wpid,
  633. uniformcodes: this.tagNames,
  634. }).then((res) => {
  635. this.tmpData.forEach((item) => {
  636. res.data.data.forEach((i) => {
  637. if (item.sts == i.uniformCode) {
  638. item.sts = i.nemCode;
  639. item.statiomName = i.name;
  640. }
  641. });
  642. });
  643. let pointIds = "";
  644. res.data.data.forEach((value) => {
  645. pointIds += value.nemCode + ",";
  646. });
  647. pointIds = pointIds.substring(0, pointIds.length - 1);
  648. this.getPoints(pointIds);
  649. });
  650. },
  651. // 查询测点
  652. getPoints(pointIds) {
  653. GetPointFitting({
  654. begin: dayjs(this.starttime).format("YYYY-MM-DD HH:mm:ss"),
  655. end: dayjs(this.endtime).format("YYYY-MM-DD HH:mm:ss"),
  656. interval: this.numgap,
  657. pointIds,
  658. }).then((res) => {
  659. if (res.data.data.length) {
  660. let powerLineChartData = [];
  661. let resData = res.data.data;
  662. resData.forEach((value, index) => {
  663. var option = {
  664. title:
  665. this.ined == 3
  666. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  667. : this.tmpData[index].statiomName,
  668. tagName: this.tmpData[index].sts,
  669. yAxisIndex: 0,
  670. value: value
  671. ? value.map((item) => {
  672. return {
  673. dateTime: item.pointTime,
  674. value: item.pointValueInDouble,
  675. };
  676. })
  677. : [],
  678. noRatio: true,
  679. };
  680. powerLineChartData.push(option);
  681. });
  682. this.chartsData = powerLineChartData;
  683. this.chartsDataAll = JSON.parse(JSON.stringify(this.chartsData));
  684. this.dialogCurveVisible = true;
  685. let tagDatas = [];
  686. resData.forEach((value, index) => {
  687. var option = {
  688. tagName:
  689. this.ined == 3
  690. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  691. : this.tmpData[index].statiomName,
  692. min: 0,
  693. max: 0,
  694. showy: false,
  695. };
  696. tagDatas.push(option);
  697. });
  698. tagDatas[0].showy = true;
  699. if (!this.searchFlag) {
  700. this.units = [this.chartsData[0].title];
  701. this.unitDatas.push({ flag: false, min: 0, max: 0, codex: 0 });
  702. this.tagDatas = tagDatas;
  703. } else {
  704. this.saveEditTagInfo();
  705. }
  706. resData.forEach((value, index) => {
  707. var option;
  708. if (value != null && value.length > 0) {
  709. let dateTime = null;
  710. let dateValue = null;
  711. let vals = [];
  712. for (var i = value.length - 1; i >= 0; i--) {
  713. if (value[i].pointValueInDouble !== "") {
  714. dateTime = dayjs(value[i].pointTime).format(
  715. "YYYY-MM-DD HH:mm:ss"
  716. );
  717. dateValue = Number(value[i].pointValueInDouble).toFixed(2);
  718. break;
  719. }
  720. }
  721. for (var j = value.length - 1; j >= 0; j--) {
  722. if (value[j].pointValueInDouble !== "") {
  723. vals.push(value[j].pointValueInDouble);
  724. }
  725. }
  726. let maxValue = vals
  727. .sort((i, j) => i - j)
  728. .reverse()[0]
  729. .toFixed(2);
  730. let minValue = vals.sort((i, j) => i - j)[0].toFixed(2);
  731. let totalValue = 0;
  732. for (var k = 0; k < vals.length; k++) {
  733. totalValue += vals[k];
  734. }
  735. let avgValue = (totalValue / vals.length).toFixed(2);
  736. option = {
  737. name: this.tmpData[index].sts,
  738. tagName:
  739. this.ined == 3
  740. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  741. : this.tmpData[index].statiomName,
  742. showy: true,
  743. dateTime: dateTime,
  744. value: dateValue,
  745. maxvalue: maxValue,
  746. minvalue: minValue,
  747. avgvalue: avgValue,
  748. };
  749. } else {
  750. option = {
  751. name: this.tmpData[index].sts,
  752. tagName:
  753. this.ined == 3
  754. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  755. : this.tmpData[index].statiomName,
  756. showy: true,
  757. dateTime: "-",
  758. value: "-",
  759. maxvalue: "-",
  760. minvalue: "-",
  761. avgvalue: "-",
  762. };
  763. }
  764. this.detailsValue.push(option);
  765. });
  766. }
  767. });
  768. },
  769. sortFun(a, b) {
  770. console.log(a, b, Number.parseInt(a - b));
  771. return parseInt(a) - parseInt(b);
  772. },
  773. // 点击查询按钮查询对比曲线
  774. searchChartData() {
  775. this.searchFlag = true;
  776. this.chartsData = [];
  777. this.detailsValue = [];
  778. if (this.ined == 1) {
  779. this.getWpPoints(this.wtid);
  780. } else if (this.ined == 2) {
  781. this.getWtPoints(this.wtid);
  782. } else if (this.ined == 3) {
  783. this.getPoints(this.tagNames);
  784. } else if (this.ined == 4) {
  785. this.getSubPoints(this.wtid);
  786. } else if (this.ined == 5) {
  787. this.getProbPoints(this.wtid);
  788. }
  789. },
  790. // 关闭弹窗事件
  791. handleClose() {
  792. this.tmpData = [];
  793. this.tagNames = "";
  794. this.searchFlag = false;
  795. this.changeYset = false;
  796. this.tagDatas = [];
  797. this.chartsData = [];
  798. this.detailsValue = [];
  799. this.starttime = new Date(new Date().setHours(0, 0, 0, 0));
  800. this.endtime = new Date();
  801. this.numgap = 900;
  802. },
  803. },
  804. mounted() {},
  805. computed: {},
  806. };
  807. </script>
  808. <style lang="less" scoped>
  809. .footerButton {
  810. justify-content: right;
  811. .el-button:first-child {
  812. width: 108px;
  813. background-color: rgba(0, 70, 199, 0.2) !important;
  814. color: #b3b3b3;
  815. border-color: transparent;
  816. }
  817. .el-button:last-of-type {
  818. width: 108px;
  819. background: rgba(0, 70, 199, 0.4) !important;
  820. }
  821. }
  822. .checkIcon {
  823. position: absolute;
  824. left: 45px;
  825. top: 8px;
  826. font-size: 20px;
  827. color: #929396;
  828. }
  829. .searchColor {
  830. background: rgba(0, 70, 199, 0.4);
  831. color: #b3b3b3;
  832. font-size: 14px;
  833. border: none;
  834. width: 108px;
  835. min-height: 25px !important;
  836. &:hover {
  837. background-color: rgba(0, 70, 199, 0.5);
  838. color: #ffffff;
  839. }
  840. }
  841. .qushi-form {
  842. flex: 0 0 auto;
  843. display: flex;
  844. align-items: center;
  845. .station {
  846. display: flex;
  847. flex-direction: row;
  848. align-items: center;
  849. font-size: 14px;
  850. font-family: Microsoft YaHei;
  851. font-weight: 400;
  852. color: #b3b3b3;
  853. margin-left: 40px;
  854. /deep/ .el-input__suffix {
  855. right: -68px;
  856. }
  857. /deep/ .el-input__prefix {
  858. left: 0;
  859. }
  860. /deep/ .el-input__inner {
  861. width: 190px;
  862. }
  863. .el-input-number {
  864. width: 190px;
  865. /deep/ .el-input-number__decrease,
  866. /deep/ .el-input-number__increase {
  867. position: absolute;
  868. z-index: 10;
  869. border: 0;
  870. height: 25px;
  871. line-height: 25px;
  872. top: 5px;
  873. }
  874. }
  875. }
  876. }
  877. .qushi-tools {
  878. flex: 1;
  879. display: flex;
  880. justify-content: flex-end;
  881. .customColor {
  882. border-radius: 0 !important;
  883. background: url("../../assets/imgs/buttonBack.png") no-repeat;
  884. background-position: 7px;
  885. }
  886. .updownTit {
  887. padding: 0 !important;
  888. width: 30px !important;
  889. min-height: 28px !important;
  890. border-radius: 4px;
  891. border: 1px solid rgba(225, 225, 225, 0.3) !important;
  892. border-top: 1px solid #ffffff !important;
  893. border-bottom: 0;
  894. box-shadow: 0 0 22px rgba(255, 255, 255, 0.2) inset !important;
  895. //border-image: linear-gradient(321deg, rgba(225, 225, 225,2 ), rgba(5, 187, 76, 0.5)) 1 1 !important;
  896. background: linear-gradient(
  897. 180deg,
  898. rgba(255, 255, 255, 0.5),
  899. rgba(0, 0, 0, 0.5),
  900. rgba(0, 0, 0, 1)
  901. );
  902. }
  903. }
  904. </style>