Procházet zdrojové kódy

1. 历史组件样式修改边距
2. 注氮、压风历史组件退回到第一版本

hongrunxia před 9 měsíci
rodič
revize
d85eda995b

+ 1 - 0
src/views/vent/monitorManager/comment/HistoryTable.vue

@@ -108,6 +108,7 @@
       return props.columnsType;
     },
     async (newVal) => {
+      debugger;
       if (!newVal) return;
       if (historyTable.value) getForm().resetFields();
       await getDeviceList();

+ 4 - 4
src/views/vent/monitorManager/compressor/components/nitrogenHistory.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="nitrogen-history">
-    <!-- <HistoryTable columns-type="nitrogen" device-type="nitrogen" :sys-id="deviceId" designScope="nitrogen_auto_history" :scroll="{ y: 650 }" /> -->
-    <HistoryTable device-code="nitrogen" dict-code="nitrogen_dict" columns-code="nitrogen_auto_history" />
+    <HistoryTable columns-type="nitrogen" device-type="nitrogen" :sys-id="deviceId" designScope="nitrogen_auto_history" :scroll="{ y: 650 }" />
+    <!-- <HistoryTable device-code="nitrogen" dict-code="nitrogen_dict" columns-code="nitrogen_auto_history" /> -->
   </div>
 </template>
 <script setup lang="ts">
-  // import HistoryTable from '../../comment/HistoryTable.vue';
-  import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
+  import HistoryTable from '../../comment/HistoryTable.vue';
+  // import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
   const props = defineProps({
     deviceType: {
       type: String,

+ 5 - 4
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -649,14 +649,15 @@ async function getDataSource() {
             }
           } else {
             let tableData: any[] = []
-            data.forEach(el => {
+            let noNetData: any[] = []
+            data.filter(el => {
               if (el.netStatus == 1) {
-                tableData.splice(0, 0, el);
+                tableData.push(el)
               } else {
-                tableData.push(el);
+                noNetData.push(el)
               }
             })
-            dataSource.value = tableData.reverse()
+            dataSource.value = [...tableData, ...noNetData]
           }
         } else {
           dataSource.value = []

+ 14 - 3
src/views/vent/monitorManager/deviceMonitor/components/device/modal/bundle.modal.vue

@@ -203,13 +203,24 @@
       //获取历史数据
       async function getListdays() {
         if (posMonitor.value.stationtype && posMonitor.value.stationtype != 'redis') {
-          const ttime_begin = dayjs(new Date().getTime() - 3 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD hh:mm:ss');
-          const ttime_end = dayjs(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss');
+          // const ttime_begin = dayjs(new Date().getTime() - 3 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD hh:mm:ss');
+          // const ttime_end = dayjs(new Date().getTime()).format('YYYY-MM-DD hh:mm:ss');
+          const ttime_begin = dayjs().startOf('date').format('YYYY-MM-DD hh:mm:ss');
+          const ttime_end = dayjs().format('YYYY-MM-DD hh:mm:ss');
           const pageNo = 1;
           const pageSize = 100;
           const skip = 8;
           const strtype = posMonitor.value.deviceType;
-          let res = await listdays({ ttime_begin, ttime_end, pageNo, pageSize, skip, strtype, gdeviceid: activeDeviceID.value });
+          let res = await listdays({
+            ttime_begin,
+            ttime_end,
+            pageNo,
+            pageSize,
+            skip,
+            strtype,
+            column: 'createTime',
+            gdeviceid: activeDeviceID.value,
+          });
           console.log(res, '束管历史数据');
           let data = res.datalist.records;
           if (data.length != 0) {

+ 4 - 3
src/views/vent/monitorManager/nitrogen/components/nitrogenHistory.vue

@@ -1,11 +1,12 @@
 <template>
   <div class="nitrogen-history">
-    <HistoryTable columns-type="forcFan" device-type="forcFan" designScope="forcFan_history" />
-    <!-- <HistoryTable device-code="forcFan" dict-code="forcFan_dict" columns-code="forcFan_history" /> -->
+    <!-- <HistoryTable columns-type="forcFan" device-type="forcFan" designScope="forcFan_history" /> -->
+    <HistoryTable device-code="forcFan" dict-code="forcFan_dict" columns-code="forcFan_history" />
   </div>
 </template>
 <script setup lang="ts">
-  import HistoryTable from '/@/views/vent/monitorManager/comment/HistoryTable.vue';
+  // import HistoryTable from '/@/views/vent/monitorManager/comment/HistoryTable.vue';
+  import HistoryTable from '/@/views/vent/comment/history/HistoryTable.vue';
 </script>
 <style lang="less" scoped>
   .nitrogen-history {