Ver código fonte

fix:查询扩展

开发 1 mês atrás
pai
commit
d3d2366908

+ 53 - 13
src/components/TopPanel/dataDwManage.vue

@@ -12,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"
@@ -41,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: "序号",
@@ -111,7 +136,11 @@ export default {
       endTime: "",
       valueTime: ["", ""],
       columns,
-      selectindex: {},
+      selectindex: {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      },
       columnsdata: [],
       selectedRowKeys: [],
       outPut: {
@@ -128,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) => {
@@ -154,9 +183,13 @@ export default {
     },
 
     async resetTime() {
-      this.startTime = "";
-      this.endTime = "";
+      this.selectindex = {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      };
       this.valueTime = ["", ""];
+      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -165,7 +198,7 @@ export default {
     },
 
     async queryTime() {
-      this.initTable()
+      this.initTable();
     },
     customRow(record, index) {
       return {
@@ -175,7 +208,7 @@ export default {
             dcbh: record.dcbh,
             xlm: record.xm,
             czm: record.czm,
-            type: 'gl'
+            type: "gl",
           });
           this.$store.dispatch("handleRightPanelVisible", true);
           this.$store.dispatch("handleLeftPanelVisible", true);
@@ -204,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) => {
@@ -257,12 +293,17 @@ export default {
   z-index: 999;
 }
 
-
 .queryParam {
   margin: 16px 32rem;
   text-align: left;
 }
 
+
+.BtnList{
+  margin-top: 16px;
+  float: right
+}
+
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -271,7 +312,6 @@ export default {
   margin-left: 15px;
 }
 
-
 :deep(.ant-table-thead > tr > th) {
   background: rgba(11, 47, 91, 1);
   text-align: center;

+ 52 - 13
src/components/TopPanel/dataManage.vue

@@ -12,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"
@@ -209,7 +235,11 @@ export default {
   data() {
     return {
       columns,
-      selectindex: {},
+      selectindex: {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      },
       columnsdata: [],
       selectedRowKeys: [],
       startTime: "",
@@ -258,7 +288,13 @@ export default {
     async resetTime() {
       this.startTime = "";
       this.endTime = "";
+      this.selectindex = {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      };
       this.valueTime = ["", ""];
+      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -286,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;
@@ -309,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) => {
@@ -385,6 +421,11 @@ export default {
   text-align: left;
 }
 
+.BtnList{
+  margin-top: 16px;
+  float: right
+}
+
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -416,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;
 }
 

+ 53 - 13
src/components/TopPanel/dataQkManage.vue

@@ -12,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"
@@ -41,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: "序号",
@@ -101,12 +126,16 @@ export default {
       endTime: "",
       valueTime: ["", ""],
       columns,
-      selectindex: {},
+      selectindex: {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      },
       columnsdata: [],
       selectedRowKeys: [],
       outPut: {
-        label: ["线名","车站名", "搬动前后变化量", "过车变化量", "过车前后变化量"],
-        field: ["xianlu", "chezhan",  "movechange", "change", "passchange"],
+        label: ["线名", "车站名", "搬动前后变化量", "过车变化量", "过车前后变化量"],
+        field: ["xianlu", "chezhan", "movechange", "change", "passchange"],
       },
     };
   },
@@ -118,8 +147,8 @@ export default {
         // 查询条件的所有数据 用于导出
         let param1 = {
           tbName: "t_point_list",
-          startTime:'',
-          endTime: '',
+          startTime: "",
+          endTime: "",
         };
         const url1 = "/EchartRouter/getQkDataManage";
         axios.post(url1, param1).then((res) => {
@@ -144,9 +173,13 @@ export default {
     },
 
     async resetTime() {
-      this.startTime = "";
-      this.endTime = "";
+      this.selectindex = {
+        xlm: "",
+        chezhan: "",
+        dcbh: "",
+      };
       this.valueTime = ["", ""];
+      this.initTable();
     },
 
     onChange(value, dateString) {
@@ -155,7 +188,7 @@ export default {
     },
 
     async queryTime() {
-      this.initTable()
+      this.initTable();
     },
     customRow(record, index) {
       return {
@@ -194,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) => {
@@ -250,6 +286,11 @@ export default {
   text-align: left;
 }
 
+.BtnList{
+  margin-top: 16px;
+  float: right
+}
+
 .OneButton {
   color: #fff;
   background-color: #00485c;
@@ -258,7 +299,6 @@ export default {
   margin-left: 15px;
 }
 
-
 :deep(.ant-table-thead > tr > th) {
   background: rgba(11, 47, 91, 1);
   text-align: center;