qushiDialog.vue 26 KB

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