Pārlūkot izejas kodu

Revert "弹框加名称"

This reverts commit e15b31a4f6fa175d7a0843b150f1bcaebed76780.
开发 1 mēnesi atpakaļ
vecāks
revīzija
daa0bdbc63

+ 59 - 31
src/components/TopPanel/dataDwManage.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="box">
-    <div class="header">功率数据</div>
     <div class="queryParam">
       <span>
         时间:
@@ -13,9 +12,35 @@
           />
         </a-space>
       </span>
-      <button class="OneButton" @click="queryTime()">查询</button>
-      <button class="OneButton" @click="resetTime()">重置</button>
-      <button class="OneButton" @click="exportAllData()">导出</button>
+      <span>
+        线名:
+        <a-input
+          v-model:value="selectindex.xlm"
+          placeholder="请输入线名"
+          style="width: 100px"
+        />
+      </span>
+      <span>
+        车站:
+        <a-input
+          v-model:value="selectindex.chezhan"
+          placeholder="请输入车站"
+          style="width: 100px"
+        />
+      </span>
+      <span>
+        道岔编号:
+        <a-input
+          v-model:value="selectindex.dcbh"
+          placeholder="请输入道岔编号"
+          style="width: 100px"
+        />
+      </span>
+      <div class="BtnList">
+        <button class="OneButton" @click="queryTime()">查询</button>
+        <button class="OneButton" @click="resetTime()">重置</button>
+        <button class="OneButton" @click="exportAllData()">导出</button>
+      </div>
     </div>
     <a-table
       :columns="columns"
@@ -42,7 +67,6 @@ import axios from "@/utils/axios.js";
 import * as moment from "moment";
 import { export_json_to_excel } from "@/utils/vendor/Export2Excel";
 
