wyd 1 year ago
parent
commit
c1638a7c1b
2 changed files with 8 additions and 8 deletions
  1. 6 6
      src/views/DeviceStatus.vue
  2. 2 2
      src/views/WarnSet/WarnSetModal.vue

+ 6 - 6
src/views/DeviceStatus.vue

@@ -164,8 +164,8 @@ export default {
       tableData: [],
       formData: {
         dateRange: [
-          moment().subtract(1, 'days').valueOf(),
-          moment().valueOf()
+          // moment().subtract(1, 'days').valueOf(),
+          // moment().valueOf()
         ],
       },
       pickerOptions: {
@@ -436,15 +436,15 @@ export default {
         }
       })
       this.formData.dateRange = [
-          moment().subtract(1, 'days').valueOf(),
-          moment().valueOf()
+          // moment().subtract(1, 'days').valueOf(),
+          // moment().valueOf()
       ]
     },
     fetchTableData() {
       findDeviceRunRecord({
         collectEntityId: this.collectEntityId,
-        startTime: this.formData.dateRange[0].valueOf(),
-        endTime: this.formData.dateRange[1].valueOf(),
+        startTime: this.formData.dateRange && this.formData.dateRange.length > 0 && this.formData.dateRange[0].valueOf() || null,
+        endTime: this.formData.dateRange && this.formData.dateRange.length > 0 && this.formData.dateRange[1].valueOf() || null,
         current: this.paginationOption.currentPage,
         pageSize: this.paginationOption.pageSize,
       }).then(res => {

+ 2 - 2
src/views/WarnSet/WarnSetModal.vue

@@ -45,7 +45,7 @@
           align="center"
         >
           <template slot-scope="scope">
-            <div v-if="rowId === scope.row.id && scope.row[item.prop + 'warnMinValue'] >= 0">
+            <div v-if="rowId === scope.row.id">
               <el-input v-model="scope.row[item.prop + 'warnMinValue']"/>
             </div>
             <div v-else>{{ scope.row[item.prop + 'warnMinValue'] }}</div>
@@ -57,7 +57,7 @@
           align="center"
         >
           <template slot-scope="scope">
-            <div v-if="rowId === scope.row.id && scope.row[item.prop + 'warnMaxValue'] >= 0">
+            <div v-if="rowId === scope.row.id">
               <el-input v-model="scope.row[item.prop + 'warnMaxValue']"/>
             </div>
             <div v-else>{{ scope.row[item.prop + 'warnMaxValue'] }}</div>