LAPTOP-PVOO9257\Lenovo пре 1 месец
родитељ
комит
e15b31a4f6

+ 32 - 60
src/components/TopPanel/dataDwManage.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="box">
+    <div class="header">功率数据</div>
     <div class="queryParam">
       <span>
         时间:
@@ -12,35 +13,9 @@
           />
         </a-space>
       </span>
-      <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>
+      <button class="OneButton" @click="queryTime()">查询</button>
+      <button class="OneButton" @click="resetTime()">重置</button>
+      <button class="OneButton" @click="exportAllData()">导出</button>
     </div>
     <a-table
       :columns="columns"
@@ -67,6 +42,7 @@ import axios from "@/utils/axios.js";
 import * as moment from "moment";
 import { export_json_to_excel } from "@/utils/vendor/Export2Excel";
 
+
 const columns = [
   {
     title: "序号",
@@ -136,11 +112,7 @@ export default {
       endTime: "",
       valueTime: ["", ""],
       columns,
-      selectindex: {
-        xlm: "",
-        chezhan: "",
-        dcbh: "",
-      },
+      selectindex: {},
       columnsdata: [],
       selectedRowKeys: [],
       outPut: {
@@ -157,8 +129,8 @@ export default {
         // 查询条件的所有数据 用于导出
         let param1 = {
           tbName: "t_point_list",
-          startTime: "",
-          endTime: "",
+          startTime:'',
+          endTime: '',
         };
         const url1 = "/EchartRouter/getDwDataManage";
         axios.post(url1, param1).then((res) => {
@@ -183,13 +155,9 @@ export default {
     },
 
     async resetTime() {
-      this.selectindex = {
-        xlm: "",
-        chezhan: "",
-        dcbh: "",
-      };
+      this.startTime = "";
+      this.endTime = "";
       this.valueTime = ["", ""];
-      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -198,7 +166,7 @@ export default {
     },
 
     async queryTime() {
-      this.initTable();
+      this.initTable()
     },
     customRow(record, index) {
       return {
@@ -208,7 +176,7 @@ export default {
             dcbh: record.dcbh,
             xlm: record.xm,
             czm: record.czm,
-            type: "功率",
+            type: 'gl'
           });
           this.$store.dispatch("handleRightPanelVisible", true);
           this.$store.dispatch("handleLeftPanelVisible", true);
@@ -237,16 +205,13 @@ 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) => {
         console.log(res);
         let tableData = res.rows.sort(this.compareNames);
 
-        for (let i = 1; i < tableData.length; i++) {
+        for (let i = 0; i < tableData.length; i++) {
           this.columnsdata.push({
             id: i,
             xm: tableData[i].xianlu,
@@ -255,10 +220,10 @@ export default {
             time: tableData[i].time,
             directionalmarker: tableData[i].directionalmarker,
             curvetype: tableData[i].curvetype,
-            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)),
+            totalwork: tableData[i].totalwork,
+            changerate: tableData[i].changerate,
+            offsetvalue: tableData[i].offsetvalue,
+            powervariance: tableData[i].powervariance,
           });
         }
       });
@@ -277,6 +242,7 @@ export default {
   cursor: pointer;
   right: 8rem;
   top: 8rem;
+  z-index: inherit;
 }
 
 .box {
@@ -290,20 +256,15 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 999;
+  z-index: 99;
 }
 
+
 .queryParam {
-  margin: 16px 32rem;
+  margin: 96px 16px 5rem 32rem;
   text-align: left;
 }
 
-
-.BtnList{
-  margin-top: 16px;
-  float: right
-}
-
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -312,6 +273,7 @@ export default {
   margin-left: 15px;
 }
 
+
 :deep(.ant-table-thead > tr > th) {
   background: rgba(11, 47, 91, 1);
   text-align: center;
@@ -352,4 +314,14 @@ 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>

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

@@ -1,5 +1,6 @@
 <template>
   <div class="box">
+    <div class="header">工务数据</div>
     <div class="queryParam">
       <span>
         时间:
@@ -12,35 +13,9 @@
           />
         </a-space>
       </span>
-      <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>
+      <button class="OneButton" @click="queryTime()">查询</button>
+      <button class="OneButton" @click="resetTime()">重置</button>
+      <button class="OneButton" @click="exportAllData()">导出</button>
     </div>
     <a-table
       :columns="columns"
@@ -235,11 +210,7 @@ export default {
   data() {
     return {
       columns,
-      selectindex: {
-        xlm: "",
-        chezhan: "",
-        dcbh: "",
-      },
+      selectindex: {},
       columnsdata: [],
       selectedRowKeys: [],
       startTime: "",
@@ -288,13 +259,7 @@ export default {
     async resetTime() {
       this.startTime = "";
       this.endTime = "";
-      this.selectindex = {
-        xlm: "",
-        chezhan: "",
-        dcbh: "",
-      };
       this.valueTime = ["", ""];
-      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -313,7 +278,7 @@ export default {
             dcbh: record.dcbh,
             xlm: record.xm,
             czm: record.czm,
-            type: "工务",
+            type: "gw",
           });
           this.$store.dispatch("handleRightPanelVisible", true);
           this.$store.dispatch("handleLeftPanelVisible", true);
@@ -322,7 +287,10 @@ 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;
@@ -342,9 +310,6 @@ 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) => {
@@ -357,18 +322,18 @@ export default {
             xb: tableData[i].xingbie,
             czm: tableData[i].czm,
             dcbh: tableData[i].dcbh,
-            jgjlc: parseFloat(Number(tableData[i].jgjlc).toFixed(2)),
+            jgjlc: tableData[i].jgjlc,
             zch: tableData[i].zch,
             gxfz: tableData[i].gxfz,
             gjhy: tableData[i].gjhy,
             gjhyffz: tableData[i].gjhyffz,
             gdfz: tableData[i].gdfz,
-            cbgdfz: parseFloat(Number(tableData[i].cbgdfz).toFixed(2)),
+            cbgdfz: tableData[i].cbgdfz,
             cbgxfz: tableData[i].cbgxfz,
             cthjfz: tableData[i].cthjfz,
             cthjffz: tableData[i].cthjffz,
-            ctcjfz: parseFloat(Number(tableData[i].ctcjfz).toFixed(2)),
-            ctcjffz: parseFloat(Number(tableData[i].ctcjffz).toFixed(2)),
+            ctcjfz: tableData[i].ctcjfz,
+            ctcjffz: tableData[i].ctcjffz,
             spfz: tableData[i].spfz,
             zcx: tableData[i].zcx,
             rq: tableData[i].riqi,
@@ -400,6 +365,7 @@ export default {
   cursor: pointer;
   right: 8rem;
   top: 8rem;
+  z-index: inherit;
 }
 
 .box {
@@ -413,19 +379,14 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 999;
+  z-index: 99;
 }
 
 .queryParam {
-  margin: 16px 32rem;
+  margin: 96px 16px 5rem 32rem;
   text-align: left;
 }
 
-.BtnList{
-  margin-top: 16px;
-  float: right
-}
-
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -457,9 +418,11 @@ 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;
 }
 
@@ -474,4 +437,14 @@ 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>

+ 38 - 57
src/components/TopPanel/dataQkManage.vue

@@ -1,5 +1,6 @@
 <template>
   <div class="box">
+    <div class="header">缺口数据</div>
     <div class="queryParam">
       <span>
         时间:
@@ -12,35 +13,9 @@
           />
         </a-space>
       </span>
-      <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>
+      <button class="OneButton" @click="queryTime()">查询</button>
+      <button class="OneButton" @click="resetTime()">重置</button>
+      <button class="OneButton" @click="exportAllData()">导出</button>
     </div>
     <a-table
       :columns="columns"
@@ -126,15 +101,17 @@ export default {
       endTime: "",
       valueTime: ["", ""],
       columns,
-      selectindex: {
-        xlm: "",
-        chezhan: "",
-        dcbh: "",
-      },
+      selectindex: {},
       columnsdata: [],
       selectedRowKeys: [],
       outPut: {
-        label: ["线名", "车站名", "搬动前后变化量", "过车变化量", "过车前后变化量"],
+        label: [
+          "线名",
+          "车站名",
+          "搬动前后变化量",
+          "过车变化量",
+          "过车前后变化量",
+        ],
         field: ["xianlu", "chezhan", "movechange", "change", "passchange"],
       },
     };
@@ -173,13 +150,9 @@ export default {
     },
 
     async resetTime() {
-      this.selectindex = {
-        xlm: "",
-        chezhan: "",
-        dcbh: "",
-      };
+      this.startTime = "";
+      this.endTime = "";
       this.valueTime = ["", ""];
-      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -198,7 +171,7 @@ export default {
             dcbh: record.dcbh,
             xlm: record.xm,
             czm: record.czm,
-            type: "缺口",
+            type: "qk",
           });
           this.$store.dispatch("handleRightPanelVisible", true);
           this.$store.dispatch("handleLeftPanelVisible", true);
@@ -207,7 +180,10 @@ 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;
@@ -227,16 +203,13 @@ 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) => {
         console.log(res);
         let tableData = res.rows.sort(this.compareNames);
 
-        for (let i = 1; i < tableData.length; i++) {
+        for (let i = 0; i < tableData.length; i++) {
           this.columnsdata.push({
             id: i,
             xm: tableData[i].xianlu,
@@ -265,6 +238,7 @@ export default {
   cursor: pointer;
   right: 8rem;
   top: 8rem;
+  z-index: inherit;
 }
 
 .box {
@@ -278,19 +252,14 @@ export default {
   margin-top: 10%;
   left: 25%;
   position: absolute;
-  z-index: 999;
+  z-index: 99;
 }
 
 .queryParam {
-  margin: 16px 32rem;
+  margin: 96px 16px 5rem 32rem;
   text-align: left;
 }
 
-.BtnList{
-  margin-top: 16px;
-  float: right
-}
-
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -322,9 +291,11 @@ 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;
 }
 
@@ -339,4 +310,14 @@ 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>