qushiDialog.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904
  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(tableHeader,tableKey,this.detailsValue,'对比曲线导出数据');
  494. },
  495. c() {
  496. this.dialogFull ? (this.dialogFull = false) : (this.dialogFull = true);
  497. },
  498. curveSwitchData(e) {
  499. this.value = e.showy;
  500. var option = "{";
  501. this.detailsValue.forEach((value, index) => {
  502. option += "'" + value.tagName + "'" + ":" + value.showy + ",";
  503. });
  504. option = option.substring(0, option.length - 1);
  505. option += "}";
  506. var json = eval("(" + option + ")");
  507. this.$refs.windChartCom.changDateVisible(json);
  508. },
  509. // 弹窗首次加载对比曲线
  510. openCurvDatas(valse, ined, wtid) {
  511. this.ined = ined;
  512. this.searchFlag = false;
  513. this.changeYset = false;
  514. this.wtid = wtid;
  515. this.dialogCurveVisible = true;
  516. this.detailsValue = [];
  517. this.tagDatas = [];
  518. this.units = [];
  519. this.unitDatas = [];
  520. this.numgap = 900;
  521. this.intervalgap = 7;
  522. let tagNames = "";
  523. this.tmpData = valse;
  524. this.tmpData.forEach((value, index) => {
  525. tagNames += value.sts + ",";
  526. });
  527. this.tagNames = tagNames.substring(0, tagNames.length - 1);
  528. if (ined == 1) {
  529. this.getWpPoints(wtid);
  530. } else if (ined == 2) {
  531. this.getWtPoints(wtid);
  532. } else if (ined == 3) {
  533. this.getPoints(this.tagNames);
  534. } else if (ined == 4) {
  535. this.getSubPoints(wtid);
  536. } else if (ined == 5) {
  537. this.getProPoints(wtid);
  538. }
  539. },
  540. // 查询设备测点
  541. getWtPoints(wtid) {
  542. GetWtPoints({
  543. wtid,
  544. uniformcodes: this.tagNames,
  545. }).then((res) => {
  546. this.tmpData.forEach((item) => {
  547. res.data.data.forEach((i) => {
  548. if (item.sts == i.uniformCode) {
  549. item.sts = i.nemCode;
  550. item.statiomName = i.name;
  551. }
  552. });
  553. // if()
  554. });
  555. let pointIds = "";
  556. res.data.data.forEach((value) => {
  557. pointIds += value.nemCode + ",";
  558. });
  559. pointIds = pointIds.substring(0, pointIds.length - 1);
  560. this.getPoints(pointIds);
  561. });
  562. },
  563. // 查询场站测点
  564. getWpPoints(wpid) {
  565. GetWpPoints({
  566. wpid,
  567. uniformcodes: this.tagNames,
  568. }).then((res) => {
  569. let resData = res.data.data.map((item) => {
  570. if (item == null) {
  571. return {};
  572. } else {
  573. return { ...item };
  574. }
  575. });
  576. let pointIds = "";
  577. this.tmpData.forEach((item) => {
  578. resData.forEach((i) => {
  579. if (Object.keys(i).length) {
  580. if (item.sts == i.uniformCode) {
  581. item.sts = i.nemCode;
  582. item.statiomName = i.name;
  583. }
  584. } else {
  585. item.sts = "";
  586. item.statiomName = "";
  587. }
  588. });
  589. });
  590. resData.forEach((value) => {
  591. if (value == {}) {
  592. value.nemCode = "";
  593. }
  594. pointIds += value.nemCode + ",";
  595. });
  596. pointIds = pointIds.substring(0, pointIds.length - 1);
  597. this.getPoints(pointIds);
  598. });
  599. },
  600. // 查询调度场站测点
  601. getSubPoints(wpid) {
  602. GetSubPoints({
  603. wpid,
  604. uniformcodes: this.tagNames,
  605. }).then((res) => {
  606. this.tmpData.forEach((item) => {
  607. res.data.data.forEach((i) => {
  608. if (item.sts == i.uniformCode) {
  609. item.sts = i.nemCode;
  610. item.statiomName = i.name;
  611. }
  612. });
  613. });
  614. let pointIds = "";
  615. res.data.data.forEach((value) => {
  616. pointIds += value.nemCode + ",";
  617. });
  618. pointIds = pointIds.substring(0, pointIds.length - 1);
  619. this.getPoints(pointIds);
  620. });
  621. },
  622. // 查询场站期次测点
  623. getProPoints(wpid) {
  624. GetProPoints({
  625. wpid,
  626. uniformcodes: this.tagNames,
  627. }).then((res) => {
  628. this.tmpData.forEach((item) => {
  629. res.data.data.forEach((i) => {
  630. if (item.sts == i.uniformCode) {
  631. item.sts = i.nemCode;
  632. item.statiomName = i.name;
  633. }
  634. });
  635. });
  636. let pointIds = "";
  637. res.data.data.forEach((value) => {
  638. pointIds += value.nemCode + ",";
  639. });
  640. pointIds = pointIds.substring(0, pointIds.length - 1);
  641. this.getPoints(pointIds);
  642. });
  643. },
  644. // 查询测点
  645. getPoints(pointIds) {
  646. GetPointFitting({
  647. begin: dayjs(this.starttime).format("YYYY-MM-DD HH:mm:ss"),
  648. end: dayjs(this.endtime).format("YYYY-MM-DD HH:mm:ss"),
  649. interval: this.numgap,
  650. pointIds,
  651. }).then((res) => {
  652. if (res.data.data.length) {
  653. let powerLineChartData = [];
  654. let resData = res.data.data;
  655. resData.forEach((value, index) => {
  656. var option = {
  657. title:
  658. this.ined == 3
  659. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  660. : this.tmpData[index].statiomName,
  661. tagName: this.tmpData[index].sts,
  662. yAxisIndex: 0,
  663. value: value
  664. ? value.map((item) => {
  665. return {
  666. dateTime: item.pointTime,
  667. value: item.pointValueInDouble,
  668. };
  669. })
  670. : [],
  671. noRatio: true,
  672. };
  673. powerLineChartData.push(option);
  674. });
  675. this.chartsData = powerLineChartData;
  676. this.chartsDataAll = JSON.parse(JSON.stringify(this.chartsData));
  677. this.dialogCurveVisible = true;
  678. let tagDatas = [];
  679. resData.forEach((value, index) => {
  680. var option = {
  681. tagName:
  682. this.ined == 3
  683. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  684. : this.tmpData[index].statiomName,
  685. min: 0,
  686. max: 0,
  687. showy: false,
  688. };
  689. tagDatas.push(option);
  690. });
  691. tagDatas[0].showy = true;
  692. if (!this.searchFlag) {
  693. this.units = [this.chartsData[0].title];
  694. this.unitDatas.push({ flag: false, min: 0, max: 0, codex: 0 });
  695. this.tagDatas = tagDatas;
  696. } else {
  697. this.saveEditTagInfo();
  698. }
  699. resData.forEach((value, index) => {
  700. var option;
  701. if (value != null && value.length > 0) {
  702. let dateTime = null;
  703. let dateValue = null;
  704. let vals = [];
  705. for (var i = value.length - 1; i >= 0; i--) {
  706. if (value[i].pointValueInDouble !== "") {
  707. dateTime = dayjs(value[i].pointTime).format(
  708. "YYYY-MM-DD HH:mm:ss"
  709. );
  710. dateValue = Number(value[i].pointValueInDouble).toFixed(2);
  711. break;
  712. }
  713. }
  714. for (var j = value.length - 1; j >= 0; j--) {
  715. if (value[j].pointValueInDouble !== "") {
  716. vals.push(value[j].pointValueInDouble);
  717. }
  718. }
  719. let maxValue = vals.sort()[0].toFixed(2);
  720. let minValue = vals.sort().reverse()[0].toFixed(2);
  721. let totalValue = 0;
  722. for (var k = 0; k < vals.length; k++) {
  723. totalValue += vals[k];
  724. }
  725. let avgValue = (totalValue / vals.length).toFixed(2);
  726. option = {
  727. name: this.tmpData[index].sts,
  728. tagName:
  729. this.ined == 3
  730. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  731. : this.tmpData[index].statiomName,
  732. showy: true,
  733. dateTime: dateTime,
  734. value: dateValue,
  735. maxvalue: maxValue,
  736. minvalue: minValue,
  737. avgvalue: avgValue,
  738. };
  739. } else {
  740. option = {
  741. name: this.tmpData[index].sts,
  742. tagName:
  743. this.ined == 3
  744. ? this.tmpData[index].stse + this.tmpData[index].statiomName
  745. : this.tmpData[index].statiomName,
  746. showy: true,
  747. dateTime: "-",
  748. value: "-",
  749. maxvalue: "-",
  750. minvalue: "-",
  751. avgvalue: "-",
  752. };
  753. }
  754. this.detailsValue.push(option);
  755. });
  756. }
  757. });
  758. },
  759. // 点击查询按钮查询对比曲线
  760. searchChartData() {
  761. this.searchFlag = true;
  762. this.chartsData = [];
  763. this.detailsValue = [];
  764. if (this.ined == 1) {
  765. this.getWpPoints(this.wtid);
  766. } else if (this.ined == 2) {
  767. this.getWtPoints(this.wtid);
  768. } else if (this.ined == 3) {
  769. this.getPoints(this.tagNames);
  770. } else if (this.ined == 4) {
  771. this.getSubPoints(this.wtid);
  772. } else if (this.ined == 5) {
  773. this.getProbPoints(this.wtid);
  774. }
  775. },
  776. // 关闭弹窗事件
  777. handleClose() {
  778. this.tmpData = [];
  779. this.tagNames = "";
  780. this.searchFlag = false;
  781. this.changeYset = false;
  782. this.tagDatas = [];
  783. this.chartsData = [];
  784. this.detailsValue = [];
  785. this.starttime = new Date(new Date().setHours(0, 0, 0, 0));
  786. this.endtime = new Date();
  787. this.numgap = 900;
  788. },
  789. },
  790. mounted() {},
  791. computed: {},
  792. };
  793. </script>
  794. <style lang="less" scoped>
  795. .footerButton {
  796. justify-content: right;
  797. .el-button:first-child {
  798. width: 108px;
  799. background-color: rgba(0, 70, 199, 0.2) !important;
  800. color: #b3b3b3;
  801. border-color: transparent;
  802. }
  803. .el-button:last-of-type {
  804. width: 108px;
  805. background: rgba(0, 70, 199, 0.4) !important;
  806. }
  807. }
  808. .checkIcon {
  809. position: absolute;
  810. left: 45px;
  811. top: 8px;
  812. font-size: 20px;
  813. color: #929396;
  814. }
  815. .searchColor {
  816. background: rgba(0, 70, 199, 0.4);
  817. color: #b3b3b3;
  818. font-size: 14px;
  819. border: none;
  820. width: 108px;
  821. min-height: 25px !important;
  822. &:hover {
  823. background-color: rgba(0, 70, 199, 0.5);
  824. color: #ffffff;
  825. }
  826. }
  827. .qushi-form {
  828. flex: 0 0 auto;
  829. display: flex;
  830. align-items: center;
  831. .station {
  832. display: flex;
  833. flex-direction: row;
  834. align-items: center;
  835. font-size: 14px;
  836. font-family: Microsoft YaHei;
  837. font-weight: 400;
  838. color: #b3b3b3;
  839. margin-left: 40px;
  840. /deep/ .el-input__suffix {
  841. right: -68px;
  842. }
  843. /deep/ .el-input__prefix {
  844. left: 0;
  845. }
  846. /deep/ .el-input__inner {
  847. width: 190px;
  848. }
  849. .el-input-number {
  850. width: 190px;
  851. /deep/ .el-input-number__decrease,
  852. /deep/ .el-input-number__increase {
  853. position: absolute;
  854. z-index: 10;
  855. border: 0;
  856. height: 25px;
  857. line-height: 25px;
  858. top: 5px;
  859. }
  860. }
  861. }
  862. }
  863. .qushi-tools {
  864. flex: 1;
  865. display: flex;
  866. justify-content: flex-end;
  867. .customColor {
  868. border-radius: 0 !important;
  869. background: url("../../assets/imgs/buttonBack.png") no-repeat;
  870. background-position: 7px;
  871. }
  872. .updownTit {
  873. padding: 0 !important;
  874. width: 30px !important;
  875. min-height: 28px !important;
  876. border-radius: 4px;
  877. border: 1px solid rgba(225, 225, 225, 0.3) !important;
  878. border-top: 1px solid #ffffff !important;
  879. border-bottom: 0;
  880. box-shadow: 0 0 22px rgba(255, 255, 255, 0.2) inset !important;
  881. //border-image: linear-gradient(321deg, rgba(225, 225, 225,2 ), rgba(5, 187, 76, 0.5)) 1 1 !important;
  882. background: linear-gradient(
  883. 180deg,
  884. rgba(255, 255, 255, 0.5),
  885. rgba(0, 0, 0, 0.5),
  886. rgba(0, 0, 0, 1)
  887. );
  888. }
  889. }
  890. </style>