From 4c6f2df21a29048440a85e34dadcd4f1c75c179c Mon Sep 17 00:00:00 2001
From: zhanghua <314079846@qq.com>
Date: 星期一, 13 十一月 2023 17:32:24 +0800
Subject: [PATCH] 页面优化

---
 src/views/smoke/realTime/components/tenHourData.vue |   83 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 80 insertions(+), 3 deletions(-)

diff --git a/src/views/smoke/realTime/components/tenHourData.vue b/src/views/smoke/realTime/components/tenHourData.vue
index 17bcab3..28e89c2 100644
--- a/src/views/smoke/realTime/components/tenHourData.vue
+++ b/src/views/smoke/realTime/components/tenHourData.vue
@@ -1,13 +1,90 @@
 <template>
-  
+    <div style="width: 100%; overflow-x: scroll">
+        <el-table
+            border
+            stripe
+            ref="multipleTable"
+            :header-cell-style="{
+                background: '#F5F5F5',
+                'font-weight': '650',
+                'line-height': '45px'
+            }"
+            :data="tableData"
+            :row-class-name="tableRowClassName"
+        >
+            <el-table-column label="搴忓彿" type="index" width="60px">
+            </el-table-column>
+            <el-table-column prop="hour_str" label="鏃堕棿" min-width="150px">
+            </el-table-column>
+            <el-table-column
+                prop="emissions_conc"
+                label="娌圭儫鎶樼畻娴撳害"
+                min-width="120px"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="granule_conc"
+                label="棰楃矑鐗╂姌绠楁祿搴�"
+                min-width="120px"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="hydrocarbon_conc"
+                label="闈炵敳鐑锋姌绠楁祿搴�"
+                min-width="95px"
+            >
+            </el-table-column>
+            <el-table-column
+                prop="status_str"
+                label="鎺掓斁鐘舵��"
+                min-width="180px"
+            >
+            </el-table-column>
+        </el-table>
+    </div>
 </template>
 
 <script>
+import statisticsApi from "@/api/smoke/statistics";
 export default {
+    data() {
+        return {
+            tableData: []
+        }
+    },
 
+    created() {
+        this.getData();
+    },
+    methods: {
+        getData() {
+            let param = {
+                field: "tenHourData",
+                localeId: this.inTimeData.Lid
+            }
+            statisticsApi.getDocument(param).then(jsonStr => {
+                const res = JSON.parse(jsonStr)
+                let list = res.Data.list
+                list.forEach(o => {
+                    o.hour_str = o.hour + '-' + (o.hour + 1) + '鐐�'
+                    o.status_str = o.status == '0' ? '杈炬爣' : '瓒呮爣'
+                    o.status = '杈炬爣'
+                });
+                this.tableData = list
+            })
+
+        },
+        // 璁剧疆琛ㄦ牸鏂戦┈绾�
+        tableRowClassName({ row, rowIndex }) {
+            if ((rowIndex + 1) % 2 === 0) {
+                return "warning-row";
+            } else {
+                return "success-row";
+            }
+        },
+    },
+    props: ['inTimeData']
 }
 </script>
-
 <style>
-
 </style>
\ No newline at end of file

--
Gitblit v1.8.0