qushiDialog.vue 25 KB

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