-
 const columns = [
   {
     title: "序号",
@@ -112,7 +136,11 @@ export default {
       endTime: "",
       valueTime: ["", ""],
       columns,
-      selectindex: {},
+      selectindex: {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      },
       columnsdata: [],
       selectedRowKeys: [],
       outPut: {
@@ -129,8 +157,8 @@ export default {
         // 查询条件的所有数据 用于导出
         let param1 = {
           tbName: "t_point_list",
-          startTime:'',
-          endTime: '',
+          startTime: "",
+          endTime: "",
         };
         const url1 = "/EchartRouter/getDwDataManage";
         axios.post(url1, param1).then((res) => {
@@ -155,9 +183,13 @@ export default {
     },
 
     async resetTime() {
-      this.startTime = "";
-      this.endTime = "";
+      this.selectindex = {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      };
       this.valueTime = ["", ""];
+      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -166,7 +198,7 @@ export default {
     },
 
     async queryTime() {
-      this.initTable()
+      this.initTable();
     },
     customRow(record, index) {
       return {
@@ -176,7 +208,7 @@ export default {
             dcbh: record.dcbh,
             xlm: record.xm,
             czm: record.czm,
-            type: 'gl'
+            type: "功率",
           });
           this.$store.dispatch("handleRightPanelVisible", true);
           this.$store.dispatch("handleLeftPanelVisible", true);
@@ -205,6 +237,9 @@ export default {
         tbName: "t_point_list",
         startTime: this.startTime,
         endTime: this.endTime,
+        xlm: this.selectindex.xlm,
+        chezhan: this.selectindex.chezhan,
+        dcbh: this.selectindex.dcbh,
       };
       const url1 = "/EchartRouter/getDwDataManage";
       axios.post(url1, param1).then((res) => {
@@ -220,10 +255,10 @@ export default {
             time: tableData[i].time,
             directionalmarker: tableData[i].directionalmarker,
             curvetype: tableData[i].curvetype,
-            totalwork: tableData[i].totalwork,
-            changerate: tableData[i].changerate,
-            offsetvalue: tableData[i].offsetvalue,
-            powervariance: tableData[i].powervariance,
+            totalwork: parseFloat(Number(tableData[i].totalwork).toFixed(2)),
+            changerate: parseFloat(Number(tableData[i].changerate).toFixed(2)),
+            offsetvalue: parseFloat(Number(tableData[i].offsetvalue).toFixed(2)),
+            powervariance: parseFloat(Number(tableData[i].powervariance).toFixed(2)),
           });
         }
       });
@@ -242,7 +277,6 @@ export default {
   cursor: pointer;
   right: 8rem;
   top: 8rem;
-  z-index: inherit;
 }
 
 .box {
@@ -256,15 +290,20 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 99;
+  z-index: 999;
 }
 
-
 .queryParam {
-  margin: 96px 16px 5rem 32rem;
+  margin: 16px 32rem;
   text-align: left;
 }
 
+
+.BtnList{
+  margin-top: 16px;
+  float: right
+}
+
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -273,7 +312,6 @@ export default {
   margin-left: 15px;
 }
 
-
 :deep(.ant-table-thead > tr > th) {
   background: rgba(11, 47, 91, 1);
   text-align: center;
@@ -314,14 +352,4 @@ export default {
 :global(.ant-table-tbody > tr.ant-table-row-selected > td) {
   background: #6b8595 !important;
 }
-
-.header > span {
-  font-size: 18px;
-  font-weight: bold;
-  margin-bottom: 10px; /* 仅在这里应用 */
-}
-
-.header {
-  height: 54px; /* 仅在这里应用 */
-}
 </style>

+ 59 - 32
src/components/TopPanel/dataManage.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="box">
-    <div class="header">工务数据</div>
     <div class="queryParam">
       <span>
         时间:
@@ -13,9 +12,35 @@
           />
         </a-space>
       </span>
-      <button class="OneButton" @click="queryTime()">查询</button>
-      <button class="OneButton" @click="resetTime()">重置</button>
-      <button class="OneButton" @click="exportAllData()">导出</button>
+      <span>
+        线名:
+        <a-input
+          v-model:value="selectindex.xlm"
+          placeholder="请输入线名"
+          style="width: 100px"
+        />
+      </span>
+      <span>
+        车站:
+        <a-input
+          v-model:value="selectindex.chezhan"
+          placeholder="请输入车站"
+          style="width: 100px"
+        />
+      </span>
+      <span>
+        道岔编号:
+        <a-input
+          v-model:value="selectindex.dcbh"
+          placeholder="请输入道岔编号"
+          style="width: 100px"
+        />
+      </span>
+      <div class="BtnList">
+        <button class="OneButton" @click="queryTime()">查询</button>
+        <button class="OneButton" @click="resetTime()">重置</button>
+        <button class="OneButton" @click="exportAllData()">导出</button>
+      </div>
     </div>
     <a-table
       :columns="columns"
@@ -210,7 +235,11 @@ export default {
   data() {
     return {
       columns,
-      selectindex: {},
+      selectindex: {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      },
       columnsdata: [],
       selectedRowKeys: [],
       startTime: "",
@@ -259,7 +288,13 @@ export default {
     async resetTime() {
       this.startTime = "";
       this.endTime = "";
+      this.selectindex = {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      };
       this.valueTime = ["", ""];
+      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -278,7 +313,7 @@ export default {
             dcbh: record.dcbh,
             xlm: record.xm,
             czm: record.czm,
-            type: "gw",
+            type: "工务",
           });
           this.$store.dispatch("handleRightPanelVisible", true);
           this.$store.dispatch("handleLeftPanelVisible", true);
@@ -287,10 +322,7 @@ export default {
       };
     },
     changeclick() {
-      this.$store.dispatch(
-        "changeshowDataManage",
-        !this.$store.state.showDataManage
-      );
+      this.$store.dispatch("changeshowDataManage", !this.$store.state.showDataManage);
     },
     compareNames(a, b) {
       var nameA = a.id;
@@ -310,6 +342,9 @@ export default {
         tbName: "t_point_list",
         startTime: this.startTime,
         endTime: this.endTime,
+        xlm: this.selectindex.xlm,
+        chezhan: this.selectindex.chezhan,
+        dcbh: this.selectindex.dcbh,
       };
       const url1 = "/EchartRouter/getDataManage";
       axios.post(url1, param1).then((res) => {
@@ -322,18 +357,18 @@ export default {
             xb: tableData[i].xingbie,
             czm: tableData[i].czm,
             dcbh: tableData[i].dcbh,
-            jgjlc: tableData[i].jgjlc,
+            jgjlc: parseFloat(Number(tableData[i].jgjlc).toFixed(2)),
             zch: tableData[i].zch,
             gxfz: tableData[i].gxfz,
             gjhy: tableData[i].gjhy,
             gjhyffz: tableData[i].gjhyffz,
             gdfz: tableData[i].gdfz,
-            cbgdfz: tableData[i].cbgdfz,
+            cbgdfz: parseFloat(Number(tableData[i].cbgdfz).toFixed(2)),
             cbgxfz: tableData[i].cbgxfz,
             cthjfz: tableData[i].cthjfz,
             cthjffz: tableData[i].cthjffz,
-            ctcjfz: tableData[i].ctcjfz,
-            ctcjffz: tableData[i].ctcjffz,
+            ctcjfz: parseFloat(Number(tableData[i].ctcjfz).toFixed(2)),
+            ctcjffz: parseFloat(Number(tableData[i].ctcjffz).toFixed(2)),
             spfz: tableData[i].spfz,
             zcx: tableData[i].zcx,
             rq: tableData[i].riqi,
@@ -365,7 +400,6 @@ export default {
   cursor: pointer;
   right: 8rem;
   top: 8rem;
-  z-index: inherit;
 }
 
 .box {
@@ -379,14 +413,19 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 99;
+  z-index: 999;
 }
 
 .queryParam {
-  margin: 96px 16px 5rem 32rem;
+  margin: 16px 32rem;
   text-align: left;
 }
 
+.BtnList{
+  margin-top: 16px;
+  float: right
+}
+
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -418,11 +457,9 @@ export default {
   color: aqua;
 }
 
-:deep(
-    .ant-table-tbody
-      > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
-      > td
-  ) {
+:deep(.ant-table-tbody
+    > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
+    > td) {
   background: #d03016;
 }
 
@@ -437,14 +474,4 @@ export default {
 :global(.ant-table-tbody > tr.ant-table-row-selected > td) {
   background: #6b8595 !important;
 }
-
-.header > span {
-  font-size: 18px;
-  font-weight: bold;
-  margin-bottom: 10px; /* 仅在这里应用 */
-}
-
-.header {
-  height: 54px; /* 仅在这里应用 */
-}
 </style>

+ 56 - 37
src/components/TopPanel/dataQkManage.vue

@@ -1,6 +1,5 @@
 <template>
   <div class="box">
-    <div class="header">缺口数据</div>
     <div class="queryParam">
       <span>
         时间:
@@ -13,9 +12,35 @@
           />
         </a-space>
       </span>
-      <button class="OneButton" @click="queryTime()">查询</button>
-      <button class="OneButton" @click="resetTime()">重置</button>
-      <button class="OneButton" @click="exportAllData()">导出</button>
+      <span>
+        线名:
+        <a-input
+          v-model:value="selectindex.xlm"
+          placeholder="请输入线名"
+          style="width: 100px"
+        />
+      </span>
+      <span>
+        车站:
+        <a-input
+          v-model:value="selectindex.chezhan"
+          placeholder="请输入车站"
+          style="width: 100px"
+        />
+      </span>
+      <span>
+        道岔编号:
+        <a-input
+          v-model:value="selectindex.dcbh"
+          placeholder="请输入道岔编号"
+          style="width: 100px"
+        />
+      </span>
+      <div class="BtnList">
+        <button class="OneButton" @click="queryTime()">查询</button>
+        <button class="OneButton" @click="resetTime()">重置</button>
+        <button class="OneButton" @click="exportAllData()">导出</button>
+      </div>
     </div>
     <a-table
       :columns="columns"
@@ -101,17 +126,15 @@ export default {
       endTime: "",
       valueTime: ["", ""],
       columns,
-      selectindex: {},
+      selectindex: {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      },
       columnsdata: [],
       selectedRowKeys: [],
       outPut: {
-        label: [
-          "线名",
-          "车站名",
-          "搬动前后变化量",
-          "过车变化量",
-          "过车前后变化量",
-        ],
+        label: ["线名", "车站名", "搬动前后变化量", "过车变化量", "过车前后变化量"],
         field: ["xianlu", "chezhan", "movechange", "change", "passchange"],
       },
     };
@@ -150,9 +173,13 @@ export default {
     },
 
     async resetTime() {
-      this.startTime = "";
-      this.endTime = "";
+      this.selectindex = {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      };
       this.valueTime = ["", ""];
+      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -171,7 +198,7 @@ export default {
             dcbh: record.dcbh,
             xlm: record.xm,
             czm: record.czm,
-            type: "qk",
+            type: "缺口",
           });
           this.$store.dispatch("handleRightPanelVisible", true);
           this.$store.dispatch("handleLeftPanelVisible", true);
@@ -180,10 +207,7 @@ export default {
       };
     },
     changeclick() {
-      this.$store.dispatch(
-        "changeshowQkDataManage",
-        !this.$store.state.showQkDataManage
-      );
+      this.$store.dispatch("changeshowQkDataManage", !this.$store.state.showQkDataManage);
     },
     compareNames(a, b) {
       var nameA = a.id;
@@ -203,6 +227,9 @@ export default {
         tbName: "t_point_list",
         startTime: this.startTime,
         endTime: this.endTime,
+        xlm: this.selectindex.xlm,
+        chezhan: this.selectindex.chezhan,
+        dcbh: this.selectindex.dcbh,
       };
       const url1 = "/EchartRouter/getQkDataManage";
       axios.post(url1, param1).then((res) => {
@@ -238,7 +265,6 @@ export default {
   cursor: pointer;
   right: 8rem;
   top: 8rem;
-  z-index: inherit;
 }
 
 .box {
@@ -252,14 +278,19 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 99;
+  z-index: 999;
 }
 
 .queryParam {
-  margin: 96px 16px 5rem 32rem;
+  margin: 16px 32rem;
   text-align: left;
 }
 
+.BtnList{
+  margin-top: 16px;
+  float: right
+}
+
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -291,11 +322,9 @@ export default {
   color: aqua;
 }
 
-:deep(
-    .ant-table-tbody
-      > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
-      > td
-  ) {
+:deep(.ant-table-tbody
+    > tr:hover:not(.ant-table-expanded-row):not(.ant-table-row-selected)
+    > td) {
   background: #d03016;
 }
 
@@ -310,14 +339,4 @@ export default {
 :global(.ant-table-tbody > tr.ant-table-row-selected > td) {
   background: #6b8595 !important;
 }
-
-.header > span {
-  font-size: 18px;
-  font-weight: bold;
-  margin-bottom: 10px; /* 仅在这里应用 */
-}
-
-.header {
-  height: 54px; /* 仅在这里应用 */
-}
 </style>