Browse Source

表格错位

蒋科 2 months ago
parent
commit
af2aee46a6

+ 13 - 1
src/views/manage-log/battery-charger.vue

@@ -328,6 +328,7 @@ export default {
             )
           );
           this.logheader = differenceABSet;
+
         }
         this.getchargerList();
       } else {
@@ -362,12 +363,23 @@ export default {
         if (valid) {
           let addParams = {
             exportName: this.ruleForm.exportName,
-            signals: this.robotValue,
+            signals: [],
             deviceNo: this.queryParams.deviceNo,
             startTime: this.queryParams.startTime,
             endTime: this.queryParams.endTime,
             exportLogType: 2,
           };
+          let differenceABSet = Array.from(
+            new Set(
+              [...this.logOptions].filter((x) =>
+                this.robotValue.includes(x.alarmCode)
+              )
+            )
+          );
+          const curArray=[...differenceABSet]
+          curArray.map(item=>{
+            addParams.signals.push(item.alarmCode)
+          })
           exportFile(addParams).then((res) => {
             console.log(res);
             if (res.code === 0) {

+ 17 - 6
src/views/manage-log/bms.vue

@@ -116,9 +116,9 @@
             fixed
             width="150"
           >
-         
+
           </el-table-column>
-        
+
           <el-table-column
             v-for="log in logheader"
             :key="log.alarmCode"
@@ -246,7 +246,7 @@ export default {
         column.label,
       ]);
     },
-   
+
     selectAll() {
       if (this.robotValue.length < this.logOptions.length) {
         this.robotValue = [];
@@ -371,12 +371,23 @@ export default {
         if (valid) {
           let addParams = {
             exportName: this.ruleForm.exportName,
-            signals: this.robotValue,
+            signals: [],
             sn: this.queryParams.sn,
             startTime: this.queryParams.startTime,
             endTime: this.queryParams.endTime,
             exportLogType: 3,
           };
+          let differenceABSet = Array.from(
+            new Set(
+              [...this.logOptions].filter((x) =>
+                this.robotValue.includes(x.alarmCode)
+              )
+            )
+          );
+          const curArray=[...differenceABSet]
+          curArray.map(item=>{
+            addParams.signals.push(item.alarmCode)
+          })
           exportFile(addParams).then((res) => {
             console.log(res);
             if (res.code === 0) {
@@ -411,12 +422,12 @@ export default {
         width: 5px !important;
     }
 }
- 
+
 
 ::v-deep .el-table__header colgroup col[name="gutter"] {
     display: table-cell !important;
 }
- 
+
 ::v-deep .el-table__body{
   width: 100% !important;
 }

+ 12 - 1
src/views/manage-log/order-charger.vue

@@ -362,12 +362,23 @@ export default {
         if (valid) {
           let addParams = {
             exportName: this.ruleForm.exportName,
-            signals: this.robotValue,
+            signals: [],
             deviceNo: this.queryParams.deviceNo,
             startTime: this.queryParams.startTime,
             endTime: this.queryParams.endTime,
             exportLogType: 4,
           };
+          let differenceABSet = Array.from(
+            new Set(
+              [...this.logOptions].filter((x) =>
+                this.robotValue.includes(x.field)
+              )
+            )
+          );
+          const curArray=[...differenceABSet]
+          curArray.map(item=>{
+            addParams.signals.push(item.field)
+          })
           exportFile(addParams).then((res) => {
             console.log(res);
             if (res.code === 0) {

+ 17 - 6
src/views/manage-log/robot.vue

@@ -202,7 +202,7 @@ export default {
         column.label,
       ]);
     },
-  
+
     selectAll() {
       if (this.robotValue.length < this.logOptions.length) {
         this.robotValue = [];
@@ -342,11 +342,22 @@ export default {
         if (valid) {
           let addParams = {
             exportName: this.ruleForm.exportName,
-            signals: this.robotValue,
+            signals: [],
             startTime: this.queryParams.startTime,
             endTime: this.queryParams.endTime,
             exportLogType: 1,
           };
+          let differenceABSet = Array.from(
+            new Set(
+              [...this.logOptions].filter((x) =>
+                this.robotValue.includes(x.alarmCode)
+              )
+            )
+          );
+          const curArray=[...differenceABSet]
+          curArray.map(item=>{
+            addParams.signals.push(item.alarmCode)
+          })
           exportFile(addParams).then((res) => {
             if (res.code === 0) {
               this.dialogExportVisible = false;
@@ -392,12 +403,12 @@ export default {
         width: 5px !important;
     }
 }
- 
+
 
 ::v-deep .el-table__header colgroup col[name="gutter"] {
     display: table-cell !important;
 }
- 
+
 ::v-deep .el-table__body{
   width: 100% !important;
 }
@@ -406,7 +417,7 @@ export default {
 }
 /* .serch{
   min-width: 70px;
-  width: 70px; 
-  height: 40px; 
+  width: 70px;
+  height: 40px;
 } */
 </style>