Explorar o código

修复温湿度采集bug

ZaiZai hai 11 meses
pai
achega
3f2f6d98a3

+ 1 - 1
public/version.json

@@ -1,3 +1,3 @@
 {
-  "value": "20240826162113"
+  "value": "20240826164024"
 }

+ 9 - 3
src/views/tentative/acquisition/model/equipment-data.vue

@@ -46,7 +46,7 @@
                             <span>返回</span>
                         </el-button>
                     </template>
-                    <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :is-index="false" :is-current-row="false" />
+                    <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :is-current-row="false" />
                 </hc-card>
             </div>
         </div>
@@ -165,8 +165,14 @@ const setDeviceData = ({ temperature, humidity }) => {
 //搜索表单
 const searchForm = ref({ nodeId: -1, startTime: '', endTime: '', deviceAddr: null })
 const searchClick = () => {
-    getDateTime()
-    getTableData()
+    const arr = dateTimeArr.value
+    if (arr.length < 2) {
+        getDateTime()
+    } else {
+        searchForm.value.startTime = arr[0]
+        searchForm.value.endTime = arr[1]
+        getTableData()
+    }
 }
 
 //历史记录表格